fix: internal transfer flow

This commit is contained in:
Rohit Waghchaure
2022-09-06 16:22:00 +05:30
parent 008542b715
commit b4a102d119
13 changed files with 257 additions and 23 deletions

View File

@@ -307,6 +307,20 @@ class StatusUpdater(Document):
def limits_crossed_error(self, args, item, qty_or_amount):
"""Raise exception for limits crossed"""
if (
self.doctype in ["Sales Invoice", "Delivery Note"]
and qty_or_amount == "amount"
and self.is_internal_customer
):
return
elif (
self.doctype in ["Purchase Invoice", "Purchase Receipt"]
and qty_or_amount == "amount"
and self.is_internal_supplier
):
return
if qty_or_amount == "qty":
action_msg = _(
'To allow over receipt / delivery, update "Over Receipt/Delivery Allowance" in Stock Settings or the Item.'