forked from elmau/empresa-libre
Donativo en especien
This commit is contained in:
parent
c0d1c41401
commit
e16ee337a3
|
@ -1996,6 +1996,9 @@ class Facturas(BaseModel):
|
||||||
if invoice.tipo_comprobante == 'T':
|
if invoice.tipo_comprobante == 'T':
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if invoice.donativo and invoice.forma_pago == '12':
|
||||||
|
return
|
||||||
|
|
||||||
importe = invoice.total_mn
|
importe = invoice.total_mn
|
||||||
if invoice.tipo_comprobante == 'E':
|
if invoice.tipo_comprobante == 'E':
|
||||||
importe *= -1
|
importe *= -1
|
||||||
|
|
|
@ -4,6 +4,7 @@ var msg = ''
|
||||||
var result = false
|
var result = false
|
||||||
var tipo_relacion = ''
|
var tipo_relacion = ''
|
||||||
var anticipo = false
|
var anticipo = false
|
||||||
|
var donativo = false
|
||||||
|
|
||||||
|
|
||||||
function get_condicion_pago(){
|
function get_condicion_pago(){
|
||||||
|
@ -498,7 +499,7 @@ function guardar_y_timbrar(values){
|
||||||
data['relacionados'] = ids
|
data['relacionados'] = ids
|
||||||
data['tipo_relacion'] = tipo_relacion
|
data['tipo_relacion'] = tipo_relacion
|
||||||
data['anticipo'] = anticipo
|
data['anticipo'] = anticipo
|
||||||
data['donativo'] = $$('chk_cfdi_donativo').getValue()
|
data['donativo'] = donativo
|
||||||
|
|
||||||
var usar_ine = $$('chk_cfdi_usar_ine').getValue()
|
var usar_ine = $$('chk_cfdi_usar_ine').getValue()
|
||||||
if(usar_ine){
|
if(usar_ine){
|
||||||
|
@ -518,6 +519,7 @@ function guardar_y_timbrar(values){
|
||||||
tipo_relacion = ''
|
tipo_relacion = ''
|
||||||
anticipo = false
|
anticipo = false
|
||||||
$$('chk_cfdi_anticipo').setValue(0)
|
$$('chk_cfdi_anticipo').setValue(0)
|
||||||
|
$$('chk_cfdi_donativo').setValue(0)
|
||||||
$$('chk_cfdi_usar_ine').setValue(0)
|
$$('chk_cfdi_usar_ine').setValue(0)
|
||||||
|
|
||||||
$$('form_invoice').setValues({id_partner: 0, lbl_partner: 'Ninguno'})
|
$$('form_invoice').setValues({id_partner: 0, lbl_partner: 'Ninguno'})
|
||||||
|
@ -545,7 +547,14 @@ function cmd_timbrar_click(id, e, node){
|
||||||
msg += 'La factura tiene CFDI relacionados<BR><BR>'
|
msg += 'La factura tiene CFDI relacionados<BR><BR>'
|
||||||
}
|
}
|
||||||
if(anticipo){
|
if(anticipo){
|
||||||
msg += 'La factura es Anticipo<BR><BR>'
|
msg += 'La factura es un Anticipo<BR><BR>'
|
||||||
|
}
|
||||||
|
if(donativo){
|
||||||
|
msg += 'La factura es un Donativo'
|
||||||
|
if($$('lst_forma_pago').getValue()=='12'){
|
||||||
|
msg += ' en Especie'
|
||||||
|
}
|
||||||
|
msg += '<BR><BR>'
|
||||||
}
|
}
|
||||||
usar_ine = $$('chk_cfdi_usar_ine').getValue()
|
usar_ine = $$('chk_cfdi_usar_ine').getValue()
|
||||||
if(usar_ine){
|
if(usar_ine){
|
||||||
|
|
Loading…
Reference in New Issue