forked from elmau/empresa-libre
commit
07d51db625
|
@ -3656,9 +3656,9 @@ class Facturas(BaseModel):
|
||||||
cantidad = float(product['cantidad'])
|
cantidad = float(product['cantidad'])
|
||||||
valor_unitario = float(product['valor_unitario'])
|
valor_unitario = float(product['valor_unitario'])
|
||||||
descuento = float(product['descuento'])
|
descuento = float(product['descuento'])
|
||||||
if tipo_comprobante == 'T':
|
# ~ if tipo_comprobante == 'T':
|
||||||
valor_unitario = 0.0
|
# ~ valor_unitario = 0.0
|
||||||
descuento = 0.0
|
# ~ descuento = 0.0
|
||||||
precio_final = valor_unitario - descuento
|
precio_final = valor_unitario - descuento
|
||||||
importe = round(cantidad * precio_final, DECIMALES)
|
importe = round(cantidad * precio_final, DECIMALES)
|
||||||
|
|
||||||
|
@ -3852,6 +3852,10 @@ class Facturas(BaseModel):
|
||||||
if invoice.descuento:
|
if invoice.descuento:
|
||||||
comprobante['Descuento'] = FORMAT.format(invoice.descuento)
|
comprobante['Descuento'] = FORMAT.format(invoice.descuento)
|
||||||
|
|
||||||
|
if invoice.tipo_comprobante == 'T':
|
||||||
|
comprobante['SubTotal'] = '0.0'
|
||||||
|
comprobante['Total'] = '0.0'
|
||||||
|
|
||||||
if invoice.tipo_relacion:
|
if invoice.tipo_relacion:
|
||||||
relacionados = {
|
relacionados = {
|
||||||
'tipo': invoice.tipo_relacion,
|
'tipo': invoice.tipo_relacion,
|
||||||
|
|
|
@ -38,6 +38,7 @@ var invoices_controllers = {
|
||||||
$$('filter_month').attachEvent('onChange', filter_month_change)
|
$$('filter_month').attachEvent('onChange', filter_month_change)
|
||||||
$$('filter_dates').attachEvent('onChange', filter_dates_change)
|
$$('filter_dates').attachEvent('onChange', filter_dates_change)
|
||||||
$$('cmd_prefactura').attachEvent('onItemClick', cmd_prefactura_click)
|
$$('cmd_prefactura').attachEvent('onItemClick', cmd_prefactura_click)
|
||||||
|
$$('cmd_preinvoice_generate_delete').attachEvent('onItemClick', cmd_preinvoice_generate_delete_click)
|
||||||
$$('cmd_cfdi_relacionados').attachEvent('onItemClick', cmd_cfdi_relacionados_click)
|
$$('cmd_cfdi_relacionados').attachEvent('onItemClick', cmd_cfdi_relacionados_click)
|
||||||
$$('lst_metodo_pago').attachEvent('onChange', lst_metodo_pago_change)
|
$$('lst_metodo_pago').attachEvent('onChange', lst_metodo_pago_change)
|
||||||
$$('lst_moneda').attachEvent('onChange', lst_moneda_change)
|
$$('lst_moneda').attachEvent('onChange', lst_moneda_change)
|
||||||
|
@ -658,7 +659,7 @@ function cmd_timbrar_click(id, e, node){
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tipo_comprobante == 'T'){
|
if(tipo_comprobante == 'T'){
|
||||||
msg += 'El Tipo de Comprobante es Traslado, todos los importes serán puesto a 0 (Cero), asegurate de que sea el tipo de comprobante correcto<BR><BR>'
|
msg += 'El Tipo de Comprobante es Traslado, el total será puesto a 0 (Cero), asegurate de que sea el tipo de comprobante correcto<BR><BR>'
|
||||||
}
|
}
|
||||||
|
|
||||||
msg += '¿Estás seguro de timbrar esta factura?<BR><BR>'
|
msg += '¿Estás seguro de timbrar esta factura?<BR><BR>'
|
||||||
|
@ -1564,7 +1565,7 @@ function refacturar_preinvoice(id){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function cmd_facturar_preinvoice_click(id, e, node){
|
function cmd_facturar_preinvoice_click(){
|
||||||
var grid = $$('grid_preinvoices')
|
var grid = $$('grid_preinvoices')
|
||||||
|
|
||||||
if(grid.count() == 0){
|
if(grid.count() == 0){
|
||||||
|
@ -2059,4 +2060,11 @@ function cmd_invoice_verify_sat_click(){
|
||||||
var values = data.json()
|
var values = data.json()
|
||||||
window.open(values.url, '_blank')
|
window.open(values.url, '_blank')
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function cmd_preinvoice_generate_delete_click(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -560,6 +560,8 @@ var controls_generate = [
|
||||||
var toolbar_preinvoices = [
|
var toolbar_preinvoices = [
|
||||||
{view: 'button', id: 'cmd_facturar_preinvoice', label: 'Facturar',
|
{view: 'button', id: 'cmd_facturar_preinvoice', label: 'Facturar',
|
||||||
type: 'iconButton', autowidth: true, icon: 'pencil'},
|
type: 'iconButton', autowidth: true, icon: 'pencil'},
|
||||||
|
{view: 'button', id: 'cmd_preinvoice_generate_delete', label: 'Facturar y Eliminar',
|
||||||
|
type: 'iconButton', autowidth: true, icon: 'pencil', hidden: true},
|
||||||
{},
|
{},
|
||||||
{view: "button", id: "cmd_delete_preinvoice", label: "Eliminar",
|
{view: "button", id: "cmd_delete_preinvoice", label: "Eliminar",
|
||||||
type: "iconButton", autowidth: true, icon: "minus"},
|
type: "iconButton", autowidth: true, icon: "minus"},
|
||||||
|
|
Loading…
Reference in New Issue