Browse Source

数据检查调整

MaiXinRong 4 years ago
parent
commit
9d9a0f6f82
1 changed files with 5 additions and 4 deletions
  1. 5 4
      app/view/shares/ledger_check_modal.ejs

+ 5 - 4
app/view/shares/ledger_check_modal.ejs

@@ -118,8 +118,8 @@
                     if (!nodePos || nodePos.length === 0) continue;
 
                     const checkData = {
-                        sgfh_qty: node.sgfh_qty, qtcl_qty: node.qtcl_qty, sjcl_qty: node.sjcl_qty,
-                        quantity: node.quantity
+                        sgfh_qty: node.sgfh_qty || 0, qtcl_qty: node.qtcl_qty || 0, sjcl_qty: node.sjcl_qty || 0,
+                        quantity: node.quantity || 0
                     };
                     const calcData = {
                         sgfh_qty: 0, qtcl_qty: 0, sjcl_qty: 0,
@@ -141,8 +141,9 @@
                     if ((!node.b_code || node.b_code === '')) continue;
                     if (node.children && node.children.length > 0) continue;
 
-                    if (checkZero(node.sgfh_qty) && checkZero(node.qtcl_qty) && checkZero(node.sjcl_qty)
-                        && checkZero(node.deal_qty) && checkZero(node.quantity)) error.push(node);
+                    if ((checkZero(node.sgfh_qty) && checkZero(node.qtcl_qty) && checkZero(node.sjcl_qty)
+                        && checkZero(node.deal_qty) && checkZero(node.quantity))
+                        || checkZero(node.unit_price)) error.push(node);
                 }
                 return error;
             },