diff --git a/Dockerfile b/Dockerfile index e66297e3..2bb679ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,7 @@ RUN chmod -R 755 /var/www/cmc-sales/app/tmp # Copy site into place. ADD . /var/www/cmc-sales RUN chmod +x /var/www/cmc-sales/run_vault.sh - +RUN chmod +x /var/www/cmc-sales/run_update_invoices.sh # By default, simply start apache. diff --git a/app/controllers/invoices_controller.php b/app/controllers/invoices_controller.php index 0468a23c..ccb684fe 100755 --- a/app/controllers/invoices_controller.php +++ b/app/controllers/invoices_controller.php @@ -14,17 +14,15 @@ class InvoicesController extends AppController { function index() { $this->Invoice->recursive = 0; $this->set('invoices', $this->paginate()); - - /*$q = <<Invoice->query($q); - - $this->set('invoices', $results);*/ } + function calculate() { + + + + } + function printView() { $this->layout = 'minimal'; diff --git a/app/controllers/line_items_controller.php b/app/controllers/line_items_controller.php index 124a5758..8933f04b 100755 --- a/app/controllers/line_items_controller.php +++ b/app/controllers/line_items_controller.php @@ -109,9 +109,11 @@ class LineItemsController extends AppController { $this->set('principles', $this->LineItem->Product->Principle->find('list')); } - // Adding or editing an Invoice means we need to update the invoiced_amount column + + // Adding or editing an Invoice means we need to update the invoiced_amount column // issue #54 function updateInvoice($documentID) { + // If we've changed a line_item for an invoice, update the invoiced amount // on the invoices table. $document = $this->LineItem->Document->find('first', array('conditions' => array('Document.id' => $documentID), 'recursive'=>1)); @@ -125,5 +127,6 @@ class LineItemsController extends AppController { } } + } ?> diff --git a/app/views/invoices/index.ctp b/app/views/invoices/index.ctp index dc84fde0..b723526f 100755 --- a/app/views/invoices/index.ctp +++ b/app/views/invoices/index.ctp @@ -13,7 +13,8 @@ Date Due sort('paid');?> Date Received - TODO + Amount Invoiced + Amount Received sort('Invoice Number');?> sort('Job Number');?> sort('enquiry_id');?> @@ -65,7 +66,8 @@ ?> - TODO + + TODO