[tests] fixes
This commit is contained in:
parent
7472a1147c
commit
ebc6016ffb
@ -179,5 +179,5 @@ def make_stock_entry(production_order_id, purpose, qty=None):
|
||||
stock_entry.from_warehouse = production_order.wip_warehouse
|
||||
stock_entry.to_warehouse = production_order.fg_warehouse
|
||||
|
||||
stock_entry.run_method("get_items")
|
||||
stock_entry.get_items()
|
||||
return stock_entry.as_dict()
|
||||
|
@ -243,14 +243,13 @@ class StockEntry(StockController):
|
||||
self.posting_date, self.posting_time, d.actual_qty, d.transfer_qty))
|
||||
|
||||
# get incoming rate
|
||||
if not flt(d.incoming_rate) or d.s_warehouse or self.purpose == "Sales Return" or force:
|
||||
incoming_rate = flt(self.get_incoming_rate(args), self.precision("incoming_rate", d))
|
||||
if incoming_rate > 0:
|
||||
d.incoming_rate = incoming_rate
|
||||
d.amount = flt(d.transfer_qty) * flt(d.incoming_rate)
|
||||
if not d.t_warehouse:
|
||||
if not flt(d.incoming_rate) or d.s_warehouse or self.purpose == "Sales Return" or force:
|
||||
incoming_rate = flt(self.get_incoming_rate(args), self.precision("incoming_rate", d))
|
||||
if incoming_rate > 0:
|
||||
d.incoming_rate = incoming_rate
|
||||
d.amount = flt(d.transfer_qty) * flt(d.incoming_rate)
|
||||
if not d.t_warehouse:
|
||||
raw_material_cost += flt(d.amount)
|
||||
raw_material_cost += flt(d.amount)
|
||||
|
||||
# set incoming rate for fg item
|
||||
if self.purpose in ("Manufacture", "Repack"):
|
||||
|
Loading…
Reference in New Issue
Block a user