From: Steve Sutton Date: Sun, 11 Mar 2018 15:58:34 +0000 (-0400) Subject: Some code clean up and adding styles for text alignment. X-Git-Tag: v1.0.0^2~155 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=a98798cddbfbad3125e1fb45f9f8a230e1292305;p=WP-Plugins%2Fglm-member-db-billing.git Some code clean up and adding styles for text alignment. Get the forms to all output the labels right aligned when next to inputs. --- diff --git a/classes/billingSupport.php b/classes/billingSupport.php index ec82396..d9b8a22 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -560,15 +560,10 @@ class GlmBillingSupport */ public function viewInvoice( $invoice_id ) { - $invoice = $this->getInvoiceById( $invoice_id ); - // echo '
$invoice: ' . print_r( $invoice, true ) . '
'; + $invoice = $this->getInvoiceById( $invoice_id ); $line_items = $this->getLineItemsForInvoice( $invoice_id ); - // echo '
$line_items: ' . print_r( $line_items, true ) . '
'; - // echo '
$this->config: ' . print_r( $this->config, true ) . '
'; - $account = $this->getAccountById( $invoice['account'] ); - // echo '
$account: ' . print_r( $account, true ) . '
'; - $payments = $this->getInvoicePaymentsByInvoiceId( $invoice_id ); - // echo '
$payments: ' . print_r( $payments, true ) . '
'; + $account = $this->getAccountById( $invoice['account'] ); + $payments = $this->getInvoicePaymentsByInvoiceId( $invoice_id ); $templateData = array( 'settings' => $this->config['settings'], @@ -579,7 +574,6 @@ class GlmBillingSupport ); $invoiceHtml = $this->generateInvoiceHtml( $templateData, 'admin/billing/invoiceStore.html' ); - // echo '
$invoiceHtml: ' . print_r( $invoiceHtml, true ) . '
'; return $invoiceHtml; } @@ -604,6 +598,12 @@ class GlmBillingSupport ), ARRAY_A ); + foreach ( $line_items as &$item ) { + $index = (int)$item['recurrence']; + if ( $item.recurring && $this->config['recurrence'][$index] ) { + $item['recurrence_string'] = $this->config['recurrence'][$index]; + } + } return $line_items; } diff --git a/views/admin/billing/editAccount.html b/views/admin/billing/editAccount.html index 8351960..ea7ad2e 100644 --- a/views/admin/billing/editAccount.html +++ b/views/admin/billing/editAccount.html @@ -24,7 +24,7 @@ - + - + - + - + - + - + - + - + - + - + - + - +
NameName {if $account.fieldFail.ref_name}

{$account.fieldFail.ref_name}

{/if}
@@ -32,7 +32,7 @@
Anniversary DateAnniversary Date {if $account.fieldFail.anniversary_date}

{$account.fieldFail.anniversary_date}

{/if}
@@ -40,7 +40,7 @@
Renewal DateRenewal Date {if $account.fieldFail.renewal_date}

{$account.fieldFail.renewal_date}

{/if}
@@ -48,7 +48,7 @@
Billing EmailBilling Email {if $account.fieldFail.email}

{$account.fieldFail.email}

{/if}
@@ -56,7 +56,7 @@
Billing First NameBilling First Name {if $account.fieldFail.billing_fname}

{$account.fieldFail.billing_fname}

{/if}
@@ -64,7 +64,7 @@
Billing Last NameBilling Last Name {if $account.fieldFail.billing_lname}

{$account.fieldFail.billing_lname}

{/if}
@@ -72,7 +72,7 @@
Billing Address 1Billing Address 1 {if $account.fieldFail.billing_addr1}

{$account.fieldFail.billing_addr1}

{/if}
@@ -80,7 +80,7 @@
Billing Address2Billing Address2 {if $account.fieldFail.billing_addr2}

{$account.fieldFail.billing_addr2}

{/if}
@@ -88,7 +88,7 @@
Billing CityBilling City {if $account.fieldFail.billing_city}

{$account.fieldFail.billing_city}

{/if}
@@ -96,7 +96,7 @@
Billing StateBilling State
Billing ZipBilling Zip {if $account.fieldFail.billing_zip}

{$account.fieldFail.billing_zip}

{/if}
@@ -119,7 +119,7 @@
Billing PhoneBilling Phone {if $account.fieldFail.billing_phone}

{$account.fieldFail.billing_phone}

{/if}
diff --git a/views/admin/billing/editInvoice.html b/views/admin/billing/editInvoice.html index bc47a27..a0b90ed 100644 --- a/views/admin/billing/editInvoice.html +++ b/views/admin/billing/editInvoice.html @@ -16,31 +16,31 @@ {/if}
-
+
-
+
Billing Account
-
-
+
Due Date
-
+
-
+
Notes
-
+
@@ -60,7 +60,7 @@
- Total Amount:    + Total Amount:    
$0.00
@@ -81,61 +81,61 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -170,7 +170,7 @@
Member NameMember Name
Anniversary DateAnniversary Date
Renewal DateRenewal Date
Billing EmailBilling Email
Billing First NameBilling First Name
Billing Last NameBilling Last Name
Billing Address 1Billing Address 1
Billing Address 2Billing Address 2
Billing CityBilling City
Billing StateBilling State
Billing ZipBilling Zip
Billing PhoneBilling Phone
- + - + @@ -121,10 +121,12 @@ {/if} + {* Footer of invoice *} + {* Shows the Billing Account name and address and the total amount owed. *}
Invoice Type Invoice Type - + - + - +
ParentParent
Line Item NameLine Item Name
AmountAmount
Numbers only (999.99)
diff --git a/views/admin/billing/invoiceStore.html b/views/admin/billing/invoiceStore.html index ad7b402..ac1d4b0 100644 --- a/views/admin/billing/invoiceStore.html +++ b/views/admin/billing/invoiceStore.html @@ -82,7 +82,7 @@
{$invoice.transaction_time|date_format:"%D"} {$item.quantity}  {$item.name}{$item.name}{if $item.recurring && $item.recurrence_string} ( {$item.recurrence_string} ){/if} ${$item.amount|string_format:"%.2f"} ${$item.total|string_format:"%.2f"}
 
Please return Coupon Below with Payment

diff --git a/views/admin/settings/billing.html b/views/admin/settings/billing.html index 73ae194..8ff0339 100644 --- a/views/admin/settings/billing.html +++ b/views/admin/settings/billing.html @@ -21,7 +21,7 @@
- + - + - + - + - + - + - + - + - + - + - + - +
Company LogoCompany Logo {if $billingSettings.fieldData.company_logo} @@ -35,7 +35,7 @@
Company NameCompany Name {if $billingSettings.fieldFail.company_name}

{$billingSettings.fieldFail.company_name}

{/if}
@@ -43,7 +43,7 @@
Company Name 2Company Name 2 {if $billingSettings.fieldFail.company_name2}

{$billingSettings.fieldFail.company_name2}

{/if}
@@ -51,7 +51,7 @@
Company Address 1Company Address 1 {if $billingSettings.fieldFail.company_addr1}

{$billingSettings.fieldFail.company_addr1}

{/if}
@@ -59,7 +59,7 @@
Company Address 2Company Address 2 {if $billingSettings.fieldFail.company_addr2}

{$billingSettings.fieldFail.company_addr2}

{/if}
@@ -67,7 +67,7 @@
Company CityCompany City {if $billingSettings.fieldFail.company_city}

{$billingSettings.fieldFail.company_city}

{/if}
@@ -75,7 +75,7 @@
Company StateCompany State
Company ZipCompany Zip {if $billingSettings.fieldFail.company_zip}

{$billingSettings.fieldFail.company_zip}

{/if}
@@ -98,7 +98,7 @@
Company PhoneCompany Phone {if $billingSettings.fieldFail.company_phone}

{$billingSettings.fieldFail.company_phone}

{/if}
@@ -106,7 +106,7 @@
Company EmailCompany Email {if $billingSettings.fieldFail.company_email}

{$billingSettings.fieldFail.company_email}

{/if}
@@ -114,7 +114,7 @@
Company URLCompany URL {if $billingSettings.fieldFail.company_url}

{$billingSettings.fieldFail.company_url}

{/if}
@@ -122,7 +122,7 @@
Payment TermsPayment Terms {if $billingSettings.fieldFail.payment_terms}

{$billingSettings.fieldFail.payment_terms}

{/if}
diff --git a/views/admin/settings/editNotificationType.html b/views/admin/settings/editNotificationType.html index 2eae49d..b71f269 100644 --- a/views/admin/settings/editNotificationType.html +++ b/views/admin/settings/editNotificationType.html @@ -18,7 +18,7 @@ - + - + - + - + - + - + - + - +
NameName {if $notification.fieldFail.name}

{$notification.fieldFail.name}

{/if}
@@ -30,11 +30,11 @@
Due DateDue Date
SubjectSubject {if $notification.fieldFail.subject}

{$notification.fieldFail.subject}

{/if}
@@ -81,7 +81,7 @@
FromFrom {if $notification.fieldFail.from_header}

{$notification.fieldFail.from_header}

{/if}
@@ -89,7 +89,7 @@
Reply-ToReply-To {if $notification.fieldFail.replyto}

{$notification.fieldFail.replyto}

{/if}
@@ -97,7 +97,7 @@
Message:Message: {php} wp_editor('{$notification.fieldData.message|escape:quotes}', 'glm_descr', array( diff --git a/views/admin/settings/invoiceTypes.html b/views/admin/settings/invoiceTypes.html index cbf894f..40c3c25 100644 --- a/views/admin/settings/invoiceTypes.html +++ b/views/admin/settings/invoiceTypes.html @@ -78,13 +78,13 @@ - + - + - + - + - +
Invoice Type Name:Invoice Type Name:
Parent:Parent:
Amount:Numbers only (999.99)Amount:Numbers only (999.99)
Recurring:Recurring:
Recurrence:Recurrence: