Fix in templates

This commit is contained in:
el Mau 2023-02-01 22:45:48 -06:00
commit af5fa3c812
2 changed files with 101 additions and 115 deletions

View File

@ -78,7 +78,7 @@ var controllers = {
tb_options = $$('tab_options').getTabbar()
tb_options.attachEvent('onChange', tab_options_change)
$$('txt_plantilla_factura_html').attachEvent('onItemClick', txt_plantilla_factura_html_click)
$$('txt_plantilla_factura_json').attachEvent('onItemClick', txt_plantilla_factura_json_click)
//~ $$('txt_plantilla_factura_json').attachEvent('onItemClick', txt_plantilla_factura_json_click)
$$('txt_plantilla_factura_css').attachEvent('onItemClick', txt_plantilla_factura_css_click)
$$('txt_plantilla_ticket').attachEvent('onItemClick', txt_plantilla_ticket_click)
//~ $$('txt_plantilla_donataria').attachEvent('onItemClick', txt_plantilla_donataria_click)
@ -951,42 +951,42 @@ function emisor_logo_click(id, e){
}
function txt_plantilla_factura_33_click(e){
//~ function txt_plantilla_factura_33_click(e){
var body_elements = [
{cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_33',
width: 200}, {width: 100}]},
{view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
borderless: true},
{},
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
click:("$$('win_template').close();")}, {}]}
]
//~ var body_elements = [
//~ {cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
//~ value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_33',
//~ width: 200}, {width: 100}]},
//~ {view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
//~ borderless: true},
//~ {},
//~ {cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
//~ click:("$$('win_template').close();")}, {}]}
//~ ]
var w = webix.ui({
view: 'window',
id: 'win_template',
modal: true,
position: 'center',
head: 'Subir Plantilla 3.3 ODT',
body: {
view: 'form',
elements: body_elements,
}
})
//~ var w = webix.ui({
//~ view: 'window',
//~ id: 'win_template',
//~ modal: true,
//~ position: 'center',
//~ head: 'Subir Plantilla 3.3 ODT',
//~ body: {
//~ view: 'form',
//~ elements: body_elements,
//~ }
//~ })
w.show()
//~ w.show()
$$('up_template').attachEvent('onUploadComplete', function(response){
if(response.ok){
$$('txt_plantilla_factura_33').setValue(response.name)
msg_ok('Plantilla cargada correctamente')
}else{
msg_error(response.name)
}
})
}
//~ $$('up_template').attachEvent('onUploadComplete', function(response){
//~ if(response.ok){
//~ $$('txt_plantilla_factura_33').setValue(response.name)
//~ msg_ok('Plantilla cargada correctamente')
//~ }else{
//~ msg_error(response.name)
//~ }
//~ })
//~ }
function txt_plantilla_ticket_click(e){
@ -1027,42 +1027,42 @@ function txt_plantilla_ticket_click(e){
}
function txt_plantilla_factura_32_click(e){
//~ function txt_plantilla_factura_32_click(e){
var body_elements = [
{cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_32',
width: 200}, {width: 100}]},
{view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
borderless: true},
{},
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
click:("$$('win_template').close();")}, {}]}
]
//~ var body_elements = [
//~ {cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
//~ value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_32',
//~ width: 200}, {width: 100}]},
//~ {view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
//~ borderless: true},
//~ {},
//~ {cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
//~ click:("$$('win_template').close();")}, {}]}
//~ ]
var w = webix.ui({
view: 'window',
id: 'win_template',
modal: true,
position: 'center',
head: 'Subir Plantilla 3.2 ODT',
body: {
view: 'form',
elements: body_elements,
}
})
//~ var w = webix.ui({
//~ view: 'window',
//~ id: 'win_template',
//~ modal: true,
//~ position: 'center',
//~ head: 'Subir Plantilla 3.2 ODT',
//~ body: {
//~ view: 'form',
//~ elements: body_elements,
//~ }
//~ })
w.show()
//~ w.show()
$$('up_template').attachEvent('onUploadComplete', function(response){
if(response.ok){
$$('txt_plantilla_factura_32').setValue(response.name)
msg_ok('Plantilla cargada correctamente')
}else{
msg_error(response.name)
}
})
}
//~ $$('up_template').attachEvent('onUploadComplete', function(response){
//~ if(response.ok){
//~ $$('txt_plantilla_factura_32').setValue(response.name)
//~ msg_ok('Plantilla cargada correctamente')
//~ }else{
//~ msg_error(response.name)
//~ }
//~ })
//~ }
function txt_plantilla_factura_html_click(e){
@ -1147,45 +1147,45 @@ function txt_plantilla_factura_css_click(e){
}
function txt_plantilla_factura_json_click(e){
//~ function txt_plantilla_factura_json_click(e){
var body_elements = [
{cols: [
{width: 100},
{view: 'uploader', id: 'up_template', autosend: true,
link: 'lst_files', value: 'Seleccionar archivo',
upload: '/files/txt_plantilla_factura_json', width: 200},
{width: 100}]},
{view: 'list', id: 'lst_files', type: 'uploader', autoheight: true,
borderless: true},
{},
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
click:("$$('win_template').close();")}, {}]}
]
//~ var body_elements = [
//~ {cols: [
//~ {width: 100},
//~ {view: 'uploader', id: 'up_template', autosend: true,
//~ link: 'lst_files', value: 'Seleccionar archivo',
//~ upload: '/files/txt_plantilla_factura_json', width: 200},
//~ {width: 100}]},
//~ {view: 'list', id: 'lst_files', type: 'uploader', autoheight: true,
//~ borderless: true},
//~ {},
//~ {cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
//~ click:("$$('win_template').close();")}, {}]}
//~ ]
var w = webix.ui({
view: 'window',
id: 'win_template',
modal: true,
position: 'center',
head: 'Subir Plantilla 3.3 JSON',
body: {
view: 'form',
elements: body_elements,
}
})
//~ var w = webix.ui({
//~ view: 'window',
//~ id: 'win_template',
//~ modal: true,
//~ position: 'center',
//~ head: 'Subir Plantilla 3.3 JSON',
//~ body: {
//~ view: 'form',
//~ elements: body_elements,
//~ }
//~ })
w.show()
//~ w.show()
$$('up_template').attachEvent('onUploadComplete', function(response){
if(response.ok){
$$('txt_plantilla_factura_json').setValue(response.name)
msg_ok('Plantilla cargada correctamente')
}else{
msg_error(response.name)
}
})
}
//~ $$('up_template').attachEvent('onUploadComplete', function(response){
//~ if(response.ok){
//~ $$('txt_plantilla_factura_json').setValue(response.name)
//~ msg_ok('Plantilla cargada correctamente')
//~ }else{
//~ msg_error(response.name)
//~ }
//~ })
//~ }
//~ function txt_plantilla_donataria_click(e){

View File

@ -609,7 +609,7 @@ var opt_templates_cfdi = [
{id: '_3.3_ccp_2.0.ods', value: 'CFDI v3.3 - Carta Porte v2.0'},
{id: '_3.3_cp_1.0.ods', value: 'CFDI v3.3 - Pagos v1.0'},
{id: '_3.3.json', value: 'CFDI v3.3 - JSON'},
{id: '_3.2.ods', value: 'CFDI v3.2'},
{id: '_3.2.ods', value: 'CFDI v3.2'}
]
@ -630,24 +630,10 @@ var options_templates = [
label: 'Archivo de estilos (CSS): ', labelPosition: 'top',
icon: 'file'}, {maxWidth: 20} ]},
{maxHeight: 20},
//~ {cols: [{maxWidth: 20},
//~ {view: 'search', id: 'txt_plantilla_factura_json', name: 'plantilla_factura_json',
//~ label: 'Plantilla Factura v3.3 (JSON): ', labelPosition: 'top',
//~ icon: 'file'}, {maxWidth: 25},
//~ {}, {maxWidth: 20} ]},
//~ {maxHeight: 20},
//~ {cols: [{maxWidth: 20},
//~ {view: 'search', id: 'txt_plantilla_pagos10', name: 'plantilla_pagos10',
//~ label: 'Plantilla Factura de Pagos v1.0 - Cfdi 3.3 (ODS): ',
//~ labelPosition: 'top', icon: 'file'}, {maxWidth: 40}, {}]},
//~ {maxHeight: 20},
{cols: [{maxWidth: 20},
{view: 'search', id: 'txt_plantilla_ticket', name: 'plantilla_ticket',
label: 'Plantilla para Tickets (ODS): ', labelPosition: 'top',
icon: 'file'},
//~ {view: 'search', id: 'txt_plantilla_donataria', name: 'plantilla_donataria',
//~ label: 'Plantilla Donataria (solo ONGs): ', labelPosition: 'top',
//~ icon: 'file'},
{}]},
{maxHeight: 20},
{cols: [{maxWidth: 20},