forked from elmau/empresa-libre
Nuevos controles para carta porte
This commit is contained in:
parent
f4779dbb99
commit
bb90b3f6d7
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -1,3 +1,22 @@
|
||||||
|
v 1.44.0 [00-Dic-2021]
|
||||||
|
----------------------
|
||||||
|
- Soporte para Carta Porte v2
|
||||||
|
|
||||||
|
* IMPORTANTE:
|
||||||
|
|
||||||
|
Es necesario hacer una migración:
|
||||||
|
|
||||||
|
```
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
cd source/app/models
|
||||||
|
|
||||||
|
python main.py -bk
|
||||||
|
|
||||||
|
python main.py -m -r RFC
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
v 1.43.0 [12-Dic-2021]
|
v 1.43.0 [12-Dic-2021]
|
||||||
----------------------
|
----------------------
|
||||||
- Soporte para entradas de almacen.
|
- Soporte para entradas de almacen.
|
||||||
|
|
|
@ -96,6 +96,12 @@ SAT = {
|
||||||
'xmlns': 'http://www.sat.gob.mx/leyendasFiscales',
|
'xmlns': 'http://www.sat.gob.mx/leyendasFiscales',
|
||||||
'schema': ' http://www.sat.gob.mx/leyendasFiscales http://www.sat.gob.mx/sitio_internet/cfd/leyendasFiscales/leyendasFisc.xsd',
|
'schema': ' http://www.sat.gob.mx/leyendasFiscales http://www.sat.gob.mx/sitio_internet/cfd/leyendasFiscales/leyendasFisc.xsd',
|
||||||
},
|
},
|
||||||
|
'cartaporte': {
|
||||||
|
'version': '2.0',
|
||||||
|
'prefix': 'cartaporte20',
|
||||||
|
'xmlns': 'http://www.sat.gob.mx/CartaPorte20',
|
||||||
|
'schema': ' http://www.sat.gob.mx/CartaPorte20 http://www.sat.gob.mx/sitio_internet/cfd/CartaPorte/CartaPorte20.xsd',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,7 @@ def config_timbrar():
|
||||||
'cfdi_anticipo': Configuracion.get_('chk_config_anticipo'),
|
'cfdi_anticipo': Configuracion.get_('chk_config_anticipo'),
|
||||||
'cfdi_ine': Configuracion.get_bool('chk_config_ine'),
|
'cfdi_ine': Configuracion.get_bool('chk_config_ine'),
|
||||||
'cfdi_edu': Configuracion.get_bool('chk_config_edu'),
|
'cfdi_edu': Configuracion.get_bool('chk_config_edu'),
|
||||||
|
'cfdi_carta_porte': Configuracion.get_bool('chk_config_carta_porte'),
|
||||||
'cfdi_divisas': Configuracion.get_bool('chk_config_divisas'),
|
'cfdi_divisas': Configuracion.get_bool('chk_config_divisas'),
|
||||||
'cfdi_metodo_pago': Configuracion.get_bool('chk_config_ocultar_metodo_pago'),
|
'cfdi_metodo_pago': Configuracion.get_bool('chk_config_ocultar_metodo_pago'),
|
||||||
'cfdi_condicion_pago': Configuracion.get_bool('chk_config_ocultar_condiciones_pago'),
|
'cfdi_condicion_pago': Configuracion.get_bool('chk_config_ocultar_condiciones_pago'),
|
||||||
|
@ -5378,7 +5379,6 @@ class Facturas(BaseModel):
|
||||||
comprobante['Fecha'] = invoice.fecha.isoformat()[:19]
|
comprobante['Fecha'] = invoice.fecha.isoformat()[:19]
|
||||||
comprobante['FormaPago'] = invoice.forma_pago
|
comprobante['FormaPago'] = invoice.forma_pago
|
||||||
comprobante['NoCertificado'] = certificado.serie
|
comprobante['NoCertificado'] = certificado.serie
|
||||||
# ~ comprobante['Certificado'] = certificado.cer_txt
|
|
||||||
comprobante['SubTotal'] = FORMAT.format(invoice.subtotal)
|
comprobante['SubTotal'] = FORMAT.format(invoice.subtotal)
|
||||||
comprobante['Moneda'] = invoice.moneda
|
comprobante['Moneda'] = invoice.moneda
|
||||||
comprobante['TipoCambio'] = '1'
|
comprobante['TipoCambio'] = '1'
|
||||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.43.0'
|
VERSION = '1.44.0'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
|
@ -212,8 +212,15 @@ function default_config(){
|
||||||
get_leyendas_fiscales()
|
get_leyendas_fiscales()
|
||||||
$$('tv_invoice').getTabbar().showOption('Leyendas Fiscales')
|
$$('tv_invoice').getTabbar().showOption('Leyendas Fiscales')
|
||||||
}
|
}
|
||||||
|
if(!values.cfdi_carta_porte){
|
||||||
|
$$('tv_invoice').getTabbar().hideOption('Carta Porte')
|
||||||
|
}else{
|
||||||
|
get_leyendas_fiscales()
|
||||||
|
$$('tv_invoice').getTabbar().showOption('Carta Porte')
|
||||||
|
}
|
||||||
cfg_invoice['leyendasfiscales'] = values.cfdi_leyendasfiscales
|
cfg_invoice['leyendasfiscales'] = values.cfdi_leyendasfiscales
|
||||||
cfg_invoice['edu'] = values.cfdi_edu
|
cfg_invoice['edu'] = values.cfdi_edu
|
||||||
|
cfg_invoice['carta_porte'] = values.cfdi_carta_porte
|
||||||
cfg_invoice['open_pdf'] = values.cfdi_open_pdf
|
cfg_invoice['open_pdf'] = values.cfdi_open_pdf
|
||||||
cfg_invoice['tax_locales'] = values.cfdi_tax_locales
|
cfg_invoice['tax_locales'] = values.cfdi_tax_locales
|
||||||
cfg_invoice['tax_decimals'] = values.cfdi_tax_decimals
|
cfg_invoice['tax_decimals'] = values.cfdi_tax_decimals
|
||||||
|
|
|
@ -820,6 +820,7 @@ var grid_leyendas_fiscales = {
|
||||||
columns: grid_cols_leyendas_fiscales,
|
columns: grid_cols_leyendas_fiscales,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var controls_leyendas_fiscales = [
|
var controls_leyendas_fiscales = [
|
||||||
{maxHeight: 15},
|
{maxHeight: 15},
|
||||||
{cols: [{maxWidth: 15},
|
{cols: [{maxWidth: 15},
|
||||||
|
@ -830,6 +831,81 @@ var controls_leyendas_fiscales = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var opt_transporte_internacional = [
|
||||||
|
{id: 'Sí', value: 'Sí'},
|
||||||
|
{id: 'No', value: 'No'},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var opt_entrada_salida = [
|
||||||
|
{id: '', value: ''},
|
||||||
|
{id: 'Entrada', value: 'Entrada'},
|
||||||
|
{id: 'Salida', value: 'Salida'},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var grid_cols_carta_ubicaciones = [
|
||||||
|
{id: 'id', header: 'ID', hidden: true},
|
||||||
|
{id: 'TipoUbicacion', header: 'Tipo de Ubicación', fillspace: 1},
|
||||||
|
{id: 'IDUbicacion', header: 'ID Ubicación', fillspace: 1},
|
||||||
|
{id: 'RFCRemitenteDestinatario', header: 'RFC Rem/Des', fillspace: 1},
|
||||||
|
{id: 'NombreRemitenteDestinatario', header: 'Nombre Rem/Des', fillspace: 1},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var grid_carta_ubicaciones = {
|
||||||
|
view: 'datatable',
|
||||||
|
id: 'grid_carta_ubicaciones',
|
||||||
|
select: 'row',
|
||||||
|
multiselect: false,
|
||||||
|
adjust: true,
|
||||||
|
autoheight: true,
|
||||||
|
headermenu: true,
|
||||||
|
columns: grid_cols_carta_ubicaciones,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var body_carta_ubicaciones = {rows:[
|
||||||
|
grid_carta_ubicaciones,
|
||||||
|
]}
|
||||||
|
|
||||||
|
|
||||||
|
var controls_carta_porte = [
|
||||||
|
{cols: [{maxWidth: 15},
|
||||||
|
{view: 'checkbox', id: 'chk_cfdi_usar_cartaporte', labelWidth: 0,
|
||||||
|
labelRight: 'Usar el complemento Carta Porte'},
|
||||||
|
{}]},
|
||||||
|
{cols: [{maxWidth: 15},
|
||||||
|
{view: 'richselect', id: 'lst_carta_TranspInternac', labelPosition: 'top',
|
||||||
|
label: 'Transporte Internacional', options: opt_transporte_internacional,
|
||||||
|
value: 'No'},
|
||||||
|
{view: 'richselect', id: 'lst_carta_EntradaSalidaMerc', labelPosition: 'top',
|
||||||
|
label: 'Entrada o Salida', options: opt_entrada_salida,
|
||||||
|
value: ''},
|
||||||
|
{view: 'richselect', id: 'lst_carta_PaisOrigenDestino', labelPosition: 'top',
|
||||||
|
label: 'País Origen/Destino', options: [],
|
||||||
|
value: ''},
|
||||||
|
{view: 'richselect', id: 'lst_carta_ViaEntradaSalida', labelPosition: 'top',
|
||||||
|
label: 'Vía de Entrada o Salida', options: [],
|
||||||
|
value: ''},
|
||||||
|
]},
|
||||||
|
{view: 'fieldset', label: 'Ubicaciones', body: body_carta_ubicaciones},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var form_carta_porte = {
|
||||||
|
type: 'space',
|
||||||
|
responsive: true,
|
||||||
|
cols: [{
|
||||||
|
view: 'form',
|
||||||
|
id: 'form_carta_porte',
|
||||||
|
complexData: true,
|
||||||
|
scroll: true,
|
||||||
|
elements: controls_carta_porte,
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var controls_invoices = [
|
var controls_invoices = [
|
||||||
{
|
{
|
||||||
view: 'tabview',
|
view: 'tabview',
|
||||||
|
@ -840,6 +916,7 @@ var controls_invoices = [
|
||||||
{id: 'PreFacturas', rows: controls_prefactura},
|
{id: 'PreFacturas', rows: controls_prefactura},
|
||||||
{id: 'INE', rows: controls_ine},
|
{id: 'INE', rows: controls_ine},
|
||||||
{id: 'Leyendas Fiscales', rows: controls_leyendas_fiscales},
|
{id: 'Leyendas Fiscales', rows: controls_leyendas_fiscales},
|
||||||
|
{id: 'Carta Porte', rows: [form_carta_porte]},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue