commit
425f2ee079
|
@ -2,6 +2,7 @@ v 1.19.1 [03-oct-2018]
|
||||||
----------------------
|
----------------------
|
||||||
- Error #291
|
- Error #291
|
||||||
- Error al generar PDF de factura de pago con relacionados sin serie
|
- Error al generar PDF de factura de pago con relacionados sin serie
|
||||||
|
- Error al relacionar facturas versión 3.2
|
||||||
|
|
||||||
v 1.19.0 [28-sep-2018]
|
v 1.19.0 [28-sep-2018]
|
||||||
----------------------
|
----------------------
|
||||||
|
|
|
@ -9,6 +9,7 @@ Libre**.
|
||||||
### 1.19.1 [03-oct-2018]
|
### 1.19.1 [03-oct-2018]
|
||||||
- Error [#291](https://gitlab.com/mauriciobaeza/empresa-libre/issues/291)
|
- Error [#291](https://gitlab.com/mauriciobaeza/empresa-libre/issues/291)
|
||||||
- Error al generar PDF de factura de pago con relacionados sin serie
|
- Error al generar PDF de factura de pago con relacionados sin serie
|
||||||
|
- Error al relacionar facturas versión 3.2
|
||||||
|
|
||||||
|
|
||||||
### 1.19.0 [28-sep-2018]
|
### 1.19.0 [28-sep-2018]
|
||||||
|
|
|
@ -3659,12 +3659,16 @@ class Facturas(BaseModel):
|
||||||
filtros = (
|
filtros = (
|
||||||
(Facturas.cancelada==False) &
|
(Facturas.cancelada==False) &
|
||||||
(Facturas.uuid.is_null(False)) &
|
(Facturas.uuid.is_null(False)) &
|
||||||
(Facturas.tipo_comprobante=='I') &
|
(Facturas.tipo_comprobante.in_(('I', 'ingreso'))) &
|
||||||
(Facturas.saldo>0)
|
(Facturas.saldo>0)
|
||||||
)
|
)
|
||||||
if ids:
|
if ids:
|
||||||
filtros &= (Facturas.id.not_in(ids))
|
filtros &= (Facturas.id.not_in(ids))
|
||||||
|
|
||||||
|
currency = case(Facturas.moneda, (
|
||||||
|
('peso', 'MXN'),
|
||||||
|
), Facturas.moneda)
|
||||||
|
|
||||||
rows = tuple(Facturas
|
rows = tuple(Facturas
|
||||||
.select(
|
.select(
|
||||||
Facturas.id,
|
Facturas.id,
|
||||||
|
@ -3676,7 +3680,7 @@ class Facturas(BaseModel):
|
||||||
Facturas.estatus,
|
Facturas.estatus,
|
||||||
Socios.nombre.alias('cliente'),
|
Socios.nombre.alias('cliente'),
|
||||||
Facturas.total,
|
Facturas.total,
|
||||||
Facturas.moneda.alias('currency'),
|
currency.alias('currency'),
|
||||||
Facturas.total_mn,
|
Facturas.total_mn,
|
||||||
Facturas.saldo,
|
Facturas.saldo,
|
||||||
)
|
)
|
||||||
|
@ -4479,6 +4483,7 @@ class Facturas(BaseModel):
|
||||||
'moneda': invoice['Moneda'],
|
'moneda': invoice['Moneda'],
|
||||||
'tipo_cambio': tipo_cambio,
|
'tipo_cambio': tipo_cambio,
|
||||||
'total': total,
|
'total': total,
|
||||||
|
'saldo': total,
|
||||||
'total_mn': round(float(total * tipo_cambio), DECIMALES),
|
'total_mn': round(float(total * tipo_cambio), DECIMALES),
|
||||||
'tipo_comprobante': invoice['TipoDeComprobante'],
|
'tipo_comprobante': invoice['TipoDeComprobante'],
|
||||||
'metodo_pago': invoice['MetodoPago'],
|
'metodo_pago': invoice['MetodoPago'],
|
||||||
|
@ -4490,7 +4495,7 @@ class Facturas(BaseModel):
|
||||||
'uuid': invoice['uuid'],
|
'uuid': invoice['uuid'],
|
||||||
'estatus': 'Importada',
|
'estatus': 'Importada',
|
||||||
'regimen_fiscal': invoice['RegimenFiscal'],
|
'regimen_fiscal': invoice['RegimenFiscal'],
|
||||||
'pagada': True,
|
'pagada': False,
|
||||||
'tipo_relacion': invoice.get('TipoRelacion', '')
|
'tipo_relacion': invoice.get('TipoRelacion', '')
|
||||||
}
|
}
|
||||||
# ~ donativo = BooleanField(default=False)
|
# ~ donativo = BooleanField(default=False)
|
||||||
|
@ -5356,7 +5361,7 @@ class FacturasPagos(BaseModel):
|
||||||
else:
|
else:
|
||||||
nuevo['saldo_anterior'] = float(mov_ant.saldo)
|
nuevo['saldo_anterior'] = float(mov_ant.saldo)
|
||||||
|
|
||||||
if(fac.moneda=='MXN'):
|
if(fac.moneda in ('MXN', 'peso')):
|
||||||
nuevo['saldo'] = nuevo['saldo_anterior'] - importe
|
nuevo['saldo'] = nuevo['saldo_anterior'] - importe
|
||||||
else:
|
else:
|
||||||
nuevo['importe'] = this_pay
|
nuevo['importe'] = this_pay
|
||||||
|
|
|
@ -1711,7 +1711,7 @@ function cmd_subir_cfdixml_click(){
|
||||||
var values = form.getValues()
|
var values = form.getValues()
|
||||||
|
|
||||||
if($$('lst_cfdixml').count() < 1){
|
if($$('lst_cfdixml').count() < 1){
|
||||||
msg = 'Selecciona un archivo XML'
|
msg = 'Selecciona al menos un archivo XML'
|
||||||
msg_error(msg)
|
msg_error(msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1724,7 +1724,7 @@ function cmd_subir_cfdixml_click(){
|
||||||
|
|
||||||
var cfdixml = $$('up_cfdixml').files.getItem($$('up_cfdixml').files.getFirstId())
|
var cfdixml = $$('up_cfdixml').files.getItem($$('up_cfdixml').files.getFirstId())
|
||||||
|
|
||||||
var ext = []
|
//~ var ext = []
|
||||||
if(cfdixml.type.toLowerCase() != 'xml'){
|
if(cfdixml.type.toLowerCase() != 'xml'){
|
||||||
msg = 'Archivo inválido, se requiere un archivo XML'
|
msg = 'Archivo inválido, se requiere un archivo XML'
|
||||||
msg_error(msg)
|
msg_error(msg)
|
||||||
|
|
|
@ -130,7 +130,7 @@ var admin_ui_niveles_educativos = {
|
||||||
|
|
||||||
|
|
||||||
var menu_data = [
|
var menu_data = [
|
||||||
{id: 'app_home', icon: 'dashboard', value: 'Inicio'},
|
{id: 'app_admin_home', icon: 'dashboard', value: 'Inicio'},
|
||||||
{id: 'app_emisor', icon: 'user-circle', value: 'Emisor'},
|
{id: 'app_emisor', icon: 'user-circle', value: 'Emisor'},
|
||||||
{id: 'app_folios', icon: 'sort-numeric-asc', value: 'Folios'},
|
{id: 'app_folios', icon: 'sort-numeric-asc', value: 'Folios'},
|
||||||
{id: 'app_correo', icon: 'envelope-o', value: 'Correo'},
|
{id: 'app_correo', icon: 'envelope-o', value: 'Correo'},
|
||||||
|
@ -146,8 +146,8 @@ var sidebar_admin = {
|
||||||
id: 'sidebar_admin',
|
id: 'sidebar_admin',
|
||||||
data: menu_data,
|
data: menu_data,
|
||||||
ready: function(){
|
ready: function(){
|
||||||
this.select('app_home');
|
this.select('app_admin_home');
|
||||||
this.open(this.getParentId('app_home'));
|
this.open(this.getParentId('app_admin_home'));
|
||||||
},
|
},
|
||||||
on:{
|
on:{
|
||||||
onAfterSelect: function(id){
|
onAfterSelect: function(id){
|
||||||
|
|
Loading…
Reference in New Issue