Commit 8347a3c1 by Damien Moulard

fix errors on changing daily conso period

parent 8bf32ac2
......@@ -189,6 +189,7 @@ function add_product() {
* Set the computed qty for the first supplier only.
*/
function compute_products_coverage_qties() {
if (order_doc.coverage_days != null) {
for (const [
key,
product
......@@ -214,6 +215,7 @@ function compute_products_coverage_qties() {
products[key].suppliersinfo[0].qty = purchase_package_qty_for_coverage;
}
}
}
}
/**
......@@ -232,8 +234,10 @@ function check_products_data() {
}
);
if (clicked_order_pill != null) {
clicked_order_pill.find('.pill_order_name').empty()
.append(`<i class="fas fa-spinner fa-spin"></i>`);
}
$.ajax({
type: 'GET',
......@@ -2112,8 +2116,9 @@ $(document).ready(function() {
check_products_data()
.then(() => {
update_cdb_order();
compute_products_coverage_qties();
update_main_screen();
update_cdb_order();
closeModal();
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment