Fix empty invoice amounts when creating a new invoice #80
|
|
@ -260,6 +260,9 @@ class DocumentsController extends AppController {
|
|||
if(isset($source_document_id)) {
|
||||
//This is not ideal. But nothing else is either.
|
||||
$sourceDoc = $this->Document->find('first', array('conditions' => array('Document.id' => $source_document_id)));
|
||||
|
||||
$totals = $this->calculateTotals($sourceDoc, $enquiry['Enquiry']['gst']);
|
||||
$this->data['Invoice']['amount_invoiced'] = $totals['total'];
|
||||
if($sourceDoc['Document']['type'] == 'orderAck') {
|
||||
$oa_attributes = array(
|
||||
'ship_via',
|
||||
|
|
|
|||
Loading…
Reference in a new issue