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