Check we're using the shipping address with the delivery note

This commit is contained in:
Hillel Coren 2017-12-31 16:36:35 +02:00
parent 62ba989043
commit e9a55aec94

View File

@ -603,6 +603,12 @@ class InvoiceController extends BaseController
];
$invoice->invoice_type_id = intval($invoice->invoice_type_id);
if ($invoice->client->shipping_address1) {
foreach (['address1', 'address2', 'city', 'state', 'postal_code', 'country_id'] as $field) {
$invoice->client->$field = $invoice->client->{'shipping_' . $field};
}
}
$data = [
'invoice' => $invoice,
'invoiceDesigns' => InvoiceDesign::getDesigns(),