Fix - Agregar retencion de impuesto

This commit is contained in:
Mauricio Baeza 2017-11-17 21:12:23 -06:00
parent 7630059361
commit 7cc248da17
1 changed files with 2 additions and 1 deletions

View File

@ -764,7 +764,7 @@ class SATImpuestos(BaseModel):
tasa = float(values['tasa']) tasa = float(values['tasa'])
tipo = 'T' tipo = 'T'
if tasa < 0: if tasa < 0:
tipo: 'R' tipo = 'R'
row = { row = {
'key': IMPUESTOS.get(values['impuesto']), 'key': IMPUESTOS.get(values['impuesto']),
@ -772,6 +772,7 @@ class SATImpuestos(BaseModel):
'tipo': tipo, 'tipo': tipo,
'tasa': abs(tasa), 'tasa': abs(tasa),
} }
try: try:
obj = SATImpuestos.create(**row) obj = SATImpuestos.create(**row)
row['id'] = obj.id row['id'] = obj.id