diff --git a/custom_addons/customer_orders/static/src/js/dashboard.js b/custom_addons/customer_orders/static/src/js/dashboard.js index 216f5a4c7..a1a49f827 100644 --- a/custom_addons/customer_orders/static/src/js/dashboard.js +++ b/custom_addons/customer_orders/static/src/js/dashboard.js @@ -185,7 +185,7 @@ export class CustomerOrderStatusGrid extends Component { dispatched_qty: parseFloat(row.dispatched_qty), dispatched_qty_kg: parseFloat(row.dispatched_qty_kg) || 0, fg_qty: parseFloat(row.fg_qty) || 0, - remaining_to_produce: Math.max(0, parseFloat(row.order_qty) - parseFloat(row.produced_qty)), + remaining_to_produce: Math.max(0, parseFloat(row.order_qty) - (parseFloat(row.produced_qty) + parseFloat(row.fg_qty))), remaining_dispatch_qty: Math.max(0, parseFloat(row.order_qty) - parseFloat(row.dispatched_qty)), completion_rate: parseFloat(row.produced_qty) > 0 ? ((parseFloat(row.produced_qty) / parseFloat(row.order_qty)) * 100) : 0 }; @@ -785,6 +785,22 @@ export class CustomerOrderStatusGrid extends Component { } ] }, + { + title: "FG Available", + width: 100, + dataIndx: "fg_qty", + dataType: "float", + filter: true, + sortable: true, + align: "right", + render: (ui) => this.formatInteger(ui.cellData), + + summary: { + type: "sum", + label: "Total:", + render: (ui) => this.formatInteger(ui.data) + } + }, { title: "Produced Qty", align: "center", @@ -859,22 +875,6 @@ export class CustomerOrderStatusGrid extends Component { } ] }, - { - title: "FG Available", - width: 100, - dataIndx: "fg_qty", - dataType: "float", - filter: true, - sortable: true, - align: "right", - render: (ui) => this.formatInteger(ui.cellData), - - summary: { - type: "sum", - label: "Total:", - render: (ui) => this.formatInteger(ui.data) - } - }, { title: "Remaining Production", width: 120,