Merge pull request #3922 from nabinhait/fraction_gle
Divisonal loss adjustment in purchase receipt
This commit is contained in:
commit
bcb386fb64
@ -334,12 +334,11 @@ class PurchaseReceipt(BuyingController):
|
||||
}))
|
||||
|
||||
# divisional loss adjustment
|
||||
if not self.get("taxes"):
|
||||
sle_valuation_amount = flt(flt(d.valuation_rate, val_rate_db_precision) * flt(d.qty) * flt(d.conversion_factor),
|
||||
self.precision("base_net_amount", d))
|
||||
|
||||
distributed_amount = flt(flt(d.base_net_amount, self.precision("base_net_amount", d))) + \
|
||||
flt(d.landed_cost_voucher_amount) + flt(d.rm_supp_cost)
|
||||
flt(d.landed_cost_voucher_amount) + flt(d.rm_supp_cost) + flt(d.item_tax_amount)
|
||||
|
||||
divisional_loss = flt(distributed_amount - sle_valuation_amount, self.precision("base_net_amount", d))
|
||||
if divisional_loss:
|
||||
|
Loading…
x
Reference in New Issue
Block a user