diff --git a/add_recurring_invoice_modal.php b/add_recurring_invoice_modal.php
index 9dcb293b..f18510ed 100644
--- a/add_recurring_invoice_modal.php
+++ b/add_recurring_invoice_modal.php
@@ -39,7 +39,7 @@
@@ -21,7 +22,7 @@
Client |
Start Date |
Last Sent |
-
Amount |
+
Next Date |
Status |
Actions |
@@ -30,49 +31,41 @@
- | INV- |
- |
- $ |
- |
- |
-
-
-
-
- |
+ |
+ |
+ |
+ |
+ |
+ |
|
-
+
diff --git a/recurring_invoice.php b/recurring_invoice.php
new file mode 100644
index 00000000..a4d99d20
--- /dev/null
+++ b/recurring_invoice.php
@@ -0,0 +1,292 @@
+
+
+2){
+ $client_phone = substr($row['client_phone'],0,3)."-".substr($row['client_phone'],3,3)."-".substr($row['client_phone'],6,4);
+ }
+ $client_website = $row['client_website'];
+
+ $sql_invoice_history = mysqli_query($mysqli,"SELECT * FROM invoice_history WHERE invoice_id = $invoice_id ORDER BY invoice_history_id ASC");
+
+ $sql_payments = mysqli_query($mysqli,"SELECT * FROM payments, accounts WHERE payments.account_id = accounts.account_id AND payments.invoice_id = $invoice_id ORDER BY payments.payment_id DESC");
+
+ //Add up all the payments for the invoice and get the total amount paid to the invoice
+ $sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS amount_paid FROM payments WHERE invoice_id = $invoice_id");
+ $row = mysqli_fetch_array($sql_amount_paid);
+ $amount_paid = $row['amount_paid'];
+
+ $balance = $invoice_amount - $amount_paid;
+
+?>
+
+
+ -
+ Recurring Invoices
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Frequency:
+ - Start Date:
+ - Next Date:
+ - Last Sent:
+ - Net Terms:
30 Day
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ Item |
+ Description |
+ Unit Cost |
+ Quantity |
+ Tax |
+ Line Total |
+
+
+
+
+
+
+ |
+ |
+ |
+ $ |
+ |
+ $ |
+ $ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Subtotal |
+ $ |
+
+ 0){ ?>
+
+ | Discount |
+ $ |
+
+
+ 0){ ?>
+
+ | Tax |
+ $ |
+
+
+ 0){ ?>
+
+ Paid to Date |
+ $ |
+
+
+
+ | Balance Due |
+ $ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Date Sent |
+ Invoice Number |
+
+
+
+
+
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+