mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix: if condition to validate doctype
This commit is contained in:
@@ -81,6 +81,15 @@ class StockController(AccountsController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def check_zero_rate(self):
|
def check_zero_rate(self):
|
||||||
|
if self.doctype in [
|
||||||
|
"POS Invoice",
|
||||||
|
"Purchase Invoice",
|
||||||
|
"Sales Invoice",
|
||||||
|
"Delivery Note",
|
||||||
|
"Purchase Receipt",
|
||||||
|
"Stock Entry",
|
||||||
|
"Stock Reconciliation",
|
||||||
|
]:
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
if (item.get("valuation_rate") == 0 or item.get("incoming_rate") == 0) and item.get(
|
if (item.get("valuation_rate") == 0 or item.get("incoming_rate") == 0) and item.get(
|
||||||
"allow_zero_valuation_rate"
|
"allow_zero_valuation_rate"
|
||||||
|
|||||||
Reference in New Issue
Block a user