// management of discount addition when no invoice on current order

// update the discount form when new invoice is created
This commit is contained in:
aFolletete
2011-12-19 18:24:03 +00:00
parent e97baff814
commit f6d29cc757
7 changed files with 139 additions and 108 deletions
+8
View File
@@ -92,6 +92,11 @@ function updateShipping(shipping_html)
$('#shipping_table_old').remove();
}
function updateDiscountForm(discount_form_html)
{
$('#voucher_form').html(discount_form_html);
}
function populateWarehouseList(warehouse_list)
{
$('#add_product_product_warehouse_area').hide();
@@ -419,6 +424,7 @@ function init()
updateInvoice(data.invoices);
updateDocuments(data.documents_html);
updateShipping(data.shipping_html);
updateDiscountForm(data.discount_form_html);
// Initialize all events
init();
@@ -591,6 +597,7 @@ function init()
updateAmounts(data.order);
updateInvoice(data.invoices);
updateDocuments(data.documents_html);
updateDiscountForm(data.discount_form_html);
// Initialize all events
init();
@@ -665,6 +672,7 @@ function init()
updateAmounts(data.order);
updateInvoice(data.invoices);
updateDocuments(data.documents_html);
updateDiscountForm(data.discount_form_html);
}
else
alert(data.error);