forked from elmau/empresa-libre
Error #295
This commit is contained in:
parent
a6edbaa56f
commit
e7666432cb
|
@ -5355,6 +5355,7 @@ class FacturasPagos(BaseModel):
|
||||||
'factura': fac,
|
'factura': fac,
|
||||||
'numero': numero,
|
'numero': numero,
|
||||||
'importe': importe,
|
'importe': importe,
|
||||||
|
'tipo_cambio': type_change,
|
||||||
}
|
}
|
||||||
if mov_ant is None:
|
if mov_ant is None:
|
||||||
nuevo['saldo_anterior'] = float(fac.saldo)
|
nuevo['saldo_anterior'] = float(fac.saldo)
|
||||||
|
@ -5365,8 +5366,8 @@ class FacturasPagos(BaseModel):
|
||||||
nuevo['saldo'] = nuevo['saldo_anterior'] - importe
|
nuevo['saldo'] = nuevo['saldo_anterior'] - importe
|
||||||
else:
|
else:
|
||||||
nuevo['importe'] = this_pay
|
nuevo['importe'] = this_pay
|
||||||
nuevo['tipo_cambio'] = type_change
|
|
||||||
nuevo['saldo'] = nuevo['saldo_anterior'] - this_pay
|
nuevo['saldo'] = nuevo['saldo_anterior'] - this_pay
|
||||||
|
print('\n\n', nuevo)
|
||||||
FacturasPagos.create(**nuevo)
|
FacturasPagos.create(**nuevo)
|
||||||
|
|
||||||
fac.saldo = nuevo['saldo']
|
fac.saldo = nuevo['saldo']
|
||||||
|
@ -5610,7 +5611,7 @@ class CfdiPagos(BaseModel):
|
||||||
Facturas.serie.alias('Serie'),
|
Facturas.serie.alias('Serie'),
|
||||||
Facturas.folio.alias('Folio'),
|
Facturas.folio.alias('Folio'),
|
||||||
Facturas.moneda.alias('MonedaDR'),
|
Facturas.moneda.alias('MonedaDR'),
|
||||||
Facturas.tipo_cambio.alias('TipoCambioDR'),
|
FacturasPagos.tipo_cambio.alias('TipoCambioDR'),
|
||||||
# ~ Facturas.metodo_pago.alias('MetodoDePagoDR'),
|
# ~ Facturas.metodo_pago.alias('MetodoDePagoDR'),
|
||||||
FacturasPagos.numero.alias('NumParcialidad'),
|
FacturasPagos.numero.alias('NumParcialidad'),
|
||||||
FacturasPagos.saldo_anterior.alias('ImpSaldoAnt'),
|
FacturasPagos.saldo_anterior.alias('ImpSaldoAnt'),
|
||||||
|
@ -5637,6 +5638,7 @@ class CfdiPagos(BaseModel):
|
||||||
del r['TipoCambioDR']
|
del r['TipoCambioDR']
|
||||||
if not r['Serie']:
|
if not r['Serie']:
|
||||||
del r['Serie']
|
del r['Serie']
|
||||||
|
print(r)
|
||||||
|
|
||||||
return related
|
return related
|
||||||
|
|
||||||
|
|
|
@ -620,11 +620,11 @@ function validate_deposito(values){
|
||||||
if(obj.currency!=CURRENCY_MN && obj.currency!=current_currency){
|
if(obj.currency!=CURRENCY_MN && obj.currency!=current_currency){
|
||||||
if(obj.type_change==undefined){
|
if(obj.type_change==undefined){
|
||||||
msg_tc = 'Captura el Tipo de Cambio'
|
msg_tc = 'Captura el Tipo de Cambio'
|
||||||
}else{
|
//~ }else{
|
||||||
var tc = obj.type_change
|
//~ var tc = obj.type_change
|
||||||
if(tc <= 1.0){
|
//~ if(tc <= 1.0){
|
||||||
msg_tc = 'El Tipo de Cambio debe ser mayor a 1.00'
|
//~ msg_tc = 'El Tipo de Cambio debe ser mayor a 1.00'
|
||||||
}
|
//~ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue