[*] BO : Fix #PSCFV-8504 carrier on invoice and delivery slip
This commit is contained in:
@@ -60,13 +60,16 @@ class HTMLTemplateDeliverySlipCore extends HTMLTemplate
|
|||||||
$invoice_address = new Address((int)$this->order->id_address_invoice);
|
$invoice_address = new Address((int)$this->order->id_address_invoice);
|
||||||
$formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' ');
|
$formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$carrier = new Carrier($this->order->id_carrier);
|
||||||
|
$carrier->name = ($carrier->name == '0' ? Configuration::get('PS_SHOP_NAME') : $carrier->name);
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'order' => $this->order,
|
'order' => $this->order,
|
||||||
'order_details' => $this->order_invoice->getProducts(),
|
'order_details' => $this->order_invoice->getProducts(),
|
||||||
'delivery_address' => $formatted_delivery_address,
|
'delivery_address' => $formatted_delivery_address,
|
||||||
'invoice_address' => $formatted_invoice_address,
|
'invoice_address' => $formatted_invoice_address,
|
||||||
'order_invoice' => $this->order_invoice
|
'order_invoice' => $this->order_invoice,
|
||||||
|
'carrier' => $carrier
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->smarty->fetch($this->getTemplate('delivery-slip'));
|
return $this->smarty->fetch($this->getTemplate('delivery-slip'));
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
|||||||
$tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT')
|
$tax_exempt = Configuration::get('VATNUMBER_MANAGEMENT')
|
||||||
&& !empty($address->vat_number)
|
&& !empty($address->vat_number)
|
||||||
&& $address->id_country != Configuration::get('VATNUMBER_COUNTRY');
|
&& $address->id_country != Configuration::get('VATNUMBER_COUNTRY');
|
||||||
|
$carrier = new Carrier($this->order->id_carrier);
|
||||||
|
|
||||||
$this->smarty->assign(array(
|
$this->smarty->assign(array(
|
||||||
'tax_exempt' => $tax_exempt,
|
'tax_exempt' => $tax_exempt,
|
||||||
'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(),
|
'use_one_after_another_method' => $this->order_invoice->useOneAfterAnotherTaxComputationMethod(),
|
||||||
@@ -98,7 +99,8 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
|||||||
'ecotax_tax_breakdown' => $this->order_invoice->getEcoTaxTaxesBreakdown(),
|
'ecotax_tax_breakdown' => $this->order_invoice->getEcoTaxTaxesBreakdown(),
|
||||||
'wrapping_tax_breakdown' => $this->order_invoice->getWrappingTaxesBreakdown(),
|
'wrapping_tax_breakdown' => $this->order_invoice->getWrappingTaxesBreakdown(),
|
||||||
'order' => $this->order,
|
'order' => $this->order,
|
||||||
'order_invoice' => $this->order_invoice
|
'order_invoice' => $this->order_invoice,
|
||||||
|
'carrier' => $carrier
|
||||||
));
|
));
|
||||||
|
|
||||||
return $this->smarty->fetch($this->getTemplate('invoice.tax-tab'));
|
return $this->smarty->fetch($this->getTemplate('invoice.tax-tab'));
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<!-- PRODUCTS TAB -->
|
<!-- PRODUCTS TAB -->
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 20%; padding-right: 7px; text-align: right; vertical-align: top">
|
<td style="width: 22%; padding-right: 7px; text-align: right; vertical-align: top">
|
||||||
<!-- CUSTOMER INFORMATIONS -->
|
<!-- CUSTOMER INFORMATIONS -->
|
||||||
<b>{l s='Order Number:' pdf='true'}</b><br />
|
<b>{l s='Order Number:' pdf='true'}</b><br />
|
||||||
{$order->getUniqReference()}<br />
|
{$order->getUniqReference()}<br />
|
||||||
@@ -93,9 +93,14 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
{if isset($carrier)}
|
||||||
|
<b>{l s='Carrier:' pdf='true'}</b><br />
|
||||||
|
{$carrier->name}<br />
|
||||||
|
<br />
|
||||||
|
{/if}
|
||||||
<!-- / CUSTOMER INFORMATIONS -->
|
<!-- / CUSTOMER INFORMATIONS -->
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 80%; text-align: right">
|
<td style="width: 78%; text-align: right">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
<tr style="line-height:6px;">
|
<tr style="line-height:6px;">
|
||||||
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 60%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td>
|
<td style="text-align: left; background-color: #4D4D4D; color: #FFF; padding-left: 10px; font-weight: bold; width: 60%">{l s='ITEMS TO BE DELIVERED' pdf='true'}</td>
|
||||||
|
|||||||
@@ -92,6 +92,11 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
{if isset($carrier)}
|
||||||
|
<b>{l s='Carrier:' pdf='true'}</b><br />
|
||||||
|
{$carrier->name}<br />
|
||||||
|
<br />
|
||||||
|
{/if}
|
||||||
<!-- / CUSTOMER INFORMATION -->
|
<!-- / CUSTOMER INFORMATION -->
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 85%; text-align: right">
|
<td style="width: 85%; text-align: right">
|
||||||
|
|||||||
Reference in New Issue
Block a user