From: Steve Sutton Date: Thu, 21 Dec 2017 18:34:26 +0000 (-0500) Subject: Update dbversion and work on invoice. X-Git-Tag: v1.0.0^2~187 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=d9db49d45b605343f4e22d9c2ff102fe633f8075;p=WP-Plugins%2Fglm-member-db-billing.git Update dbversion and work on invoice. Working on printable invoices. Adding new total field to the line items table. To be used for holding the amount times the qty. --- diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 3df6d56..2eb965f 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -457,7 +457,7 @@ class GlmBillingSupport // echo '
$invoice: ' . print_r( $invoice, true ) . '
'; $line_items = $this->getLineItemsForInvoice( $invoice_id ); // echo '
$line_items: ' . print_r( $line_items, true ) . '
'; - // echo '
$this->config: ' . print_r( $this->config['settings'], true ) . '
'; + // echo '
$this->config: ' . print_r( $this->config, true ) . '
'; $account = $this->getAccountById( $invoice['account'] ); // echo '
$account: ' . print_r( $account, true ) . '
'; diff --git a/index.php b/index.php index 3546b29..3e0f1b9 100644 --- a/index.php +++ b/index.php @@ -38,7 +38,7 @@ * version from this plugin. */ define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '0.0.1'); -define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.4'); +define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.5'); // This is the minimum version of the GLM Members DB plugin require for this plugin. define('GLM_MEMBERS_BILLING_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0'); diff --git a/models/admin/billing/invoices.php b/models/admin/billing/invoices.php index e834ea6..0e6903c 100644 --- a/models/admin/billing/invoices.php +++ b/models/admin/billing/invoices.php @@ -173,6 +173,7 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices 'name' => $_REQUEST['line_item_name'][$line_item], 'amount' => $_REQUEST['line_item_amount'][$line_item], 'quantity' => $_REQUEST['line_item_qty'][$line_item], + 'total' => (float)$_REQUEST['line_item_qty'][$line_item] * (float)$_REQUEST['line_item_amount'][$line_item], ), array( '%d', @@ -180,6 +181,7 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices '%s', '%s', '%d', + '%d' ) ); } @@ -257,7 +259,7 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices break; case 'delete': - // Need to remove any line items for the invoice alse + // Need to remove any line items for the invoice also // $invoices = $this->deleteTransactions($this->invoice_id); if ($invoices) { diff --git a/setup/databaseScripts/create_database_V0.0.4.sql b/setup/databaseScripts/create_database_V0.0.4.sql deleted file mode 100644 index 83b78c2..0000000 --- a/setup/databaseScripts/create_database_V0.0.4.sql +++ /dev/null @@ -1,214 +0,0 @@ --- Gaslight Media Billing Module --- File Created: 11/08/2017 --- Database Version: 0.0.3 --- Database Creation Script --- --- To permit each query below to be executed separately, --- all queries must be separated by a line with four dashes --- --- **** BE SURE TO ALSO UPDATE drop_database_Vxxx.sql FILE WHEN CHANGING TABLES **** --- - --- Billing Accounts -CREATE TABLE {prefix}accounts ( - id INT NOT NULL AUTO_INCREMENT, - ref_dest INT NOT NULL, -- reference to member id - ref_name TINYTEXT NOT NULL, -- Name of reference member - billing_addr1 TINYTEXT NULL, -- Billing Address 1 - billing_addr2 TINYTEXT NULL, -- Billing Address 2 - billing_city TINYTEXT NULL, -- Billing City - billing_state TINYTEXT NULL, -- Billing State - billing_zip TINYTEXT NULL, -- Billing Zip - billing_phone TINYTEXT NULL, -- Billing Phone - anniversary_date DATE NOT NULL, -- anniversary date - used for main invoice generation - payment_data TEXT NULL, -- stored payment data - email TINYTEXT NULL, -- billing email - PRIMARY KEY (id) -); - ----- - --- transactions -CREATE TABLE {prefix}transactions ( - id INT NOT NULL AUTO_INCREMENT, - type INT NOT NULL, -- type of transaction (payment,invoice,etc) - type_id INT NOT NULL, -- reference to type id - account INT NOT NULL, -- reference to account id - transaction_time DATETIME NOT NULL, -- datetime for the transaction - current_invoice_total DECIMAL(8, 2) NOT NULL, -- invoice total - current_payment_total DECIMAL(8, 2) NOT NULL, -- payment total - PRIMARY KEY (id) -); - ----- - --- Invoices -CREATE TABLE {prefix}invoices ( - id INT NOT NULL AUTO_INCREMENT, - transaction_time DATETIME NOT NULL, -- datetime for the invoice - account INT NOT NULL, -- ref to account id - amount_total DECIMAL(8, 2) NOT NULL, -- total amount for invoice - balance DECIMAL(8, 2) NOT NULL, -- balance for this invoice - due_date DATE NOT NULL, -- Due date for this invoice - paid BOOLEAN DEFAULT '0', -- true/false if invoice is paid - notes TINYTEXT, -- notes for this invoice - recurring BOOLEAN DEFAULT '0', -- true/false if recurring - recurrence INT NULL DEFAULT 0, -- recurrence type - PRIMARY KEY (id) -); - ----- - --- Line Item Types -CREATE TABLE {prefix}invoice_types ( - id INT NOT NULL AUTO_INCREMENT, - name TINYTEXT NOT NULL, -- name - parent INT NOT NULL DEFAULT 0, -- 0 if top level otherwise ref to another line_item_type as it's parent - amount DECIMAL(8,2) NOT NULL DEFAULT '0.00', -- amount - recurring BOOLEAN DEFAULT '0', -- true/false if recurring - recurrence INT NULL DEFAULT 0, -- recurrence type - PRIMARY KEY (id) -); - ----- - --- Line Items -CREATE TABLE {prefix}line_items ( - id INT NOT NULL AUTO_INCREMENT, - invoice INT NOT NULL, -- reference to invoice - line_item_type INT NOT NULL, -- reference to line item type - name TEXT NOT NULL, -- line item name - amount DECIMAL(8,2) DEFAULT '0.00', -- line item amount per item - quantity INT DEFAULT 1, -- quantity - recurring BOOLEAN DEFAULT '0', -- true/false if recurring - recurrence INT NULL DEFAULT 0, -- recurrence type - PRIMARY KEY (id) -); - ----- - --- payments -CREATE TABLE {prefix}payments ( - id INT NOT NULL AUTO_INCREMENT, - transaction_time DATETIME NOT NULL, -- datetime of payment - account INT NOT NULL, -- ref to account table - amount DECIMAL(8, 2) NOT NULL, -- payment amount - payment_method TINYTEXT NOT NULL, -- payment method - payment_data TINYTEXT NULL, -- additional payment info - PRIMARY KEY (id) -); - ----- - --- pdfs -CREATE TABLE {prefix}pdfs ( - id INT NOT NULL AUTO_INCREMENT, - ref_type INT NOT NULL, -- reference type - ref_dest INT NOT NULL, -- reference types id - pdf MEDIUMTEXT NOT NULL, -- saved pdf - PRIMARY KEY (id) -); - ----- - --- Notification Types -CREATE TABLE {prefix}notification_types ( - id INT NOT NULL AUTO_INCREMENT, - name TINYTEXT NOT NULL, -- name - from_header TINYTEXT NOT NULL, -- from headers - replyto TINYTEXT NULL, -- reply-to headers - subject TINYTEXT NOT NULL, -- Subject - message TEXT NOT NULL, -- Message - send_by_date BOOLEAN NULL DEFAULT '0', -- true/false send by date based on due date - send_by_action BOOLEAN NULL DEFAULT '0', -- send notice based on an action - send_action INT NULL DEFAULT 0, -- (create invoice or receive payment) - send_date_number INT NULL DEFAULT 0, -- number to apply to send by date - send_date_period INT NULL DEFAULT 0, -- (days,weeks,months,years) - send_date_when INT NULL DEFAULT 0, -- (before or after) - PRIMARY KEY (id) -); - ----- - --- Notifications -CREATE TABLE {prefix}notifications ( - id INT NOT NULL AUTO_INCREMENT, - notification_type INT NOT NULL, -- ref to notification type - account INT NOT NULL, -- ref to account - from_replyto TINYTEXT NOT NULL, -- from reply-to header - subject TEXT NOT NULL, -- subject - message TEXT NOT NULL, -- message - date_sent DATETIME NOT NULL, -- Date the notice was sent - email_sent TINYTEXT NOT NULL, -- email used - PRIMARY KEY (id) -); - ----- - --- Gateway Settings -CREATE TABLE {prefix}gateway_settings ( - id INT NOT NULL AUTO_INCREMENT, - name TEXT NOT NULL, - login_id TINYTEXT NOT NULL, - transaction_key TINYTEXT NOT NULL, - PRIMARY KEY (id) -); - ----- - --- Settings -CREATE TABLE {prefix}settings ( - id INT NOT NULL AUTO_INCREMENT, - company_logo TINYTEXT NULL, - company_logo_height INT NULL, - company_name TINYTEXT NULL, - company_name2 TINYTEXT NULL, - company_addr1 TINYTEXT NULL, - company_addr2 TINYTEXT NULL, - company_city TINYTEXT NULL, - company_state TINYTEXT NULL, - company_zip TINYTEXT NULL, - company_phone TINYTEXT NULL, - company_email TINYTEXT NULL, - company_url TINYTEXT NULL, - PRIMARY KEY (id) -); - ----- - --- Set default billing Settings entry -INSERT INTO {prefix}settings - ( id ) - VALUES - ( 1 ); - ----- - --- Management -CREATE TABLE {prefix}management ( - id INT NOT NULL AUTO_INCREMENT, - payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini - proc_methods SMALLINT NULL, -- Creadit Cart payment processing methods available - Bitmap - see proc_method in plugin.ini - cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini - -- Authorize.net Credentials - authorize_net_login TINYTEXT NULL, - authorize_net_key TINYTEXT NULL, - authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini - authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net - authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail - -- Merchant Solutions Credentials - merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials - merchant_solutions_merchantpin TINYTEXT NULL, - merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini - merchant_solutions_conf BOOLEAN NULL, -- Flag to send payment confirmation Email - merchant_solutions_merchant_email TINYTEXT NULL, -- Merchant Solutions will send copy of confirmation E-Mail - PRIMARY KEY (id) -); - ----- - --- Set default billing Management entry -INSERT INTO {prefix}management - ( id ) - VALUES - ( 1 ); diff --git a/setup/databaseScripts/create_database_V0.0.5.sql b/setup/databaseScripts/create_database_V0.0.5.sql new file mode 100644 index 0000000..791c908 --- /dev/null +++ b/setup/databaseScripts/create_database_V0.0.5.sql @@ -0,0 +1,215 @@ +-- Gaslight Media Billing Module +-- File Created: 11/08/2017 +-- Database Version: 0.0.3 +-- Database Creation Script +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes +-- +-- **** BE SURE TO ALSO UPDATE drop_database_Vxxx.sql FILE WHEN CHANGING TABLES **** +-- + +-- Billing Accounts +CREATE TABLE {prefix}accounts ( + id INT NOT NULL AUTO_INCREMENT, + ref_dest INT NOT NULL, -- reference to member id + ref_name TINYTEXT NOT NULL, -- Name of reference member + billing_addr1 TINYTEXT NULL, -- Billing Address 1 + billing_addr2 TINYTEXT NULL, -- Billing Address 2 + billing_city TINYTEXT NULL, -- Billing City + billing_state TINYTEXT NULL, -- Billing State + billing_zip TINYTEXT NULL, -- Billing Zip + billing_phone TINYTEXT NULL, -- Billing Phone + anniversary_date DATE NOT NULL, -- anniversary date - used for main invoice generation + payment_data TEXT NULL, -- stored payment data + email TINYTEXT NULL, -- billing email + PRIMARY KEY (id) +); + +---- + +-- transactions +CREATE TABLE {prefix}transactions ( + id INT NOT NULL AUTO_INCREMENT, + type INT NOT NULL, -- type of transaction (payment,invoice,etc) + type_id INT NOT NULL, -- reference to type id + account INT NOT NULL, -- reference to account id + transaction_time DATETIME NOT NULL, -- datetime for the transaction + current_invoice_total DECIMAL(8, 2) NOT NULL, -- invoice total + current_payment_total DECIMAL(8, 2) NOT NULL, -- payment total + PRIMARY KEY (id) +); + +---- + +-- Invoices +CREATE TABLE {prefix}invoices ( + id INT NOT NULL AUTO_INCREMENT, + transaction_time DATETIME NOT NULL, -- datetime for the invoice + account INT NOT NULL, -- ref to account id + amount_total DECIMAL(8, 2) NOT NULL, -- total amount for invoice + balance DECIMAL(8, 2) NOT NULL, -- balance for this invoice + due_date DATE NOT NULL, -- Due date for this invoice + paid BOOLEAN DEFAULT '0', -- true/false if invoice is paid + notes TINYTEXT, -- notes for this invoice + recurring BOOLEAN DEFAULT '0', -- true/false if recurring + recurrence INT NULL DEFAULT 0, -- recurrence type + PRIMARY KEY (id) +); + +---- + +-- Line Item Types +CREATE TABLE {prefix}invoice_types ( + id INT NOT NULL AUTO_INCREMENT, + name TINYTEXT NOT NULL, -- name + parent INT NOT NULL DEFAULT 0, -- 0 if top level otherwise ref to another line_item_type as it's parent + amount DECIMAL(8,2) NOT NULL DEFAULT '0.00', -- amount + recurring BOOLEAN DEFAULT '0', -- true/false if recurring + recurrence INT NULL DEFAULT 0, -- recurrence type + PRIMARY KEY (id) +); + +---- + +-- Line Items +CREATE TABLE {prefix}line_items ( + id INT NOT NULL AUTO_INCREMENT, + invoice INT NOT NULL, -- reference to invoice + line_item_type INT NOT NULL, -- reference to line item type + name TEXT NOT NULL, -- line item name + amount DECIMAL(8,2) DEFAULT '0.00', -- line item amount per item + quantity INT DEFAULT 1, -- quantity + total DECIMAL(8,2) DEFAULT '0.00', -- line item total + recurring BOOLEAN DEFAULT '0', -- true/false if recurring + recurrence INT NULL DEFAULT 0, -- recurrence type + PRIMARY KEY (id) +); + +---- + +-- payments +CREATE TABLE {prefix}payments ( + id INT NOT NULL AUTO_INCREMENT, + transaction_time DATETIME NOT NULL, -- datetime of payment + account INT NOT NULL, -- ref to account table + amount DECIMAL(8, 2) NOT NULL, -- payment amount + payment_method TINYTEXT NOT NULL, -- payment method + payment_data TINYTEXT NULL, -- additional payment info + PRIMARY KEY (id) +); + +---- + +-- pdfs +CREATE TABLE {prefix}pdfs ( + id INT NOT NULL AUTO_INCREMENT, + ref_type INT NOT NULL, -- reference type + ref_dest INT NOT NULL, -- reference types id + pdf MEDIUMTEXT NOT NULL, -- saved pdf + PRIMARY KEY (id) +); + +---- + +-- Notification Types +CREATE TABLE {prefix}notification_types ( + id INT NOT NULL AUTO_INCREMENT, + name TINYTEXT NOT NULL, -- name + from_header TINYTEXT NOT NULL, -- from headers + replyto TINYTEXT NULL, -- reply-to headers + subject TINYTEXT NOT NULL, -- Subject + message TEXT NOT NULL, -- Message + send_by_date BOOLEAN NULL DEFAULT '0', -- true/false send by date based on due date + send_by_action BOOLEAN NULL DEFAULT '0', -- send notice based on an action + send_action INT NULL DEFAULT 0, -- (create invoice or receive payment) + send_date_number INT NULL DEFAULT 0, -- number to apply to send by date + send_date_period INT NULL DEFAULT 0, -- (days,weeks,months,years) + send_date_when INT NULL DEFAULT 0, -- (before or after) + PRIMARY KEY (id) +); + +---- + +-- Notifications +CREATE TABLE {prefix}notifications ( + id INT NOT NULL AUTO_INCREMENT, + notification_type INT NOT NULL, -- ref to notification type + account INT NOT NULL, -- ref to account + from_replyto TINYTEXT NOT NULL, -- from reply-to header + subject TEXT NOT NULL, -- subject + message TEXT NOT NULL, -- message + date_sent DATETIME NOT NULL, -- Date the notice was sent + email_sent TINYTEXT NOT NULL, -- email used + PRIMARY KEY (id) +); + +---- + +-- Gateway Settings +CREATE TABLE {prefix}gateway_settings ( + id INT NOT NULL AUTO_INCREMENT, + name TEXT NOT NULL, + login_id TINYTEXT NOT NULL, + transaction_key TINYTEXT NOT NULL, + PRIMARY KEY (id) +); + +---- + +-- Settings +CREATE TABLE {prefix}settings ( + id INT NOT NULL AUTO_INCREMENT, + company_logo TINYTEXT NULL, + company_logo_height INT NULL, + company_name TINYTEXT NULL, + company_name2 TINYTEXT NULL, + company_addr1 TINYTEXT NULL, + company_addr2 TINYTEXT NULL, + company_city TINYTEXT NULL, + company_state TINYTEXT NULL, + company_zip TINYTEXT NULL, + company_phone TINYTEXT NULL, + company_email TINYTEXT NULL, + company_url TINYTEXT NULL, + PRIMARY KEY (id) +); + +---- + +-- Set default billing Settings entry +INSERT INTO {prefix}settings + ( id ) + VALUES + ( 1 ); + +---- + +-- Management +CREATE TABLE {prefix}management ( + id INT NOT NULL AUTO_INCREMENT, + payment_methods SMALLINT NULL, -- Payment methods available for all registrations - Bitmap - see payment_method in plugin.ini + proc_methods SMALLINT NULL, -- Creadit Cart payment processing methods available - Bitmap - see proc_method in plugin.ini + cc_accepts SMALLINT NULL, -- Credit Cards Accepted - Bitmap - See credit_card in plugin.ini + -- Authorize.net Credentials + authorize_net_login TINYTEXT NULL, + authorize_net_key TINYTEXT NULL, + authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini + authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net + authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail + -- Merchant Solutions Credentials + merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials + merchant_solutions_merchantpin TINYTEXT NULL, + merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini + merchant_solutions_conf BOOLEAN NULL, -- Flag to send payment confirmation Email + merchant_solutions_merchant_email TINYTEXT NULL, -- Merchant Solutions will send copy of confirmation E-Mail + PRIMARY KEY (id) +); + +---- + +-- Set default billing Management entry +INSERT INTO {prefix}management + ( id ) + VALUES + ( 1 ); diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 499a3e1..ba4fb64 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -18,5 +18,6 @@ $glmMembersBillingDbVersions = array( '0.0.2' => array('version' => '0.0.2', 'tables' => 11), '0.0.3' => array('version' => '0.0.3', 'tables' => 12), '0.0.4' => array('version' => '0.0.4', 'tables' => 12), + '0.0.5' => array('version' => '0.0.5', 'tables' => 12), ); diff --git a/setup/databaseScripts/update_database_V0.0.5.sql b/setup/databaseScripts/update_database_V0.0.5.sql new file mode 100644 index 0000000..c8b2a66 --- /dev/null +++ b/setup/databaseScripts/update_database_V0.0.5.sql @@ -0,0 +1,9 @@ +-- Gaslight Media Billing Database +-- File Created: 12/21/2017 +-- Database Version: 0.0.5 +-- +-- To permit each query below to be executed separately, +-- all queries must be separated by a line with four dashes + +-- Add fields for line_items total +ALTER TABLE {prefix}line_items ADD total DECIMAL(8,2) DEFAULT '0.00' -- line item total diff --git a/views/admin/billing/invoiceStore.html b/views/admin/billing/invoiceStore.html index 4c79a2a..42f19c0 100644 --- a/views/admin/billing/invoiceStore.html +++ b/views/admin/billing/invoiceStore.html @@ -2,7 +2,8 @@ - +
- - + - + + + + - + + - + + - + +
LOGO - - - - - - - - - -
Date: {$invoice.transaction_time|date_format:"%D"}
Billing #: {$invoice.account}
- +
{if $settings.company_logo}{/if} +

INVOICE

+ - {$settings.company_name}
+ {$settings.company_name}
{if $settings.company_name2}{$settings.company_name2}
{/if} {if $settings.company_addr1}{$settings.company_addr1}
{/if} {if $settings.company_addr2}{$settings.company_addr2}
{/if} {if $settings.company_city}{$settings.company_city} {$settings.company_state}, {$settings.company_zip}
{/if} {if $settings.company_phone}{$settings.company_phone}
{/if} {if $settings.company_email}{$settings.company_email}
{/if} - {if $settings.company_url}{$settings.company_url}
{/if} +
+ + + + + + + + + + + + + +
Date: {$invoice.transaction_time|date_format:"%D"}
Account #: {$account.id}
Invoice #: {$invoice.id}
- Bill To:
+

Bill To:

{if $account.billing_name2}{$account.billing_name2}
{/if} {if $account.billing_addr1}{$account.billing_addr1}
{/if} {if $account.billing_addr2}{$account.billing_addr2}
{/if} @@ -58,74 +97,97 @@
 
- - - - + + + + + + + + + {foreach $line_items as $item} - - - - + + + + + + {/foreach} + + + + +
DateDescriptionQtyAmountDateQty DescriptionRateAmount

{$invoice.transaction_time|date_format:"%D"}{$item.name}{$item.quantity}{$item.amount}{$invoice.transaction_time|date_format:"%D"}{$item.quantity} {$item.name}${$item.amount|string_format:"%.2f"}${$item.total|string_format:"%.2f"}

Total Amount${$invoice.balance|string_format:"%.2f"}
 
- Payment Terms: blah blah blah - + Payment Terms: +

Please return Coupon Below with Payment + Membership dues need to be paid by October 1st. +
 

Please return Coupon Below with Payment

-
+ Make checks payable to:
{$settings.company_name}
{if $settings.company_name2}{$settings.company_name2}
{/if} - {if $settings.company_addr1}{$settings.company_addr1}
{/if} - {if $settings.company_addr2}{$settings.company_addr2}
{/if} + {if $settings.company_addr1}{$settings.company_addr1},{/if} + {if $settings.company_addr2}{$settings.company_addr2},{/if} {if $settings.company_city}{$settings.company_city} {$settings.company_state}, {$settings.company_zip}
{/if} - {if $settings.company_phone}{$settings.company_phone}
{/if} + {if $settings.company_phone}{$settings.company_phone} -{/if} {if $settings.company_email}{$settings.company_email}
{/if} - {if $settings.company_url}{$settings.company_url}
{/if} -
+

{if $account.billing_name2}{$account.billing_name2}
{/if} {if $account.billing_addr1}{$account.billing_addr1}
{/if} {if $account.billing_addr2}{$account.billing_addr2}
{/if} {if $account.billing_city}{$account.billing_city} {$account.billing_state}, {$account.billing_zip}
{/if} {if $account.billing_phone}{$account.billing_phone}
{/if}
+ - + - - + + + + + +
Please Pay:{$invoice.balance}${$invoice.balance|string_format:"%.2f"}
Payment Amount:
Billing #: {$invoice.account} Account #: {$account.id}
Invoice #: {$invoice.id}