Fix for exempted tax
This commit is contained in:
parent
5f56179ebb
commit
aee467d98f
|
@ -8167,7 +8167,9 @@ class Tickets(BaseModel):
|
||||||
return inicio
|
return inicio
|
||||||
|
|
||||||
def _without_tax(self, importe, obj):
|
def _without_tax(self, importe, obj):
|
||||||
|
# ~ todo
|
||||||
# ~ Por ahora se asume que solo tiene IVA trasladado 0.16
|
# ~ Por ahora se asume que solo tiene IVA trasladado 0.16
|
||||||
|
|
||||||
for tax in obj.impuestos:
|
for tax in obj.impuestos:
|
||||||
tasa = 1.0 + float(tax.tasa)
|
tasa = 1.0 + float(tax.tasa)
|
||||||
base = round(importe / tasa, DECIMALES)
|
base = round(importe / tasa, DECIMALES)
|
||||||
|
@ -8231,9 +8233,6 @@ class Tickets(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
for tax in totals_tax.values():
|
for tax in totals_tax.values():
|
||||||
if tax.tipo == 'E':
|
|
||||||
continue
|
|
||||||
|
|
||||||
ticket_tax = {
|
ticket_tax = {
|
||||||
'ticket': ticket.id,
|
'ticket': ticket.id,
|
||||||
'impuesto': tax.id,
|
'impuesto': tax.id,
|
||||||
|
@ -8499,6 +8498,7 @@ class Tickets(BaseModel):
|
||||||
'key': r.impuesto.key,
|
'key': r.impuesto.key,
|
||||||
'base': r.base,
|
'base': r.base,
|
||||||
'importe': tax_importe}
|
'importe': tax_importe}
|
||||||
|
print(values)
|
||||||
tax_sum[tax_id] = values
|
tax_sum[tax_id] = values
|
||||||
|
|
||||||
for i, tax in tax_sum.items():
|
for i, tax in tax_sum.items():
|
||||||
|
@ -8539,16 +8539,18 @@ class Tickets(BaseModel):
|
||||||
periodicidad = values['periodicidad']
|
periodicidad = values['periodicidad']
|
||||||
id_client = int(values['client'])
|
id_client = int(values['client'])
|
||||||
tickets = util.loads(values['tickets'])
|
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:
|
if is_invoice_day:
|
||||||
filters = (
|
filters = (
|
||||||
Socios.rfc == RFCS['PUBLIC'] and
|
Socios.rfc == RFCS['PUBLIC'] and
|
||||||
Socios.slug == 'publico_en_general')
|
Socios.slug == 'publico_en_general'
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
client = Socios.get(filters)
|
client = Socios.get(filters)
|
||||||
except Socios.DoesNotExist:
|
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}
|
data = {'ok': False, 'msg': msg}
|
||||||
return data
|
return data
|
||||||
else:
|
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 |
|
@ -235,7 +235,7 @@ var cells_new_ticket = [
|
||||||
|
|
||||||
var toolbar_ticket_invoice = {view: 'toolbar', elements: [{},
|
var toolbar_ticket_invoice = {view: 'toolbar', elements: [{},
|
||||||
{view: 'checkbox', id: 'chk_is_invoice_day', labelWidth: 0, width: 150,
|
{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,
|
{view: 'richselect', id: 'lst_global_periodicidad_2', labelWidth: 90, width: 225,
|
||||||
label: 'Periodicidad:', options: opt_global_periodicidad, value: '01', disabled: true},
|
label: 'Periodicidad:', options: opt_global_periodicidad, value: '01', disabled: true},
|
||||||
{view: 'richselect', id: 'lst_global_months_2', labelWidth: 50, width: 250,
|
{view: 'richselect', id: 'lst_global_months_2', labelWidth: 50, width: 250,
|
||||||
|
|
Loading…
Reference in New Issue