diff --git a/controllers/emails_controller.php b/controllers/emails_controller.php index f529f232..0cf6f19f 100755 --- a/controllers/emails_controller.php +++ b/controllers/emails_controller.php @@ -74,6 +74,19 @@ class EmailsController extends AppController { } + function print_frame($id = null) { + $this->layout = 'ajax'; + $email = $this->Email->find('first', array('conditions'=>array('Email.id'=>$id))); + + $body_ID = $this->findBodyID($email['EmailAttachment']); + $this->set('body_ID', $body_ID); + $this->set('recipients', $this->Email->EmailRecipient->getRecipients($id)); + + $this->set('email', $email); + } + + + /** * Fetch all the Emails that are from, to, cc a User ID * diff --git a/controllers/shipments_controller.php b/controllers/shipments_controller.php index b989fd7a..2fbaa2fe 100644 --- a/controllers/shipments_controller.php +++ b/controllers/shipments_controller.php @@ -133,7 +133,7 @@ class ShipmentsController extends AppController { if ($this->Shipment->saveAll($this->data)) { - + $this->Shipment->Box->updateCounterCache(array('shipment_id'=>$shipment_id)); $this->Shipment->ShipmentInvoice->updateCounterCache(array('shipment_id'=>$shipment_id)); diff --git a/views/elements/add_edit_shipment.ctp b/views/elements/add_edit_shipment.ctp index 8c08a7b9..bc38d9f2 100644 --- a/views/elements/add_edit_shipment.ctp +++ b/views/elements/add_edit_shipment.ctp @@ -95,7 +95,7 @@ echo $form->input('id', array('type'=>'hidden')); =$form->input('address_id', array('type'=>'hidden', 'id'=>'address_id', 'value'=>$this->data['Shipment']['address_id']));?>