Skip to content

Commit

Permalink
chore: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Dec 18, 2023
1 parent ce21542 commit 2769ed9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def validate_quantity(self, row, qty_field=None):
qty_field = "qty"

precision = row.precision
if self.voucher_type in ["Subcontracting Receipt"]:
if row.get("doctype") in ["Subcontracting Receipt Supplied Item"]:
qty_field = "consumed_qty"

if abs(abs(flt(self.total_qty, precision)) - abs(flt(row.get(qty_field), precision))) > 0.01:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,9 @@ def test_subcontracting_receipt_cancel_with_batch(self):
"item_code": fg_item,
"warehouse": sco.items[0].warehouse,
"has_batch_no": 1,
"entries": [{"batch_no": batch_doc.name, "qty": sco.items[0].qty}],
"type_of_transaction": "Inward",
"voucher_type": "Subcontracting Receipt",
"entries": [{"batch_no": batch_doc.name, "qty": 100}],
}
).insert(ignore_permissions=True)

Expand Down

0 comments on commit 2769ed9

Please sign in to comment.