fix: if accepted warehouse not selected during rejection then stock ledger not created
This commit is contained in:
parent
12c01e2975
commit
0a71cabab1
@ -463,6 +463,9 @@ class BuyingController(StockController, Subcontracting):
|
|||||||
stock_items = self.get_stock_items()
|
stock_items = self.get_stock_items()
|
||||||
|
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
|
if d.item_code not in stock_items:
|
||||||
|
continue
|
||||||
|
|
||||||
if d.item_code in stock_items and d.warehouse:
|
if d.item_code in stock_items and d.warehouse:
|
||||||
pr_qty = flt(d.qty) * flt(d.conversion_factor)
|
pr_qty = flt(d.qty) * flt(d.conversion_factor)
|
||||||
|
|
||||||
@ -488,6 +491,7 @@ class BuyingController(StockController, Subcontracting):
|
|||||||
sle = self.get_sl_entries(
|
sle = self.get_sl_entries(
|
||||||
d, {"actual_qty": flt(pr_qty), "serial_no": cstr(d.serial_no).strip()}
|
d, {"actual_qty": flt(pr_qty), "serial_no": cstr(d.serial_no).strip()}
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.is_return:
|
if self.is_return:
|
||||||
outgoing_rate = get_rate_for_return(
|
outgoing_rate = get_rate_for_return(
|
||||||
self.doctype, self.name, d.item_code, self.return_against, item_row=d
|
self.doctype, self.name, d.item_code, self.return_against, item_row=d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user