Permalink
Browse files

Merge branch 'master' into Expenses

  • Loading branch information...
2 parents 31974e4 + 8a71e9d commit 36cd409a0a718d699a80b01cde5b29ef346d507d @klou committed Mar 6, 2014
View
@@ -0,0 +1,9 @@
+FusionInvoice
+=============
+
+Fork of https://www.fusioninvoice.com/
+
+
+This is a direct copy / upload of Fusion Invoice 1.3.x. All original work done by Jesse Terry.
+
+See the Expenses branch for an included Expenses module, by Stephane Tremblay.
@@ -1 +0,0 @@
-This file can be removed.
@@ -15,44 +15,48 @@
</div>
-<div id="filter_results">
- <table class="table table-striped">
-
- <thead>
- <tr>
- <th><?php echo lang('invoice'); ?></th>
- <th><?php echo lang('created'); ?></th>
- <th><?php echo lang('due_date'); ?></th>
- <th><?php echo lang('client_name'); ?></th>
- <th><?php echo lang('amount'); ?></th>
- <th><?php echo lang('balance'); ?></th>
- <th><?php echo lang('options'); ?></th>
- </tr>
- </thead>
-
- <tbody>
- <?php foreach ($invoices as $invoice) { ?>
- <tr>
- <td><a href="<?php echo site_url('guest/invoices/view/' . $invoice->invoice_id); ?>"><?php echo $invoice->invoice_number; ?></a></td>
- <td><?php echo date_from_mysql($invoice->invoice_date_created); ?></td>
- <td><?php echo date_from_mysql($invoice->invoice_date_due); ?></td>
- <td><?php echo $invoice->client_name; ?></td>
- <td><?php echo format_currency($invoice->invoice_total); ?></td>
- <td><?php echo format_currency($invoice->invoice_balance); ?></td>
- <td>
- <a href="<?php echo site_url('guest/invoices/view/' . $invoice->invoice_id); ?>" class="btn btn-small">
- <i class="icon-eye-open"></i> <?php echo lang('view'); ?>
- </a>
-
- <a href="<?php echo site_url('guest/invoices/generate_pdf/' . $invoice->invoice_id); ?>" class="btn btn-small">
- <i class="icon-print"></i> <?php echo lang('pdf'); ?>
- </a>
-
- <?php if ($this->mdl_settings->setting('merchant_enabled') == 1 and $invoice->invoice_balance > 0) { ?><a href="<?php echo site_url('guest/payment_handler/make_payment/' . $invoice->invoice_url_key); ?>" class="btn btn-small btn-success"><i class="icon-white icon-ok"></i> <?php echo lang('pay_now'); ?></a><?php } ?>
- </td>
- </tr>
- <?php } ?>
- </tbody>
-
- </table>
+<div class="table-content">
+
+ <div id="filter_results">
+ <table class="table table-striped">
+
+ <thead>
+ <tr>
+ <th><?php echo lang('invoice'); ?></th>
+ <th><?php echo lang('created'); ?></th>
+ <th><?php echo lang('due_date'); ?></th>
+ <th><?php echo lang('client_name'); ?></th>
+ <th><?php echo lang('amount'); ?></th>
+ <th><?php echo lang('balance'); ?></th>
+ <th><?php echo lang('options'); ?></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <?php foreach ($invoices as $invoice) { ?>
+ <tr>
+ <td><a href="<?php echo site_url('guest/invoices/view/' . $invoice->invoice_id); ?>"><?php echo $invoice->invoice_number; ?></a></td>
+ <td><?php echo date_from_mysql($invoice->invoice_date_created); ?></td>
+ <td><?php echo date_from_mysql($invoice->invoice_date_due); ?></td>
+ <td><?php echo $invoice->client_name; ?></td>
+ <td><?php echo format_currency($invoice->invoice_total); ?></td>
+ <td><?php echo format_currency($invoice->invoice_balance); ?></td>
+ <td>
+ <a href="<?php echo site_url('guest/invoices/view/' . $invoice->invoice_id); ?>" class="btn btn-small">
+ <i class="icon-eye-open"></i> <?php echo lang('view'); ?>
+ </a>
+
+ <a href="<?php echo site_url('guest/invoices/generate_pdf/' . $invoice->invoice_id); ?>" class="btn btn-small">
+ <i class="icon-print"></i> <?php echo lang('pdf'); ?>
+ </a>
+
+ <?php if ($this->mdl_settings->setting('merchant_enabled') == 1 and $invoice->invoice_balance > 0) { ?><a href="<?php echo site_url('guest/payment_handler/make_payment/' . $invoice->invoice_url_key); ?>" class="btn btn-small btn-success"><i class="icon-white icon-ok"></i> <?php echo lang('pay_now'); ?></a><?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+
+ </table>
+ </div>
+
</div>
@@ -7,32 +7,36 @@
</div>
-<?php $this->layout->load_view('layout/alerts'); ?>
-
-<div id="filter_results">
- <table class="table table-striped">
-
- <thead>
- <tr>
- <th><?php echo lang('date'); ?></th>
- <th><?php echo lang('invoice'); ?></th>
- <th><?php echo lang('amount'); ?></th>
- <th><?php echo lang('payment_method'); ?></th>
- <th><?php echo lang('note'); ?></th>
- </tr>
- </thead>
-
- <tbody>
- <?php foreach ($payments as $payment) { ?>
- <tr>
- <td><?php echo date_from_mysql($payment->payment_date); ?></td>
- <td><?php echo $payment->invoice_number; ?></td>
- <td><?php echo format_currency($payment->payment_amount); ?></td>
- <td><?php echo $payment->payment_method_name; ?></td>
- <td><?php echo $payment->payment_note; ?></td>
- </tr>
- <?php } ?>
- </tbody>
-
- </table>
+<div class="table-content">
+
+ <?php $this->layout->load_view('layout/alerts'); ?>
+
+ <div id="filter_results">
+ <table class="table table-striped">
+
+ <thead>
+ <tr>
+ <th><?php echo lang('date'); ?></th>
+ <th><?php echo lang('invoice'); ?></th>
+ <th><?php echo lang('amount'); ?></th>
+ <th><?php echo lang('payment_method'); ?></th>
+ <th><?php echo lang('note'); ?></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <?php foreach ($payments as $payment) { ?>
+ <tr>
+ <td><?php echo date_from_mysql($payment->payment_date); ?></td>
+ <td><?php echo $payment->invoice_number; ?></td>
+ <td><?php echo format_currency($payment->payment_amount); ?></td>
+ <td><?php echo $payment->payment_method_name; ?></td>
+ <td><?php echo $payment->payment_note; ?></td>
+ </tr>
+ <?php } ?>
+ </tbody>
+
+ </table>
+ </div>
+
</div>
@@ -16,50 +16,54 @@
</div>
-<div id="filter_results">
-<?php echo $this->layout->load_view('layout/alerts'); ?>
+<div class="table-content">
- <table class="table table-striped">
+ <div id="filter_results">
+ <?php echo $this->layout->load_view('layout/alerts'); ?>
- <thead>
- <tr>
- <th><?php echo lang('quote'); ?></th>
- <th><?php echo lang('created'); ?></th>
- <th><?php echo lang('due_date'); ?></th>
- <th><?php echo lang('client_name'); ?></th>
- <th><?php echo lang('amount'); ?></th>
- <th><?php echo lang('options'); ?></th>
- </tr>
- </thead>
+ <table class="table table-striped">
- <tbody>
- <?php foreach ($quotes as $quote) { ?>
- <tr>
- <td><a href="<?php echo site_url('guest/quotes/view/' . $quote->quote_id); ?>" title="<?php echo lang('edit'); ?>"><?php echo $quote->quote_number; ?></a></td>
- <td><?php echo date_from_mysql($quote->quote_date_created); ?></td>
- <td><?php echo date_from_mysql($quote->quote_date_expires); ?></td>
- <td><?php echo $quote->client_name; ?></td>
- <td><?php echo format_currency($quote->quote_total); ?></td>
- <td>
- <a href="<?php echo site_url('guest/quotes/view/' . $quote->quote_id); ?>" class="btn btn-small">
- <i class="icon-search"></i> <?php echo lang('view'); ?>
- </a>
+ <thead>
+ <tr>
+ <th><?php echo lang('quote'); ?></th>
+ <th><?php echo lang('created'); ?></th>
+ <th><?php echo lang('due_date'); ?></th>
+ <th><?php echo lang('client_name'); ?></th>
+ <th><?php echo lang('amount'); ?></th>
+ <th><?php echo lang('options'); ?></th>
+ </tr>
+ </thead>
- <a href="<?php echo site_url('guest/quotes/generate_pdf/' . $quote->quote_id); ?>" class="btn btn-small">
- <i class="icon-print"></i> <?php echo lang('pdf'); ?>
- </a>
- <?php if (in_array($quote->quote_status_id, array(2,3))) { ?>
- <a href="<?php echo site_url('guest/quotes/approve/' . $quote->quote_id); ?>" class="btn btn-success"><i class="icon-white icon-check"></i> <?php echo lang('approve'); ?></a>
- <a href="<?php echo site_url('guest/quotes/reject/' . $quote->quote_id); ?>" class="btn btn-danger"><i class="icon-white icon-ban-circle"></i> <?php echo lang('reject'); ?></a>
- <?php } elseif ($quote->quote_status_id == 4) { ?>
- <a href="#" class="btn btn-success"><?php echo lang('approved'); ?></a>
- <?php } elseif ($quote->quote_status_id == 5) { ?>
- <a href="#" class="btn btn-danger"><?php echo lang('rejected'); ?></a>
- <?php } ?>
- </td>
- </tr>
- <?php } ?>
- </tbody>
+ <tbody>
+ <?php foreach ($quotes as $quote) { ?>
+ <tr>
+ <td><a href="<?php echo site_url('guest/quotes/view/' . $quote->quote_id); ?>" title="<?php echo lang('edit'); ?>"><?php echo $quote->quote_number; ?></a></td>
+ <td><?php echo date_from_mysql($quote->quote_date_created); ?></td>
+ <td><?php echo date_from_mysql($quote->quote_date_expires); ?></td>
+ <td><?php echo $quote->client_name; ?></td>
+ <td><?php echo format_currency($quote->quote_total); ?></td>
+ <td>
+ <a href="<?php echo site_url('guest/quotes/view/' . $quote->quote_id); ?>" class="btn btn-small">
+ <i class="icon-search"></i> <?php echo lang('view'); ?>
+ </a>
+
+ <a href="<?php echo site_url('guest/quotes/generate_pdf/' . $quote->quote_id); ?>" class="btn btn-small">
+ <i class="icon-print"></i> <?php echo lang('pdf'); ?>
+ </a>
+ <?php if (in_array($quote->quote_status_id, array(2,3))) { ?>
+ <a href="<?php echo site_url('guest/quotes/approve/' . $quote->quote_id); ?>" class="btn btn-success"><i class="icon-white icon-check"></i> <?php echo lang('approve'); ?></a>
+ <a href="<?php echo site_url('guest/quotes/reject/' . $quote->quote_id); ?>" class="btn btn-danger"><i class="icon-white icon-ban-circle"></i> <?php echo lang('reject'); ?></a>
+ <?php } elseif ($quote->quote_status_id == 4) { ?>
+ <a href="#" class="btn btn-success"><?php echo lang('approved'); ?></a>
+ <?php } elseif ($quote->quote_status_id == 5) { ?>
+ <a href="#" class="btn btn-danger"><?php echo lang('rejected'); ?></a>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+
+ </table>
+ </div>
- </table>
</div>
@@ -51,7 +51,7 @@ public function recur($cron_key = NULL)
);
// This is the new invoice id
- $target_id = $this->mdl_invoices->create($db_array);
+ $target_id = $this->mdl_invoices->create($db_array, FALSE);
// Copy the original invoice to the new invoice
$this->mdl_invoices->copy_invoice($source_id, $target_id);
@@ -94,7 +94,7 @@
<select name="email_template" id="email_template">
<option value=""></option>
<?php foreach ($email_templates as $email_template) { ?>
- <option value="<?php echo $email_template->email_template_id; ?>" <?php if ($this->mdl_settings->setting('default_email_template') == $email_template->email_template_id) { ?>selected="selected"<?php } ?>><?php echo $email_template->email_template_title; ?></option>
+ <option value="<?php echo $email_template->email_template_id; ?>" <?php if ($this->mdl_settings->setting('email_quote_template') == $email_template->email_template_id) { ?>selected="selected"<?php } ?>><?php echo $email_template->email_template_title; ?></option>
<?php } ?>
</select>
</div>
@@ -0,0 +1 @@
+# This file is included for versioning only - no database changes were made in this release

0 comments on commit 36cd409

Please sign in to comment.