Add to invoice and billing statements
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 18 Apr 2018 20:04:07 +0000 (16:04 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 18 Apr 2018 20:04:07 +0000 (16:04 -0400)
Adding 'Pay Invoice' link to:
Member billing statements.
Admin Invoice list.

css/admin.css
css/front.css
models/front/billing/becomeMember.php
views/admin/billing/invoices.html
views/admin/billing/statements.html

index 391b3cd..6843554 100644 (file)
     display: inline;
     float: right;
 }
+
+@media only screen and (max-width: 600px) {
+    .glm-billing-left-half {
+        width: 100%;
+    }
+    .glm-billing-right-half {
+        width: 100%;
+    }
+}
index 5c16336..30495f1 100644 (file)
 .glm-billing-form input[type=submit] {
     margin-top: 20px;
 }
+
+@media only screen and (max-width: 600px) {
+    .glm-billing-left-half {
+        width: 100%;
+    }
+    .glm-billing-right-half {
+        width: 100%;
+    }
+}
index 7ebb33c..8456b92 100644 (file)
@@ -142,12 +142,43 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
                 $error = true;
                 $messages[] = $errors['password'] = "<span style='color: red;'>Passwords don't match!</span>";
             }
-            // if ( isset( $passwd ) && preg_match()
-            // $messages[] = '<pre>$wpUser: ' . print_r( $wpUser, true ) . '</pre>';
-            // Password test.
-            // Verify they match and they aren't weak passwords.
-
             // Process the main form
+            // 1. Setup the member
+            $memberData = array(
+                'access'      => $access,
+                'member_type' => $memberType,
+                'created'     => date( 'Y-m-d' ),
+                'member_slug' => $memberSlug,
+            );
+            // 2. Setup the member_info
+            $memberInfoData = array(
+                'member',
+                'member_name',
+                'status',
+                'reference_name',
+                'descr',
+                'short_descr',
+                'addr1',
+                'addr2',
+                'city',
+                'state',
+                'country',
+                'zip',
+                'region',
+                'county',
+                'phone',
+                'toll_free',
+                'url',
+                'email',
+                'mailing_addr1',
+                'mailing_addr2',
+                'mailing_city',
+                'mailing_state',
+                'mailing_zip',
+                'create_time',
+            );
+            // 3. Setup the contact (and wpUser)
+            // 4. Setup the custom fields
 
             // Process any custom fields
             break;
index 3c664b0..c84bdde 100644 (file)
@@ -42,7 +42,8 @@
     {/if}
         <br clear="all">
 
-
+<pre>
+</pre>
 <table class="wp-list-table widefat fixed posts glm-admin-table">
     <thead>
         <tr>
@@ -53,6 +54,7 @@
             <th style="width: 70px;">Due Date</th>
             <th style="width: 100px;">Amount Total</th>
             <th style="width: 70px;">Balance</th>
+            <th style="width: 100px;">Pay Invoice</th>
             <th style="width: 50px;">View</th>
         </tr>
     </thead>
@@ -76,6 +78,7 @@
                     <td> {$t.due_date.date} </td>
                     <td> {$t.amount_total} </td>
                     <td> {$t.balance} </td>
+                    <td> {if $t.paid.value}&nbsp;{else}<a href="{$thisUrl}?page=glm-members-admin-menu-member&glm_action=billing&option=makepayment&member={$t.member_id}">Pay Invoice</a>{/if} </td>
                     <td> <a href="{$thisUrl}?page={$thisPage}&glm_action=invoices&option=view&id={$t.id}">View</a> </td>
                 </tr>
             {/foreach}
index 795c495..5b6416d 100644 (file)
@@ -15,7 +15,8 @@
                 <th>Line Items (invoices only)</th>
                 <th>Amount</th>
                 <th>Balance</th>
-                <th>&nbsp;</th>
+                <th>Pay Invoice</th>
+                <th>View</th>
             </tr>
         </thead>
         <tbody>
@@ -35,6 +36,7 @@
                         </td>
                         <td>${$transaction.transaction_data.amount_total}</td>
                         <td>${$transaction.transaction_data.balance}</td>
+                        <td>{if $transaction.transaction_data.paid}&nbsp;{else}<a href="{$thisUrl}?page={$thisPage}&glm_action=billing&option=makepayment&member={$memberID}">Pay Invoice</a>{/if}</td>
                         <td> <a href="{$thisUrl}?page={$thisPage}&glm_action=billing&option=view&member={$memberID}&id={$transaction.type_id}">View</a> </td>
                     </tr>
                 {* Payments *}
                         <td>${$transaction.transaction_data.amount}</td>
                         <td>&nbsp;</td>
                         <td>&nbsp;</td>
+                        <td>&nbsp;</td>
                     </tr>
                 {/if}
             {$alt = $alt + 1}
         {/foreach}
 
-<!--
-        <tr{if $alt % 2 == 0} class="alternate"{/if}>
-            <td>&nbsp;</td>
-            <td>&nbsp;</td>
-            <td>&nbsp;</td>
-            <td>&nbsp;</td>
-            <td>Balance Due</td>
-            <td>${$balance_due|string_format:"%.2f"}</td>
-            <td>&nbsp;</td>
-        </tr>
--->
         </tbody>
     </table>