[*] BO: Warehouse name is now displayed on each product line orders

This commit is contained in:
Rémi Gaillard
2013-08-14 15:02:30 +02:00
parent 6cff684af1
commit 24ac8582bf
5 changed files with 33 additions and 3 deletions
@@ -45,6 +45,7 @@
{/if}
</td>
<td align="center" class="productQuantity">{$product['customizationQuantityTotal']}</td>
{if $display_warehouse}<td style="" align="center">&nbsp;</td>{/if}
{if ($order->hasBeenPaid())}<td align="center" class="productQuantity">{$product['customizationQuantityRefunded']}</td>{/if}
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<td align="center" class="productQuantity">{$product['customizationQuantityReturned']}</td>{/if}
{if $stock_management}<td align="center" class=""> - </td>{/if}
@@ -103,6 +104,7 @@
</span>
{/if}
</td>
{if $display_warehouse}<td style="" align="center">&nbsp;</td>{/if}
{if ($order->hasBeenPaid())}<td align="center">{$customization['quantity_refunded']}</td>{/if}
{if ($order->hasBeenDelivered())}<td align="center">{$customization['quantity_returned']}</td>{/if}
<td align="center">
@@ -40,6 +40,7 @@
</td>
<td style="display:none;" align="center" class="productQuantity"><input type="text" name="add_product[product_quantity]" id="add_product_product_quantity" value="1" size="3" disabled="disabled" /></td>
{if ($order->hasBeenPaid())}<td style="display:none;" align="center" class="productQuantity">&nbsp;</td>{/if}
{if $display_warehouse}<td style="" align="center">&nbsp;</td>{/if}
{if ($order->hasBeenDelivered())}<td style="display:none;" align="center" class="productQuantity">&nbsp;</td>{/if}
<td style="display:none;" align="center" class="productQuantity" id="add_product_product_stock">0</td>
<td style="display:none;" align="center" id="add_product_product_total">{displayPrice price=0 currency=$currency->id}</td>
@@ -56,6 +56,7 @@
</span>
{/if}
</td>
<td>{if $display_warehouse}{$product.warehouse_name|escape:'htmlall':'UTF-8'}{/if}</td>
{if ($order->hasBeenPaid())}
<td align="center" class="productQuantity">
{$product['product_quantity_refunded']}
@@ -592,6 +592,7 @@
<th>{l s='Product'}</th>
<th style="width: 15%; text-align: center">{l s='Unit Price'} <sup>*</sup></th>
<th style="width: 4%; text-align: center">{l s='Qty'}</th>
{if $display_warehouse}<th style="text-align: center">{l s='Warehouse'}</th>{/if}
{if ($order->hasBeenPaid())}<th style="width: 3%; text-align: center">{l s='Refunded'}</th>{/if}
{if ($order->hasBeenDelivered() || $order->hasProductReturned())}<th style="width: 3%; text-align: center">{l s='Returned'}</th>{/if}
{if $stock_management}<th style="width: 10%; text-align: center">{l s='Available quantity'}</th>{/if}
+28 -3
View File
@@ -1332,6 +1332,13 @@ class AdminOrdersControllerCore extends AdminController
// if the current stock requires a warning
if ($product['current_stock'] == 0 && $display_out_of_stock_warning)
$this->displayWarning($this->l('This product is out of stock: ').' '.$product['product_name']);
if ($product['id_warehouse'] != 0)
{
$warehouse = new Warehouse((int)$product['id_warehouse']);
$product['warehouse_name'] = $warehouse->name;
}
else
$product['warehouse_name'] = '--';
}
// Smarty assign
@@ -1374,7 +1381,8 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $order->getInvoicesCollection(),
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
'payment_methods' => $payment_methods,
'invoice_management_active' => Configuration::get('PS_INVOICE', null, null, $order->id_shop)
'invoice_management_active' => Configuration::get('PS_INVOICE', null, null, $order->id_shop),
'display_warehouse' => (int)Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')
);
return parent::renderView();
@@ -1737,6 +1745,13 @@ class AdminOrdersControllerCore extends AdminController
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
$product['return_history'] = OrderReturn::getProductReturnDetail((int)$product['id_order_detail']);
$product['refund_history'] = OrderSlip::getProductSlipDetail((int)$product['id_order_detail']);
if ($product['id_warehouse'] != 0)
{
$warehouse = new Warehouse((int)$product['id_warehouse']);
$product['warehouse_name'] = $warehouse->name;
}
else
$product['warehouse_name'] = '--';
// Get invoices collection
$invoice_collection = $order->getInvoicesCollection();
@@ -1757,7 +1772,8 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $invoice_collection,
'current_id_lang' => Context::getContext()->language->id,
'link' => Context::getContext()->link,
'current_index' => self::$currentIndex
'current_index' => self::$currentIndex,
'display_warehouse' => (int)Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')
));
$this->sendChangedNotification($order);
@@ -1952,6 +1968,14 @@ class AdminOrdersControllerCore extends AdminController
$product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl'];
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
$product['refund_history'] = OrderSlip::getProductSlipDetail($order_detail->id);
if ($product['id_warehouse'] != 0)
{
$warehouse = new Warehouse((int)$product['id_warehouse']);
$product['warehouse_name'] = $warehouse->name;
}
else
$product['warehouse_name'] = '--';
// Get invoices collection
$invoice_collection = $order->getInvoicesCollection();
@@ -1971,7 +1995,8 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $invoice_collection,
'current_id_lang' => Context::getContext()->language->id,
'link' => Context::getContext()->link,
'current_index' => self::$currentIndex
'current_index' => self::$currentIndex,
'display_warehouse' => (int)Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')
));
if (!$res)