forked from elmau/empresa-libre
Representación impresa para Carta Porte
This commit is contained in:
commit
d2c361e174
|
@ -1,3 +1,8 @@
|
||||||
|
v 1.44.1 [19-Ene-2022]
|
||||||
|
- Correciones en generación de Carta Porte v2.0
|
||||||
|
- Plantilla para representación impresa de Carta Porte v2.0
|
||||||
|
|
||||||
|
|
||||||
v 1.44.0 [10-Ene-2022]
|
v 1.44.0 [10-Ene-2022]
|
||||||
----------------------
|
----------------------
|
||||||
- Soporte para Carta Porte v2 con CFDI 3.3
|
- Soporte para Carta Porte v2 con CFDI 3.3
|
||||||
|
|
|
@ -14,7 +14,6 @@ contratar: administracion ARROBA empresalibre.net
|
||||||
|
|
||||||
G1: `A5DdXxCKPw3QKWVdDVs7CzkNugNUW1sHu5zDJFWxCU2h`
|
G1: `A5DdXxCKPw3QKWVdDVs7CzkNugNUW1sHu5zDJFWxCU2h`
|
||||||
BCH: `qztd3l00xle5tffdqvh2snvadkuau2ml0uqm4n875d`
|
BCH: `qztd3l00xle5tffdqvh2snvadkuau2ml0uqm4n875d`
|
||||||
BTC: `3FhiXcXmAesmQzrNEngjHFnvaJRhU1AGWV`
|
|
||||||
|
|
||||||
|
|
||||||
### Requerimientos:
|
### Requerimientos:
|
||||||
|
|
|
@ -473,7 +473,6 @@ class CFDI(object):
|
||||||
|
|
||||||
if self._carta_porte:
|
if self._carta_porte:
|
||||||
datos = datos['cartaporte']
|
datos = datos['cartaporte']
|
||||||
print('\nDatos', datos)
|
|
||||||
ubicaciones = datos.pop('ubicaciones')
|
ubicaciones = datos.pop('ubicaciones')
|
||||||
mercancias = datos.pop('mercancias', ())
|
mercancias = datos.pop('mercancias', ())
|
||||||
tiposfigura = datos.pop('tiposfigura', ())
|
tiposfigura = datos.pop('tiposfigura', ())
|
||||||
|
@ -486,15 +485,19 @@ class CFDI(object):
|
||||||
|
|
||||||
node = ET.SubElement(node_carta, f'{prefix}:Ubicaciones')
|
node = ET.SubElement(node_carta, f'{prefix}:Ubicaciones')
|
||||||
for ubicacion in ubicaciones:
|
for ubicacion in ubicaciones:
|
||||||
|
domicilio = ubicacion.pop('domicilio', {})
|
||||||
dt = parser.parse(ubicacion['FechaHoraSalidaLlegada'])
|
dt = parser.parse(ubicacion['FechaHoraSalidaLlegada'])
|
||||||
ubicacion['FechaHoraSalidaLlegada'] = dt.isoformat()[:19]
|
ubicacion['FechaHoraSalidaLlegada'] = dt.isoformat()[:19]
|
||||||
ET.SubElement(node, f'{prefix}:Ubicacion', ubicacion)
|
sub_node = ET.SubElement(node, f'{prefix}:Ubicacion', ubicacion)
|
||||||
|
if domicilio:
|
||||||
|
ET.SubElement(sub_node, f'{prefix}:Domicilio', domicilio)
|
||||||
|
|
||||||
attr = mercancias
|
attr = mercancias
|
||||||
mercancias = attr.pop('mercancias')
|
mercancias = attr.pop('mercancias')
|
||||||
autotransporte = attr.pop('autotransporte')
|
autotransporte = attr.pop('autotransporte')
|
||||||
identificacion = autotransporte.pop('identificacion')
|
identificacion = autotransporte.pop('identificacion')
|
||||||
seguros = autotransporte.pop('seguros')
|
seguros = autotransporte.pop('seguros')
|
||||||
|
remolque = autotransporte.pop('remolque')
|
||||||
|
|
||||||
node = ET.SubElement(node_carta, f'{prefix}:Mercancias', attr)
|
node = ET.SubElement(node_carta, f'{prefix}:Mercancias', attr)
|
||||||
for mercancia in mercancias:
|
for mercancia in mercancias:
|
||||||
|
@ -503,6 +506,9 @@ class CFDI(object):
|
||||||
sub_node = ET.SubElement(node, f'{prefix}:Autotransporte', autotransporte)
|
sub_node = ET.SubElement(node, f'{prefix}:Autotransporte', autotransporte)
|
||||||
ET.SubElement(sub_node, f'{prefix}:IdentificacionVehicular', identificacion)
|
ET.SubElement(sub_node, f'{prefix}:IdentificacionVehicular', identificacion)
|
||||||
ET.SubElement(sub_node, f'{prefix}:Seguros', seguros)
|
ET.SubElement(sub_node, f'{prefix}:Seguros', seguros)
|
||||||
|
if remolque['SubTipoRem'] and remolque['Placa']:
|
||||||
|
tmp = ET.SubElement(sub_node, f'{prefix}:Remolques')
|
||||||
|
ET.SubElement(tmp, f'{prefix}:Remolque', remolque)
|
||||||
|
|
||||||
if tiposfigura:
|
if tiposfigura:
|
||||||
sub_node = ET.SubElement(node_carta, f'{prefix}:FiguraTransporte')
|
sub_node = ET.SubElement(node_carta, f'{prefix}:FiguraTransporte')
|
||||||
|
|
|
@ -934,6 +934,82 @@ class LIBO(object):
|
||||||
cell3 = self._set_cell(v=disposicion, cell=cell3)
|
cell3 = self._set_cell(v=disposicion, cell=cell3)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def _carta_porte(self, data):
|
||||||
|
if not data:
|
||||||
|
return
|
||||||
|
|
||||||
|
# ~ print(data)
|
||||||
|
figuras = data.pop('figuras')
|
||||||
|
mercancias = data.pop('mercancias')
|
||||||
|
detalle = mercancias.pop('detalle')
|
||||||
|
mercancias = mercancias.pop('mercancias')
|
||||||
|
autotransporte = data.pop('autotransporte')
|
||||||
|
ubicaciones = data.pop('ubicaciones')
|
||||||
|
|
||||||
|
for k, v in data.items():
|
||||||
|
self._set_cell(f'{{cp.{k}}}', v)
|
||||||
|
for k, v in figuras.items():
|
||||||
|
self._set_cell(f'{{cp.{k}}}', v)
|
||||||
|
for k, v in autotransporte.items():
|
||||||
|
self._set_cell(f'{{cp.{k}}}', v)
|
||||||
|
for k, v in mercancias.items():
|
||||||
|
self._set_cell(f'{{cp.{k}}}', v)
|
||||||
|
|
||||||
|
first = True
|
||||||
|
count = len(ubicaciones)
|
||||||
|
for i, ubicacion in enumerate(ubicaciones):
|
||||||
|
tipo = ubicacion['TipoUbicacion']
|
||||||
|
nombre = ubicacion['NombreRemitenteDestinatario']
|
||||||
|
rfc = ubicacion['RFCRemitenteDestinatario']
|
||||||
|
nombre_rfc = f"{nombre} ({rfc})"
|
||||||
|
fecha = ubicacion['FechaHoraSalidaLlegada']
|
||||||
|
domicilio = ubicacion['domicilio']
|
||||||
|
if first:
|
||||||
|
first = False
|
||||||
|
cell_1 = self._set_cell('{cp.TipoUbicacion}', tipo)
|
||||||
|
cell_2 = self._set_cell('{cp.NombreRemitenteDestinatario}', nombre)
|
||||||
|
cell_3 = self._set_cell('{cp.RFCRemitenteDestinatario}', rfc)
|
||||||
|
cell_4 = self._set_cell('{cp.FechaHoraSalidaLlegada}', fecha)
|
||||||
|
cell_5 = self._set_cell('{cp.Domicilio}', domicilio)
|
||||||
|
|
||||||
|
row = cell_1.CellAddress.Row + 1
|
||||||
|
self._sheet.getRows().insertByIndex(row, count - 1)
|
||||||
|
self._copy_paste_rows(cell_1, count)
|
||||||
|
else:
|
||||||
|
cell_1 = self._set_cell(v=tipo, cell=cell_1)
|
||||||
|
cell_2 = self._set_cell(v=nombre, cell=cell_2)
|
||||||
|
cell_3 = self._set_cell(v=rfc, cell=cell_3)
|
||||||
|
cell_4 = self._set_cell(v=fecha, cell=cell_4)
|
||||||
|
cell_5 = self._set_cell(v=domicilio, cell=cell_5)
|
||||||
|
|
||||||
|
first = True
|
||||||
|
count = len(detalle)
|
||||||
|
for i, mercancia in enumerate(detalle):
|
||||||
|
clave = mercancia['BienesTransp']
|
||||||
|
descripcion = mercancia['Descripcion']
|
||||||
|
unidad = mercancia['ClaveUnidad']
|
||||||
|
cantidad = mercancia['Cantidad']
|
||||||
|
peso = mercancia['PesoEnKg']
|
||||||
|
if first:
|
||||||
|
first = False
|
||||||
|
cell_1 = self._set_cell('{cp.BienesTransp}', clave)
|
||||||
|
cell_2 = self._set_cell('{cp.Descripcion}', descripcion)
|
||||||
|
cell_3 = self._set_cell('{cp.ClaveUnidad}', unidad)
|
||||||
|
cell_4 = self._set_cell('{cp.Cantidad}', cantidad)
|
||||||
|
cell_5 = self._set_cell('{cp.PesoEnKg}', peso)
|
||||||
|
if count > 1:
|
||||||
|
row = cell_1.CellAddress.Row + 1
|
||||||
|
self._sheet.getRows().insertByIndex(row, count - 1)
|
||||||
|
self._copy_paste_rows(cell_1, count)
|
||||||
|
else:
|
||||||
|
cell_1 = self._set_cell(v=clave, cell=cell_1)
|
||||||
|
cell_2 = self._set_cell(v=descripcion, cell=cell_2)
|
||||||
|
cell_3 = self._set_cell(v=unidad, cell=cell_3)
|
||||||
|
cell_4 = self._set_cell(v=cantidad, cell=cell_4)
|
||||||
|
cell_5 = self._set_cell(v=peso, cell=cell_5)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
def _nomina(self, data):
|
def _nomina(self, data):
|
||||||
if not data:
|
if not data:
|
||||||
return
|
return
|
||||||
|
@ -1156,12 +1232,14 @@ class LIBO(object):
|
||||||
self._nomina(data['nomina'])
|
self._nomina(data['nomina'])
|
||||||
else:
|
else:
|
||||||
self._totales(data['totales'])
|
self._totales(data['totales'])
|
||||||
self._timbre(data['timbre'])
|
|
||||||
self._donataria(data['donataria'])
|
self._donataria(data['donataria'])
|
||||||
self._ine(data['ine'])
|
self._ine(data['ine'])
|
||||||
|
|
||||||
self._divisas(data.get('divisas', {}))
|
self._divisas(data.get('divisas', {}))
|
||||||
self._leyendas(data.get('leyendas', ''))
|
self._leyendas(data.get('leyendas', ''))
|
||||||
|
self._carta_porte(data.get('carta_porte', {}))
|
||||||
|
|
||||||
|
self._timbre(data['timbre'])
|
||||||
|
|
||||||
self._cancelado(data['cancelada'])
|
self._cancelado(data['cancelada'])
|
||||||
self._others_values(data)
|
self._others_values(data)
|
||||||
|
@ -1177,7 +1255,6 @@ class LIBO(object):
|
||||||
def pdf(self, path, data, ods=False):
|
def pdf(self, path, data, ods=False):
|
||||||
options = {'AsTemplate': True, 'Hidden': True}
|
options = {'AsTemplate': True, 'Hidden': True}
|
||||||
log.debug('Abrir plantilla...')
|
log.debug('Abrir plantilla...')
|
||||||
|
|
||||||
self._template = self._doc_open(path, options)
|
self._template = self._doc_open(path, options)
|
||||||
if self._template is None:
|
if self._template is None:
|
||||||
return b''
|
return b''
|
||||||
|
@ -1479,10 +1556,16 @@ def to_pdf(data, emisor_rfc, ods=False, pdf_from='1'):
|
||||||
default = 'plantilla_factura.ods'
|
default = 'plantilla_factura.ods'
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
rfc = emisor_rfc
|
rfc = emisor_rfc
|
||||||
|
|
||||||
version = data['comprobante']['version']
|
version = data['comprobante']['version']
|
||||||
|
|
||||||
if 'nomina' in data and data['nomina']:
|
if 'nomina' in data and data['nomina']:
|
||||||
version = '{}_{}'.format(data['nomina']['version'], version)
|
|
||||||
default = 'plantilla_nomina.ods'
|
default = 'plantilla_nomina.ods'
|
||||||
|
version = '{}_{}'.format(data['nomina']['version'], version)
|
||||||
|
|
||||||
|
if 'carta_porte' in data:
|
||||||
|
default = 'plantilla_factura_cp.ods'
|
||||||
|
version = '{}_cp_{}'.format(version, data['carta_porte']['version'])
|
||||||
|
|
||||||
pagos = ''
|
pagos = ''
|
||||||
if data.get('pagos', False):
|
if data.get('pagos', False):
|
||||||
|
|
|
@ -260,6 +260,51 @@ class CfdiToDict(object):
|
||||||
'cfdi': 'http://www.sat.gob.mx/cfd/3',
|
'cfdi': 'http://www.sat.gob.mx/cfd/3',
|
||||||
'divisas': 'http://www.sat.gob.mx/divisas',
|
'divisas': 'http://www.sat.gob.mx/divisas',
|
||||||
'leyendasFisc': 'http://www.sat.gob.mx/leyendasFiscales',
|
'leyendasFisc': 'http://www.sat.gob.mx/leyendasFiscales',
|
||||||
|
'cartaporte20': 'http://www.sat.gob.mx/CartaPorte20',
|
||||||
|
}
|
||||||
|
tipo_figura = {
|
||||||
|
'01': '[01] Operador',
|
||||||
|
'02': '[02] Propietario',
|
||||||
|
'03': '[03] Arrendador',
|
||||||
|
'04': '[04] Notificado',
|
||||||
|
}
|
||||||
|
PAISES = {
|
||||||
|
'MEX': 'México',
|
||||||
|
}
|
||||||
|
ESTADOS = {
|
||||||
|
'AGU': 'Aguascalientes',
|
||||||
|
'BCN': 'Baja California',
|
||||||
|
'BCS': 'Baja California Sur',
|
||||||
|
'CAM': 'Campeche',
|
||||||
|
'CHP': 'Chiapas',
|
||||||
|
'CHH': 'Chihuahua',
|
||||||
|
'COA': 'Coahuila',
|
||||||
|
'COL': 'Colima',
|
||||||
|
'DIF': 'Ciudad de México',
|
||||||
|
'DUR': 'Durango',
|
||||||
|
'GUA': 'Guanajuato',
|
||||||
|
'GRO': 'Guerrero',
|
||||||
|
'HID': 'Hidalgo',
|
||||||
|
'JAL': 'Jalisco',
|
||||||
|
'MEX': 'México',
|
||||||
|
'MIC': 'Michoacán',
|
||||||
|
'MOR': 'Morelos',
|
||||||
|
'NAC': 'Nacional',
|
||||||
|
'NAY': 'Nayarit',
|
||||||
|
'NLE': 'Nuevo León',
|
||||||
|
'OAX': 'Oaxaca',
|
||||||
|
'PUE': 'Puebla',
|
||||||
|
'QUE': 'Querétaro',
|
||||||
|
'ROO': 'Quintana Roo',
|
||||||
|
'SLP': 'San Luis Potosí',
|
||||||
|
'SIN': 'Sinaloa',
|
||||||
|
'SON': 'Sonora',
|
||||||
|
'TAB': 'Tabasco',
|
||||||
|
'TAM': 'Tamaulipas',
|
||||||
|
'TLA': 'Tlaxcala',
|
||||||
|
'VER': 'Veracruz',
|
||||||
|
'YUC': 'Yucatán',
|
||||||
|
'ZAC': 'Zacatecas',
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, xml):
|
def __init__(self, xml):
|
||||||
|
@ -277,6 +322,13 @@ class CfdiToDict(object):
|
||||||
self._complementos()
|
self._complementos()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def _set_carta_porte_domicilio(self, data):
|
||||||
|
municipio = data['Municipio']
|
||||||
|
estado = self.ESTADOS[data['Estado']]
|
||||||
|
pais = self.PAISES[data['Pais']]
|
||||||
|
domicilio = f"{municipio}, {estado}, {pais}, C.P. {data['CodigoPostal']}"
|
||||||
|
return domicilio
|
||||||
|
|
||||||
def _complementos(self):
|
def _complementos(self):
|
||||||
path = '//cfdi:Complemento'
|
path = '//cfdi:Complemento'
|
||||||
complemento = self._root.xpath(path, namespaces=self.NS)[0]
|
complemento = self._root.xpath(path, namespaces=self.NS)[0]
|
||||||
|
@ -293,6 +345,56 @@ class CfdiToDict(object):
|
||||||
if node:
|
if node:
|
||||||
leyendas = [CaseInsensitiveDict(n.attrib) for n in node]
|
leyendas = [CaseInsensitiveDict(n.attrib) for n in node]
|
||||||
self._values['leyendas'] = leyendas
|
self._values['leyendas'] = leyendas
|
||||||
|
|
||||||
|
path = '//cartaporte20:CartaPorte'
|
||||||
|
carta_porte = complemento.xpath(path, namespaces=self.NS)
|
||||||
|
if carta_porte:
|
||||||
|
values = CaseInsensitiveDict(carta_porte[0].attrib)
|
||||||
|
for node in carta_porte[0]:
|
||||||
|
if 'FiguraTransporte' in node.tag:
|
||||||
|
figuras = CaseInsensitiveDict(node[0].attrib)
|
||||||
|
figuras['TipoFigura'] = self.tipo_figura[figuras['TipoFigura']]
|
||||||
|
values['figuras'] = figuras
|
||||||
|
elif 'Mercancias' in node.tag:
|
||||||
|
mercancias = CaseInsensitiveDict(node.attrib)
|
||||||
|
detalle = [CaseInsensitiveDict(n.attrib)
|
||||||
|
for n in node if 'Mercancia' in n.tag]
|
||||||
|
values['mercancias'] = {
|
||||||
|
'mercancias': mercancias,
|
||||||
|
'detalle': detalle,
|
||||||
|
}
|
||||||
|
|
||||||
|
path = '//cartaporte20:Autotransporte'
|
||||||
|
node_auto = node.xpath(path, namespaces=self.NS)[0]
|
||||||
|
values_auto = CaseInsensitiveDict(node_auto.attrib)
|
||||||
|
values['autotransporte'] = values_auto
|
||||||
|
|
||||||
|
path = '//cartaporte20:IdentificacionVehicular'
|
||||||
|
node_tmp = node_auto.xpath(path, namespaces=self.NS)[0]
|
||||||
|
values_auto = CaseInsensitiveDict(node_tmp.attrib)
|
||||||
|
values['autotransporte'].update(values_auto)
|
||||||
|
|
||||||
|
path = '//cartaporte20:Seguros'
|
||||||
|
node_tmp = node_auto.xpath(path, namespaces=self.NS)[0]
|
||||||
|
values_auto = CaseInsensitiveDict(node_tmp.attrib)
|
||||||
|
values['autotransporte'].update(values_auto)
|
||||||
|
|
||||||
|
path = '//cartaporte20:Remolques'
|
||||||
|
node_tmp = node_auto.xpath(path, namespaces=self.NS)[0][0]
|
||||||
|
values_auto = CaseInsensitiveDict(node_tmp.attrib)
|
||||||
|
values['autotransporte'].update(values_auto)
|
||||||
|
elif 'Ubicaciones' in node.tag:
|
||||||
|
ubicaciones = []
|
||||||
|
for n in node:
|
||||||
|
ubicacion = CaseInsensitiveDict(n.attrib)
|
||||||
|
ubicacion['domicilio'] = self._set_carta_porte_domicilio(
|
||||||
|
CaseInsensitiveDict(n[0].attrib))
|
||||||
|
ubicaciones.append(ubicacion)
|
||||||
|
|
||||||
|
values['ubicaciones'] = ubicaciones
|
||||||
|
|
||||||
|
self._values['carta_porte'] = values
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -641,9 +743,9 @@ def get_cert(args):
|
||||||
|
|
||||||
def make_xml(data, certificado):
|
def make_xml(data, certificado):
|
||||||
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
cert = SATCertificate(certificado.cer, certificado.key_enc.encode())
|
||||||
if DEBUG:
|
# ~ if DEBUG:
|
||||||
data['emisor']['Rfc'] = certificado.rfc
|
# ~ data['emisor']['Rfc'] = certificado.rfc
|
||||||
data['emisor']['RegimenFiscal'] = '603'
|
# ~ data['emisor']['RegimenFiscal'] = '603'
|
||||||
|
|
||||||
cfdi = CFDI()
|
cfdi = CFDI()
|
||||||
xml = ET.parse(BytesIO(cfdi.get_xml(data).encode()))
|
xml = ET.parse(BytesIO(cfdi.get_xml(data).encode()))
|
||||||
|
|
|
@ -4785,6 +4785,7 @@ class Facturas(BaseModel):
|
||||||
|
|
||||||
values = cls._get_not_in_xml(cls, obj, emisor)
|
values = cls._get_not_in_xml(cls, obj, emisor)
|
||||||
data = util.get_data_from_xml(obj, values)
|
data = util.get_data_from_xml(obj, values)
|
||||||
|
data.update(utils.CfdiToDict(obj.xml).values)
|
||||||
doc = util.to_pdf(data, emisor.rfc, True)
|
doc = util.to_pdf(data, emisor.rfc, True)
|
||||||
return doc, name
|
return doc, name
|
||||||
|
|
||||||
|
@ -5329,10 +5330,34 @@ class Facturas(BaseModel):
|
||||||
return
|
return
|
||||||
|
|
||||||
values = utils.loads(valores)
|
values = utils.loads(valores)
|
||||||
|
|
||||||
|
total_distance = 0.00
|
||||||
|
total_weight = 0.00
|
||||||
mercancias = values['mercancias']
|
mercancias = values['mercancias']
|
||||||
for mercancia in mercancias['mercancias']:
|
for mercancia in mercancias['mercancias']:
|
||||||
mercancia['ClaveUnidad'] = SATUnidades.get_key_by_id(mercancia['ClaveUnidad'])
|
mercancia['ClaveUnidad'] = SATUnidades.get_key_by_id(mercancia['ClaveUnidad'])
|
||||||
|
total_weight += float(mercancia['PesoEnKg'])
|
||||||
|
mercancias['PesoBrutoTotal'] = f"{total_weight:.2f}"
|
||||||
|
|
||||||
|
ubicaciones = values['ubicaciones']
|
||||||
|
for ubicacion in ubicaciones:
|
||||||
|
if 'DistanciaRecorrida' in ubicacion:
|
||||||
|
print(1, type(ubicacion['DistanciaRecorrida']), ubicacion['DistanciaRecorrida'])
|
||||||
|
total_distance += float(ubicacion['DistanciaRecorrida'])
|
||||||
|
municipio = ubicacion.pop('Municipio')
|
||||||
|
estado = ubicacion.pop('Estado')
|
||||||
|
pais = ubicacion.pop('Pais')
|
||||||
|
cp = ubicacion.pop('CodigoPostal')
|
||||||
|
if municipio and estado and pais and cp:
|
||||||
|
ubicacion['domicilio'] = {
|
||||||
|
'Municipio': municipio,
|
||||||
|
'Estado': estado,
|
||||||
|
'Pais': pais,
|
||||||
|
'CodigoPostal': cp,
|
||||||
|
}
|
||||||
|
|
||||||
|
values['TotalDistRec'] = f"{total_distance:.2f}"
|
||||||
|
# ~ print(2, values)
|
||||||
data = {
|
data = {
|
||||||
'factura': invoice,
|
'factura': invoice,
|
||||||
'nombre': 'cartaporte',
|
'nombre': 'cartaporte',
|
||||||
|
@ -7184,7 +7209,10 @@ class CfdiPagos(BaseModel):
|
||||||
|
|
||||||
partner = related[0].factura.cliente
|
partner = related[0].factura.cliente
|
||||||
partner_name = related[0].factura.cliente.nombre
|
partner_name = related[0].factura.cliente.nombre
|
||||||
regimen_fiscal = related[0].factura.regimen_fiscal
|
|
||||||
|
emisor = Emisor.select()[0]
|
||||||
|
# ~ regimen_fiscal = related[0].factura.regimen_fiscal
|
||||||
|
regimen_fiscal = emisor.regimenes[0].key
|
||||||
|
|
||||||
filters = (
|
filters = (
|
||||||
(CfdiPagos.movimiento==id_mov) &
|
(CfdiPagos.movimiento==id_mov) &
|
||||||
|
|
|
@ -42,7 +42,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.44.0'
|
VERSION = '1.44.1'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,10 @@ var invoices_controllers = {
|
||||||
tv_invoice = $$('tv_invoice').getTabbar()
|
tv_invoice = $$('tv_invoice').getTabbar()
|
||||||
tv_invoice.attachEvent('onChange', tv_invoice_change)
|
tv_invoice.attachEvent('onChange', tv_invoice_change)
|
||||||
|
|
||||||
|
$$('grid_carta_mercancias').attachEvent('onItemClick', grid_carta_mercancias_click)
|
||||||
|
$$('cmd_carta_add_product').attachEvent('onItemClick', cmd_carta_add_product_click)
|
||||||
|
$$('cmd_carta_copy_from_invoice').attachEvent('onItemClick', cmd_carta_copy_from_invoice_click)
|
||||||
|
|
||||||
webix.extend($$('grid_invoices'), webix.ProgressBar)
|
webix.extend($$('grid_invoices'), webix.ProgressBar)
|
||||||
|
|
||||||
init_config_invoices()
|
init_config_invoices()
|
||||||
|
@ -699,21 +703,21 @@ function guardar_y_timbrar(values){
|
||||||
|
|
||||||
var usar_cartaporte = $$('chk_cfdi_usar_cartaporte').getValue()
|
var usar_cartaporte = $$('chk_cfdi_usar_cartaporte').getValue()
|
||||||
if(usar_cartaporte){
|
if(usar_cartaporte){
|
||||||
var total_distance = 0.00
|
//~ var total_distance = 0.00
|
||||||
var total_weight = 0.00
|
//~ var total_weight = 0.00
|
||||||
var cartaporte = {
|
var cartaporte = {
|
||||||
TranspInternac: $$('lst_carta_TranspInternac').getValue(),
|
TranspInternac: $$('lst_carta_TranspInternac').getValue(),
|
||||||
TotalDistRec: total_distance,
|
//~ TotalDistRec: total_distance,
|
||||||
}
|
}
|
||||||
var ubicaciones = $$('grid_carta_ubicaciones').data.getRange()
|
var ubicaciones = $$('grid_carta_ubicaciones').data.getRange()
|
||||||
ubicaciones.forEach(function(row, index){
|
ubicaciones.forEach(function(row, index){
|
||||||
delete row['id']
|
delete row['id']
|
||||||
delete row['delete']
|
delete row['delete']
|
||||||
if(row['DistanciaRecorrida']){
|
//~ if(row['DistanciaRecorrida']){
|
||||||
total_distance += parseFloat(row['DistanciaRecorrida'])
|
//~ total_distance += parseFloat(row['DistanciaRecorrida'])
|
||||||
}
|
//~ }
|
||||||
})
|
})
|
||||||
cartaporte['TotalDistRec'] = String(total_distance)
|
//~ cartaporte['TotalDistRec'] = total_distance
|
||||||
cartaporte['ubicaciones'] = ubicaciones
|
cartaporte['ubicaciones'] = ubicaciones
|
||||||
|
|
||||||
var row = $$('grid_carta_autotransporte').data.getRange()[0]
|
var row = $$('grid_carta_autotransporte').data.getRange()[0]
|
||||||
|
@ -728,20 +732,25 @@ function guardar_y_timbrar(values){
|
||||||
seguros: {
|
seguros: {
|
||||||
AseguraRespCivil: row['AseguraRespCivil'],
|
AseguraRespCivil: row['AseguraRespCivil'],
|
||||||
PolizaRespCivil: row['PolizaRespCivil'],
|
PolizaRespCivil: row['PolizaRespCivil'],
|
||||||
|
},
|
||||||
|
remolque: {
|
||||||
|
SubTipoRem: row['SubTipoRem'],
|
||||||
|
Placa: row['Placa'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var mercancias = $$('grid_carta_mercancias').data.getRange()
|
var mercancias = $$('grid_carta_mercancias').data.getRange()
|
||||||
mercancias.forEach(function(row, index){
|
mercancias.forEach(function(row, index){
|
||||||
delete row['id']
|
delete row['id']
|
||||||
|
delete row['delete']
|
||||||
row['Cantidad'] = String(row['Cantidad'])
|
row['Cantidad'] = String(row['Cantidad'])
|
||||||
//~ row['ValorMercancia'] = String(row['ValorMercancia'])
|
//~ row['ValorMercancia'] = String(row['ValorMercancia'])
|
||||||
if(row['PesoEnKg']){
|
//~ if(row['PesoEnKg']){
|
||||||
total_weight += parseFloat(row['PesoEnKg'])
|
//~ total_weight += parseFloat(row['PesoEnKg'])
|
||||||
}
|
//~ }
|
||||||
})
|
})
|
||||||
var mercancias = {
|
var mercancias = {
|
||||||
'PesoBrutoTotal': String(total_weight),
|
'PesoBrutoTotal': 0.00,
|
||||||
'UnidadPeso': $$('lst_carta_UnidadPeso').getValue(),
|
'UnidadPeso': $$('lst_carta_UnidadPeso').getValue(),
|
||||||
'NumTotalMercancias': String(mercancias.length),
|
'NumTotalMercancias': String(mercancias.length),
|
||||||
mercancias: mercancias,
|
mercancias: mercancias,
|
||||||
|
@ -2482,37 +2491,15 @@ function get_leyendas_fiscales(){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//~ Delete
|
||||||
function _tab_carta_porte(){
|
function _tab_carta_porte(){
|
||||||
var g1 = $$('grid_details')
|
|
||||||
var g2 = $$('grid_carta_mercancias')
|
|
||||||
|
|
||||||
if(!g1.count()){
|
|
||||||
msg = 'Agrega primero "todos" los productos a trasladar'
|
|
||||||
msg_error(msg)
|
|
||||||
activate_tab('tv_invoice', 'Generar')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
g2.clearAll()
|
|
||||||
|
|
||||||
g1.eachRow(function(row){
|
|
||||||
const r = g1.getItem(row)
|
|
||||||
var data = new Object()
|
|
||||||
data['BienesTransp'] = r.clave_sat
|
|
||||||
data['Descripcion'] = r.descripcion
|
|
||||||
data['Cantidad'] = r.cantidad
|
|
||||||
data['ClaveUnidad'] = r.unidad
|
|
||||||
//~ data['ValorMercancia'] = r.importe
|
|
||||||
g2.add(data)
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function tv_invoice_change(nv, ov){
|
function tv_invoice_change(nv, ov){
|
||||||
if(nv=='Carta Porte'){
|
if(nv=='Carta Porte'){
|
||||||
_tab_carta_porte()
|
//~ _tab_carta_porte()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2615,3 +2602,60 @@ function cmd_invoice_ask_cancel_click(){
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function cmd_carta_add_product_click(){
|
||||||
|
var g = $$('grid_carta_mercancias')
|
||||||
|
g.add({delete: '-'})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _copy_from_invoice(){
|
||||||
|
var g1 = $$('grid_details')
|
||||||
|
var g2 = $$('grid_carta_mercancias')
|
||||||
|
|
||||||
|
if(!g1.count()){
|
||||||
|
msg = 'Agrega primero "todos" los productos a trasladar'
|
||||||
|
msg_error(msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
g2.clearAll()
|
||||||
|
|
||||||
|
g1.eachRow(function(row){
|
||||||
|
const r = g1.getItem(row)
|
||||||
|
var data = new Object()
|
||||||
|
data['delete'] = '-'
|
||||||
|
data['BienesTransp'] = r.clave_sat
|
||||||
|
data['Descripcion'] = r.descripcion
|
||||||
|
data['Cantidad'] = r.cantidad
|
||||||
|
data['ClaveUnidad'] = r.unidad
|
||||||
|
//~ data['ValorMercancia'] = r.importe
|
||||||
|
g2.add(data)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function cmd_carta_copy_from_invoice_click(){
|
||||||
|
msg = '¿Estás seguro de copiar los productos?<BR><BR> \
|
||||||
|
Esto reemplazara todos los datos actuales'
|
||||||
|
webix.confirm({
|
||||||
|
title: 'Copiar productos',
|
||||||
|
ok: 'Si',
|
||||||
|
cancel: 'No',
|
||||||
|
type: 'confirm-error',
|
||||||
|
text: msg,
|
||||||
|
callback:function(result){
|
||||||
|
if(result){
|
||||||
|
_copy_from_invoice()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function grid_carta_mercancias_click(id, e, node){
|
||||||
|
if(id.column != 'delete'){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.remove(id.row)
|
||||||
|
}
|
||||||
|
|
|
@ -860,7 +860,44 @@ var date_suggest = {
|
||||||
|
|
||||||
|
|
||||||
var opt_countries = [
|
var opt_countries = [
|
||||||
{id: 'MXN', value: 'México'},
|
{id: 'MEX', value: 'México'},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var opt_carta_estados = [
|
||||||
|
{id: 'AGU', value: 'Aguascalientes'},
|
||||||
|
{id: 'BCN', value: 'Baja California'},
|
||||||
|
{id: 'BCS', value: 'Baja California Sur'},
|
||||||
|
{id: 'CAM', value: 'Campeche'},
|
||||||
|
{id: 'CHP', value: 'Chiapas'},
|
||||||
|
{id: 'CHH', value: 'Chihuahua'},
|
||||||
|
{id: 'COA', value: 'Coahuila'},
|
||||||
|
{id: 'COL', value: 'Colima'},
|
||||||
|
{id: 'DIF', value: 'Ciudad de México'},
|
||||||
|
{id: 'DUR', value: 'Durango'},
|
||||||
|
{id: 'GUA', value: 'Guanajuato'},
|
||||||
|
{id: 'GRO', value: 'Guerrero'},
|
||||||
|
{id: 'HID', value: 'Hidalgo'},
|
||||||
|
{id: 'JAL', value: 'Jalisco'},
|
||||||
|
{id: 'MEX', value: 'México'},
|
||||||
|
{id: 'MIC', value: 'Michoacán'},
|
||||||
|
{id: 'MOR', value: 'Morelos'},
|
||||||
|
{id: 'NAC', value: 'Nacional'},
|
||||||
|
{id: 'NAY', value: 'Nayarit'},
|
||||||
|
{id: 'NLE', value: 'Nuevo León'},
|
||||||
|
{id: 'OAX', value: 'Oaxaca'},
|
||||||
|
{id: 'PUE', value: 'Puebla'},
|
||||||
|
{id: 'QUE', value: 'Querétaro'},
|
||||||
|
{id: 'ROO', value: 'Quintana Roo'},
|
||||||
|
{id: 'SLP', value: 'San Luis Potosí'},
|
||||||
|
{id: 'SIN', value: 'Sinaloa'},
|
||||||
|
{id: 'SON', value: 'Sonora'},
|
||||||
|
{id: 'TAB', value: 'Tabasco'},
|
||||||
|
{id: 'TAM', value: 'Tamaulipas'},
|
||||||
|
{id: 'TLA', value: 'Tlaxcala'},
|
||||||
|
{id: 'VER', value: 'Veracruz'},
|
||||||
|
{id: 'YUC', value: 'Yucatán'},
|
||||||
|
{id: 'ZAC', value: 'Zacatecas'},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -871,9 +908,9 @@ var grid_cols_carta_ubicaciones = [
|
||||||
{id: 'RFCRemitenteDestinatario', header: 'RFC Rem/Des', editor: 'text', fillspace: 1},
|
{id: 'RFCRemitenteDestinatario', header: 'RFC Rem/Des', editor: 'text', fillspace: 1},
|
||||||
{id: 'NombreRemitenteDestinatario', header: 'Nombre Rem/Des', editor: 'text', fillspace: 1},
|
{id: 'NombreRemitenteDestinatario', header: 'Nombre Rem/Des', editor: 'text', fillspace: 1},
|
||||||
{id: 'FechaHoraSalidaLlegada', header: 'Fecha/Hora', editor: 'date', suggest: date_suggest, format: webix.Date.dateToStr("%D, %d-%M-%Y %h:%i"), footer: 'Total distancia:', fillspace: 1},
|
{id: 'FechaHoraSalidaLlegada', header: 'Fecha/Hora', editor: 'date', suggest: date_suggest, format: webix.Date.dateToStr("%D, %d-%M-%Y %h:%i"), footer: 'Total distancia:', fillspace: 1},
|
||||||
{id: 'DistanciaRecorrida', header: 'Distancia (KM)', editor: 'text', css: 'right', footer: {content: 'summColumn', css: 'right'}, fillspace: 1},
|
{id: 'DistanciaRecorrida', header: 'Distancia (KM)', editor: 'text', format: webix.i18n.numberFormat, css: 'right', footer: {content: 'summColumn', css: 'right'}, fillspace: 1},
|
||||||
{id: 'Municipio', headerd: 'Municipio', editor: 'text', fillspace: 1},
|
{id: 'Municipio', headerd: 'Municipio', editor: 'text', fillspace: 1},
|
||||||
{id: 'Estado', headerd: 'Estado', editor: 'text', fillspace: 1},
|
{id: 'Estado', headerd: 'Estado', editor: 'select', options: opt_carta_estados, fillspace: 1},
|
||||||
{id: 'Pais', headerd: 'Pais', editor: 'select', options: opt_countries, fillspace: 1},
|
{id: 'Pais', headerd: 'Pais', editor: 'select', options: opt_countries, fillspace: 1},
|
||||||
{id: 'CodigoPostal', headerd: 'C.P.', editor: 'text', fillspace: 1},
|
{id: 'CodigoPostal', headerd: 'C.P.', editor: 'text', fillspace: 1},
|
||||||
]
|
]
|
||||||
|
@ -885,13 +922,13 @@ var grid_cols_carta_ubicaciones = [
|
||||||
//~ Referencia
|
//~ Referencia
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var grid_cols_carta_mercancias = [
|
var grid_cols_carta_mercancias = [
|
||||||
{id: 'id', header: 'ID', hidden: true},
|
{id: 'id', header: 'ID', hidden: true},
|
||||||
{id: 'BienesTransp', header: 'Clave SAT', fillspace: 1},
|
{id: 'delete', header: '', width: 30, css: 'delete'},
|
||||||
{id: 'Descripcion', header: 'Descripción', fillspace: 1},
|
{id: 'BienesTransp', header: 'Clave SAT', editor: 'text', fillspace: 1},
|
||||||
{id: 'Cantidad', header: 'Cantidad', format: webix.i18n.numberFormat, css: 'right', fillspace: 1},
|
{id: 'Descripcion', header: 'Descripción', editor: 'text', fillspace: 1},
|
||||||
{id: 'ClaveUnidad', header: 'Unidad', options: 'values/unidades', fillspace: 1},
|
{id: 'Cantidad', header: 'Cantidad', editor: 'text', format: webix.i18n.numberFormat, css: 'right', fillspace: 1},
|
||||||
|
{id: 'ClaveUnidad', header: 'Unidad', editor: 'select', options: 'values/unidades', footer: 'Total peso:', fillspace: 1},
|
||||||
//~ {id: 'ValorMercancia', header: 'Valor Mercancia', format: webix.i18n.priceFormat, css: 'right', footer: 'Total peso:', fillspace: 1},
|
//~ {id: 'ValorMercancia', header: 'Valor Mercancia', format: webix.i18n.priceFormat, css: 'right', footer: 'Total peso:', fillspace: 1},
|
||||||
{id: 'PesoEnKg', header: 'Peso (Kg)', format: webix.i18n.numberFormat, css: 'right', editor: 'text', footer: {content: 'summColumn', css: 'right'}, fillspace: 1},
|
{id: 'PesoEnKg', header: 'Peso (Kg)', format: webix.i18n.numberFormat, css: 'right', editor: 'text', footer: {content: 'summColumn', css: 'right'}, fillspace: 1},
|
||||||
]
|
]
|
||||||
|
@ -902,6 +939,79 @@ var opt_config_auto = [
|
||||||
{id: 'VL', value: '[VL] Vehículo ligero de carga (2 llantas en el eje delantero y 2 llantas en el eje trasero)'},
|
{id: 'VL', value: '[VL] Vehículo ligero de carga (2 llantas en el eje delantero y 2 llantas en el eje trasero)'},
|
||||||
{id: 'C2', value: '[C2] Camión Unitario (2 llantas en el eje delantero y 4 llantas en el eje trasero)'},
|
{id: 'C2', value: '[C2] Camión Unitario (2 llantas en el eje delantero y 4 llantas en el eje trasero)'},
|
||||||
{id: 'C3', value: '[C3] Camión Unitario (2 llantas en el eje delantero y 6 o 8 llantas en los dos ejes traseros)'},
|
{id: 'C3', value: '[C3] Camión Unitario (2 llantas en el eje delantero y 6 o 8 llantas en los dos ejes traseros)'},
|
||||||
|
{id: 'C2R2', value: '[C2R2] Camión-Remolque (6 llantas en el camión y 8 llantas en remolque)'},
|
||||||
|
{id: 'C3R2', value: '[C3R2] Camión-Remolque (10 llantas en el camión y 8 llantas en remolque)'},
|
||||||
|
{id: 'C2R3', value: '[C2R3] Camión-Remolque (6 llantas en el camión y 12 llantas en remolque)'},
|
||||||
|
{id: 'C3R3', value: '[C3R3] Camión-Remolque (10 llantas en el camión y 12 llantas en remolque)'},
|
||||||
|
{id: 'T2S1', value: '[T2S1] Tractocamión Articulado (6 llantas en el tractocamión, 4 llantas en el semirremolque)'},
|
||||||
|
{id: 'T2S2', value: '[T2S2] Tractocamión Articulado (6 llantas en el tractocamión, 8 llantas en el semirremolque)'},
|
||||||
|
{id: 'T2S3', value: '[T2S3] Tractocamión Articulado (6 llantas en el tractocamión, 12 llantas en el semirremolque)'},
|
||||||
|
{id: 'T3S1', value: '[T3S1] Tractocamión Articulado (10 llantas en el tractocamión, 4 llantas en el semirremolque)'},
|
||||||
|
{id: 'T3S2', value: '[T3S2] Tractocamión Articulado (10 llantas en el tractocamión, 8 llantas en el semirremolque)'},
|
||||||
|
{id: 'T3S3', value: '[T3S3] Tractocamión Articulado (10 llantas en el tractocamión, 12 llantas en el semirremolque)'},
|
||||||
|
{id: 'T2S1R2', value: '[T2S1R2] Tractocamión Semirremolque-Remolque (6 llantas en el tractocamión, 4 llantas en el semirremolque y 8 llantas en el remolque)'},
|
||||||
|
{id: 'T2S2R2', value: '[T2S2R2] Tractocamión Semirremolque-Remolque (6 llantas en el tractocamión, 8 llantas en el semirremolque y 8 llantas en el remolque)'},
|
||||||
|
{id: 'T2S1R3', value: '[T2S1R3] Tractocamión Semirremolque-Remolque (6 llantas en el tractocamión, 4 llantas en el semirremolque y 12 llantas en el remolque)'},
|
||||||
|
{id: 'T3S1R2', value: '[T3S1R2] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 4 llantas en el semirremolque y 8 llantas en el remolque)'},
|
||||||
|
{id: 'T3S1R3', value: '[T3S1R3] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 4 llantas en el semirremolque y 12 llantas en el remolque)'},
|
||||||
|
{id: 'T3S2R2', value: '[T3S2R2] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 8 llantas en el semirremolque y 8 llantas en el remolque)'},
|
||||||
|
{id: 'T3S2R3', value: '[T3S2R3] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 8 llantas en el semirremolque y 12 llantas en el remolque)'},
|
||||||
|
{id: 'T3S2R4', value: '[T3S2R4] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 8 llantas en el semirremolque y 16 llantas en el remolque)'},
|
||||||
|
{id: 'T2S2S2', value: '[T2S2S2] Tractocamión Semirremolque-Semirremolque (6 llantas en el tractocamión, 8 llantas en el semirremolque delantero y 8 llantas en el semirremolque trasero)'},
|
||||||
|
{id: 'T3S2S2', value: '[T3S2S2] Tractocamión Semirremolque-Semirremolque (10 llantas en el tractocamión, 8 llantas en el semirremolque delantero y 8 llantas en el semirremolque trasero)'},
|
||||||
|
{id: 'T3S3S2', value: '[T3S3S2] Tractocamión Semirremolque-Semirremolque (10 llantas en el tractocamión, 12 llantas en el semirremolque delantero y 8 llantas en el semirremolque trasero)'},
|
||||||
|
{id: 'OTROEVGP', value: '[OTROEVGP] Especializado de carga Voluminosa y/o Gran Peso'},
|
||||||
|
{id: 'OTROSG', value: '[OTROSG] Servicio de Grúas'},
|
||||||
|
{id: 'GPLUTA', value: '[GPLUTA] Grúa de Pluma Tipo A'},
|
||||||
|
{id: 'GPLUTB', value: '[GPLUTB] Grúa de Pluma Tipo B'},
|
||||||
|
{id: 'GPLUTC', value: '[GPLUTC] Grúa de Pluma Tipo C'},
|
||||||
|
{id: 'GPLUTD', value: '[GPLUTD] Grúa de Pluma Tipo D'},
|
||||||
|
{id: 'GPLATA', value: '[GPLATA] Grúa de Plataforma Tipo A'},
|
||||||
|
{id: 'GPLATB', value: '[GPLATB] Grúa de Plataforma Tipo B'},
|
||||||
|
{id: 'GPLATC', value: '[GPLATC] Grúa de Plataforma Tipo C'},
|
||||||
|
{id: 'GPLATD', value: '[GPLATD] Grúa de Plataforma Tipo D'},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var opt_carta_tipo_remolque = [
|
||||||
|
{id: '', value: ''},
|
||||||
|
{id: 'CTR001', value: '[CTR001] Caballete'},
|
||||||
|
{id: 'CTR002', value: '[CTR002] Caja'},
|
||||||
|
{id: 'CTR003', value: '[CTR003] Caja Abierta'},
|
||||||
|
{id: 'CTR004', value: '[CTR004] Caja Cerrada'},
|
||||||
|
{id: 'CTR005', value: '[CTR005] Caja De Recolección Con Cargador Frontal'},
|
||||||
|
{id: 'CTR006', value: '[CTR006] Caja Refrigerada'},
|
||||||
|
{id: 'CTR007', value: '[CTR007] Caja Seca'},
|
||||||
|
{id: 'CTR008', value: '[CTR008] Caja Transferencia'},
|
||||||
|
{id: 'CTR009', value: '[CTR009] Cama Baja o Cuello Ganso'},
|
||||||
|
{id: 'CTR010', value: '[CTR010] Chasis Portacontenedor'},
|
||||||
|
{id: 'CTR011', value: '[CTR011] Convencional De Chasis'},
|
||||||
|
{id: 'CTR012', value: '[CTR012] Equipo Especial'},
|
||||||
|
{id: 'CTR013', value: '[CTR013] Estacas'},
|
||||||
|
{id: 'CTR014', value: '[CTR014] Góndola Madrina'},
|
||||||
|
{id: 'CTR015', value: '[CTR015] Grúa Industrial'},
|
||||||
|
{id: 'CTR016', value: '[CTR016] Grúa'},
|
||||||
|
{id: 'CTR017', value: '[CTR017] Integral'},
|
||||||
|
{id: 'CTR018', value: '[CTR018] Jaula'},
|
||||||
|
{id: 'CTR019', value: '[CTR019] Media Redila'},
|
||||||
|
{id: 'CTR020', value: '[CTR020] Pallet o Celdillas'},
|
||||||
|
{id: 'CTR021', value: '[CTR021] Plataforma'},
|
||||||
|
{id: 'CTR022', value: '[CTR022] Plataforma Con Grúa'},
|
||||||
|
{id: 'CTR023', value: '[CTR023] Plataforma Encortinada'},
|
||||||
|
{id: 'CTR024', value: '[CTR024] Redilas'},
|
||||||
|
{id: 'CTR025', value: '[CTR025] Refrigerador'},
|
||||||
|
{id: 'CTR026', value: '[CTR026] Revolvedora'},
|
||||||
|
{id: 'CTR027', value: '[CTR027] Semicaja'},
|
||||||
|
{id: 'CTR028', value: '[CTR028] Tanque'},
|
||||||
|
{id: 'CTR029', value: '[CTR029] Tolva'},
|
||||||
|
{id: 'CTR031', value: '[CTR031] Volteo'},
|
||||||
|
{id: 'CTR032', value: '[CTR032] Volteo Desmontable'},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
var opt_carta_aseguradoras = [
|
||||||
|
{id: 'General de Seguros', value: 'General de Seguros'},
|
||||||
|
{id: 'Qualitas', value: 'Qualitas'},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -912,6 +1022,8 @@ var grid_cols_carta_autotransporte = [
|
||||||
{id: 'ConfigVehicular', header: 'Clave Autotransporte', editor: 'select', options: opt_config_auto, fillspace: 1},
|
{id: 'ConfigVehicular', header: 'Clave Autotransporte', editor: 'select', options: opt_config_auto, fillspace: 1},
|
||||||
{id: 'PlacaVM', header: 'Placa', editor: 'text', fillspace: 1},
|
{id: 'PlacaVM', header: 'Placa', editor: 'text', fillspace: 1},
|
||||||
{id: 'AnioModeloVM', header: 'Modelo (Año)', editor: 'text', fillspace: 1},
|
{id: 'AnioModeloVM', header: 'Modelo (Año)', editor: 'text', fillspace: 1},
|
||||||
|
{id: 'SubTipoRem', header: 'ST Remolque', editor: 'select', options: opt_carta_tipo_remolque, fillspace: 1},
|
||||||
|
{id: 'Placa', header: 'Placa', editor: 'text', fillspace: 1},
|
||||||
{id: 'AseguraRespCivil', header: 'Aseguradora', editor: 'text', fillspace: 1},
|
{id: 'AseguraRespCivil', header: 'Aseguradora', editor: 'text', fillspace: 1},
|
||||||
{id: 'PolizaRespCivil', header: 'Póliza', editor: 'text', fillspace: 1},
|
{id: 'PolizaRespCivil', header: 'Póliza', editor: 'text', fillspace: 1},
|
||||||
]
|
]
|
||||||
|
@ -932,7 +1044,6 @@ var grid_cols_carta_tipos_figuras = [
|
||||||
{id: 'RFCFigura', header: 'RFC Figura', editor: 'text', fillspace: 1},
|
{id: 'RFCFigura', header: 'RFC Figura', editor: 'text', fillspace: 1},
|
||||||
{id: 'NombreFigura', header: 'Nombre Figura', editor: 'text', fillspace: 1},
|
{id: 'NombreFigura', header: 'Nombre Figura', editor: 'text', fillspace: 1},
|
||||||
{id: 'NumLicencia', header: 'Número de Licencia', editor: 'text', fillspace: 1},
|
{id: 'NumLicencia', header: 'Número de Licencia', editor: 'text', fillspace: 1},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -948,8 +1059,8 @@ var grid_carta_ubicaciones = {
|
||||||
columns: grid_cols_carta_ubicaciones,
|
columns: grid_cols_carta_ubicaciones,
|
||||||
//~ data: data_tmp1,
|
//~ data: data_tmp1,
|
||||||
data: [
|
data: [
|
||||||
{delete: '-', TipoUbicacion: 'Origen', Pais: 'MXN'},
|
{delete: '-', TipoUbicacion: 'Origen', Pais: 'MEX'},
|
||||||
{delete: '-', TipoUbicacion: 'Destino', Pais: 'MXN'},
|
{delete: '-', TipoUbicacion: 'Destino', Pais: 'MEX'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -996,8 +1107,14 @@ var grid_carta_tipos_figuras = {
|
||||||
|
|
||||||
|
|
||||||
var body_carta_mercancias = {rows:[
|
var body_carta_mercancias = {rows:[
|
||||||
{cols: [{view: 'richselect', id: 'lst_carta_UnidadPeso', labelPosition: 'top',
|
{cols: [
|
||||||
label: 'Unidad de Peso', maxWidth: 300, options: '/satunidadespeso?opt=active'}, {}
|
{view: 'button', id: 'cmd_carta_add_product', label: 'Agregar Mercancía', icon: 'plus',
|
||||||
|
type: 'iconButton', autowidth: true, align: 'center'},
|
||||||
|
{view: 'button', id: 'cmd_carta_copy_from_invoice', label: 'Copiar de CFDI', icon: 'copy',
|
||||||
|
type: 'iconButton', autowidth: true, align: 'center'},
|
||||||
|
{},
|
||||||
|
{view: 'richselect', id: 'lst_carta_UnidadPeso', label: 'Unidad de Peso: ',
|
||||||
|
labelWidth: 110, maxWidth: 300, options: '/satunidadespeso?opt=active'}
|
||||||
]},
|
]},
|
||||||
{maxHeight: 10},
|
{maxHeight: 10},
|
||||||
grid_carta_mercancias,
|
grid_carta_mercancias,
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue