This commit is contained in:
El Mau 2023-12-20 18:51:38 -06:00
parent 4d9bc4a172
commit 2620159408
1 changed files with 11 additions and 3 deletions

View File

@ -434,6 +434,14 @@ function validate_invoice(values){
return false
}
var metodo_pago = $$('lst_metodo_pago').getValue()
if(metodo_pago=='PPD' && forma_pago!='99'){
webix.UIManager.setFocus('lst_forma_pago')
msg = 'La Forma de pago debe ser: [99] Por definir'
msg_error(msg)
return false
}
var tipo_cambio = $$('txt_tipo_cambio').getValue()
if(tipo_cambio.trim() == ""){
webix.UIManager.setFocus('txt_tipo_cambio')
@ -466,8 +474,8 @@ function validate_invoice(values){
anticipo = $$('chk_cfdi_anticipo').getValue()
if(anticipo){
var mp = $$('lst_metodo_pago').getValue()
if(mp != 'PUE'){
//~ var mp = $$('lst_metodo_pago').getValue()
if(metodo_pago != 'PUE'){
msg = 'En anticipos, el método de pago debe ser: Pago en una sola exhibición'
msg_error(msg)
return false
@ -548,7 +556,7 @@ function validate_invoice(values){
if(is_global){
var key_sat = rows[i]['clave_sat']
if(key_sat!=KEY_SAT_01){
var msg = 'Clave SAT inválida para Facturar Global en la línea: ' + (i + 1)
var msg = 'Clave SAT inválida para Factura Global en la línea: ' + (i + 1)
msg_error(msg)
return false
}