|
@@ -149,8 +149,9 @@ $(document).ready(() => {
|
|
|
});
|
|
|
if (gcl) {
|
|
|
const mc = _.find(materialChecklistData, { b_code: gcl.b_code, name: gcl.name, unit: gcl.unit, unit_price: gcl.unit_price });
|
|
|
- const newOrder = _.indexOf(gclGatherData, gcl);
|
|
|
- if (!mc && _.findIndex(pushData, { order: newOrder }) === -1) {
|
|
|
+ // const newOrder = _.indexOf(gclGatherData, gcl);
|
|
|
+ // console.log(newOrder);
|
|
|
+ if (!mc && _.findIndex(pushData, { b_code: gcl.b_code, name: gcl.name, unit: gcl.unit, unit_price: gcl.unit_price }) === -1) {
|
|
|
pushData.push({ b_code: gcl.b_code, name: gcl.name, unit: gcl.unit, unit_price: gcl.unit_price, quantity: (gcl.quantity ? gcl.quantity : null), total_price: (gcl.total_price ? gcl.total_price : null), had_bills: 1 });
|
|
|
}
|
|
|
}
|