File tree Expand file tree Collapse file tree 1 file changed +22
-10
lines changed
erpnext/accounts/doctype/payment_entry Expand file tree Collapse file tree 1 file changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -1082,20 +1082,32 @@ def set_unallocated_amount(self):
10821082 self .base_paid_amount + deductions_to_consider
10831083 ):
10841084 self .unallocated_amount = (
1085- self .base_paid_amount
1086- + deductions_to_consider
1087- - self .base_total_allocated_amount
1088- - included_taxes
1089- ) / self .source_exchange_rate
1085+ flt (
1086+ (
1087+ self .base_paid_amount
1088+ + deductions_to_consider
1089+ - self .base_total_allocated_amount
1090+ - included_taxes
1091+ ),
1092+ self .precision ("unallocated_amount" ),
1093+ )
1094+ / self .source_exchange_rate
1095+ )
10901096 elif self .payment_type == "Pay" and self .base_total_allocated_amount < (
10911097 self .base_received_amount - deductions_to_consider
10921098 ):
10931099 self .unallocated_amount = (
1094- self .base_received_amount
1095- - deductions_to_consider
1096- - self .base_total_allocated_amount
1097- - included_taxes
1098- ) / self .target_exchange_rate
1100+ flt (
1101+ (
1102+ self .base_received_amount
1103+ - deductions_to_consider
1104+ - self .base_total_allocated_amount
1105+ - included_taxes
1106+ ),
1107+ self .precision ("unallocated_amount" ),
1108+ )
1109+ / self .target_exchange_rate
1110+ )
10991111
11001112 def set_exchange_gain_loss (self ):
11011113 exchange_gain_loss = flt (
You can’t perform that action at this time.
0 commit comments