Fix for exempted tax

This commit is contained in:
el Mau 2023-03-03 01:38:19 -06:00
parent 5f56179ebb
commit aee467d98f
4 changed files with 9 additions and 7 deletions

View File

@ -8167,7 +8167,9 @@ class Tickets(BaseModel):
return inicio
def _without_tax(self, importe, obj):
# ~ todo
# ~ Por ahora se asume que solo tiene IVA trasladado 0.16
for tax in obj.impuestos:
tasa = 1.0 + float(tax.tasa)
base = round(importe / tasa, DECIMALES)
@ -8231,9 +8233,6 @@ class Tickets(BaseModel):
for tax in totals_tax.values():
if tax.tipo == 'E':
continue
ticket_tax = {
'ticket': ticket.id,
'impuesto': tax.id,
@ -8499,6 +8498,7 @@ class Tickets(BaseModel):
'key': r.impuesto.key,
'base': r.base,
'importe': tax_importe}
print(values)
tax_sum[tax_id] = values
for i, tax in tax_sum.items():
@ -8539,16 +8539,18 @@ class Tickets(BaseModel):
periodicidad = values['periodicidad']
id_client = int(values['client'])
tickets = util.loads(values['tickets'])
invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
# ~ invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
invoice_by_ticket = True
if is_invoice_day:
filters = (
Socios.rfc == RFCS['PUBLIC'] and
Socios.slug == 'publico_en_general')
Socios.slug == 'publico_en_general'
)
try:
client = Socios.get(filters)
except Socios.DoesNotExist:
msg = 'No existe el cliente Público en General. Agregalo primero.'
msg = 'No existe el cliente PUBLICO EN GENERAL. Agregalo primero.'
data = {'ok': False, 'msg': msg}
return data
else:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -235,7 +235,7 @@ var cells_new_ticket = [
var toolbar_ticket_invoice = {view: 'toolbar', elements: [{},
{view: 'checkbox', id: 'chk_is_invoice_day', labelWidth: 0, width: 150,
labelRight: 'Es factura del día'},
labelRight: 'Es Factura Global'},
{view: 'richselect', id: 'lst_global_periodicidad_2', labelWidth: 90, width: 225,
label: 'Periodicidad:', options: opt_global_periodicidad, value: '01', disabled: true},
{view: 'richselect', id: 'lst_global_months_2', labelWidth: 50, width: 250,