Fix edit invoice form
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 26 Apr 2019 14:22:28 +0000 (10:22 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 26 Apr 2019 14:22:28 +0000 (10:22 -0400)
Fixing issue with edit invoice not saving data correctly.
Saving of payment method now working.

config/plugin.ini
models/admin/billing/invoices.php

index e39a6c8..82e728d 100644 (file)
@@ -18,12 +18,29 @@ transaction_numb['Payment']    = 20;
 transaction_numb['Adjustment'] = 30;
 transaction_numb['Comment']    = 40;
 
-; Payment Methods
-payment_method[10] = "Check"
-payment_method[20] = "Credit Card"
-payment_method[30] = "Cash"
-payment_method[40] = "Other"
-
+;
+; Payment Method - Use as Bitmap Index or List
+;
+payment_method[1]                               = 'No Charge'
+payment_method[2]                               = 'Pay On Arrival'
+payment_method[3]                               = 'Cash'
+payment_method[4]                               = 'Check'
+; payment_method[5]                               = 'Call from Merchant'
+payment_method[6]                               = 'Credit Card'
+payment_method[7]                               = 'PayPal'
+payment_method [10]                             = 'Payment Pending'
+
+payment_method_numb['NoCharge']                 = 1
+payment_method_numb['OnArrival']                = 2
+payment_method_numb['Cash']                     = 3
+payment_method_numb['Check']                    = 4
+; payment_method_numb['CallFromMerchant']         = 5
+payment_method_numb['CreditCard']               = 6
+payment_method_numb['PayPal']                   = 7
+payment_method_numb['Pending']                  = 10
+
+; Default payment method is Credit Card
+default_payment_method                          = 6
 ; Alternate Payment Methods
 alt_payment_method[10] = "Check"
 alt_payment_method[20] = "Credit Card"
index eb09b0e..2b23b10 100644 (file)
@@ -187,7 +187,7 @@ class GlmMembersAdmin_billing_invoices extends GlmDataInvoices
             if ( isset( $_REQUEST['id'] ) ) {
                 $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
                 $this->invoice_id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT );
-                $nvoices         = $this->editEntry( $this->invoice_id );
+                $invoices         = $this->editEntry( $this->invoice_id );
                 // echo '<pre>$invoices: ' . print_r( $invoices, true ) . '</pre>';
                 $view            = 'editInvoice';
                 $InvoiceTypesObj = new GlmDataInvoiceTypes( $this->wpdb, $this->config );