// Product Suppliers : Add wholesale price management for each supplier
This commit is contained in:
@@ -202,21 +202,6 @@
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!--tr>
|
||||
<td class="col-left"><label>{l s='Supplier:' }</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="id_supplier" id="id_supplier">
|
||||
<option value="0">-- {l s='Choose (optional)'} --</option>
|
||||
{if $product->id_supplier}
|
||||
<option value="{$product->id_supplier}" selected="selected">{$product->supplier_name}</option>
|
||||
{/if}
|
||||
<option disabled="disabled">----------</option>
|
||||
</select>
|
||||
<a href="{$link->getAdminLink('AdminSuppliers')}&addsupplier" onclick="return confirm('{l s='Are you sure you want to delete entered product information?' js=1}">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Create'}" title="{l s='Create'}" /> <b>{l s='Create'}</b>
|
||||
</a>
|
||||
</td>
|
||||
</tr-->
|
||||
</table>
|
||||
<table cellpadding="5" cellspacing="0" border="0" style="width: 100%;"><tr><td><div class="separation"></div></td></tr></table>
|
||||
{* [begin] pack product *}
|
||||
@@ -576,13 +561,13 @@ $(document).ready(function(){
|
||||
</tr>
|
||||
|
||||
{* @todo : prices related has to be moved in price subtab *}
|
||||
<tr>
|
||||
<!--tr>
|
||||
<td class="col-left"><label>{l s='Pre-tax wholesale price:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
{$currency->prefix}<input size="11" maxlength="14" name="wholesale_price" type="text" value="{$product->wholesale_price}" onchange="this.value = this.value.replace(/,/g, '.');" />{$currency->suffix}
|
||||
<p class="preference_description">{l s='The wholesale price at which you bought this product'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tr-->
|
||||
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Pre-tax retail price:'}</label></td>
|
||||
@@ -973,7 +958,7 @@ $(document).ready(function(){
|
||||
<p class="preference_description">{l s='Tags separated by commas (e.g., dvd, dvd player, hifi)'}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="col-left"><label>{l s='Accessories:'}<br /><br /><i>{l s='(Do not forget to Save the product afterward)'}</i></label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
@@ -989,7 +974,7 @@ $(document).ready(function(){
|
||||
var formProduct;
|
||||
var accessories = new Array();
|
||||
</script>
|
||||
|
||||
|
||||
<div id="ajax_choose_product" style="padding:6px; padding-top:2px; width:600px;">
|
||||
<p class="clear">{l s='Begin typing the first letters of the product name, then select the product from the drop-down list:'}</p>
|
||||
<input type="text" value="" id="product_autocomplete_input" />
|
||||
@@ -1035,7 +1020,7 @@ var accessories = new Array();
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
toggleVirtualProduct(getE('is_virtual_good'));
|
||||
unitPriceWithTax('unit');
|
||||
|
||||
@@ -45,26 +45,44 @@
|
||||
{foreach from=$associated_suppliers item=supplier}
|
||||
<h3 style="margin-bottom:0;"><a href="#">{$supplier->name}</a></h3>
|
||||
<div style="display:block;">
|
||||
<table cellpadding="5" cellspacing="5" style="width:80%; margin-left:0;">
|
||||
<table cellpadding="10" cellspacing="0" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='product name'}</th>
|
||||
<th width="150">{l s='supplier reference'}</th>
|
||||
<th width="150">{l s='Supplier reference'}</th>
|
||||
<th width="150">{l s='Unit price tax excluded'}</th>
|
||||
<th width="150">{l s='Unit price currency'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$attributes item=attribute}
|
||||
{foreach $attributes AS $index => $attribute}
|
||||
{assign var=reference value=''}
|
||||
{assign var=price_te value=''}
|
||||
{assign var=id_currency value=''}
|
||||
{foreach from=$associated_suppliers_collection item=asc}
|
||||
{if $asc->id_product == $attribute['id_product'] && $asc->id_product_attribute == $attribute['id_product_attribute'] && $asc->id_supplier == $supplier->id_supplier}
|
||||
{assign var=reference value=$asc->product_supplier_reference}
|
||||
{assign var=price_te value=Tools::ps_round($asc->product_supplier_price_te, 2)}
|
||||
{assign var=id_currency value=$asc->id_currency}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr>
|
||||
<tr {if $index is odd}class="alt_row"{/if}>
|
||||
<td>{$product_designation[$attribute['id_product_attribute']]}</td>
|
||||
<td>
|
||||
<input type="text" size="10" value="{$reference}" name="supplier_reference_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size="10" value="{$price_te}" name="product_price_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}" />
|
||||
</td>
|
||||
<td>
|
||||
<select name="product_price_currency_{$attribute['id_product']}_{$attribute['id_product_attribute']}_{$supplier->id_supplier}">
|
||||
{foreach $currencies AS $currency}
|
||||
<option value="{$currency['id_currency']}"
|
||||
{if $currency['id_currency'] == $id_currency}selected="selected"{/if}
|
||||
>{$currency['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
{foreach from=$warehouses item=warehouse}
|
||||
<h3 style="margin-bottom:0;"><a href="#">{$warehouse['name']}</a></h3>
|
||||
<div style="display:block;">
|
||||
<table cellpadding="5" cellspacing="5" style="width:80%; margin-left:0;">
|
||||
<table cellpadding="10" cellspacing="0" class="table">
|
||||
<tr>
|
||||
<th width="100">{l s='In the warehouse?'}</th>
|
||||
<th>{l s='product name'}</th>
|
||||
<th width="150">{l s='location in the warehouse (optionnal)'}</th>
|
||||
</tr>
|
||||
{foreach from=$attributes item=attribute}
|
||||
{foreach $attributes AS $index => $attribute}
|
||||
{assign var=location value=''}
|
||||
{assign var=selected value=''}
|
||||
{foreach from=$associated_warehouses item=aw}
|
||||
@@ -32,7 +32,7 @@
|
||||
{assign var=selected value=true}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<tr>
|
||||
<tr {if $index is odd}class="alt_row"{/if}>
|
||||
<td><input type="checkbox"
|
||||
name="check_warehouse_{$warehouse['id_warehouse']}_{$attribute['id_product']}_{$attribute['id_product_attribute']}"
|
||||
{if $selected == true}checked="checked"{/if}
|
||||
|
||||
Reference in New Issue
Block a user