// Supply Orders : added supplier address in the order form (PDF)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10998 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2011-12-06 15:27:38 +00:00
parent 53ffa9dace
commit bda11e1541
3 changed files with 27 additions and 4 deletions
@@ -33,6 +33,7 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate
public $supply_order;
public $warehouse;
public $address_warehouse;
public $address_supplier;
public $context;
public function __construct(SupplyOrder $supply_order, $smarty)
@@ -42,6 +43,7 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate
$this->context = Context::getContext();
$this->warehouse = new Warehouse($supply_order->id_warehouse);
$this->address_warehouse = new Address($this->warehouse->id_address);
$this->address_supplier = new Address(Address::getAddressIdBySupplierId($supply_order->id_supplier));
// header informations
$this->date = Tools::displayDate($supply_order->date_add, (int)$this->supply_order->id_lang);
@@ -64,6 +66,7 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate
$this->smarty->assign(array(
'warehouse' => $this->warehouse,
'address_warehouse' => $this->address_warehouse,
'address_supplier' => $this->address_supplier,
'supply_order' => $this->supply_order,
'supply_order_details' => $supply_order_details,
'tax_order_summary' => $tax_order_summary,
+12 -2
View File
@@ -53,6 +53,18 @@
<tr>
<td style="font-size: 13pt; font-weight: bold">{$supply_order->supplier_name}</td>
</tr>
<tr>
<td style="font-size: 13pt; font-weight: bold">{$address_supplier->address1}</td>
</tr>
{* if the address has two parts *}
{if !empty($address_supplier->address2)}
<tr>
<td style="font-size: 13pt; font-weight: bold">{$address_supplier->address2}</td>
</tr>
{/if}
<tr>
<td style="font-size: 13pt; font-weight: bold">{$address_supplier->postcode} {$address_supplier->city}</td>
</tr>
</table>
</div>
<!-- / SUPPLIER ADDRESS -->
@@ -153,6 +165,4 @@
</table>
</div>
<!-- / TOTAL -->
</div>
+12 -2
View File
@@ -53,6 +53,18 @@
<tr>
<td style="font-size: 13pt; font-weight: bold">{$supply_order->supplier_name}</td>
</tr>
<tr>
<td style="font-size: 13pt; font-weight: bold">{$address_supplier->address1}</td>
</tr>
{* if the address has two parts *}
{if !empty($address_supplier->address2)}
<tr>
<td style="font-size: 13pt; font-weight: bold">{$address_supplier->address2}</td>
</tr>
{/if}
<tr>
<td style="font-size: 13pt; font-weight: bold">{$address_supplier->postcode} {$address_supplier->city}</td>
</tr>
</table>
</div>
<!-- / SUPPLIER ADDRESS -->
@@ -153,6 +165,4 @@
</table>
</div>
<!-- / TOTAL -->
</div>