// stock : update and bugs fix on supplier order add product interface and supplier order view interface + toolbar bug fix

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9991 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dSevere
2011-11-09 15:11:36 +00:00
parent db61901f68
commit 047efe3e72
5 changed files with 273 additions and 222 deletions
@@ -35,6 +35,10 @@
<td>{l s='Employee:'}</td>
<td>{$supplier_order_employee}</td>
</tr>
<tr>
<td>{l s='Creation date:'}</td>
<td>{$supplier_order_creation_date}</td>
</tr>
<tr>
<td>{l s='Last update:'}</td>
<td>{$supplier_order_last_update}</td>
@@ -47,6 +51,14 @@
<td>{l s='Warehouse:'}</td>
<td>{$supplier_order_warehouse}</td>
</tr>
<tr>
<td>{l s='Currency:'}</td>
<td>{$supplier_order_currency->name}</td>
</tr>
<tr>
<td>{l s='Global discount rate:'}</td>
<td>{$supplier_order_discount_rate} %</td>
</tr>
</table>
</fieldset>
</div>
@@ -64,7 +76,7 @@
<table style="width: 400px;" classe="table">
<tr>
<th>{l s='Designation'}</th>
<th width='60px'>{l s='Value'}</th>
<th width="100px">{l s='Value'}</th>
</tr>
<tr>
<td bgcolor="#000000"></td>
@@ -72,15 +84,15 @@
</tr>
<tr>
<td>{l s='Total TE'}</td>
<td>{$supplier_order_total_te}</td>
<td align="right">{$supplier_order_currency->prefix}&nbsp;{$supplier_order_total_te}&nbsp;{$supplier_order_currency->suffix}</td>
</tr>
<tr>
<td>{l s='Discount'}</td>
<td>{$supplier_order_discount_value_te}</td>
<td align="right">{$supplier_order_currency->prefix}&nbsp;{$supplier_order_discount_value_te}&nbsp;{$supplier_order_currency->suffix}</td>
</tr>
<tr>
<td>{l s='Total with discount TE'}</td>
<td>{$supplier_order_total_with_discount_te}</td>
<td align="right">{$supplier_order_currency->prefix}&nbsp;{$supplier_order_total_with_discount_te}&nbsp;{$supplier_order_currency->suffix}</td>
</tr>
<tr>
<td bgcolor="#000000"></td>
@@ -88,11 +100,11 @@
</tr>
<tr>
<td>{l s='Total Tax'}</td>
<td>{$supplier_order_total_tax}</td>
<td align="right">{$supplier_order_currency->prefix}&nbsp;{$supplier_order_total_tax}&nbsp;{$supplier_order_currency->suffix}</td>
</tr>
<tr>
<td>{l s='Total TI'}</td>
<td>{$supplier_order_total_ti}</td>
<td align="right">{$supplier_order_currency->prefix}&nbsp;{$supplier_order_total_ti}&nbsp;{$supplier_order_currency->suffix}</td>
</tr>
<tr>
<td bgcolor="#000000"></td>
@@ -100,7 +112,7 @@
</tr>
<tr>
<td>{l s='TOTAL TO PAY'}</td>
<td>{$supplier_order_total_ti}</td>
<td align="right">{$supplier_order_currency->prefix}&nbsp;{$supplier_order_total_ti}&nbsp;{$supplier_order_currency->suffix}</td>
</tr>
</table>
</fieldset>
+39 -34
View File
@@ -40,49 +40,54 @@
//get reference on save link
btn_save = $('span[class~="process-icon-save"]').parent();
//get reference on save and stay link
btn_save_and_stay = $('span[class~="process-icon-save-and-stay"]').parent();
//get reference on form submit button
btn_submit = $('#{$table}_form_submit_btn');
//get reference on current save link label
lbl_save = $('#desc-{$table}-save div');
//override save link label with submit button value
lbl_save.html(btn_submit.attr("value"));
if (btn_save_and_stay)
if (btn_save.length > 0)
{
//get reference on save and stay link
btn_save_and_stay = $('span[class~="process-icon-save-and-stay"]').parent();
//get reference on form submit button
btn_submit = $('#{$table}_form_submit_btn');
//get reference on current save link label
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
lbl_save = $('#desc-{$table}-save div');
//override save and stay link label with submit button value
lbl_save_and_stay.html(btn_submit.attr("value") + ' and stay');
}
//override save link label with submit button value
if (btn_submit.attr("value").length > 0)
lbl_save.html(btn_submit.attr("value"));
//hide standard submit button
btn_submit.hide();
//submit the form
{block name=formSubmit}
btn_save.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
$('#{$table}_form').submit();
});
if (btn_save_and_stay)
if (btn_save_and_stay.length > 0)
{
btn_save_and_stay.click(function() {
//get reference on current save link label
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
//override save and stay link label with submit button value
if (btn_submit.attr("value").length > 0)
lbl_save_and_stay.html(btn_submit.attr("value") + ' and stay');
}
//hide standard submit button
btn_submit.hide();
//submit the form
{block name=formSubmit}
btn_save.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
$('#{$table}_form').submit();
});
}
{/block}
if (btn_save_and_stay)
{
btn_save_and_stay.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
$('#{$table}_form').submit();
});
}
{/block}
}
});
</script>
{/block}