Fix type change in deposit
This commit is contained in:
parent
968c2744ec
commit
a37b3a5c23
|
@ -7260,12 +7260,14 @@ class FacturasPagos(BaseModel):
|
|||
fac = Facturas.get(Facturas.id==int(i))
|
||||
this_pay = values['this_pay']
|
||||
importe = values['importe']
|
||||
type_change = round(1 / values['type_change'], 6)
|
||||
|
||||
validate = round(this_pay / type_change, 2)
|
||||
while validate > importe:
|
||||
type_change += 0.000001
|
||||
type_change = 1.00
|
||||
if mov.moneda != fac.moneda:
|
||||
type_change = round(1 / values['type_change'], 6)
|
||||
validate = round(this_pay / type_change, 2)
|
||||
while validate > importe:
|
||||
type_change += 0.000001
|
||||
validate = round(this_pay / type_change, 2)
|
||||
|
||||
mov_ant, numero = cls._movimiento_anterior(cls, mov, fac)
|
||||
nuevo = {
|
||||
|
|
Loading…
Reference in New Issue