diff --git a/views/boxes/add.ctp b/views/boxes/add.ctp
new file mode 100644
index 00000000..c8d97a40
--- /dev/null
+++ b/views/boxes/add.ctp
@@ -0,0 +1,21 @@
+
+create('Box');?>
+
+
+ input('shipment_id');
+ echo $form->input('length');
+ echo $form->input('width');
+ echo $form->input('height');
+ echo $form->input('weight');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('List Boxes', true), array('action' => 'index'));?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+
+
diff --git a/views/boxes/edit.ctp b/views/boxes/edit.ctp
new file mode 100644
index 00000000..1610348f
--- /dev/null
+++ b/views/boxes/edit.ctp
@@ -0,0 +1,23 @@
+
+create('Box');?>
+
+
+ input('id');
+ echo $form->input('shipment_id');
+ echo $form->input('length');
+ echo $form->input('width');
+ echo $form->input('height');
+ echo $form->input('weight');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('Delete', true), array('action' => 'delete', $form->value('Box.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Box.id'))); ?>
+ link(__('List Boxes', true), array('action' => 'index'));?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+
+
diff --git a/views/boxes/index.ctp b/views/boxes/index.ctp
new file mode 100644
index 00000000..1eb95903
--- /dev/null
+++ b/views/boxes/index.ctp
@@ -0,0 +1,66 @@
+
+
+
+counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?>
+
+
+ sort('id');?>
+ sort('shipment_id');?>
+ sort('length');?>
+ sort('width');?>
+ sort('height');?>
+ sort('weight');?>
+
+
+
+ >
+
+
+
+
+ link($box['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $box['Shipment']['id'])); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ link(__('View', true), array('action' => 'view', $box['Box']['id'])); ?>
+ link(__('Edit', true), array('action' => 'edit', $box['Box']['id'])); ?>
+ link(__('Delete', true), array('action' => 'delete', $box['Box']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $box['Box']['id'])); ?>
+
+
+
+
+
+
+ prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ | numbers();?>
+ next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+
+
+
+ link(__('New Box', true), array('action' => 'add')); ?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+
+
diff --git a/views/boxes/view.ctp b/views/boxes/view.ctp
new file mode 100644
index 00000000..df000f4e
--- /dev/null
+++ b/views/boxes/view.ctp
@@ -0,0 +1,45 @@
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+ link($box['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $box['Shipment']['id'])); ?>
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+
+
+
+
+ link(__('Edit Box', true), array('action' => 'edit', $box['Box']['id'])); ?>
+ link(__('Delete Box', true), array('action' => 'delete', $box['Box']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $box['Box']['id'])); ?>
+ link(__('List Boxes', true), array('action' => 'index')); ?>
+ link(__('New Box', true), array('action' => 'add')); ?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+
+
diff --git a/views/freight_forwarders/add.ctp b/views/freight_forwarders/add.ctp
new file mode 100644
index 00000000..fccd3694
--- /dev/null
+++ b/views/freight_forwarders/add.ctp
@@ -0,0 +1,15 @@
+
+create('FreightForwarder');?>
+
+
+ input('name');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('List FreightForwarders', true), array('action' => 'index'));?>
+
+
diff --git a/views/freight_forwarders/edit.ctp b/views/freight_forwarders/edit.ctp
new file mode 100644
index 00000000..d7ca9225
--- /dev/null
+++ b/views/freight_forwarders/edit.ctp
@@ -0,0 +1,17 @@
+
+create('FreightForwarder');?>
+
+
+ input('id');
+ echo $form->input('name');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('Delete', true), array('action' => 'delete', $form->value('FreightForwarder.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('FreightForwarder.id'))); ?>
+ link(__('List FreightForwarders', true), array('action' => 'index'));?>
+
+
diff --git a/views/freight_forwarders/index.ctp b/views/freight_forwarders/index.ctp
new file mode 100644
index 00000000..570d506b
--- /dev/null
+++ b/views/freight_forwarders/index.ctp
@@ -0,0 +1,48 @@
+
+
+
+counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?>
+
+
+ sort('id');?>
+ sort('name');?>
+
+
+
+ >
+
+
+
+
+
+
+
+ link(__('View', true), array('action' => 'view', $freightForwarder['FreightForwarder']['id'])); ?>
+ link(__('Edit', true), array('action' => 'edit', $freightForwarder['FreightForwarder']['id'])); ?>
+ link(__('Delete', true), array('action' => 'delete', $freightForwarder['FreightForwarder']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $freightForwarder['FreightForwarder']['id'])); ?>
+
+
+
+
+
+
+ prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ | numbers();?>
+ next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+
+
+
+ link(__('New FreightForwarder', true), array('action' => 'add')); ?>
+
+
diff --git a/views/freight_forwarders/view.ctp b/views/freight_forwarders/view.ctp
new file mode 100644
index 00000000..ee71194c
--- /dev/null
+++ b/views/freight_forwarders/view.ctp
@@ -0,0 +1,23 @@
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+
+
+
+
+ link(__('Edit FreightForwarder', true), array('action' => 'edit', $freightForwarder['FreightForwarder']['id'])); ?>
+ link(__('Delete FreightForwarder', true), array('action' => 'delete', $freightForwarder['FreightForwarder']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $freightForwarder['FreightForwarder']['id'])); ?>
+ link(__('List FreightForwarders', true), array('action' => 'index')); ?>
+ link(__('New FreightForwarder', true), array('action' => 'add')); ?>
+
+
diff --git a/views/jobs/index.ctp b/views/jobs/index.ctp
index 58d1574d..656cb456 100644
--- a/views/jobs/index.ctp
+++ b/views/jobs/index.ctp
@@ -1,6 +1,5 @@
link('jquery.chromatable');
echo $javascript->link('job_index');
?>
diff --git a/views/jobs/view_report.ctp b/views/jobs/view_report.ctp
index f0b744c3..539d8dde 100644
--- a/views/jobs/view_report.ctp
+++ b/views/jobs/view_report.ctp
@@ -12,6 +12,7 @@
Enquiry Number
Principle
Customer
+ Status
Sale Currency
Gross Sales AUD
Net Sales AUD
@@ -51,7 +52,18 @@
?>
-
+
+ if($job['Job']['job_status'] == 'JOB CANCELLED' || $job['Job']['job_status'] == 'JOB ON HOLD' ) {
+ $class='cancelled';
+ $doCount = false;
+ }
+ else {
+ $class ='';
+ $doCount = true;
+ }
+ ?>
+
+
=$job['Job']['date_order_received'];?>
=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?>
@@ -62,21 +74,36 @@
=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?>
+ =$job['Job']['job_status'];?>
+
=$job['Currency']['name'];?>
=$job['Job']['company_gross_sales_aud'];?>
- $gross_sales_aud_total += $job['Job']['company_gross_sales_aud']; ?>
+
+ if($doCount) {
+ $gross_sales_aud_total += $job['Job']['company_gross_sales_aud'];
+ }
+ ?>
=$job['Job']['net_sales_aud'];?>
- $net_sales_aud_total += $job['Job']['net_sales_aud']; ?>
+
+ if($doCount) {
+ $net_sales_aud_total += $job['Job']['net_sales_aud'];
+
+ } ?>
=$job['Job']['gross_profit_aud'];?>
- $gross_profit_total += $job['Job']['gross_profit_aud']; ?>
+
+ if($doCount) {
+ $gross_profit_total += $job['Job']['gross_profit_aud'];
+
+ }
+ ?>
@@ -90,40 +117,60 @@
=$job['Job']['ato_exchange_rate'];?>
=$job['Job']['gross_australian_sales_foreign_currency'];?>
- $gross_australian_sales_foreign_currency_total += $job['Job']['gross_australian_sales_foreign_currency']; ?>
+
+ if($doCount) {
+ $gross_australian_sales_foreign_currency_total += $job['Job']['gross_australian_sales_foreign_currency']; }
+ ?>
=$job['Job']['net_australian_sales_foreign_currency'];
- $net_australian_sales_foreign_currency_total += $job['Job']['net_australian_sales_foreign_currency'];
+ if($doCount) {
+ $net_australian_sales_foreign_currency_total += $job['Job']['net_australian_sales_foreign_currency'];
+
+ }
?>
=$job['Job']['gross_profit_value_australian_sales_foreign_currency'];
- $gross_profit_value_australian_sales_foreign_currency_total += $job['Job']['gross_profit_value_australian_sales_foreign_currency'];
+ if($doCount) {
+ $gross_profit_value_australian_sales_foreign_currency_total += $job['Job']['gross_profit_value_australian_sales_foreign_currency'];
+
+ }
?>
=$job['Job']['gross_export_sales_foreign_currency'];
- $gross_export_sales_foreign_currency_total += $job['Job']['gross_export_sales_foreign_currency'];
+
+ if($doCount) {
+
+ $gross_export_sales_foreign_currency_total += $job['Job']['gross_export_sales_foreign_currency'];
+ }
?>
=$job['Job']['net_export_sales_foreign_currency'];
- $net_export_sales_foreign_currency_total += $job['Job']['net_export_sales_foreign_currency'];
+ if($doCount) {
+ $net_export_sales_foreign_currency_total += $job['Job']['net_export_sales_foreign_currency'];
+ }
?>
=$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
- $gross_profit_value_after_discount_exports_foreign_currency_total += $job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
-
+ if($doCount) {
+ $gross_profit_value_after_discount_exports_foreign_currency_total += $job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
+ }
?>
=$job['Job']['gross_commissions'];
- $gross_commissions_total += $job['Job']['gross_commissions'];
+ if($doCount) {
+ $gross_commissions_total += $job['Job']['gross_commissions'];
+ }
?>
=$job['Job']['net_commissions'];
- $net_commissions_total += $job['Job']['net_commissions'];
+ if($doCount) {
+ $net_commissions_total += $job['Job']['net_commissions'];
+ }
?>
@@ -139,6 +186,7 @@
//Enq No ?>
//Principle ?>
//Customer ?>
+ //Status ?>
//Sale Currency?>
=$number->currency($gross_sales_aud_total)?>
=$number->currency($net_sales_aud_total)?>
diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp
index ea2c9ea7..6624dd7b 100755
--- a/views/layouts/default.ctp
+++ b/views/layouts/default.ctp
@@ -56,16 +56,24 @@
- link('Enquiries', '/enquiries/index'); ?>
+ link('Enquiries', '/enquiries/index'); ?>
+
link('Enquiry Register', '/enquiries/index'); ?>
- link('Jobs', '/jobs/index'); ?>
+ link('Jobs', '/jobs/index'); ?>
+
link('Job List', '/jobs/index'); ?>
+ link('Shipments','/shipments/index');?>
+
+ link('Shipments List', '/shipments/index');?>
+
+
+
link('Customers', '/customers/index'); ?>
link('Customer Index', '/customers/index'); ?>
diff --git a/views/principles/index.ctp b/views/principles/index.ctp
index 03e1f1d1..befc8b35 100755
--- a/views/principles/index.ctp
+++ b/views/principles/index.ctp
@@ -10,6 +10,7 @@ echo $paginator->counter(array(
sort('name');?>
+ Short Name
sort('code');?>
sort('country_id');?>
sort('currency_id');?>
@@ -28,6 +29,9 @@ foreach ($principles as $principle):
+
+
+
diff --git a/views/shipment_invoices/add.ctp b/views/shipment_invoices/add.ctp
new file mode 100644
index 00000000..c7c861ff
--- /dev/null
+++ b/views/shipment_invoices/add.ctp
@@ -0,0 +1,28 @@
+
+create('ShipmentInvoice');?>
+
+
+ input('shipment_id');
+ echo $form->input('principle_id');
+ echo $form->input('currency_id');
+ echo $form->input('invoice_number');
+ echo $form->input('invoice_amount');
+ echo $form->input('deferred_gst');
+ echo $form->input('approved');
+ echo $form->input('invoice_type');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('List ShipmentInvoices', true), array('action' => 'index'));?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?>
+ link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?>
+
+
diff --git a/views/shipment_invoices/edit.ctp b/views/shipment_invoices/edit.ctp
new file mode 100644
index 00000000..8dd3b552
--- /dev/null
+++ b/views/shipment_invoices/edit.ctp
@@ -0,0 +1,30 @@
+
+create('ShipmentInvoice');?>
+
+
+ input('id');
+ echo $form->input('shipment_id');
+ echo $form->input('principle_id');
+ echo $form->input('currency_id');
+ echo $form->input('invoice_number');
+ echo $form->input('invoice_amount');
+ echo $form->input('deferred_gst');
+ echo $form->input('approved');
+ echo $form->input('invoice_type');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('Delete', true), array('action' => 'delete', $form->value('ShipmentInvoice.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('ShipmentInvoice.id'))); ?>
+ link(__('List ShipmentInvoices', true), array('action' => 'index'));?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?>
+ link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?>
+
+
diff --git a/views/shipment_invoices/index.ctp b/views/shipment_invoices/index.ctp
new file mode 100644
index 00000000..6a79b572
--- /dev/null
+++ b/views/shipment_invoices/index.ctp
@@ -0,0 +1,82 @@
+
+
+
+counter(array(
+'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+));
+?>
+
+
+ sort('id');?>
+ sort('shipment_id');?>
+ sort('principle_id');?>
+ sort('currency_id');?>
+ sort('invoice_number');?>
+ sort('invoice_amount');?>
+ sort('deferred_gst');?>
+ sort('approved');?>
+ sort('invoice_type');?>
+
+
+
+ >
+
+
+
+
+ link($shipmentInvoice['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $shipmentInvoice['Shipment']['id'])); ?>
+
+
+ link($shipmentInvoice['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $shipmentInvoice['Principle']['id'])); ?>
+
+
+ link($shipmentInvoice['Currency']['name'], array('controller' => 'currencies', 'action' => 'view', $shipmentInvoice['Currency']['id'])); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ link(__('View', true), array('action' => 'view', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
+ link(__('Edit', true), array('action' => 'edit', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
+ link(__('Delete', true), array('action' => 'delete', $shipmentInvoice['ShipmentInvoice']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipmentInvoice['ShipmentInvoice']['id'])); ?>
+
+
+
+
+
+
+ prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
+ | numbers();?>
+ next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
+
+
+
+ link(__('New ShipmentInvoice', true), array('action' => 'add')); ?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?>
+ link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?>
+
+
diff --git a/views/shipment_invoices/view.ctp b/views/shipment_invoices/view.ctp
new file mode 100644
index 00000000..e7f9382c
--- /dev/null
+++ b/views/shipment_invoices/view.ctp
@@ -0,0 +1,64 @@
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+ link($shipmentInvoice['Shipment']['id'], array('controller' => 'shipments', 'action' => 'view', $shipmentInvoice['Shipment']['id'])); ?>
+
+
+ >
+ >
+ link($shipmentInvoice['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $shipmentInvoice['Principle']['id'])); ?>
+
+
+ >
+ >
+ link($shipmentInvoice['Currency']['name'], array('controller' => 'currencies', 'action' => 'view', $shipmentInvoice['Currency']['id'])); ?>
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+
+
+
+
+ link(__('Edit ShipmentInvoice', true), array('action' => 'edit', $shipmentInvoice['ShipmentInvoice']['id'])); ?>
+ link(__('Delete ShipmentInvoice', true), array('action' => 'delete', $shipmentInvoice['ShipmentInvoice']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipmentInvoice['ShipmentInvoice']['id'])); ?>
+ link(__('List ShipmentInvoices', true), array('action' => 'index')); ?>
+ link(__('New ShipmentInvoice', true), array('action' => 'add')); ?>
+ link(__('List Shipments', true), array('controller' => 'shipments', 'action' => 'index')); ?>
+ link(__('New Shipment', true), array('controller' => 'shipments', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Currencies', true), array('controller' => 'currencies', 'action' => 'index')); ?>
+ link(__('New Currency', true), array('controller' => 'currencies', 'action' => 'add')); ?>
+
+
diff --git a/views/shipments/add.ctp b/views/shipments/add.ctp
new file mode 100644
index 00000000..591c9f53
--- /dev/null
+++ b/views/shipments/add.ctp
@@ -0,0 +1,35 @@
+
+create('Shipment');?>
+
+
+ input('box_count');
+ echo $form->input('freight_forwarder_id');
+ echo $form->input('date_arrived');
+ echo $form->input('date_dispatched');
+ echo $form->input('airway_bill');
+ echo $form->input('comments');
+ echo $form->input('Job');
+ echo $form->input('Principle');
+ echo $form->input('PurchaseOrder');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('List Shipments', true), array('action' => 'index'));?>
+ link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?>
+ link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?>
+ link(__('List Boxes', true), array('controller' => 'boxes', 'action' => 'index')); ?>
+ link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add')); ?>
+ link(__('List Shipment Invoices', true), array('controller' => 'shipment_invoices', 'action' => 'index')); ?>
+ link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add')); ?>
+ link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?>
+ link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Purchase Orders', true), array('controller' => 'purchase_orders', 'action' => 'index')); ?>
+ link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add')); ?>
+
+
diff --git a/views/shipments/edit.ctp b/views/shipments/edit.ctp
new file mode 100644
index 00000000..f1845f62
--- /dev/null
+++ b/views/shipments/edit.ctp
@@ -0,0 +1,37 @@
+
+create('Shipment');?>
+
+
+ input('id');
+ echo $form->input('box_count');
+ echo $form->input('freight_forwarder_id');
+ echo $form->input('date_arrived');
+ echo $form->input('date_dispatched');
+ echo $form->input('airway_bill');
+ echo $form->input('comments');
+ echo $form->input('Job');
+ echo $form->input('Principle');
+ echo $form->input('PurchaseOrder');
+ ?>
+
+end('Submit');?>
+
+
+
+ link(__('Delete', true), array('action' => 'delete', $form->value('Shipment.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('Shipment.id'))); ?>
+ link(__('List Shipments', true), array('action' => 'index'));?>
+ link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?>
+ link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?>
+ link(__('List Boxes', true), array('controller' => 'boxes', 'action' => 'index')); ?>
+ link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add')); ?>
+ link(__('List Shipment Invoices', true), array('controller' => 'shipment_invoices', 'action' => 'index')); ?>
+ link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add')); ?>
+ link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?>
+ link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Purchase Orders', true), array('controller' => 'purchase_orders', 'action' => 'index')); ?>
+ link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add')); ?>
+
+
diff --git a/views/shipments/index.ctp b/views/shipments/index.ctp
new file mode 100644
index 00000000..76fb8d62
--- /dev/null
+++ b/views/shipments/index.ctp
@@ -0,0 +1,126 @@
+
+
+ link('shipment_index');?>
+
+ counter(array(
+ 'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
+ ));
+ ?>
+
+
+ sort('date_arrived');?>
+ sort('date_dispatched');?>
+ sort('type');?>
+ Principle(s)
+ PO(s)
+ Jobs
+ sort('box_count');?>
+ sort('freight_forwarder_id');?>
+
+
+ sort('airway_bill');?>
+ sort('comments');?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if(!empty($principle['short_name'])) {
+ echo $html->link($principle['short_name'], array('controller'=>'principles','action'=>'view',$principle['id']));
+ }
+ else {
+ echo $html->link($principle['name'], array('controller'=>'principles','action'=>'view',$principle['id']));
+ }
+ ?>
+
+
+
+
+
+
+
+ =$html->link($po['title'], array('controller'=>'purchase_orders', 'action'=>'view', $po['id']));?>
+
+
+
+
+
+
+ =$html->link($job['title'], array('controller'=>'jobs', 'action'=>'view', $job['id']));?>
+
+
+
+
+
+
+
+
+ link($shipment['FreightForwarder']['name'], array('controller' => 'freight_forwarders', 'action' => 'view', $shipment['FreightForwarder']['id'])); ?>
+
+
+
+
+
+
+
+
+
+
+ link(__('View', true), array('action' => 'view', $shipment['Shipment']['id'])); ?>
+ link(__('Edit', true), array('action' => 'edit', $shipment['Shipment']['id'])); ?>
+ link(__('Delete', true), array('action' => 'delete', $shipment['Shipment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipment['Shipment']['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/shipments/view.ctp b/views/shipments/view.ctp
new file mode 100644
index 00000000..e708bf66
--- /dev/null
+++ b/views/shipments/view.ctp
@@ -0,0 +1,371 @@
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+ link($shipment['FreightForwarder']['name'], array('controller' => 'freight_forwarders', 'action' => 'view', $shipment['FreightForwarder']['id'])); ?>
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+ >
+ >
+
+
+
+
+
+
+
+ link(__('Edit Shipment', true), array('action' => 'edit', $shipment['Shipment']['id'])); ?>
+ link(__('Delete Shipment', true), array('action' => 'delete', $shipment['Shipment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $shipment['Shipment']['id'])); ?>
+ link(__('List Shipments', true), array('action' => 'index')); ?>
+ link(__('New Shipment', true), array('action' => 'add')); ?>
+ link(__('List Freight Forwarders', true), array('controller' => 'freight_forwarders', 'action' => 'index')); ?>
+ link(__('New Freight Forwarder', true), array('controller' => 'freight_forwarders', 'action' => 'add')); ?>
+ link(__('List Boxes', true), array('controller' => 'boxes', 'action' => 'index')); ?>
+ link(__('New Box', true), array('controller' => 'boxes', 'action' => 'add')); ?>
+ link(__('List Shipment Invoices', true), array('controller' => 'shipment_invoices', 'action' => 'index')); ?>
+ link(__('New Shipment Invoice', true), array('controller' => 'shipment_invoices', 'action' => 'add')); ?>
+ link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?>
+ link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?>
+ link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?>
+ link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?>
+ link(__('List Purchase Orders', true), array('controller' => 'purchase_orders', 'action' => 'index')); ?>
+ link(__('New Purchase Order', true), array('controller' => 'purchase_orders', 'action' => 'add')); ?>
+
+
+
+
+
+
+
diff --git a/webroot/css/quotenik.css b/webroot/css/quotenik.css
index b76bf85b..a0fbf23b 100755
--- a/webroot/css/quotenik.css
+++ b/webroot/css/quotenik.css
@@ -1393,3 +1393,15 @@ span.month {
span.year {
cursor: pointer;
}
+
+tr.cancelled td {
+ text-decoration: line-through;
+}
+
+
+
+/* Shipments Index */
+
+table.shipments tr td {
+ font-size: 80%;
+}
diff --git a/webroot/js/job_index.js b/webroot/js/job_index.js
index b460448d..721745b9 100644
--- a/webroot/js/job_index.js
+++ b/webroot/js/job_index.js
@@ -1,17 +1,7 @@
$(function() {
- //alert($("#jobTableHead > tr > th").length);
-
- /* var headerCols = $(".jobTableHead > tr > th");
-
-
- headerCols.each(function(index) {
- alert($(this).width);
- });*/
-
-
- $(".editButton").show();
+// $(".editButton").show();
diff --git a/webroot/js/menu.js b/webroot/js/menu.js
index daf04a95..be802e13 100755
--- a/webroot/js/menu.js
+++ b/webroot/js/menu.js
@@ -5,6 +5,14 @@ $(function() {
},
function() {
$('ul', this).slideUp(50); //hide submenu
- })
+ });
+
+
+ $('#content').hover(
+ function() {
+ $('#nav > ul').hide();
+ }
+ );
+
});
diff --git a/webroot/js/shipment_index.js b/webroot/js/shipment_index.js
new file mode 100644
index 00000000..8a15dfc0
--- /dev/null
+++ b/webroot/js/shipment_index.js
@@ -0,0 +1,83 @@
+$(function() {
+ // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
+ $( "#dialog:ui-dialog" ).dialog( "destroy" );
+
+ var name = $( "#name" ),
+ email = $( "#email" ),
+ password = $( "#password" ),
+ allFields = $( [] ).add( name ).add( email ).add( password ),
+ tips = $( ".validateTips" );
+
+ function updateTips( t ) {
+ tips
+ .text( t )
+ .addClass( "ui-state-highlight" );
+ setTimeout(function() {
+ tips.removeClass( "ui-state-highlight", 1500 );
+ }, 500 );
+ }
+
+ function checkLength( o, n, min, max ) {
+ if ( o.val().length > max || o.val().length < min ) {
+ o.addClass( "ui-state-error" );
+ updateTips( "Length of " + n + " must be between " +
+ min + " and " + max + "." );
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ function checkRegexp( o, regexp, n ) {
+ if ( !( regexp.test( o.val() ) ) ) {
+ o.addClass( "ui-state-error" );
+ updateTips( n );
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ $( "#dialog-form" ).dialog({
+ autoOpen: false,
+ height: 300,
+ width: 350,
+ modal: true,
+ buttons: {
+ "Create an account": function() {
+ var bValid = true;
+ allFields.removeClass( "ui-state-error" );
+
+ bValid = bValid && checkLength( name, "username", 3, 16 );
+ bValid = bValid && checkLength( email, "email", 6, 80 );
+ bValid = bValid && checkLength( password, "password", 5, 16 );
+
+ bValid = bValid && checkRegexp( name, /^[a-z]([0-9a-z_])+$/i, "Username may consist of a-z, 0-9, underscores, begin with a letter." );
+ // From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
+ bValid = bValid && checkRegexp( email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. ui@jquery.com" );
+ bValid = bValid && checkRegexp( password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9" );
+
+ if ( bValid ) {
+ $( "#users tbody" ).append( " " +
+ "" + name.val() + " " +
+ "" + email.val() + " " +
+ "" + password.val() + " " +
+ " " );
+ $( this ).dialog( "close" );
+ }
+ },
+ Cancel: function() {
+ $( this ).dialog( "close" );
+ }
+ },
+ close: function() {
+ allFields.val( "" ).removeClass( "ui-state-error" );
+ }
+ });
+
+ $( "#newShipment" )
+ .button()
+ .click(function() {
+ $( "#dialog-form" ).dialog( "open" );
+ });
+ });
\ No newline at end of file