This commit is contained in:
Mauricio Baeza 2018-10-07 20:29:14 -05:00
parent 0465b684f0
commit 5ac614e079
1 changed files with 7 additions and 1 deletions

View File

@ -5369,7 +5369,13 @@ class FacturasPagos(BaseModel):
fac = Facturas.get(Facturas.id==int(i))
this_pay = values['this_pay']
importe = values['importe']
type_change = round(this_pay / importe, 6)
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 = {
'movimiento': mov,