stock entry incoming rate based on precision

This commit is contained in:
Nabin Hait 2014-06-24 12:42:36 +05:30
parent 613d784cfb
commit fdf38dab6f

View File

@ -220,8 +220,8 @@ class StockEntry(StockController):
# get incoming rate
if not d.bom_no:
if not flt(d.incoming_rate) or d.s_warehouse or self.purpose == "Sales Return":
incoming_rate = self.get_incoming_rate(args)
if flt(incoming_rate) > 0:
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)