From e378a596ec508079527ed1e63c6273e0b2fa6afd Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Mon, 14 Mar 2011 11:26:58 +1100 Subject: [PATCH] Adding invoices and jobs to Customer view --- views/elements/invoice_table.ctp | 86 +++++++++++++++++++++++ views/elements/job_table.ctp | 116 +++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 views/elements/invoice_table.ctp create mode 100644 views/elements/job_table.ctp diff --git a/views/elements/invoice_table.ctp b/views/elements/invoice_table.ctp new file mode 100644 index 00000000..ed6b50ee --- /dev/null +++ b/views/elements/invoice_table.ctp @@ -0,0 +1,86 @@ + +

+

+ counter(array( + 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) + )); + ?>

+ + + + + + + + + + + + + + + + > + + + + + + + + + "; + } + else { + echo "PAID"; + echo ""; + echo ""; + } + + ?> + + + + + + + +
sort('issue_date');?>sort('due_date');?>sort('Invoice Number');?>sort('Job Number');?>sort('enquiry_id');?>sort('paid');?>sort('payment_received_date');?>sort('user_id');?>
+ toUnix($invoice['Invoice']['issue_date'])); ?> + + toUnix($invoice['Invoice']['due_date'])); ?> + + + + link($invoice['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $invoice['Invoice']['job_id'])); ?> + + link($invoice['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $invoice['Enquiry']['id'])); ?> + + "; + echo ""; + echo "N/A"; + echo ""; + echo date('j M Y',$time->toUnix($invoice['Invoice']['payment_received_date'])); + echo " + link($invoice['User']['username'], array('controller' => 'users', 'action' => 'view', $invoice['User']['id'])); ?> + + link(__('View', true), array('controller'=>'invoices','action' => 'view', $invoice['Invoice']['id'])); ?> + link(__('Edit', true), array('controller'=>'invoices', 'action' => 'edit', $invoice['Invoice']['id'])); ?> + +
+
+ prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?> + | numbers();?> + next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?> +
\ No newline at end of file diff --git a/views/elements/job_table.ctp b/views/elements/job_table.ctp new file mode 100644 index 00000000..c416dad1 --- /dev/null +++ b/views/elements/job_table.ctp @@ -0,0 +1,116 @@ +

+

+ counter(array( + 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) + )); + ?>

+ + + + + + + + + + + + + + + + + + + + + + link($po['title']." ", array('controller'=>'purchase_orders', 'action'=>'view', $po['id'])); + } + + ?> + > + + + + + + + + + + + + + + + + + + + + + + + + +
sort('created');?>sort('Job Number');?>sort('enquiry_id');?>POssort('Customer');?>sort('customer_order_number');?>sort('date_order_received');?>sort('date_order_sent_to_customer');?>sort('domestic_freight_paid_by');?>sort('sale_category');?>sort('shipment_category');?>sort('comments');?>
+ toUnix($job['Job']['created'])); ?> + + link(__($job['Job']['title'], true), array('action' => 'view', $job['Job']['id'])); ?> + + link($job['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $job['Enquiry']['id'])); ?> + + link($customers[$job['Enquiry']['customer_id']], array('controller'=>'customers', + 'action'=>'view', $job['Enquiry']['customer_id'])); ?> + + + + + + + + + + + + + + + + + link(__('View', true), array('action' => 'view', $job['Job']['id'])); ?> + link(__('Edit', true), array('action' => 'edit', $job['Job']['id']), array('class'=>'editWindow')); ?> +
+
+ prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?> + | numbers();?> + next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?> +
+ + + + \ No newline at end of file