Merge pull request #29359 from KrithiRamani/foc_item

fix: bypass selling price validation for free item
This commit is contained in:
rohitwaghchaure 2022-02-01 11:54:01 +05:30 committed by GitHub
commit 62e5aa7d72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ class SellingController(StockController):
valuation_rate_map = {}
for item in self.items:
if not item.item_code:
if not item.item_code or item.is_free_item:
continue
last_purchase_rate, is_stock_item = frappe.get_cached_value(
@ -251,7 +251,7 @@ class SellingController(StockController):
valuation_rate_map[(rate.item_code, rate.warehouse)] = rate.valuation_rate
for item in self.items:
if not item.item_code:
if not item.item_code or item.is_free_item:
continue
last_valuation_rate = valuation_rate_map.get(