fix: pos return validation on v15 (#45951)
This commit is contained in:
@@ -170,7 +170,7 @@ class AccountsController(TransactionBase):
|
|||||||
self.validate_qty_is_not_zero()
|
self.validate_qty_is_not_zero()
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self.doctype in ["Sales Invoice", "Purchase Invoice"]
|
self.doctype in ["Sales Invoice", "Purchase Invoice", "POS Invoice"]
|
||||||
and self.get("is_return")
|
and self.get("is_return")
|
||||||
and self.get("update_stock")
|
and self.get("update_stock")
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ def get_already_returned_items(doc):
|
|||||||
|
|
||||||
field = (
|
field = (
|
||||||
frappe.scrub(doc.doctype) + "_item"
|
frappe.scrub(doc.doctype) + "_item"
|
||||||
if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Sales Invoice"]
|
if doc.doctype in ["Purchase Invoice", "Purchase Receipt", "Sales Invoice", "POS Invoice"]
|
||||||
else "dn_detail"
|
else "dn_detail"
|
||||||
)
|
)
|
||||||
data = frappe.db.sql(
|
data = frappe.db.sql(
|
||||||
@@ -770,6 +770,7 @@ def get_return_against_item_fields(voucher_type):
|
|||||||
"Delivery Note": "dn_detail",
|
"Delivery Note": "dn_detail",
|
||||||
"Sales Invoice": "sales_invoice_item",
|
"Sales Invoice": "sales_invoice_item",
|
||||||
"Subcontracting Receipt": "subcontracting_receipt_item",
|
"Subcontracting Receipt": "subcontracting_receipt_item",
|
||||||
|
"POS Invoice": "sales_invoice_item",
|
||||||
}
|
}
|
||||||
return return_against_item_fields[voucher_type]
|
return return_against_item_fields[voucher_type]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user