From: Steve Sutton Date: Thu, 25 Jul 2019 20:53:20 +0000 (-0400) Subject: Running testing on all sections. X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=6bd73506482a680adb3fa21155a0780ede797b00;p=WP-Plugins%2Fglm-member-db-billing.git Running testing on all sections. Testing each section Added payment type column correctly on the report and invoicing pages. --- diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 2aa1cbb..f4b7cf2 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -295,7 +295,7 @@ class GlmBillingSupport '%d', '%d', '%s', - '%d' + '%s' ) ); diff --git a/classes/data/dataSettings.php b/classes/data/dataSettings.php index 62b8d0a..6ba4eec 100644 --- a/classes/data/dataSettings.php +++ b/classes/data/dataSettings.php @@ -405,5 +405,3 @@ class GlmDataBillingSettings extends GlmDataAbstract } } - -?> diff --git a/models/admin/billing/accounts.php b/models/admin/billing/accounts.php index 39c6e65..97d2808 100644 --- a/models/admin/billing/accounts.php +++ b/models/admin/billing/accounts.php @@ -399,23 +399,21 @@ class GlmMembersAdmin_billing_accounts extends GlmDataAccounts // $where_params[] = "T.renewal_date >= now()"; // $where_params[] = "T.renewal_date + INTERVAL 1 YEAR - INTERVAL $days_before_renewal DAY <= '$curDate'"; // $where_params[] = "T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY >= '$curDate'"; - $sub_where_parts[] = "(T.renewal_date + INTERVAL 1 YEAR - INTERVAL $days_before_renewal DAY <= '$curDate' AND " . - "T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY >= '$curDate')"; - $sub_where_parts[] = "invoice_type != 0"; + $sub_where_parts[] = "(T.renewal_date + INTERVAL 1 YEAR - INTERVAL $days_before_renewal DAY <= '$curDate' AND T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY >= '$curDate')"; + $where_params['invoice_type'] = "invoice_type != 0"; } if ( isset( $_REQUEST['filterOverdue'] ) ) { $filterOverdue = filter_var( $_REQUEST['filterOverdue'], FILTER_VALIDATE_BOOLEAN ); // $where_params[] = "T.renewal_date + INTERVAL 1 YEAR < '$curDate'"; // $where_params[] = "T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY >= '$curDate'"; - $sub_where_parts[] = "(T.renewal_date + INTERVAL 1 YEAR < '$curDate' AND " . - "T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY >= '$curDate')"; - $sub_where_parts[] = "invoice_type != 0"; + $sub_where_parts[] = "(T.renewal_date + INTERVAL 1 YEAR < '$curDate' AND T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY <= '$curDate')"; + $where_params['invoice_type'] = "invoice_type != 0"; } if ( isset( $_REQUEST['filterExpired'] ) ) { $filterExpired = filter_var( $_REQUEST['filterExpired'], FILTER_VALIDATE_BOOLEAN ); // $where_params[] = "T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY < '$curDate'"; $sub_where_parts[] = "T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY < '$curDate'"; - $sub_where_parts[] = "invoice_type != 0"; + $where_params['invoice_type'] = "invoice_type != 0"; } if ( !empty( $sub_where_parts ) ) { @@ -427,8 +425,10 @@ class GlmMembersAdmin_billing_accounts extends GlmDataAccounts // By implode with AND. $where = implode( ' AND ', $where_params ); + // echo '
$where: ' . print_r( $where, true ) . '
'; + // Get the list of accounts and determine number of accounts in list - $orderBy = 'renewal_date ASC'; + $orderBy = 'ref_name ASC'; $this->postEmployees = true; $accountsResult = $this->getList( $where, $orderBy, true, 'id', $start, $limit ); $this->postEmployees = false; @@ -454,11 +454,8 @@ class GlmMembersAdmin_billing_accounts extends GlmDataAccounts if ( count( $accounts ) > 0 ) { $haveAccounts = true; } - // echo '
$accounts: ' . print_r( $accounts, true ) . '
'; unset( $accountsResult ); - // echo '
$accounts: ' . print_r( $accounts, true ) . '
'; - break; } diff --git a/models/admin/billing/index.php b/models/admin/billing/index.php index f5eef1a..2ba6026 100644 --- a/models/admin/billing/index.php +++ b/models/admin/billing/index.php @@ -224,7 +224,8 @@ class GlmMembersAdmin_billing_index extends GlmDataAccounts if ( $this->config['billing_settings']['dashboard_overdue_renewals'] ) { // Get the number of over due renewals $overDueWhere = "T.archived <> true AND invoice_type != 0"; - $overDueWhere .= " AND T.renewal_date + INTERVAL 1 YEAR < '$curDate'"; + // $overDueWhere .= " AND T.renewal_date + INTERVAL 1 YEAR < '$curDate'"; + $overDueWhere .= " AND ( T.renewal_date + INTERVAL 1 YEAR < '$curDate' AND T.renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY <= '$curDate')"; $start = 1; $this->postEmployees = true; $overdue = $this->getList( $overDueWhere, $orderBy, true, 'id', $start, $limit ); diff --git a/models/admin/billing/invoices.php b/models/admin/billing/invoices.php index 57ad5d3..a520add 100644 --- a/models/admin/billing/invoices.php +++ b/models/admin/billing/invoices.php @@ -197,7 +197,6 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices $Notifications->sendEmailNotification( $notice['id'], $account_id, $data ); } } - // echo '
$_REQUEST: ' . print_r( $_REQUEST, true ) . '
'; $invoiceSent = true; } @@ -247,14 +246,13 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config ); $this->invoice_id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ); $invoices = $this->editEntry( $this->invoice_id ); - // echo '
$invoices: ' . print_r( $invoices, true ) . '
'; - $view = 'editInvoice'; - $InvoiceTypesObj = new GlmDataInvoiceTypes( $this->wpdb, $this->config ); - $invoiceTypes = $InvoiceTypesObj->getList(); - $lineItems = $BillingSupport->getLineItemsForInvoice( $this->invoice_id ); + $view = 'editInvoice'; + $InvoiceTypesObj = new GlmDataInvoiceTypes( $this->wpdb, $this->config ); + $invoiceTypes = $InvoiceTypesObj->getList(); + $lineItems = $BillingSupport->getLineItemsForInvoice( $this->invoice_id ); + // Sort the types by parent child - $invoiceTypes = $InvoiceTypesObj->sortParentChild($invoiceTypes); - // echo '
$invoiceTypes: ' . print_r( $invoiceTypes, true ) . '
'; + $invoiceTypes = $InvoiceTypesObj->sortParentChild($invoiceTypes); if ( isset( $invoiceTypes ) ) { foreach ( $invoiceTypes as $invoiceType ) { $invTypes[$invoiceType['id']] = array( @@ -697,7 +695,6 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices $orderBy = 'due_date ASC, transaction_time DESC'; $this->line_items_post = true; $invoicesResult = $this->getList($where, $orderBy, true, 'id', $start, $limit); - // echo '
$invoicesResult: ' . print_r( $invoicesResult, true ) . '
'; $totalInvoices = $this->getStats($where); $this->line_items_post = false; diff --git a/models/admin/billing/invoicing.php b/models/admin/billing/invoicing.php index 65b54b0..ac1fa78 100644 --- a/models/admin/billing/invoicing.php +++ b/models/admin/billing/invoicing.php @@ -190,11 +190,11 @@ class GlmMembersAdmin_billing_invoicing //extends GlmDataAccounts foreach ( $accounts as $account ) { - echo '
$account: ' . print_r( $account, true ) . '
'; + // echo '
$account: ' . print_r( $account, true ) . '
'; // Get the invoice type $invoiceType = $BillingSupport->getInvoiceTypeById( $account['invoice_type'] ); - echo '
$invoiceType: ' . print_r( $invoiceType, true ) . '
'; + // echo '
$invoiceType: ' . print_r( $invoiceType, true ) . '
'; // Create the invoice for this member account $newInvoiceId = $BillingSupport->createMemberInvoiceWithEmployees( diff --git a/models/admin/billing/payments.php b/models/admin/billing/payments.php index 1edf13d..43560f1 100644 --- a/models/admin/billing/payments.php +++ b/models/admin/billing/payments.php @@ -231,23 +231,6 @@ class GlmMembersAdmin_billing_payments extends GlmDataPayments $where = 'true'; $where_params = array( 'true' ); - // Check for paging - // if ( isset( $_REQUEST['pageSelect'] ) ) { - // $_SESSION['search']['pageSelect'] = $_REQUEST['pageSelect']; - // } else if ( isset( $_REQUEST['searched'] ) && !isset( $_REQUEST['pageSelect'] ) ) { - // unset( $_SESSION['search']['pageSelect'] ); - // } - // if ( isset( $_REQUEST['nextStart'] ) ) { - // $_SESSION['search']['nextStart'] = $_REQUEST['nextStart']; - // } else if ( isset( $_REQUEST['searched'] ) && !isset( $_REQUEST['nextStart'] ) ) { - // unset( $_SESSION['search']['nextStart'] ); - // } - // if ( isset( $_REQUEST['prevStart'] ) ) { - // $_SESSION['search']['prevStart'] = $_REQUEST['prevStart']; - // } else if ( isset( $_REQUEST['searched'] ) && !isset( $_REQUEST['prevStart'] ) ) { - // unset( $_SESSION['search']['prevStart'] ); - // } - // Check if we're doing paging if (isset($_REQUEST['pageSelect'])) { // If request is for Next @@ -264,20 +247,6 @@ class GlmMembersAdmin_billing_payments extends GlmDataPayments } } - // if( isset($_SESSION['search']['pageSelect']) ){ - // // If request is for Next - // if ($_SESSION['search']['pageSelect'][0] == 'N') { - // $newStart = $_SESSION['search']['nextStart'] - 0; - // - // // Otherwise it must be Previous - // } else { - // $newStart = $_SESSION['search']['prevStart'] - 0; - // } - // if ($newStart > 0) { - // $start = $newStart; - // } - // } - // Get any search parameters. $reg_options = array( 'options' => array( @@ -311,12 +280,9 @@ class GlmMembersAdmin_billing_payments extends GlmDataPayments // By implode with AND. $where = implode( ' AND ', $where_params ); - // echo '
$where: ' . print_r( $where, true ) . '
'; - // Get the list of payments and determine number of payments in list - $orderBy = 'transaction_time asc'; + $orderBy = 'transaction_time DESC'; $paymentsResult = $this->getList($where, $orderBy, true, 'id', $start, $limit); - // echo '
$paymentsResult: ' . print_r( $paymentsResult, true ) . '
'; // Get paging results $numbDisplayed = $paymentsResult['returned']; diff --git a/models/admin/member/billing.php b/models/admin/member/billing.php index 38fcb0c..e38c064 100644 --- a/models/admin/member/billing.php +++ b/models/admin/member/billing.php @@ -223,7 +223,7 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/data/dataAccounts.php'; $account = $Accounts->editEntry( $accountID ); if ( $account && $account['fieldData'] ) { - $invoiceTypeId = $account['fieldData']['invoice_type']; + $invoiceTypeId = $account['fieldData']['invoice_type']['value']; if ( $invoiceTypeId ) { $member_invoice = $BillingSupport->getInvoiceTypeById( $invoiceTypeId ); @@ -244,8 +244,8 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling // Get tho account data $Accounts = new GlmDataAccounts( $this->wpdb, $this->config ); $account = $Accounts->editEntry( $accountID ); - if ( $account && $account['fieldData']['invoice_type'] ) { - $invoiceTypeId = $account['fieldData']['invoice_type']; + if ( $account && $account['fieldData']['invoice_type']['value'] ) { + $invoiceTypeId = $account['fieldData']['invoice_type']['value']; } else { $invoiceError = true; $messages[] = 'No account Payment Type set!'; @@ -334,7 +334,7 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/data/dataAccounts.php'; $account = $Accounts->editEntry( $accountID ); if ( $account && $account['fieldData'] ) { - $invoiceTypeId = $account['fieldData']['invoice_type']; + $invoiceTypeId = $account['fieldData']['invoice_type']['value']; if ( $invoiceTypeId ) { $member_invoice = $BillingSupport->getInvoiceTypeById( $invoiceTypeId ); diff --git a/setup/validActions.php b/setup/validActions.php index 7d76bc2..ddc0edb 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -118,5 +118,3 @@ $glmMembersBillingAddOnValidActions = array( ), ) ); - -?> diff --git a/views/admin/billing/editAccountAjax.html b/views/admin/billing/editAccountAjax.html index fb15b91..3dd27c6 100644 --- a/views/admin/billing/editAccountAjax.html +++ b/views/admin/billing/editAccountAjax.html @@ -8,348 +8,357 @@ {$data = $account}
-
- - - - - - - {if $settings.member_types_enabled} - - {/if} - {if $lockedToMember} - - - - {/if} - - {if $accountID} - - {/if} - {if !$settings.account_number_enabled}{/if} - - {include file='ui/f6/errorCallout.html'} - -
- Account Information - - {* Name *} - {$ui = [ - 'value' => $data.fieldData.ref_name, - 'field' => 'ref_name', - 'label' => 'Name', - 'placeholder' => 'Name', - 'required' => $data.fieldRequired.ref_name, - 'errorText' => 'Name is Required' - ]} - {include file='ui/f6/text.html'} - - - {if !$lockedToMember} - {if $settings.account_number_enabled} - - {* Account Number *} - {$ui = [ - 'value' => $data.fieldData.account_number, - 'field' => 'account_number', - 'label' => 'Account Number', - 'placeholder' => 'Account Number', - 'required' => $data.fieldRequired.account_number, - 'errorText' => 'Account Number is Required' - ]} - {include file='ui/f6/text.html'} - - {/if} - - {if !$settings.member_types_enabled} - - {* Payment Type *} - {$ui = [ - 'value' => $data.fieldData.invoice_type.value, - 'field' => 'invoice_type', - 'label' => 'Payment Type', - 'list' => $data.fieldData.invoice_type.list, - 'l_label' => 'name', - 'l_value' => 'value', - 'l_blank' => false, - 'required' => $data.fieldRequired.invoice_type, - 'errorText' => 'Payment Type is Required' - ]} - {include file='ui/f6/select.html'} - - {/if} - - {if $settings.invoice_methods_enabled} - - {* Payment Methods *} - {$ui = [ - 'value' => [ - 'email_invoice' => $data.fieldData.invoice_type.value, - 'usmail_invoice' => $data.fieldData.usmail_invoice.value, - 'fax_invoice' => $data.fieldData.fax_invoice.value - ], - 'field' => 'invoice_type', - 'list' => ['email_invoice' => 'By Email','usmail_invoice' => 'By US Email','fax_invoice' => 'By Fax'], - 'label' => 'Invoice Delivery Methods', - 'required' => false, - 'errorText' => 'At least one Invoice Delivery Method is Required' - ]} - {include file='ui/f6/multicheckboxes.html'} - - {/if} - - {* Anniversary Date *} + {* Form Start *} + {$ui = [ + 'id' => 'billingInfoForm', + 'action' => "{$ajaxUrl}?action=glm_members_admin_ajax", + 'method' => 'post', + 'file' => false, + 'validate' => true, + 'validateFocusMsg' => true + ]} + {include file='ui/f6/form-start.html'} + + + + + + + + {if $settings.member_types_enabled} + + {/if} + {if $lockedToMember} + + + + {/if} + + {if $accountID} + + {/if} + {if !$settings.account_number_enabled}{/if} + +
+ Account Information + + {* Name *} + {$ui = [ + 'value' => $data.fieldData.ref_name, + 'field' => 'ref_name', + 'label' => 'Name', + 'placeholder' => 'Name', + 'required' => $data.fieldRequired.ref_name, + 'errorText' => 'Name is Required' + ]} + {include file='ui/f6/text.html'} + + + {if !$lockedToMember} + {if $settings.account_number_enabled} + + {* Account Number *} {$ui = [ - 'value' => $data.fieldData.anniversary_date.date, - 'field' => 'anniversary_date', - 'label' => 'Anniversary Date', - 'placeholder' => 'Anniversary Date', - 'required' => $data.fieldRequired.anniversary_date, - 'errorText' => 'Anniversary Date is Required' + 'value' => $data.fieldData.account_number, + 'field' => 'account_number', + 'label' => 'Account Number', + 'placeholder' => 'Account Number', + 'required' => $data.fieldRequired.account_number, + 'errorText' => 'Account Number is Required' ]} {include file='ui/f6/text.html'} - {* Renewal Date *} + {/if} + + {if !$settings.member_types_enabled} + + {* Payment Type *} {$ui = [ - 'value' => $data.fieldData.renewal_date.date, - 'field' => 'renewal_date', - 'label' => 'Renewal Date', - 'placeholder' => 'Renewal Date', - 'required' => $data.fieldRequired.renewal_date, - 'errorText' => 'Renewal Date is Required' + 'value' => $data.fieldData.invoice_type.value, + 'field' => 'invoice_type', + 'label' => 'Payment Type', + 'list' => $data.fieldData.invoice_type.list, + 'l_label' => 'name', + 'l_value' => 'value', + 'l_blank' => false, + 'required' => $data.fieldRequired.invoice_type, + 'errorText' => 'Payment Type is Required' ]} - {include file='ui/f6/text.html'} + {include file='ui/f6/select.html'} {/if} - {if $settings.allow_employees} - -
-
Boss
-
- - {if $account.fieldFail.boss}

{$account.fieldFail.boss}

{/if}
-
-
+ {if $settings.invoice_methods_enabled} -
-
- Associated Members/Employees -
-
- -
- {if $employees} - {foreach $employees as $employee} -
- - {$employee.employee_name} - -
- {/foreach} - {/if} -
-
-
+ {* Payment Methods *} + {$ui = [ + 'value' => [ + 'email_invoice' => $data.fieldData.invoice_type.value, + 'usmail_invoice' => $data.fieldData.usmail_invoice.value, + 'fax_invoice' => $data.fieldData.fax_invoice.value + ], + 'field' => 'invoice_type', + 'list' => ['email_invoice' => 'By Email','usmail_invoice' => 'By US Email','fax_invoice' => 'By Fax'], + 'label' => 'Invoice Delivery Methods', + 'required' => false, + 'errorText' => 'At least one Invoice Delivery Method is Required' + ]} + {include file='ui/f6/multicheckboxes.html'} {/if} -
- -
- Billing Information - - {* Billing Email *} + {* Anniversary Date *} {$ui = [ - 'value' => $data.fieldData.email, - 'field' => 'email', - 'label' => 'Billing Email', - 'placeholder' => 'Billing Email', - 'required' => $data.fieldRequired.email, - 'errorText' => 'Billing Email is Required' + 'value' => $data.fieldData.anniversary_date.date, + 'field' => 'anniversary_date', + 'label' => 'Anniversary Date', + 'placeholder' => 'Anniversary Date', + 'required' => $data.fieldRequired.anniversary_date, + 'errorText' => 'Anniversary Date is Required' ]} {include file='ui/f6/text.html'} - {* Billing Company *} + {* Renewal Date *} {$ui = [ - 'value' => $data.fieldData.billing_company, - 'field' => 'billing_company', - 'label' => 'Billing Company', - 'placeholder' => 'Billing Company', - 'required' => $data.fieldRequired.billing_company, - 'errorText' => 'Billing Company is Required' + 'value' => $data.fieldData.renewal_date.date, + 'field' => 'renewal_date', + 'label' => 'Renewal Date', + 'placeholder' => 'Renewal Date', + 'required' => $data.fieldRequired.renewal_date, + 'errorText' => 'Renewal Date is Required' ]} {include file='ui/f6/text.html'} - {* Billing Position *} - {$ui = [ - 'value' => $data.fieldData.billing_position, - 'field' => 'billing_position', - 'label' => 'Billing Position', - 'placeholder' => 'Billing Position', - 'required' => $data.fieldRequired.billing_position, - 'errorText' => 'Billing Position is Required' - ]} - {include file='ui/f6/text.html'} + {/if} - {if $settings.billing_contact_name_enabled} + {if $settings.allow_employees} - {* Billing Contact Name *} - {$ui = [ - 'value' => $data.fieldData.billing_contact_name, - 'field' => 'billing_contact_name', - 'label' => 'Billing Contact Name', - 'placeholder' => 'Billing Contact Name', - 'required' => $data.fieldRequired.billing_contact_name, - 'errorText' => 'Billing Contact Name is Required' - ]} - {include file='ui/f6/text.html'} - {else} - {* Billing First Name *} - {$ui = [ - 'value' => $data.fieldData.billing_fname, - 'field' => 'billing_fname', - 'label' => 'Billing First Name', - 'placeholder' => 'Billing First Name', - 'required' => $data.fieldRequired.billing_fname, - 'errorText' => 'Billing First Name is Required' - ]} - {include file='ui/f6/text.html'} +
+
Boss
+
+ + {if $account.fieldFail.boss}

{$account.fieldFail.boss}

{/if}
+
+
- {* Billing Last Name *} - {$ui = [ - 'value' => $data.fieldData.billing_lname, - 'field' => 'billing_lname', - 'label' => 'Billing Last Name', - 'placeholder' => 'Billing Last Name', - 'required' => $data.fieldRequired.billing_lname, - 'errorText' => 'Billing Last Name is Required' - ]} - {include file='ui/f6/text.html'} - {/if} +
+
+ Associated Members/Employees +
+
+ +
+ {if $employees} + {foreach $employees as $employee} +
+ + {$employee.employee_name} + +
+ {/foreach} + {/if} +
+
+
- {* Billing Address 1 *} + {/if} + +
+ +
+ Billing Information + + {* Billing Email *} + {$ui = [ + 'value' => $data.fieldData.email, + 'field' => 'email', + 'label' => 'Billing Email', + 'placeholder' => 'Billing Email', + 'required' => $data.fieldRequired.email, + 'errorText' => 'Billing Email is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing Company *} + {$ui = [ + 'value' => $data.fieldData.billing_company, + 'field' => 'billing_company', + 'label' => 'Billing Company', + 'placeholder' => 'Billing Company', + 'required' => $data.fieldRequired.billing_company, + 'errorText' => 'Billing Company is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing Position *} + {$ui = [ + 'value' => $data.fieldData.billing_position, + 'field' => 'billing_position', + 'label' => 'Billing Position', + 'placeholder' => 'Billing Position', + 'required' => $data.fieldRequired.billing_position, + 'errorText' => 'Billing Position is Required' + ]} + {include file='ui/f6/text.html'} + + {if $settings.billing_contact_name_enabled} + + {* Billing Contact Name *} {$ui = [ - 'value' => $data.fieldData.billing_addr1, - 'field' => 'billing_addr1', - 'label' => 'Billing Address 1', - 'placeholder' => 'Billing Address 1', - 'required' => $data.fieldRequired.billing_addr1, - 'errorText' => 'Billing Address 1 is Required' + 'value' => $data.fieldData.billing_contact_name, + 'field' => 'billing_contact_name', + 'label' => 'Billing Contact Name', + 'placeholder' => 'Billing Contact Name', + 'required' => $data.fieldRequired.billing_contact_name, + 'errorText' => 'Billing Contact Name is Required' ]} {include file='ui/f6/text.html'} - - {* Billing Address 2 *} + {else} + {* Billing First Name *} {$ui = [ - 'value' => $data.fieldData.billing_addr2, - 'field' => 'billing_addr2', - 'label' => 'Billing Address 2', - 'placeholder' => 'Billing Address 2', - 'required' => $data.fieldRequired.billing_addr2, - 'errorText' => 'Billing Address 2 is Required' + 'value' => $data.fieldData.billing_fname, + 'field' => 'billing_fname', + 'label' => 'Billing First Name', + 'placeholder' => 'Billing First Name', + 'required' => $data.fieldRequired.billing_fname, + 'errorText' => 'Billing First Name is Required' ]} {include file='ui/f6/text.html'} - {* Billing City *} + {* Billing Last Name *} {$ui = [ - 'value' => $data.fieldData.billing_city, - 'field' => 'billing_city', - 'label' => 'Billing City', - 'placeholder' => 'Billing City', - 'required' => $data.fieldRequired.billing_city, - 'errorText' => 'Billing City is Required' + 'value' => $data.fieldData.billing_lname, + 'field' => 'billing_lname', + 'label' => 'Billing Last Name', + 'placeholder' => 'Billing Last Name', + 'required' => $data.fieldRequired.billing_lname, + 'errorText' => 'Billing Last Name is Required' ]} {include file='ui/f6/text.html'} + {/if} - {if $settings.billing_county_enabled} - {* Billing County *} - {$ui = [ - 'value' => $data.fieldData.billing_county.value, - 'field' => 'billing_county', - 'label' => 'Billing County', - 'list' => $data.fieldData.billing_county.list, - 'l_label' => 'name', - 'l_value' => 'value', - 'l_blank' => false, - 'required' => $data.fieldRequired.billing_county, - 'errorText' => 'Billing County is Required' - ]} - {include file='ui/f6/select.html'} - {else} - - {/if} - - {* Billing State *} + {* Billing Address 1 *} + {$ui = [ + 'value' => $data.fieldData.billing_addr1, + 'field' => 'billing_addr1', + 'label' => 'Billing Address 1', + 'placeholder' => 'Billing Address 1', + 'required' => $data.fieldRequired.billing_addr1, + 'errorText' => 'Billing Address 1 is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing Address 2 *} + {$ui = [ + 'value' => $data.fieldData.billing_addr2, + 'field' => 'billing_addr2', + 'label' => 'Billing Address 2', + 'placeholder' => 'Billing Address 2', + 'required' => $data.fieldRequired.billing_addr2, + 'errorText' => 'Billing Address 2 is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing City *} + {$ui = [ + 'value' => $data.fieldData.billing_city, + 'field' => 'billing_city', + 'label' => 'Billing City', + 'placeholder' => 'Billing City', + 'required' => $data.fieldRequired.billing_city, + 'errorText' => 'Billing City is Required' + ]} + {include file='ui/f6/text.html'} + + {if $settings.billing_county_enabled} + {* Billing County *} {$ui = [ - 'value' => $data.fieldData.billing_state.value, - 'field' => 'billing_state', - 'label' => 'Billing State', - 'list' => $data.fieldData.billing_state.list, + 'value' => $data.fieldData.billing_county.value, + 'field' => 'billing_county', + 'label' => 'Billing County', + 'list' => $data.fieldData.billing_county.list, 'l_label' => 'name', 'l_value' => 'value', 'l_blank' => false, - 'required' => $data.fieldRequired.billing_state, - 'errorText' => 'Billing State is Required' + 'required' => $data.fieldRequired.billing_county, + 'errorText' => 'Billing County is Required' ]} {include file='ui/f6/select.html'} + {else} + + {/if} - {* Billing Zip *} - {$ui = [ - 'value' => $data.fieldData.billing_zip, - 'field' => 'billing_zip', - 'label' => 'Billing Zip', - 'placeholder' => 'Billing Zip', - 'required' => $data.fieldRequired.billing_zip, - 'errorText' => 'Billing Zip is Required' - ]} - {include file='ui/f6/text.html'} - - {* Billing Country *} - {$ui = [ - 'value' => $data.fieldData.billing_country, - 'field' => 'billing_country', - 'label' => 'Billing Country', - 'placeholder' => 'Billing Country', - 'required' => $data.fieldRequired.billing_country, - 'errorText' => 'Billing Country is Required' - ]} - {include file='ui/f6/text.html'} - - {* Billing Phone *} - {$ui = [ - 'value' => $data.fieldData.billing_phone, - 'field' => 'billing_phone', - 'label' => 'Billing Phone', - 'placeholder' => 'Billing Phone', - 'required' => $data.fieldRequired.billing_phone, - 'errorText' => 'Billing Phone is Required' - ]} - {include file='ui/f6/text.html'} - - {* Billing Fax *} - {$ui = [ - 'value' => $data.fieldData.billing_fax, - 'field' => 'billing_fax', - 'label' => 'Billing Fax', - 'placeholder' => 'Billing Fax', - 'required' => $data.fieldRequired.billing_fax, - 'errorText' => 'Billing Fax is Required' - ]} - {include file='ui/f6/text.html'} - -
- - {include file='ui/f6/errorCallout.html'} - - - - - - + {* Billing State *} + {$ui = [ + 'value' => $data.fieldData.billing_state.value, + 'field' => 'billing_state', + 'label' => 'Billing State', + 'list' => $data.fieldData.billing_state.list, + 'l_label' => 'name', + 'l_value' => 'value', + 'l_blank' => false, + 'required' => $data.fieldRequired.billing_state, + 'errorText' => 'Billing State is Required' + ]} + {include file='ui/f6/select.html'} + + {* Billing Zip *} + {$ui = [ + 'value' => $data.fieldData.billing_zip, + 'field' => 'billing_zip', + 'label' => 'Billing Zip', + 'placeholder' => 'Billing Zip', + 'required' => $data.fieldRequired.billing_zip, + 'errorText' => 'Billing Zip is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing Country *} + {$ui = [ + 'value' => $data.fieldData.billing_country, + 'field' => 'billing_country', + 'label' => 'Billing Country', + 'placeholder' => 'Billing Country', + 'required' => $data.fieldRequired.billing_country, + 'errorText' => 'Billing Country is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing Phone *} + {$ui = [ + 'value' => $data.fieldData.billing_phone, + 'field' => 'billing_phone', + 'label' => 'Billing Phone', + 'placeholder' => 'Billing Phone', + 'required' => $data.fieldRequired.billing_phone, + 'errorText' => 'Billing Phone is Required' + ]} + {include file='ui/f6/text.html'} + + {* Billing Fax *} + {$ui = [ + 'value' => $data.fieldData.billing_fax, + 'field' => 'billing_fax', + 'label' => 'Billing Fax', + 'placeholder' => 'Billing Fax', + 'required' => $data.fieldRequired.billing_fax, + 'errorText' => 'Billing Fax is Required' + ]} + {include file='ui/f6/text.html'} + +
+ + {include file='ui/f6/errorCallout.html'} + + + + + + {* Form End *} + {include file='ui/f6/form-end.html'}