From 8bef1d454deeb747eb4bafaca02a7231bb1d656b Mon Sep 17 00:00:00 2001 From: dSevere Date: Thu, 3 Nov 2011 17:59:29 +0000 Subject: [PATCH] // stock : add product managemetn on supplier order --- .../ajax_supplier_order_products_list.php | 2 +- .../themes/template/supplier_orders/form.tpl | 217 ++++++++++++++++++ classes/stock/SupplierOrder.php | 2 +- 3 files changed, 219 insertions(+), 2 deletions(-) create mode 100644 admin-dev/themes/template/supplier_orders/form.tpl diff --git a/admin-dev/ajax_supplier_order_products_list.php b/admin-dev/ajax_supplier_order_products_list.php index 498802b30..5a6913852 100644 --- a/admin-dev/ajax_supplier_order_products_list.php +++ b/admin-dev/ajax_supplier_order_products_list.php @@ -34,7 +34,7 @@ include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); require_once(dirname(__FILE__).'/init.php'); /* @var string Given this pattern, it will return a list of products */ -$pattern = pSQL(Tools::getValue('pattern', false)); +$pattern = pSQL(Tools::getValue('q', false)); if (!$pattern || $pattern == '' || strlen($pattern) < 1) die(); diff --git a/admin-dev/themes/template/supplier_orders/form.tpl b/admin-dev/themes/template/supplier_orders/form.tpl new file mode 100644 index 000000000..f6c0895da --- /dev/null +++ b/admin-dev/themes/template/supplier_orders/form.tpl @@ -0,0 +1,217 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 9795 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{extends file="../helper/form/form.tpl"} + +{block name="other_fieldsets"} + {if isset($show_product_management_form)} +

 

+ + + +
+ + Supplier Order Management + Ad an manage products of the current supplier Order + + +

{l s='To add a product to the order, begin typing the first letters of the product name, then select the product from the drop-down list:'}

+ + {l s='Add a product to the supplier order'} + +

 

+ + + + + +
+ + + + + + + + + + + + + + + {foreach $products_list AS $product} + + + + + + + + + + + {/foreach} + +
{l s='Reference'}{l s='EAN13'}{l s='Name'}{l s='Unit Price TE'}{l s='Quantity'}{l s='Discount rate'}{l s='Tax rate'}{l s='Delete'}
+ {$product.reference} + + {$product.ean13} + + {$product.name} + + + + + + + + + + + {l s='Remove this product from the order'} + +
+
+ +
+ + + + {/if} +{/block} \ No newline at end of file diff --git a/classes/stock/SupplierOrder.php b/classes/stock/SupplierOrder.php index 01c423b4c..900d4e2cd 100755 --- a/classes/stock/SupplierOrder.php +++ b/classes/stock/SupplierOrder.php @@ -251,7 +251,7 @@ class SupplierOrderCore extends ObjectModel * * @return array */ - protected function getEntriesCollection() + public function getEntriesCollection() { // build query $query = new DbQuery();