2018-06-14 22:20:55 -05:00
//~ Empresa Libre
2022-01-27 13:10:16 -06:00
//~ Copyright (C) 2016-2018 Mauricio Baeza Servin (publico@cuates.net)
2018-06-14 22:20:55 -05:00
//~
//~ This program is free software: you can redistribute it and/or modify
//~ it under the terms of the GNU General Public License as published by
//~ the Free Software Foundation, either version 3 of the License, or
//~ (at your option) any later version.
//~
//~ This program is distributed in the hope that it will be useful,
//~ but WITHOUT ANY WARRANTY; without even the implied warranty of
//~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//~ GNU General Public License for more details.
//~
//~ You should have received a copy of the GNU General Public License
//~ along with this program. If not, see <http://www.gnu.org/licenses/>.
2017-06-27 15:43:02 -05:00
2017-11-08 23:47:15 -06:00
var grid _cfdi _cliente _cols = [
{ id : 'index' , header : '#' , adjust : 'data' , css : 'right' ,
2017-12-20 01:15:48 -06:00
footer : { content : 'countRows' , colspan : 3 , css : 'right' } } ,
2017-11-08 23:47:15 -06:00
{ id : "id" , header : "ID" , hidden : true } ,
{ id : "serie" , header : [ "Serie" , { content : "selectFilter" } ] , adjust : "header" ,
sort : "string" } ,
{ id : 'folio' , header : [ 'Folio' ] , adjust : 'data' , sort : 'int' ,
css : 'right' } ,
{ id : 'uuid' , header : [ 'UUID' , { content : 'textFilter' } ] , width : 250 ,
sort : 'string' } ,
2017-12-12 23:36:22 -06:00
{ id : "fecha" , header : [ "Fecha y Hora" ] , width : 150 , sort : 'string' } ,
2017-11-08 23:47:15 -06:00
{ id : "tipo_comprobante" , header : [ "Tipo" , { content : "selectFilter" } ] ,
adjust : 'header' , sort : 'string' } ,
{ id : "estatus" , header : [ "Estatus" , { content : "selectFilter" } ] ,
adjust : "header" , sort : "string" } ,
{ id : 'total_mn' , header : [ 'Total M.N.' ] , width : 150 ,
sort : 'int' , format : webix . i18n . priceFormat , css : 'right' } ,
]
var grid _relacionados _cols = [
{ id : 'index' , header : '#' , adjust : 'data' , css : 'right' } ,
{ id : "id" , header : "ID" , hidden : true } ,
{ id : "serie" , header : "Serie" , adjust : "header" , sort : "string" } ,
{ id : 'folio' , header : 'Folio' , adjust : 'data' , sort : 'int' , css : 'right' } ,
{ id : 'uuid' , header : 'UUID' , width : 250 , sort : 'string' } ,
{ id : "fecha" , header : "Fecha y Hora" , width : 150 , sort : 'date' } ,
{ id : "tipo_comprobante" , header : "Tipo" , adjust : 'header' , sort : 'string' } ,
{ id : "estatus" , header : "Estatus" , adjust : "header" , sort : "string" } ,
{ id : 'total_mn' , header : [ 'Total M.N.' ] , width : 150 ,
sort : 'int' , format : webix . i18n . priceFormat , css : 'right' } ,
]
var grid _cfdi _cliente = {
view : 'datatable' ,
id : 'grid_cfdi_cliente' ,
select : 'row' ,
autoConfig : false ,
adjust : true ,
height : 300 ,
resizeColumn : true ,
headermenu : true ,
drag : true ,
columns : grid _cfdi _cliente _cols ,
on : {
'data->onStoreUpdated' : function ( ) {
this . data . each ( function ( obj , i ) {
obj . index = i + 1
} )
}
}
}
var grid _relacionados = {
view : 'datatable' ,
id : 'grid_relacionados' ,
select : 'row' ,
autoConfig : false ,
adjust : true ,
height : 200 ,
resizeColumn : true ,
headermenu : true ,
drag : true ,
columns : grid _relacionados _cols ,
on : {
'data->onStoreUpdated' : function ( ) {
this . data . each ( function ( obj , i ) {
obj . index = i + 1
} )
}
}
}
var body _cfdi _relacionados = { rows : [
{ cols : [
{ view : 'label' , id : 'lbl_cfdi_title' , label : 'Cliente: ' ,
autowidth : true } ,
{ view : 'label' , id : 'lbl_cfdi_cliente' , label : '' , align : 'left' } ] } ,
2017-11-12 18:50:41 -06:00
{ cols : [
{ view : 'richselect' , id : 'lst_tipo_relacion' , label : 'Tipo de Relación' ,
labelWidth : 140 , required : true , options : [ ] } ,
{ view : 'checkbox' , id : 'chk_relacionados_anticipo' ,
labelRight : 'Solo Anticipos' , width : 200 , disabled : true } ] } ,
2017-11-08 23:47:15 -06:00
{ minHeight : 10 , maxHeight : 10 } ,
{ cols : [
{ view : 'richselect' , id : 'filter_cfdi_year' , label : 'Año' , width : 100 ,
labelAlign : 'center' , labelPosition : 'top' , options : [ ] } ,
{ view : 'richselect' , id : 'filter_cfdi_month' , label : 'Mes' , width : 125 ,
labelAlign : 'center' , labelPosition : 'top' , options : months } ,
{ view : 'text' , id : 'filter_cfdi_folio' , label : 'Folio' , width : 125 ,
labelAlign : 'center' , labelPosition : 'top' } ,
{ view : 'text' , id : 'filter_cfdi_uuid' , label : 'UUID' ,
labelAlign : 'center' , labelPosition : 'top' } ,
{ view : 'icon' , id : 'cmd_filter_relacionados' , icon : 'filter' } ,
] } ,
grid _cfdi _cliente ,
{ minHeight : 10 , maxHeight : 10 } ,
{ view : 'label' , label : 'CFDI Relacionados' } ,
grid _relacionados ,
{ minHeight : 10 , maxHeight : 10 } ,
{ cols : [ { } ,
{ view : 'button' , id : 'cmd_guardar_relacionados' , label : 'Relacionar' } ,
{ view : 'button' , id : 'cmd_limpiar_relacionados' , label : 'Limpiar' } ,
{ } ] } ,
{ minHeight : 15 , maxHeight : 15 } ,
] }
var ui _invoice = {
init : function ( ) {
webix . ui ( {
view : 'window' ,
id : 'win_cfdi_relacionados' ,
autoheight : true ,
width : 850 ,
modal : true ,
position : 'center' ,
head : { view : 'toolbar' ,
elements : [
{ view : 'label' , label : 'CFDI Relacionados' } ,
{ view : 'icon' , icon : 'times-circle' ,
click : '$$("win_cfdi_relacionados").close()' } ,
]
} ,
body : body _cfdi _relacionados ,
} )
$$ ( 'cmd_guardar_relacionados' ) . attachEvent ( 'onItemClick' , cmd _guardar _relacionados _click )
$$ ( 'cmd_limpiar_relacionados' ) . attachEvent ( 'onItemClick' , cmd _limpiar _relacionados _click )
$$ ( 'cmd_filter_relacionados' ) . attachEvent ( 'onItemClick' , cmd _filter _relacionados _click )
2017-11-12 18:50:41 -06:00
$$ ( 'lst_tipo_relacion' ) . attachEvent ( 'onChange' , lst _tipo _relacion _change )
$$ ( 'filter_cfdi_month' ) . attachEvent ( 'onChange' , filter _cfdi _month _change )
2017-11-08 23:47:15 -06:00
$$ ( 'filter_cfdi_month' ) . attachEvent ( 'onChange' , filter _cfdi _month _change )
} }
2017-06-27 15:43:02 -05:00
2017-12-29 04:09:02 -06:00
var body _cfdi _notes = { rows : [
{ minHeight : 5 , maxHeight : 5 } ,
2018-01-10 23:21:37 -06:00
{ view : 'textarea' , id : 'invoice_notes' , name : 'invoice_notes' , height : 300 ,
placeholder : 'Captura las notas.' } ,
{ minHeight : 5 , maxHeight : 5 } ,
{ cols : [ { } , { view : 'button' , id : 'cmd_invoice_save_note' , autowidth : true ,
label : 'Guardar y Cerrar' , type : 'iconButton' , hotkey : 'Ctrl+enter' } ,
{ } ] } ,
2017-12-29 04:09:02 -06:00
{ minHeight : 5 , maxHeight : 5 } ,
2018-06-15 00:05:55 -05:00
] , }
2017-12-29 04:09:02 -06:00
var win _invoice _notes = {
init : function ( ) {
webix . ui ( {
view : 'window' ,
2018-01-10 23:21:37 -06:00
id : 'win_invoice_notes' ,
height : 400 ,
2017-12-29 04:09:02 -06:00
width : 500 ,
modal : true ,
position : 'center' ,
2018-01-10 23:21:37 -06:00
head : 'Notas' ,
2017-12-29 04:09:02 -06:00
body : body _cfdi _notes ,
} )
2018-01-10 23:21:37 -06:00
$$ ( 'cmd_invoice_save_note' ) . attachEvent ( 'onItemClick' , cmd _invoice _save _note _click )
}
}
2017-12-29 04:09:02 -06:00
2017-06-27 15:43:02 -05:00
var toolbar _invoices = [
{ view : "button" , id : "cmd_new_invoice" , label : "Nueva" , type : "iconButton" ,
autowidth : true , icon : "plus" } ,
2017-10-10 18:49:05 -05:00
{ view : "button" , id : "cmd_refacturar" , label : "Refacturar" , type : "iconButton" ,
2017-06-27 15:43:02 -05:00
autowidth : true , icon : "pencil" } ,
2017-10-10 18:49:05 -05:00
{ } ,
2018-01-16 22:04:27 -06:00
{ view : 'button' , id : 'cmd_admin_invoice_notes' , label : 'Notas' ,
2018-01-16 23:13:50 -06:00
disabled : true , type : 'iconButton' , autowidth : true , icon : 'commenting-o' } ,
2018-01-02 18:24:55 -06:00
{ view : 'button' , id : 'cmd_invoice_report_pdf' , label : 'Reporte' ,
type : 'iconButton' , autowidth : true , icon : 'file-pdf-o' } ,
{ view : 'button' , id : 'cmd_invoice_report_xls' , label : 'Reporte' ,
type : 'iconButton' , autowidth : true , icon : 'table' } ,
{ } ,
2017-06-27 15:43:02 -05:00
{ view : "button" , id : "cmd_delete_invoice" , label : "Eliminar" , type : "iconButton" ,
autowidth : true , icon : "minus" } ,
2017-10-04 23:22:05 -05:00
]
2017-10-10 18:49:05 -05:00
var toolbar _invoices _util = [
{ view : 'button' , id : 'cmd_invoice_timbrar' , label : 'Timbrar' ,
type : 'iconButton' , autowidth : true , icon : 'ticket' } ,
2017-10-28 23:37:08 -05:00
{ view : 'button' , id : 'cmd_invoice_sat' , label : 'SAT' ,
type : 'iconButton' , autowidth : true , icon : 'check-circle' } ,
2018-02-13 12:05:44 -06:00
{ view : 'button' , id : 'cmd_invoice_verify_sat' , label : 'SAT' ,
type : 'iconButton' , autowidth : true , icon : 'firefox' } ,
2017-10-16 23:36:10 -05:00
{ } ,
2022-01-03 23:06:55 -06:00
{ view : 'button' , id : 'cmd_invoice_ask_cancel' , label : 'Cancelar' ,
2017-10-16 23:36:10 -05:00
type : 'iconButton' , autowidth : true , icon : 'ban' } ,
2017-10-10 18:49:05 -05:00
]
2017-11-06 23:34:43 -06:00
var toolbar _invoices _generate = { view : 'toolbar' , elements : [ { } ,
2017-12-29 04:09:02 -06:00
{ view : 'button' , id : 'cmd_cfdi_notes' , label : 'Notas' ,
type : 'iconButton' , autowidth : true , icon : 'commenting-o' } ,
2017-11-06 23:34:43 -06:00
{ view : 'button' , id : 'cmd_cfdi_relacionados' , label : 'CFDI Relacionados' ,
type : 'iconButton' , autowidth : true , icon : 'file-o' } ,
2018-01-19 22:16:19 -06:00
{ view : 'button' , id : 'cmd_import_invoice' , label : 'Importar' ,
type : 'iconButton' , autowidth : true , icon : 'upload' } ,
2017-11-19 14:34:54 -06:00
{ view : 'checkbox' , id : 'chk_cfdi_anticipo' , labelRight : 'Es Anticipo' ,
labelWidth : 0 , width : 100 , hidden : true } ,
{ view : 'checkbox' , id : 'chk_cfdi_donativo' , labelRight : 'Es Donativo' ,
labelWidth : 0 , width : 100 , hidden : true } ,
{ } ] }
2017-11-06 23:34:43 -06:00
2017-10-28 00:30:42 -05:00
var toolbar _invoices _filter = [
{ view : 'richselect' , id : 'filter_year' , label : 'Año' , labelAlign : 'right' ,
labelWidth : 50 , width : 150 , options : [ ] } ,
{ view : 'richselect' , id : 'filter_month' , label : 'Mes' , labelAlign : 'right' ,
labelWidth : 50 , width : 200 , options : months } ,
{ view : 'daterangepicker' , id : 'filter_dates' , label : 'Fechas' ,
2017-10-28 22:21:39 -05:00
labelAlign : 'right' , width : 300 } ,
2019-02-15 17:51:13 -06:00
{ } ,
{ view : 'search' , id : 'search_by' , name : 'search_by' , width : 200 ,
placeholder : 'Captura al menos cuatro letras' } ,
2017-10-28 00:30:42 -05:00
]
2017-06-27 15:43:02 -05:00
var grid _invoices _cols = [
2017-11-06 22:36:00 -06:00
{ id : 'index' , header : '#' , adjust : 'data' , css : 'right' ,
2017-12-20 01:15:48 -06:00
footer : { content : 'countRows' , colspan : 3 , css : 'right' } } ,
2017-06-27 15:43:02 -05:00
{ id : "id" , header : "ID" , hidden : true } ,
2018-06-15 00:05:55 -05:00
{ id : 'serie' , header : [ "Serie" , { content : "selectFilter" } ] , adjust : "data" ,
sort : 'string' , template : '{common.subrow()} #serie#' } ,
2017-11-06 22:36:00 -06:00
{ id : 'folio' , header : [ 'Folio' , { content : 'numberFilter' } ] , adjust : 'data' ,
sort : 'int' , css : 'right' , footer : { text : 'Facturas' , colspan : 3 } } ,
2017-10-04 23:22:05 -05:00
{ id : "uuid" , header : [ "UUID" , { content : "textFilter" } ] , adjust : "data" ,
2017-10-10 18:49:05 -05:00
sort : "string" , hidden : true } ,
2017-10-28 00:30:42 -05:00
{ id : "fecha" , header : [ "Fecha y Hora" ] ,
2017-12-12 23:36:22 -06:00
adjust : "data" , sort : "string" } ,
2017-10-04 23:22:05 -05:00
{ id : "tipo_comprobante" , header : [ "Tipo" , { content : "selectFilter" } ] ,
adjust : 'header' , sort : 'string' } ,
{ id : "estatus" , header : [ "Estatus" , { content : "selectFilter" } ] ,
adjust : "data" , sort : "string" } ,
2018-05-23 23:42:57 -05:00
{ id : "paid" , header : [ "Pagada" , { content : "selectFilter" } ] ,
adjust : "data" , sort : "string" } ,
2022-01-22 20:17:42 -06:00
{ id : 'metodo_pago' , header : [ 'Método de Pago' , { content : 'selectFilter' } ] ,
adjust : 'data' , hidden : true } ,
2018-09-25 01:24:37 -05:00
{ id : 'total' , header : [ 'Total' , { content : 'numberFilter' } ] ,
width : 125 , sort : 'int' , format : webix . i18n . priceFormat , css : 'right' ,
hidden : true } ,
{ id : 'currency' , header : [ 'Moneda' , { content : 'selectFilter' } ] ,
adjust : 'data' , sort : 'string' , hidden : true } ,
2018-01-02 18:24:55 -06:00
{ id : 'total_mn' , header : [ 'Total M.N.' , { content : 'numberFilter' } ] ,
width : 150 , sort : 'int' , format : webix . i18n . priceFormat , css : 'right' ,
footer : { content : 'summTimbrada' , css : 'right' } } ,
2018-01-16 22:04:27 -06:00
{ id : 'cliente' , header : [ 'Razón Social' , { content : 'selectFilter' } ] ,
2018-06-03 22:39:37 -05:00
fillspace : true , sort : 'string' , footer : { text : '$ 0.00' , colspan : 2 } } ,
2017-10-10 18:49:05 -05:00
{ id : 'xml' , header : 'XML' , adjust : 'data' , template : get _icon ( 'xml' ) } ,
{ id : 'pdf' , header : 'PDF' , adjust : 'data' , template : get _icon ( 'pdf' ) } ,
2018-11-19 01:03:48 -06:00
{ id : 'html' , header : 'HTML' , adjust : 'data' , template : get _icon ( 'html' ) } ,
2018-01-18 00:15:14 -06:00
{ id : 'ods' , header : 'ODS' , adjust : 'data' , template : get _icon ( 'table' ) } ,
2017-10-10 18:49:05 -05:00
{ id : 'zip' , header : 'ZIP' , adjust : 'data' , template : get _icon ( 'zip' ) } ,
2019-04-01 23:09:32 -06:00
{ id : 'email' , header : '@' , adjust : 'data' , template : get _icon ( 'email' ) }
2017-10-04 23:22:05 -05:00
]
2017-06-27 15:43:02 -05:00
2018-06-15 00:05:55 -05:00
var sv _grid _invoices = {
borderless : true ,
view : 'datatable' ,
headerRowHeight : 25 ,
columns : [
{ id : 'id_product' , header : 'id_product' , hidden : true } ,
{ id : "clave" , header : { text : 'Clave' , css : 'center' } , width : 100 ,
adjust : 'data' } ,
{ id : "clave_sat" , hidden : true } ,
{ id : "descripcion" , header : { text : 'Descripción' , css : 'center' } ,
fillspace : true } ,
{ id : "pedimento" , header : 'Pedimento' , hidden : true } ,
{ id : "id_student" , header : 'ID_Alumno' , hidden : true } ,
{ id : 'student' , header : 'Alumno' , hidden : true , width : 150 } ,
{ id : "unidad" , header : { text : 'Unidad' , css : 'center' } , width : 100 } ,
{ id : 'cantidad' , header : { text : 'Cantidad' , css : 'center' } , width : 100 ,
format : webix . i18n . numberFormat , css : 'right' } ,
{ id : "valor_unitario" , header : { text : 'Valor Unitario' , css : 'center' } ,
width : 100 , format : webix . i18n . priceFormat , css : 'right' } ,
{ id : 'descuento' , header : { text : 'Descuento' , css : 'center' } ,
width : 80 , format : webix . i18n . priceFormat , css : 'right' } ,
{ id : 'precio_final' , hidden : true , header : 'precio_final' , width : 80 ,
format : webix . i18n . priceFormat , css : 'right' } ,
{ id : "importe" , header : { text : 'Importe' , css : 'center' } , width : 150 ,
format : webix . i18n . priceFormat , css : 'right' } ,
] ,
scrollX : false ,
autoheight : true ,
css : 'table_sg' ,
}
2017-06-27 15:43:02 -05:00
var grid _invoices = {
2017-10-10 18:49:05 -05:00
view : 'datatable' ,
id : 'grid_invoices' ,
2018-06-15 00:05:55 -05:00
subview : sv _grid _invoices ,
2017-10-10 18:49:05 -05:00
select : 'row' ,
2018-01-16 22:04:27 -06:00
multiselect : true ,
2017-06-27 15:43:02 -05:00
adjust : true ,
footer : true ,
resizeColumn : true ,
headermenu : true ,
columns : grid _invoices _cols ,
2017-12-21 01:13:28 -06:00
scheme : {
$change : function ( item ) {
if ( item . estatus == 'Cancelada' ) {
item . $css = 'cancel'
}
}
} ,
2017-11-06 22:36:00 -06:00
on : {
'data->onStoreUpdated' : function ( ) {
this . data . each ( function ( obj , i ) {
obj . index = i + 1
} )
}
2017-11-22 00:46:23 -06:00
} ,
2017-11-06 22:36:00 -06:00
}
2017-06-27 15:43:02 -05:00
var grid _details _cols = [
2018-02-08 01:04:58 -06:00
{ id : 'id_product' , header : 'id_product' , hidden : true } ,
2017-10-04 23:22:05 -05:00
{ id : 'delete' , header : '' , width : 30 , css : 'delete' } ,
2018-01-19 22:16:19 -06:00
{ id : "clave" , header : { text : 'Clave' , css : 'center' } , width : 100 ,
adjust : 'data' } ,
2017-11-19 00:42:16 -06:00
{ id : "clave_sat" , hidden : true } ,
2017-10-05 15:33:25 -05:00
{ id : "descripcion" , header : { text : 'Descripción' , css : 'center' } ,
2018-01-13 18:39:22 -06:00
fillspace : true , editor : 'popup' } ,
2018-01-08 09:40:35 -06:00
{ id : "pedimento" , header : 'Pedimento' , editor : 'text' , hidden : true } ,
2018-01-29 13:21:06 -06:00
{ id : "id_student" , header : 'ID_Alumno' , hidden : true } ,
{ id : 'student' , header : 'Alumno' , hidden : true , width : 150 } ,
2018-02-08 01:35:35 -06:00
{ id : "unidad" , header : { text : 'Unidad' , css : 'center' } , width : 100 ,
editor : 'select' , options : 'values/unidades' } ,
2017-10-05 15:33:25 -05:00
{ id : 'cantidad' , header : { text : 'Cantidad' , css : 'center' } , width : 100 ,
2017-11-16 22:49:17 -06:00
format : webix . i18n . numberFormat , css : 'right' , editor : 'text' } ,
2017-11-12 23:27:40 -06:00
{ id : "valor_unitario" , header : { text : 'Valor Unitario' , css : 'center' } ,
2018-07-10 23:34:32 -05:00
width : 100 , format : format _currency , css : 'right' , editor : 'text' } ,
2017-11-12 23:27:40 -06:00
{ id : 'descuento' , header : { text : 'Descuento' , css : 'center' } ,
2018-08-09 15:51:11 -05:00
width : 100 , format : format _currency , css : 'right' , editor : 'text' } ,
2017-11-12 23:27:40 -06:00
{ id : 'precio_final' , hidden : true , header : 'precio_final' , width : 80 ,
2017-11-16 22:49:17 -06:00
format : webix . i18n . priceFormat , css : 'right' } ,
2017-11-12 23:27:40 -06:00
{ id : "importe" , header : { text : 'Importe' , css : 'center' } , width : 150 ,
2017-11-16 22:49:17 -06:00
format : webix . i18n . priceFormat , css : 'right' } ,
2021-06-01 19:34:34 -05:00
{ id : "inventario" , hidden : true } ,
{ id : "existencia" , hidden : true } ,
2017-10-04 23:22:05 -05:00
]
2017-06-27 15:43:02 -05:00
var grid _details = {
2017-10-05 15:33:25 -05:00
view : 'datatable' ,
id : 'grid_details' ,
select : 'row' ,
2017-06-27 15:43:02 -05:00
adjust : true ,
autoheight : true ,
2017-10-06 00:10:27 -05:00
editable : true ,
2017-06-27 15:43:02 -05:00
columns : grid _details _cols ,
2017-11-22 19:44:26 -06:00
data : [ ] ,
2018-01-13 18:39:22 -06:00
fixedRowHeight : false ,
2017-10-04 23:22:05 -05:00
}
var grid _totals _cols = [
{ id : 'id' , header : 'ID' , hidden : true } ,
2018-05-23 23:42:57 -05:00
{ id : 'concepto' , header : 'Concepto' , width : 250 ,
2017-10-04 23:22:05 -05:00
footer : { text : 'TOTAL' , css : 'right_footer' } , css : 'right' } ,
{ id : 'importe' , header : 'Importe' , width : 150 ,
footer : { content : 'summColumn' , css : 'right_footer' } ,
format : webix . i18n . priceFormat , css : 'right' } ,
]
var grid _totals = {
view : 'datatable' ,
id : 'grid_totals' ,
select : false ,
2018-05-23 23:42:57 -05:00
width : 400 ,
2017-10-04 23:22:05 -05:00
header : false ,
footer : true ,
autoheight : true ,
columns : grid _totals _cols ,
2017-11-22 19:44:26 -06:00
data : [ { id : 1 , concepto : 'SubTotal' , importe : 0 } ] ,
2017-10-04 23:22:05 -05:00
}
var suggest _partners = {
view : 'gridsuggest' ,
2017-10-05 15:33:25 -05:00
id : 'grid_clients_found' ,
name : 'grid_clients_found' ,
2017-10-04 23:22:05 -05:00
body : {
autoConfig : false ,
2018-06-14 22:20:55 -05:00
scroll : true ,
autoheight : false ,
yCount : 15 ,
2017-10-04 23:22:05 -05:00
header : false ,
2017-10-05 12:16:20 -05:00
columns : [
{ id : 'id' , hidden : true } ,
{ id : 'nombre' , adjust : 'data' } ,
2017-10-07 00:16:58 -05:00
{ id : 'rfc' , adjust : 'data' } ,
{ id : 'forma_pago' , hidden : true } ,
{ id : 'uso_cfdi' , hidden : true } ,
] ,
2017-10-04 23:22:05 -05:00
dataFeed : function ( text ) {
if ( text . length > 2 ) {
2017-10-05 15:33:25 -05:00
this . load ( '/values/client?name=' + text )
2017-10-04 23:22:05 -05:00
} else {
this . hide ( )
}
}
}
}
2017-12-20 01:15:48 -06:00
2017-10-04 23:22:05 -05:00
var suggest _products = {
view : 'gridsuggest' ,
id : 'grid_products_found' ,
name : 'grid_products_found' ,
body : {
autoConfig : false ,
2018-06-14 22:20:55 -05:00
scroll : true ,
autoheight : false ,
yCount : 12 ,
2017-10-04 23:22:05 -05:00
header : true ,
columns : [
{ id : 'id' , hidden : true } ,
2017-10-15 02:30:55 -05:00
{ id : 'clave' , header : 'Clave' , adjust : 'data' } ,
2018-01-10 21:44:15 -06:00
{ id : 'descripcion' , header : 'Descripción' , width : 500 } ,
2017-10-15 02:30:55 -05:00
{ id : 'unidad' , header : 'Unidad' , adjust : 'data' } ,
{ id : 'valor_unitario' , header : 'Valor Unitario' , adjust : 'data' ,
2017-10-07 00:16:58 -05:00
format : webix . i18n . priceFormat }
2017-10-04 23:22:05 -05:00
] ,
dataFeed : function ( text ) {
if ( text . length > 2 ) {
this . load ( '/values/product?name=' + text )
} else {
this . hide ( )
}
}
}
}
2018-01-29 13:21:06 -06:00
var suggest _students = {
view : 'gridsuggest' ,
id : 'grid_students_found' ,
name : 'grid_students_found' ,
body : {
autoConfig : false ,
header : false ,
columns : [
{ id : 'id' , hidden : true } ,
{ id : 'nombre' , adjust : 'data' } ,
{ id : 'paterno' , adjust : 'data' } ,
{ id : 'materno' , adjust : 'data' } ,
{ id : 'rfc' , adjust : 'data' } ,
] ,
dataFeed : function ( text ) {
if ( text . length > 2 ) {
this . load ( '/values/student?name=' + text )
} else {
this . hide ( )
}
}
}
}
2017-10-07 00:16:58 -05:00
var body _comprobante = { rows : [ {
cols : [
{
view : 'richselect' ,
id : 'lst_tipo_comprobante' ,
label : 'Tipo' ,
labelPosition : 'top' ,
required : true ,
value : 'I' ,
options : [
{ id : 'I' , value : 'Ingreso' } ,
{ id : 'E' , value : 'Egreso' } ,
{ id : 'T' , value : 'Traslado' }
]
} ,
{
view : 'richselect' ,
id : 'lst_serie' ,
label : 'Serie' ,
labelPosition : 'top' ,
options : [ ] ,
} ,
] } ,
2019-01-17 22:00:07 -06:00
{ view : 'text' , id : 'txt_folio_custom' , label : 'Folio: ' , labelWidth : 50 ,
hidden : true , placeholder : 'Solo números' } ,
2017-10-07 00:16:58 -05:00
{ view : 'richselect' , id : 'lst_uso_cfdi' , name : 'uso_cfdi' , required : true ,
labelPosition : 'top' , label : 'Uso del CFDI' , options : [ ] } ,
2017-10-04 23:22:05 -05:00
] }
var opt _metodo _pago = [
{ id : 'PUE' , value : 'Pago en una sola exhibición' } ,
{ id : 'PPD' , value : 'Pago en parcialidades o diferido' }
]
var body _opciones = { rows : [
2017-11-02 23:24:31 -06:00
{ view : 'richselect' , id : 'lst_metodo_pago' , label : 'Método de Pago' ,
labelPosition : 'top' , options : opt _metodo _pago , value : 'PUE' ,
required : true } ,
2017-10-07 00:16:58 -05:00
{ view : 'richselect' , id : 'lst_forma_pago' , name : 'forma_pago' ,
label : 'Forma de Pago' , labelPosition : 'top' , required : true ,
options : [ ] } ,
2017-10-04 23:22:05 -05:00
{ view : 'text' , id : 'txt_condicion_pago' , label : 'Condiciones de Pago' ,
2017-11-02 23:24:31 -06:00
labelPosition : 'top' , suggest : [ ] } ,
2017-10-04 23:22:05 -05:00
] }
var body _moneda = { cols : [
{ view : 'richselect' , id : 'lst_moneda' , label : 'Nombre' ,
labelPosition : 'top' , required : true , options : [ ] } ,
{ view : 'text' , type : 'text' , id : 'txt_tipo_cambio' , value : '1.00' ,
label : 'Tipo de Cambio' , labelPosition : 'top' , required : true ,
invalidMessage : 'Captura un valor númerico' , inputAlign : 'right' ,
readonly : true }
] }
2019-02-14 22:50:17 -06:00
var body _divisas = { cols : [
{ view : 'radio' , id : 'opt_divisas' , name : 'opt_divisas' ,
options : [ 'Ninguna' , 'Compra' , 'Venta' ] } ,
] }
2017-10-06 00:10:27 -05:00
var body _regimen _fiscal = {
view : 'richselect' ,
id : 'lst_regimen_fiscal' ,
required : true ,
options : [ ]
}
2018-01-29 13:21:06 -06:00
var body _students = { rows : [
{ view : 'search' , id : 'search_student' ,
name : "search_student" , label : "por Nombre o RFC" ,
labelPosition : 'top' , suggest : suggest _students ,
placeholder : 'Captura al menos tres letras' } ,
] }
2020-04-16 22:35:41 -05:00
var txt _total _cant = { rows : [ {
view : 'text' ,
id : 'txt_total_cant' ,
readonly : true ,
width : 300 ,
label : 'Total cantidades: ' ,
labelWidth : 150 ,
inputAlign : 'center'
} , { } ] }
2017-06-27 15:43:02 -05:00
var controls _generate = [
2017-11-06 23:34:43 -06:00
{ minHeight : 10 , maxHeight : 10 } ,
toolbar _invoices _generate ,
{ minHeight : 10 , maxHeight : 10 } ,
2017-10-04 23:22:05 -05:00
{ cols : [ { rows : [
{ view : 'fieldset' , label : 'Buscar Cliente' , body : { rows : [
{ cols : [
2017-10-05 15:33:25 -05:00
{ view : "search" , id : "search_client_id" , name : "search_client_id" ,
2017-10-04 23:22:05 -05:00
label : "por Clave" , labelPosition : 'top' , maxWidth : 200 ,
placeholder : 'Captura la clave' } ,
2017-10-05 15:33:25 -05:00
{ view : 'search' , id : 'search_client_name' ,
name : 'search_client_name' , label : 'por Nombre o RFC' ,
2017-10-05 12:16:20 -05:00
labelPosition : 'top' , suggest : suggest _partners ,
placeholder : 'Captura al menos tres letras' } ,
2017-10-04 23:22:05 -05:00
] } ,
2017-10-05 15:33:25 -05:00
{ cols : [ {
view : 'label' , id : 'lbl_client_title' ,
name : "lbl_client_title" , label : 'Seleccionado: ' ,
autowidth : true } ,
{ view : 'label' , id : 'lbl_client' , name : 'lbl_client' ,
label : 'Ninguno' } ,
2017-10-04 23:22:05 -05:00
] }
] } } ,
{ view : 'fieldset' , label : 'Buscar Producto' , body : { rows : [
2017-10-05 15:33:25 -05:00
{ cols : [
{ view : "search" , id : "search_product_id" ,
name : "search_product_id" , label : "por Clave" ,
labelPosition : 'top' , maxWidth : 200 ,
2017-12-06 00:30:30 -06:00
placeholder : 'Presiona ENTER para buscar' } ,
2017-10-05 15:33:25 -05:00
{ view : "search" , id : "search_product_name" ,
2017-12-06 00:24:13 -06:00
name : "search_product_name" , label : "por Descripción o Clave" ,
2017-10-05 15:33:25 -05:00
labelPosition : 'top' , suggest : suggest _products ,
placeholder : 'Captura al menos tres letras' } ,
2017-10-04 23:22:05 -05:00
] } ,
2018-01-29 13:21:06 -06:00
] } } ,
{ view : 'fieldset' , id : 'fs_students' , label : 'Buscar Alumno' ,
body : body _students } ,
2017-10-04 23:22:05 -05:00
] } ,
{ maxWidth : 10 } ,
{ maxWidth : 300 , rows : [
{ view : 'fieldset' , label : 'Comprobante' , body : body _comprobante } ,
{ view : 'fieldset' , label : 'Opciones de Pago' , body : body _opciones } ,
2017-10-06 00:10:27 -05:00
{ view : 'fieldset' , id : 'fs_moneda' , label : 'Moneda' , body : body _moneda } ,
2019-02-14 22:50:17 -06:00
{ view : 'fieldset' , id : 'fs_divisas' , label : 'Divisas - Tipo de Operación' , body : body _divisas } ,
2017-10-06 00:10:27 -05:00
{ view : 'fieldset' , id : 'fs_regimen_fiscal' , label : 'Regimen Fiscal' ,
body : body _regimen _fiscal } ,
2017-10-04 23:22:05 -05:00
] }
] } ,
{ view : 'label' , label : 'Detalle' , height : 30 , align : 'left' } ,
2017-06-27 15:43:02 -05:00
grid _details ,
2017-10-04 23:22:05 -05:00
{ minHeight : 15 , maxHeight : 15 } ,
2020-04-16 22:35:41 -05:00
{ cols : [ { } , txt _total _cant , grid _totals ] } ,
2017-10-30 00:03:02 -06:00
{ minHeight : 15 , maxHeight : 15 } ,
{ margin : 20 , cols : [ { } ,
2017-11-06 23:34:43 -06:00
{ view : "button" , id : "cmd_timbrar" , label : "Timbrar" , icon : 'ticket' ,
type : 'iconButton' , autowidth : true , align : "center" } ,
2017-10-30 00:03:02 -06:00
{ view : "button" , id : 'cmd_prefactura' , label : "PreFactura" ,
2017-11-06 23:34:43 -06:00
type : 'iconButton' , autowidth : true , align : 'center' , icon : 'file-o' } ,
2017-10-30 00:03:02 -06:00
{ } ]
2017-11-05 00:13:48 -06:00
} ,
{ rows : [
{ template : "" , type : "section" } ,
{ margin : 10 , cols : [ { } ,
{ view : 'button' , id : 'cmd_close_invoice' , label : 'Cancelar' ,
type : 'danger' , autowidth : true , align : 'center' }
]
} ,
] }
2017-10-30 00:03:02 -06:00
]
var toolbar _preinvoices = [
{ view : 'button' , id : 'cmd_facturar_preinvoice' , label : 'Facturar' ,
type : 'iconButton' , autowidth : true , icon : 'pencil' } ,
2018-02-20 11:03:21 -06:00
{ view : 'button' , id : 'cmd_preinvoice_generate_delete' , label : 'Facturar y Eliminar' ,
type : 'iconButton' , autowidth : true , icon : 'pencil' , hidden : true } ,
2017-10-30 00:03:02 -06:00
{ } ,
{ view : "button" , id : "cmd_delete_preinvoice" , label : "Eliminar" ,
type : "iconButton" , autowidth : true , icon : "minus" } ,
]
var toolbar _prefilter = [
{ view : 'richselect' , id : 'prefilter_year' , label : 'Año' , labelAlign : 'right' ,
labelWidth : 50 , width : 150 , options : [ ] } ,
{ view : 'richselect' , id : 'prefilter_month' , label : 'Mes' , labelAlign : 'right' ,
labelWidth : 50 , width : 200 , options : months } ,
]
var grid _preinvoices _cols = [
{ id : "id" , header : "ID" , hidden : true } ,
{ id : "folio" , header : [ "Folio" , { content : "numberFilter" } ] , adjust : "data" ,
sort : "int" , css : "cell_right" } ,
2018-01-13 15:25:06 -06:00
{ id : "fecha" , header : [ "Fecha y Hora" ] , adjust : "data" , sort : "string" ,
footer : 'Total' } ,
2017-10-30 00:03:02 -06:00
{ id : "tipo_comprobante" , header : [ "Tipo" , { content : "selectFilter" } ] ,
adjust : 'header' , sort : 'string' } ,
2018-01-13 15:25:06 -06:00
{ id : 'total_mn' , header : [ 'Total M.N.' ] , width : 150 , sort : 'int' ,
format : webix . i18n . priceFormat , css : 'right' ,
footer : { content : 'summColumn' , css : 'right' } } ,
2017-10-30 00:03:02 -06:00
{ id : "cliente" , header : [ "Razón Social" , { content : "selectFilter" } ] ,
fillspace : true , sort : "string" } ,
{ id : 'pdf' , header : 'PDF' , adjust : 'data' , template : get _icon ( 'pdf' ) } ,
2022-01-27 13:10:16 -06:00
{ id : 'email' , header : '@' , adjust : 'data' , template : get _icon ( 'email' ) }
2017-10-30 00:03:02 -06:00
]
var grid _preinvoices = {
view : 'datatable' ,
id : 'grid_preinvoices' ,
select : 'row' ,
adjust : true ,
footer : true ,
resizeColumn : true ,
2017-11-05 00:13:48 -06:00
autoheight : true ,
2017-10-30 00:03:02 -06:00
headermenu : true ,
2017-11-06 23:34:43 -06:00
columns : grid _preinvoices _cols
2017-10-30 00:03:02 -06:00
}
var controls _prefactura = [
{ view : 'toolbar' , elements : toolbar _preinvoices } ,
{ view : 'toolbar' , elements : toolbar _prefilter } ,
grid _preinvoices ,
2017-06-27 15:43:02 -05:00
]
2017-11-20 00:47:23 -06:00
var opt _tipo _proceso = [
{ id : 'Ordinario' , value : 'Ordinario' } ,
{ id : 'Precampaña' , value : 'Precampaña' } ,
{ id : 'Campaña' , value : 'Campaña' } ,
]
var opt _tipo _comite = [
2021-05-31 12:59:45 -05:00
{ id : '' , value : '' } ,
2017-11-20 00:47:23 -06:00
{ id : 'Ejecutivo Nacional' , value : 'Ejecutivo Nacional' } ,
{ id : 'Ejecutivo Estatal' , value : 'Ejecutivo Estatal' } ,
{ id : 'Directivo Estatal' , value : 'Directivo Estatal' } ,
]
2021-05-31 12:59:45 -05:00
var opt _ine _ambito = [
{ id : '' , value : '' } ,
{ id : 'Local' , value : 'Local' } ,
{ id : 'Federal' , value : 'Federal' } ,
]
var opt _clave _entidad = [
{ id : '' , value : '' } ,
{ id : 'AGU' , value : 'Aguascalientes' } ,
{ id : 'BCN' , value : 'Baja California' } ,
{ id : 'BCS' , value : 'Baja California Sur' } ,
{ id : 'CAM' , value : 'Campeche' } ,
{ id : 'CHP' , value : 'Chiapas' } ,
{ id : 'CHH' , value : 'Chihuahua' } ,
{ id : 'COA' , value : 'Coahuila' } ,
{ id : 'COL' , value : 'Colima' } ,
{ id : 'CR1' , value : 'Circunscripción 1' } ,
{ id : 'CR2' , value : 'Circunscripción 2' } ,
{ id : 'CR3' , value : 'Circunscripción 3' } ,
{ id : 'CR4' , value : 'Circunscripción 4' } ,
{ id : 'CR5' , value : 'Circunscripción 5' } ,
{ id : 'DIF' , value : 'Ciudad de México' } ,
{ id : 'DUR' , value : 'Durango' } ,
{ id : 'GUA' , value : 'Guanajuato' } ,
{ id : 'GRO' , value : 'Guerrero' } ,
{ id : 'HID' , value : 'Hidalgo' } ,
{ id : 'JAL' , value : 'Jalisco' } ,
2022-01-25 19:12:41 -06:00
{ id : 'MEX' , value : 'Estado de México' } ,
2021-05-31 12:59:45 -05:00
{ id : 'MIC' , value : 'Michoacán' } ,
{ id : 'MOR' , value : 'Morelos' } ,
{ id : 'NAC' , value : 'Nacional' } ,
{ id : 'NAY' , value : 'Nayarit' } ,
{ id : 'NLE' , value : 'Nuevo León' } ,
{ id : 'OAX' , value : 'Oaxaca' } ,
{ id : 'PUE' , value : 'Puebla' } ,
{ id : 'QUE' , value : 'Querétaro' } ,
{ id : 'ROO' , value : 'Quintana Roo' } ,
{ id : 'SLP' , value : 'San Luis Potosí' } ,
{ id : 'SIN' , value : 'Sinaloa' } ,
{ id : 'SON' , value : 'Sonora' } ,
{ id : 'TAB' , value : 'Tabasco' } ,
{ id : 'TAM' , value : 'Tamaulipas' } ,
{ id : 'TLA' , value : 'Tlaxcala' } ,
{ id : 'VER' , value : 'Veracruz' } ,
{ id : 'YUC' , value : 'Yucatán' } ,
{ id : 'ZAC' , value : 'Zacatecas' } ,
]
2020-03-01 23:18:26 -06:00
var controls _ine = [
2017-11-20 00:47:23 -06:00
{ maxHeight : 15 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'checkbox' , id : 'chk_cfdi_usar_ine' , labelWidth : 0 ,
labelRight : 'Usar el complemento INE' } ,
{ } ] } ,
{ maxHeight : 10 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'richselect' , id : 'lst_ine_tipo_proceso' , labelWidth : 150 ,
label : 'Tipo de Proceso' , options : opt _tipo _proceso ,
value : 'Ordinario' } ,
{ } ] } ,
{ maxHeight : 10 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'richselect' , id : 'lst_ine_tipo_comite' , labelWidth : 150 ,
2021-05-31 12:59:45 -05:00
label : 'Tipo de Comite' , options : opt _tipo _comite , value : '' } ,
2017-11-20 00:47:23 -06:00
{ } ] } ,
{ maxHeight : 10 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'text' , id : 'txt_ine_idcontabilidad' , name : 'ine_idcontabilidad' ,
label : 'ID de Contabilidad: ' , labelWidth : 150 } ,
{ } ] } ,
2021-05-31 12:59:45 -05:00
{ maxHeight : 10 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'richselect' , id : 'lst_ine_key_entidad' , name : 'ine_key_entidad' ,
label : 'Clave Entidad: ' , labelWidth : 150 , options : opt _clave _entidad } ,
{ } ] } ,
{ maxHeight : 10 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'richselect' , id : 'lst_ine_ambito' , name : 'ine_ambito' ,
label : 'Ámbito: ' , labelWidth : 150 , options : opt _ine _ambito } ,
{ } ] } ,
2017-11-20 00:47:23 -06:00
]
2020-03-01 23:18:26 -06:00
var grid _cols _leyendas _fiscales = [
{ id : 'id' , header : 'ID' , hidden : true } ,
{ id : 'texto_leyenda' , header : 'Leyenda' , fillspace : 2 } ,
{ id : 'norma' , header : 'Norma' , fillspace : 1 } ,
{ id : 'disposicion_fiscal' , header : 'Disposición Fiscal' , fillspace : 1 } ,
]
var grid _leyendas _fiscales = {
view : 'datatable' ,
id : 'grid_leyendas_fiscales' ,
select : 'row' ,
multiselect : true ,
adjust : true ,
autoheight : true ,
headermenu : true ,
columns : grid _cols _leyendas _fiscales ,
}
2021-12-21 23:01:44 -06:00
2020-03-01 23:18:26 -06:00
var controls _leyendas _fiscales = [
{ maxHeight : 15 } ,
{ cols : [ { maxWidth : 15 } ,
{ view : 'label' , id : 'lbl_title' , label : 'Selecciona las Leyendas Fiscales a integrar en esta factura' } ,
{ } ] } ,
{ maxHeight : 15 } ,
grid _leyendas _fiscales ,
]
2021-12-21 23:01:44 -06:00
var opt _transporte _internacional = [
{ id : 'Sí' , value : 'Sí' } ,
{ id : 'No' , value : 'No' } ,
]
var opt _entrada _salida = [
{ id : '' , value : '' } ,
{ id : 'Entrada' , value : 'Entrada' } ,
{ id : 'Salida' , value : 'Salida' } ,
]
2021-12-25 17:48:08 -06:00
var opt _origen _destino = [
{ id : 'Origen' , value : 'Origen' } ,
{ id : 'Destino' , value : 'Destino' } ,
]
2022-01-06 21:15:11 -06:00
var date _suggest = {
type : 'calendar' ,
body : {
timepicker : true ,
icons : true ,
}
}
2021-12-25 17:48:08 -06:00
2022-01-10 13:39:35 -06:00
var opt _countries = [
2022-01-12 21:42:02 -06:00
{ id : 'MEX' , value : 'México' } ,
2022-01-10 13:39:35 -06:00
]
2022-01-14 21:54:17 -06:00
var opt _carta _estados = [
{ id : 'AGU' , value : 'Aguascalientes' } ,
{ id : 'BCN' , value : 'Baja California' } ,
{ id : 'BCS' , value : 'Baja California Sur' } ,
{ id : 'CAM' , value : 'Campeche' } ,
{ id : 'CHP' , value : 'Chiapas' } ,
{ id : 'CHH' , value : 'Chihuahua' } ,
{ id : 'COA' , value : 'Coahuila' } ,
{ id : 'COL' , value : 'Colima' } ,
{ id : 'DIF' , value : 'Ciudad de México' } ,
{ id : 'DUR' , value : 'Durango' } ,
{ id : 'GUA' , value : 'Guanajuato' } ,
{ id : 'GRO' , value : 'Guerrero' } ,
{ id : 'HID' , value : 'Hidalgo' } ,
{ id : 'JAL' , value : 'Jalisco' } ,
2022-01-25 19:33:05 -06:00
{ id : 'MEX' , value : 'Estado de México' } ,
2022-01-14 21:54:17 -06:00
{ id : 'MIC' , value : 'Michoacán' } ,
{ id : 'MOR' , value : 'Morelos' } ,
{ id : 'NAC' , value : 'Nacional' } ,
{ id : 'NAY' , value : 'Nayarit' } ,
{ id : 'NLE' , value : 'Nuevo León' } ,
{ id : 'OAX' , value : 'Oaxaca' } ,
{ id : 'PUE' , value : 'Puebla' } ,
{ id : 'QUE' , value : 'Querétaro' } ,
{ id : 'ROO' , value : 'Quintana Roo' } ,
{ id : 'SLP' , value : 'San Luis Potosí' } ,
{ id : 'SIN' , value : 'Sinaloa' } ,
{ id : 'SON' , value : 'Sonora' } ,
{ id : 'TAB' , value : 'Tabasco' } ,
{ id : 'TAM' , value : 'Tamaulipas' } ,
{ id : 'TLA' , value : 'Tlaxcala' } ,
{ id : 'VER' , value : 'Veracruz' } ,
{ id : 'YUC' , value : 'Yucatán' } ,
{ id : 'ZAC' , value : 'Zacatecas' } ,
]
2021-12-21 23:01:44 -06:00
var grid _cols _carta _ubicaciones = [
{ id : 'id' , header : 'ID' , hidden : true } ,
2021-12-27 21:33:34 -06:00
{ id : 'delete' , header : '' , hidden : true , width : 30 , css : 'delete' } ,
2021-12-25 17:48:08 -06:00
{ id : 'TipoUbicacion' , header : 'Tipo de Ubicación' , editor : 'select' , options : opt _origen _destino , fillspace : 1 } ,
{ id : 'RFCRemitenteDestinatario' , header : 'RFC Rem/Des' , editor : 'text' , fillspace : 1 } ,
2022-01-10 13:39:35 -06:00
{ id : 'NombreRemitenteDestinatario' , header : 'Nombre Rem/Des' , editor : 'text' , fillspace : 1 } ,
2022-01-06 21:15:11 -06:00
{ id : 'FechaHoraSalidaLlegada' , header : 'Fecha/Hora' , editor : 'date' , suggest : date _suggest , format : webix . Date . dateToStr ( "%D, %d-%M-%Y %h:%i" ) , footer : 'Total distancia:' , fillspace : 1 } ,
2022-01-12 21:42:02 -06:00
{ id : 'DistanciaRecorrida' , header : 'Distancia (KM)' , editor : 'text' , format : webix . i18n . numberFormat , css : 'right' , footer : { content : 'summColumn' , css : 'right' } , fillspace : 1 } ,
2022-01-10 13:39:35 -06:00
{ id : 'Municipio' , headerd : 'Municipio' , editor : 'text' , fillspace : 1 } ,
2022-01-14 21:54:17 -06:00
{ id : 'Estado' , headerd : 'Estado' , editor : 'select' , options : opt _carta _estados , fillspace : 1 } ,
2022-01-10 13:39:35 -06:00
{ id : 'Pais' , headerd : 'Pais' , editor : 'select' , options : opt _countries , fillspace : 1 } ,
{ id : 'CodigoPostal' , headerd : 'C.P.' , editor : 'text' , fillspace : 1 } ,
2021-12-25 17:48:08 -06:00
]
2022-01-10 13:39:35 -06:00
//~ Calle
//~ NumeroExterior
//~ NumeroInterior
//~ Colonia
//~ Localidad
//~ Referencia
2021-12-25 17:48:08 -06:00
var grid _cols _carta _mercancias = [
{ id : 'id' , header : 'ID' , hidden : true } ,
2022-01-16 22:20:45 -06:00
{ id : 'delete' , header : '' , width : 30 , css : 'delete' } ,
{ id : 'BienesTransp' , header : 'Clave SAT' , editor : 'text' , fillspace : 1 } ,
{ id : 'Descripcion' , header : 'Descripción' , editor : 'text' , fillspace : 1 } ,
{ id : 'Cantidad' , header : 'Cantidad' , editor : 'text' , format : webix . i18n . numberFormat , css : 'right' , fillspace : 1 } ,
2022-01-20 00:06:05 -06:00
{ id : 'ClaveUnidad' , header : 'Unidad' , editor : 'select' , options : 'values/unitbykey' , footer : 'Total peso:' , fillspace : 1 } ,
2022-01-09 23:52:05 -06:00
//~ {id: 'ValorMercancia', header: 'Valor Mercancia', format: webix.i18n.priceFormat, css: 'right', footer: 'Total peso:', fillspace: 1},
2021-12-29 22:02:17 -06:00
{ id : 'PesoEnKg' , header : 'Peso (Kg)' , format : webix . i18n . numberFormat , css : 'right' , editor : 'text' , footer : { content : 'summColumn' , css : 'right' } , fillspace : 1 } ,
2021-12-21 23:01:44 -06:00
]
2022-01-27 13:23:00 -06:00
var opt _carta _tipo _permiso _sct = [
{ id : 'TPAF01' , value : '[TPAF01] Autotransporte Federal de carga general.' } ,
{ id : 'TPAF02' , value : '[TPAF02] Transporte privado de carga.' } ,
{ id : 'TPAF03' , value : '[TPAF03] Autotransporte Federal de Carga Especializada de materiales y residuos peligrosos.' } ,
{ id : 'TPAF04' , value : '[TPAF04] Transporte de automóviles sin rodar en vehículo tipo góndola.' } ,
{ id : 'TPAF05' , value : '[TPAF05] Transporte de carga de gran peso y/o volumen de hasta 90 toneladas.' } ,
{ id : 'TPAF06' , value : '[TPAF06] Transporte de carga especializada de gran peso y/o volumen de más 90 toneladas.' } ,
{ id : 'TPAF07' , value : '[TPAF07] Transporte Privado de materiales y residuos peligrosos.' } ,
{ id : 'TPAF08' , value : '[TPAF08] Autotransporte internacional de carga de largo recorrido.' } ,
{ id : 'TPAF09' , value : '[TPAF09] Autotransporte internacional de carga especializada de materiales y residuos peligrosos de largo recorrido.' } ,
{ id : 'TPAF10' , value : '[TPAF10] Autotransporte Federal de Carga General cuyo ámbito de aplicación comprende la franja fronteriza con Estados Unidos.' } ,
{ id : 'TPAF11' , value : '[TPAF11] Autotransporte Federal de Carga Especializada cuyo ámbito de aplicación comprende la franja fronteriza con Estados Unidos.' } ,
{ id : 'TPAF12' , value : '[TPAF12] Servicio auxiliar de arrastre en las vías generales de comunicación.' } ,
{ id : 'TPAF13' , value : '[TPAF13] Servicio auxiliar de servicios de arrastre, arrastre y salvamento, y depósito de vehículos en las vías generales de comunicación.' } ,
{ id : 'TPAF14' , value : '[TPAF14] Servicio de paquetería y mensajería en las vías generales de comunicación.' } ,
{ id : 'TPAF15' , value : '[TPAF15] Transporte especial para el tránsito de grúas industriales con peso máximo de 90 toneladas.' } ,
{ id : 'TPAF16' , value : '[TPAF16] Servicio federal para empresas arrendadoras servicio público federal.' } ,
{ id : 'TPAF17' , value : '[TPAF17] Empresas trasladistas de vehículos nuevos.' } ,
{ id : 'TPAF18' , value : '[TPAF18] Empresas fabricantes o distribuidoras de vehículos nuevos.' } ,
{ id : 'TPAF19' , value : '[TPAF19] Autorización expresa para circular en los caminos y puentes de jurisdicción federal con configuraciones de tractocamión doblemente articulado.' } ,
{ id : 'TPAF20' , value : '[TPAF20] Autotransporte Federal de Carga Especializada de fondos y valores.' } ,
{ id : 'TPTM01' , value : '[TPTM01] Permiso temporal para navegación de cabotaje' } ,
{ id : 'TPTA01' , value : '[TPTA01] Concesión y/o autorización para el servicio regular nacional y/o internacional para empresas mexicanas' } ,
{ id : 'TPTA02' , value : '[TPTA02] Permiso para el servicio aéreo regular de empresas extranjeras' } ,
{ id : 'TPTA03' , value : '[TPTA03] Permiso para el servicio nacional e internacional no regular de fletamento' } ,
{ id : 'TPTA04' , value : '[TPTA04] Permiso para el servicio nacional e internacional no regular de taxi aéreo' } ,
{ id : 'TPXX00' , value : '[TPXX00] Permiso no contemplado en el catálogo.' }
]
2021-12-28 22:26:05 -06:00
var opt _config _auto = [
{ id : '' , value : '' } ,
{ id : 'VL' , value : '[VL] Vehículo ligero de carga (2 llantas en el eje delantero y 2 llantas en el eje trasero)' } ,
{ id : 'C2' , value : '[C2] Camión Unitario (2 llantas en el eje delantero y 4 llantas en el eje trasero)' } ,
{ id : 'C3' , value : '[C3] Camión Unitario (2 llantas en el eje delantero y 6 o 8 llantas en los dos ejes traseros)' } ,
2022-01-17 21:49:35 -06:00
{ id : 'C2R2' , value : '[C2R2] Camión-Remolque (6 llantas en el camión y 8 llantas en remolque)' } ,
{ id : 'C3R2' , value : '[C3R2] Camión-Remolque (10 llantas en el camión y 8 llantas en remolque)' } ,
{ id : 'C2R3' , value : '[C2R3] Camión-Remolque (6 llantas en el camión y 12 llantas en remolque)' } ,
{ id : 'C3R3' , value : '[C3R3] Camión-Remolque (10 llantas en el camión y 12 llantas en remolque)' } ,
{ id : 'T2S1' , value : '[T2S1] Tractocamión Articulado (6 llantas en el tractocamión, 4 llantas en el semirremolque)' } ,
{ id : 'T2S2' , value : '[T2S2] Tractocamión Articulado (6 llantas en el tractocamión, 8 llantas en el semirremolque)' } ,
{ id : 'T2S3' , value : '[T2S3] Tractocamión Articulado (6 llantas en el tractocamión, 12 llantas en el semirremolque)' } ,
{ id : 'T3S1' , value : '[T3S1] Tractocamión Articulado (10 llantas en el tractocamión, 4 llantas en el semirremolque)' } ,
{ id : 'T3S2' , value : '[T3S2] Tractocamión Articulado (10 llantas en el tractocamión, 8 llantas en el semirremolque)' } ,
{ id : 'T3S3' , value : '[T3S3] Tractocamión Articulado (10 llantas en el tractocamión, 12 llantas en el semirremolque)' } ,
{ id : 'T2S1R2' , value : '[T2S1R2] Tractocamión Semirremolque-Remolque (6 llantas en el tractocamión, 4 llantas en el semirremolque y 8 llantas en el remolque)' } ,
{ id : 'T2S2R2' , value : '[T2S2R2] Tractocamión Semirremolque-Remolque (6 llantas en el tractocamión, 8 llantas en el semirremolque y 8 llantas en el remolque)' } ,
{ id : 'T2S1R3' , value : '[T2S1R3] Tractocamión Semirremolque-Remolque (6 llantas en el tractocamión, 4 llantas en el semirremolque y 12 llantas en el remolque)' } ,
{ id : 'T3S1R2' , value : '[T3S1R2] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 4 llantas en el semirremolque y 8 llantas en el remolque)' } ,
{ id : 'T3S1R3' , value : '[T3S1R3] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 4 llantas en el semirremolque y 12 llantas en el remolque)' } ,
{ id : 'T3S2R2' , value : '[T3S2R2] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 8 llantas en el semirremolque y 8 llantas en el remolque)' } ,
{ id : 'T3S2R3' , value : '[T3S2R3] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 8 llantas en el semirremolque y 12 llantas en el remolque)' } ,
{ id : 'T3S2R4' , value : '[T3S2R4] Tractocamión Semirremolque-Remolque (10 llantas en el tractocamión, 8 llantas en el semirremolque y 16 llantas en el remolque)' } ,
{ id : 'T2S2S2' , value : '[T2S2S2] Tractocamión Semirremolque-Semirremolque (6 llantas en el tractocamión, 8 llantas en el semirremolque delantero y 8 llantas en el semirremolque trasero)' } ,
{ id : 'T3S2S2' , value : '[T3S2S2] Tractocamión Semirremolque-Semirremolque (10 llantas en el tractocamión, 8 llantas en el semirremolque delantero y 8 llantas en el semirremolque trasero)' } ,
{ id : 'T3S3S2' , value : '[T3S3S2] Tractocamión Semirremolque-Semirremolque (10 llantas en el tractocamión, 12 llantas en el semirremolque delantero y 8 llantas en el semirremolque trasero)' } ,
{ id : 'OTROEVGP' , value : '[OTROEVGP] Especializado de carga Voluminosa y/o Gran Peso' } ,
{ id : 'OTROSG' , value : '[OTROSG] Servicio de Grúas' } ,
{ id : 'GPLUTA' , value : '[GPLUTA] Grúa de Pluma Tipo A' } ,
{ id : 'GPLUTB' , value : '[GPLUTB] Grúa de Pluma Tipo B' } ,
{ id : 'GPLUTC' , value : '[GPLUTC] Grúa de Pluma Tipo C' } ,
{ id : 'GPLUTD' , value : '[GPLUTD] Grúa de Pluma Tipo D' } ,
{ id : 'GPLATA' , value : '[GPLATA] Grúa de Plataforma Tipo A' } ,
{ id : 'GPLATB' , value : '[GPLATB] Grúa de Plataforma Tipo B' } ,
{ id : 'GPLATC' , value : '[GPLATC] Grúa de Plataforma Tipo C' } ,
{ id : 'GPLATD' , value : '[GPLATD] Grúa de Plataforma Tipo D' } ,
]
var opt _carta _tipo _remolque = [
{ id : '' , value : '' } ,
{ id : 'CTR001' , value : '[CTR001] Caballete' } ,
{ id : 'CTR002' , value : '[CTR002] Caja' } ,
{ id : 'CTR003' , value : '[CTR003] Caja Abierta' } ,
{ id : 'CTR004' , value : '[CTR004] Caja Cerrada' } ,
{ id : 'CTR005' , value : '[CTR005] Caja De Recolección Con Cargador Frontal' } ,
{ id : 'CTR006' , value : '[CTR006] Caja Refrigerada' } ,
{ id : 'CTR007' , value : '[CTR007] Caja Seca' } ,
{ id : 'CTR008' , value : '[CTR008] Caja Transferencia' } ,
{ id : 'CTR009' , value : '[CTR009] Cama Baja o Cuello Ganso' } ,
{ id : 'CTR010' , value : '[CTR010] Chasis Portacontenedor' } ,
{ id : 'CTR011' , value : '[CTR011] Convencional De Chasis' } ,
{ id : 'CTR012' , value : '[CTR012] Equipo Especial' } ,
{ id : 'CTR013' , value : '[CTR013] Estacas' } ,
{ id : 'CTR014' , value : '[CTR014] Góndola Madrina' } ,
{ id : 'CTR015' , value : '[CTR015] Grúa Industrial' } ,
{ id : 'CTR016' , value : '[CTR016] Grúa' } ,
{ id : 'CTR017' , value : '[CTR017] Integral' } ,
{ id : 'CTR018' , value : '[CTR018] Jaula' } ,
{ id : 'CTR019' , value : '[CTR019] Media Redila' } ,
{ id : 'CTR020' , value : '[CTR020] Pallet o Celdillas' } ,
{ id : 'CTR021' , value : '[CTR021] Plataforma' } ,
{ id : 'CTR022' , value : '[CTR022] Plataforma Con Grúa' } ,
{ id : 'CTR023' , value : '[CTR023] Plataforma Encortinada' } ,
{ id : 'CTR024' , value : '[CTR024] Redilas' } ,
{ id : 'CTR025' , value : '[CTR025] Refrigerador' } ,
{ id : 'CTR026' , value : '[CTR026] Revolvedora' } ,
{ id : 'CTR027' , value : '[CTR027] Semicaja' } ,
{ id : 'CTR028' , value : '[CTR028] Tanque' } ,
{ id : 'CTR029' , value : '[CTR029] Tolva' } ,
{ id : 'CTR031' , value : '[CTR031] Volteo' } ,
{ id : 'CTR032' , value : '[CTR032] Volteo Desmontable' } ,
]
var opt _carta _aseguradoras = [
{ id : 'General de Seguros' , value : 'General de Seguros' } ,
{ id : 'Qualitas' , value : 'Qualitas' } ,
2021-12-28 22:26:05 -06:00
]
2021-12-25 23:00:23 -06:00
var grid _cols _carta _autotransporte = [
{ id : 'id' , header : 'ID' , hidden : true } ,
2022-01-27 13:23:00 -06:00
{ id : 'PermSCT' , header : 'Tipo Permiso SCT' , editor : 'select' , options : opt _carta _tipo _permiso _sct , fillspace : 1 } ,
2021-12-28 22:26:05 -06:00
{ id : 'NumPermisoSCT' , header : 'Número Permiso SCT' , editor : 'text' , fillspace : 1 } ,
{ id : 'ConfigVehicular' , header : 'Clave Autotransporte' , editor : 'select' , options : opt _config _auto , fillspace : 1 } ,
{ id : 'PlacaVM' , header : 'Placa' , editor : 'text' , fillspace : 1 } ,
{ id : 'AnioModeloVM' , header : 'Modelo (Año)' , editor : 'text' , fillspace : 1 } ,
2022-01-17 21:49:35 -06:00
{ id : 'SubTipoRem' , header : 'ST Remolque' , editor : 'select' , options : opt _carta _tipo _remolque , fillspace : 1 } ,
2022-01-14 21:54:17 -06:00
{ id : 'Placa' , header : 'Placa' , editor : 'text' , fillspace : 1 } ,
2022-01-09 23:52:05 -06:00
{ id : 'AseguraRespCivil' , header : 'Aseguradora' , editor : 'text' , fillspace : 1 } ,
{ id : 'PolizaRespCivil' , header : 'Póliza' , editor : 'text' , fillspace : 1 } ,
2021-12-25 23:00:23 -06:00
]
var opt _tipos _figura = [
{ id : '' , value : '' } ,
{ id : '01' , value : '[01] Operador' } ,
{ id : '02' , value : '[02] Propietario' } ,
{ id : '03' , value : '[03] Arrendador' } ,
{ id : '04' , value : '[04] Notificado' } ,
]
var grid _cols _carta _tipos _figuras = [
{ id : 'id' , header : 'ID' , hidden : true } ,
{ id : 'TipoFigura' , header : 'Tipo Figura' , editor : 'select' , options : opt _tipos _figura , fillspace : 1 } ,
{ id : 'RFCFigura' , header : 'RFC Figura' , editor : 'text' , fillspace : 1 } ,
2022-01-09 23:52:05 -06:00
{ id : 'NombreFigura' , header : 'Nombre Figura' , editor : 'text' , fillspace : 1 } ,
2021-12-25 23:00:23 -06:00
{ id : 'NumLicencia' , header : 'Número de Licencia' , editor : 'text' , fillspace : 1 } ,
]
2021-12-21 23:01:44 -06:00
var grid _carta _ubicaciones = {
view : 'datatable' ,
id : 'grid_carta_ubicaciones' ,
multiselect : false ,
adjust : true ,
autoheight : true ,
headermenu : true ,
2021-12-25 17:48:08 -06:00
editable : true ,
footer : true ,
2021-12-21 23:01:44 -06:00
columns : grid _cols _carta _ubicaciones ,
2022-01-10 13:39:35 -06:00
//~ data: data_tmp1,
data : [
2022-01-15 21:52:41 -06:00
{ delete : '-' , TipoUbicacion : 'Origen' , Pais : 'MEX' } ,
{ delete : '-' , TipoUbicacion : 'Destino' , Pais : 'MEX' } ,
2022-01-10 13:39:35 -06:00
]
2021-12-21 23:01:44 -06:00
}
2021-12-25 17:48:08 -06:00
var grid _carta _mercancias = {
view : 'datatable' ,
id : 'grid_carta_mercancias' ,
multiselect : false ,
adjust : true ,
autoheight : true ,
headermenu : true ,
editable : true ,
footer : true ,
columns : grid _cols _carta _mercancias ,
}
2021-12-25 23:00:23 -06:00
var grid _carta _autotransporte = {
view : 'datatable' ,
id : 'grid_carta_autotransporte' ,
multiselect : false ,
adjust : true ,
autoheight : true ,
headermenu : true ,
editable : true ,
columns : grid _cols _carta _autotransporte ,
2022-01-10 13:39:35 -06:00
data : [ { id : 0 } ] ,
//~ data: data_tmp2,
2021-12-25 23:00:23 -06:00
}
var grid _carta _tipos _figuras = {
view : 'datatable' ,
id : 'grid_carta_tipos_figuras' ,
multiselect : false ,
adjust : true ,
autoheight : true ,
headermenu : true ,
editable : true ,
columns : grid _cols _carta _tipos _figuras ,
2022-01-10 13:39:35 -06:00
data : [ { id : 0 } ] ,
//~ data: data_tmp3,
2021-12-25 23:00:23 -06:00
}
2021-12-25 17:48:08 -06:00
var body _carta _mercancias = { rows : [
2022-01-14 21:54:17 -06:00
{ cols : [
{ view : 'button' , id : 'cmd_carta_add_product' , label : 'Agregar Mercancía' , icon : 'plus' ,
type : 'iconButton' , autowidth : true , align : 'center' } ,
{ view : 'button' , id : 'cmd_carta_copy_from_invoice' , label : 'Copiar de CFDI' , icon : 'copy' ,
type : 'iconButton' , autowidth : true , align : 'center' } ,
{ } ,
{ view : 'richselect' , id : 'lst_carta_UnidadPeso' , label : 'Unidad de Peso: ' ,
labelWidth : 110 , maxWidth : 300 , options : '/satunidadespeso?opt=active' }
2021-12-25 23:00:23 -06:00
] } ,
{ maxHeight : 10 } ,
2021-12-25 17:48:08 -06:00
grid _carta _mercancias ,
] }
2021-12-25 23:00:23 -06:00
2021-12-21 23:01:44 -06:00
var body _carta _ubicaciones = { rows : [
grid _carta _ubicaciones ,
] }
2021-12-25 23:00:23 -06:00
var body _carta _autotransporte = { rows : [
grid _carta _autotransporte ,
] }
var body _carta _tipos _figuras = { rows : [
grid _carta _tipos _figuras ,
] }
2021-12-21 23:01:44 -06:00
var controls _carta _porte = [
{ cols : [ { maxWidth : 15 } ,
{ view : 'checkbox' , id : 'chk_cfdi_usar_cartaporte' , labelWidth : 0 ,
2022-01-20 00:06:05 -06:00
labelRight : 'Usar el complemento Carta Porte' } , { } ,
{ view : 'button' , id : 'cmd_carta_import_json' , label : 'Importar JSON' ,
icon : 'upload' , type : 'iconButton' , autowidth : true , align : 'center' } ,
{ view : 'button' , id : 'cmd_carta_import_ods' , label : 'Importar ODS' ,
icon : 'upload' , type : 'iconButton' , autowidth : true , align : 'center' } ,
{ maxWidth : 15 } ] } ,
2021-12-25 17:48:08 -06:00
{ view : 'fieldset' , label : 'Mercancias' , body : body _carta _mercancias } ,
2021-12-21 23:01:44 -06:00
{ cols : [ { maxWidth : 15 } ,
{ view : 'richselect' , id : 'lst_carta_TranspInternac' , labelPosition : 'top' ,
label : 'Transporte Internacional' , options : opt _transporte _internacional ,
2021-12-29 22:02:17 -06:00
value : 'No' , readonly : true } ,
2021-12-21 23:01:44 -06:00
{ view : 'richselect' , id : 'lst_carta_EntradaSalidaMerc' , labelPosition : 'top' ,
label : 'Entrada o Salida' , options : opt _entrada _salida ,
2021-12-29 22:02:17 -06:00
value : '' , disabled : true } ,
2021-12-21 23:01:44 -06:00
{ view : 'richselect' , id : 'lst_carta_PaisOrigenDestino' , labelPosition : 'top' ,
label : 'País Origen/Destino' , options : [ ] ,
2021-12-29 22:02:17 -06:00
value : '' , disabled : true } ,
2021-12-21 23:01:44 -06:00
{ view : 'richselect' , id : 'lst_carta_ViaEntradaSalida' , labelPosition : 'top' ,
label : 'Vía de Entrada o Salida' , options : [ ] ,
2021-12-29 22:02:17 -06:00
value : '' , disabled : true } ,
2021-12-21 23:01:44 -06:00
] } ,
{ view : 'fieldset' , label : 'Ubicaciones' , body : body _carta _ubicaciones } ,
2021-12-25 23:00:23 -06:00
{ view : 'fieldset' , label : 'Autotransporte' , body : body _carta _autotransporte } ,
{ view : 'fieldset' , label : 'Tipos Figura' , body : body _carta _tipos _figuras } ,
2021-12-21 23:01:44 -06:00
]
var form _carta _porte = {
type : 'space' ,
responsive : true ,
cols : [ {
view : 'form' ,
id : 'form_carta_porte' ,
complexData : true ,
scroll : true ,
elements : controls _carta _porte ,
} ]
}
2017-06-27 15:43:02 -05:00
var controls _invoices = [
{
2017-10-30 00:03:02 -06:00
view : 'tabview' ,
2017-11-05 00:13:48 -06:00
id : 'tv_invoice' ,
2017-11-20 00:47:23 -06:00
animate : true ,
2017-06-27 15:43:02 -05:00
cells : [
2017-10-30 00:03:02 -06:00
{ id : 'Generar' , rows : controls _generate } ,
{ id : 'PreFacturas' , rows : controls _prefactura } ,
2020-03-01 23:18:26 -06:00
{ id : 'INE' , rows : controls _ine } ,
{ id : 'Leyendas Fiscales' , rows : controls _leyendas _fiscales } ,
2021-12-21 23:01:44 -06:00
{ id : 'Carta Porte' , rows : [ form _carta _porte ] } ,
2017-06-27 15:43:02 -05:00
]
} ,
2017-10-04 23:22:05 -05:00
]
2017-06-27 15:43:02 -05:00
var form _invoice = {
2017-10-06 00:10:27 -05:00
type : 'space' ,
2017-11-05 00:13:48 -06:00
responsive : true ,
2017-06-27 15:43:02 -05:00
cols : [ {
2017-10-06 00:10:27 -05:00
view : 'form' ,
id : 'form_invoice' ,
2017-06-27 15:43:02 -05:00
complexData : true ,
2017-11-15 19:33:41 -06:00
scroll : true ,
2017-06-27 15:43:02 -05:00
elements : controls _invoices ,
} ]
2017-10-06 00:10:27 -05:00
}
2017-06-27 15:43:02 -05:00
var multi _invoices = {
2017-10-10 18:49:05 -05:00
id : 'multi_invoices' ,
2017-10-04 23:22:05 -05:00
view : 'multiview' ,
2017-06-27 15:43:02 -05:00
animate : true ,
cells : [
2017-10-10 18:49:05 -05:00
{ id : 'invoices_home' , rows : [
{ view : 'toolbar' , elements : toolbar _invoices } ,
{ view : 'toolbar' , elements : toolbar _invoices _util } ,
2017-10-28 00:30:42 -05:00
{ view : 'toolbar' , elements : toolbar _invoices _filter } ,
2017-06-27 15:43:02 -05:00
grid _invoices ,
] } ,
2017-11-15 19:33:41 -06:00
{ id : 'invoices_new' , rows : [ form _invoice ] }
2017-06-27 15:43:02 -05:00
]
2017-10-06 00:10:27 -05:00
}
2017-06-27 15:43:02 -05:00
var app _invoices = {
id : "app_invoices" ,
rows : [
{ view : "template" , id : "th_invoices" , type : "header" , template : "Administración de Facturas" } ,
multi _invoices
2017-11-15 00:12:55 -06:00
] ,
2017-10-07 00:16:58 -05:00
}
2018-01-19 22:16:19 -06:00
var body _upload _invoice = { rows : [
{ view : 'form' , id : 'form_upload_invoice' , rows : [
{ cols : [ { } ,
{ view : 'uploader' , id : 'up_invoice' , autosend : false ,
link : 'lst_upload_invoice' , value : 'Seleccionar Archivo' ,
upload : '/files/invoiceods' } , { } ] } ,
{ cols : [
{ view : 'list' , id : 'lst_upload_invoice' , name : 'lst_upload_invoice' ,
type : 'uploader' , autoheight : true , borderless : true } ] } ,
{ cols : [ { } , { view : 'button' , id : 'cmd_upload_invoice' ,
label : 'Importar Factura' } , { } ] } ,
] } ,
] }
var win _import _invoice = {
init : function ( ) {
webix . ui ( {
view : 'window' ,
id : 'win_import_invoice' ,
width : 400 ,
modal : true ,
position : 'center' ,
head : 'Importar Factura de Plantilla' ,
body : body _upload _invoice ,
} )
$$ ( 'cmd_upload_invoice' ) . attachEvent ( 'onItemClick' , cmd _upload _invoice _click )
$$ ( 'up_invoice' ) . attachEvent ( 'onUploadComplete' , up _invoice _upload _complete )
}
2018-06-14 22:20:55 -05:00
}
2022-01-03 23:06:55 -06:00
var opt _reasons _cancel = [
{ id : '' , value : '' } ,
{ id : '01' , value : '[01] Comprobante emitido con errores con relación' } ,
{ id : '02' , value : '[02] Comprobante emitido con errores sin relación' } ,
{ id : '03' , value : '[03] No se llevó acabo la operación' } ,
{ id : '04' , value : '[04] Operación nominativa relacionada en una factura global' } ,
]
var body _invoice _cancel = { rows : [ { minHeight : 15 } ,
{ view : 'richselect' , id : 'lst_reasons_cancel' , labelPosition : 'top' , label : 'Razón de cancelación' , options : opt _reasons _cancel , value : '' , width : 400 } ,
{ view : 'text' , id : 'txt_cancel_uuid' , labelPosition : 'top' , label : 'UUID que sustituye' , width : 400 } ,
{ view : 'label' , label : 'Esta acción no se puede deshacer' , autowidth : true , align : 'center' } ,
{ view : 'label' , label : '¿Estás segura de continuar?' , autowidth : true , align : 'center' } ,
{ cols : [ { } ,
{ view : 'button' , id : 'cmd_invoice_cancel' , width : 100 , label : 'Cancelar' , type : 'danger' , icon : 'ban' } ,
{ maxWidth : 25 } ,
{ view : 'button' , id : 'cmd_win_cancel_close' , width : 100 , label : 'Cerrar' } ,
{ }
] } ,
{ minHeight : 20 } ,
] }
var win _invoice _cancel = {
init : function ( ) {
webix . ui ( {
view : 'window' ,
id : 'win_invoice_cancel' ,
modal : true ,
width : 400 ,
position : 'center' ,
head : 'Cancelar CFDI' ,
body : body _invoice _cancel ,
} )
$$ ( 'cmd_invoice_cancel' ) . attachEvent ( 'onItemClick' , cmd _invoice _cancel _click )
$$ ( 'cmd_win_cancel_close' ) . attachEvent ( 'onItemClick' , cmd _win _cancel _close _click )
}
}
2022-01-20 00:06:05 -06:00
var body _upload _carta _json = { rows : [
{ view : 'form' , id : 'form_upload_carta' , rows : [
{ cols : [ { } ,
{ view : 'uploader' , id : 'up_invoice_json' , autosend : false ,
link : 'lst_upload_invoice' , value : 'Seleccionar Archivo' ,
accept : 'application/json' , upload : '' } , { } ] } ,
{ cols : [
{ view : 'list' , id : 'lst_upload_invoice' , name : 'lst_upload_invoice' ,
type : 'uploader' , autoheight : true , borderless : true } ] } ,
//~ {cols: [{}, {view: 'button', id: 'cmd_upload_invoice',
//~ label: 'Importar Factura'}, {}]},
] } ,
] }
var win _carta _import _json = {
init : function ( ) {
webix . ui ( {
view : 'window' ,
id : 'win_carta_import_json' ,
width : 400 ,
modal : true ,
position : 'center' ,
head : 'Importar Carta Porte JSON' ,
body : body _upload _carta _json ,
} )
//~ $$('cmd_upload_invoice').attachEvent('onItemClick', cmd_upload_invoice_click)
$$ ( 'up_invoice_json' ) . attachEvent ( 'onAfterFileAdd' , up _invoice _json _on _after _file _add )
}
}