Merge branch 'develop'

Fix - In filter invoice by dates
This commit is contained in:
Mauricio Baeza 2019-03-04 19:22:56 -06:00
commit 6cef8fe669
8 changed files with 35 additions and 5 deletions

6
.gitignore vendored
View File

@ -18,6 +18,12 @@ docs/bk/
source/docs/
site/
vedev/
# Virtualenv
.env/
virtual/
docs/
cache/
credenciales.conf
*.sqlite

View File

@ -1,3 +1,8 @@
v 1.28.1 [04-mar-2019]
----------------------
- Error: Al buscar facturas por fechas
v 1.28.0 [17-feb-2019]
----------------------
- Mejora: Manejo de empaques para mensajeria

View File

@ -1 +1 @@
1.28.0
1.28.1

View File

@ -1666,12 +1666,19 @@ def to_pdf_from_json(rfc, version, data):
if exists(path_logo):
data['emisor']['logo2'] = path_logo
path_cbb = data['timbre']['path_cbb']
path = get_path_temp()
pdf = TemplateInvoice(path)
pdf.custom_styles = custom_styles
pdf.data = data
pdf.render()
return read_file(path)
data = read_file(path)
_kill(path)
_kill(path_cbb)
return data
def format_currency(value, currency, digits=2):

View File

@ -3720,7 +3720,7 @@ class Facturas(BaseModel):
return data
def _get_filters(self, values):
if 'start' in values:
if 'start' in values and 'end' in values:
filters = Facturas.fecha.between(
utils.parse_date(values['start']),
utils.parse_date(values['end'], True)
@ -9913,6 +9913,7 @@ def _exportar_documentos():
Facturas.get_pdf(row['id'], rfc, True)
msg = '\tPDF generado...'
log.info(msg)
log.info('Documentos exportados...')
return

View File

@ -47,7 +47,7 @@ except ImportError:
DEBUG = DEBUG
VERSION = '1.28.0'
VERSION = '1.28.1'
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)

View File

@ -1640,6 +1640,12 @@ function cmd_agregar_impuesto_click(){
return
}
if(impuesto='ISR' || tasa > 0){
msg = 'El impuesto ISR debe ser tipo Retención'
msg_error(msg)
return
}
msg = 'Datos correctos.<BR><BR>¿Estás seguro de agregar este impuesto?'
webix.confirm({
title: 'Agregar impuesto',

View File

@ -1383,6 +1383,12 @@ function cmd_invoice_cancelar_click(){
function get_filters_invoices(){
var filters = $$('filter_dates').getValue()
if(filters['start'] && !filters['end']){
msg = 'No seleccionaste la fecha final'
msg_error(msg)
}
filters['year'] = $$('filter_year').getValue()
filters['month'] = $$('filter_month').getValue()
filters['client'] = $$('grid_invoices').getFilter('cliente').value
@ -2296,7 +2302,6 @@ function search_by(value){
};
}
});
}