Fix - Validar impuestos incorrectos
This commit is contained in:
parent
0662a046c2
commit
4a0fed1630
|
@ -2317,6 +2317,8 @@ class ImportFacturaLibre(object):
|
||||||
nombre = 'COMERCIALIZADORA PECOLLA SA DE CV'
|
nombre = 'COMERCIALIZADORA PECOLLA SA DE CV'
|
||||||
elif rfc == 'SMA850101TQ4':
|
elif rfc == 'SMA850101TQ4':
|
||||||
nombre = 'SECRETARIA DE MARINA ARMADA DE MEXICO DRAGA BAHIA CHAMELA ADR-05'
|
nombre = 'SECRETARIA DE MARINA ARMADA DE MEXICO DRAGA BAHIA CHAMELA ADR-05'
|
||||||
|
elif rfc == 'GTR0610314Z0':
|
||||||
|
nombre = 'GRUPO TORQUE SA DE CV'
|
||||||
|
|
||||||
tipo_persona = 1
|
tipo_persona = 1
|
||||||
if rfc == 'XEXX010101000':
|
if rfc == 'XEXX010101000':
|
||||||
|
|
|
@ -5085,6 +5085,8 @@ def _importar_facturas(rows):
|
||||||
detalles = row.pop('detalles')
|
detalles = row.pop('detalles')
|
||||||
impuestos = row.pop('impuestos')
|
impuestos = row.pop('impuestos')
|
||||||
cliente = row.pop('cliente')
|
cliente = row.pop('cliente')
|
||||||
|
if cliente['rfc'] == 'GTR0610314Z0':
|
||||||
|
cliente['slug'] = 'grupo_torque_sa_de_cv'
|
||||||
row['cliente'] = Socios.get(**cliente)
|
row['cliente'] = Socios.get(**cliente)
|
||||||
with database_proxy.atomic() as txn:
|
with database_proxy.atomic() as txn:
|
||||||
if _existe_factura(row):
|
if _existe_factura(row):
|
||||||
|
@ -5472,6 +5474,7 @@ def _importar_productos(archivo):
|
||||||
taxes = [SATImpuestos.select().where(SATImpuestos.id==6)]
|
taxes = [SATImpuestos.select().where(SATImpuestos.id==6)]
|
||||||
else:
|
else:
|
||||||
taxes = []
|
taxes = []
|
||||||
|
try:
|
||||||
for i in range(0, len(impuestos), 4):
|
for i in range(0, len(impuestos), 4):
|
||||||
w = {
|
w = {
|
||||||
'key': impuestos[i],
|
'key': impuestos[i],
|
||||||
|
@ -5480,6 +5483,9 @@ def _importar_productos(archivo):
|
||||||
'tasa': float(impuestos[i+3]),
|
'tasa': float(impuestos[i+3]),
|
||||||
}
|
}
|
||||||
taxes.append(SATImpuestos.get_o_crea(w))
|
taxes.append(SATImpuestos.get_o_crea(w))
|
||||||
|
except IndexError:
|
||||||
|
print (data)
|
||||||
|
continue
|
||||||
|
|
||||||
with database_proxy.transaction():
|
with database_proxy.transaction():
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue