2018-09-16 00:34:35 -05:00
|
|
|
//~ Empresa Libre
|
|
|
|
//~ Copyright (C) 2016-2018 Mauricio Baeza Servin (web@correolibre.net)
|
|
|
|
//~
|
|
|
|
//~ 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
|
|
|
|
|
|
|
|
|
|
|
var toolbar_partners = [
|
2017-06-27 17:07:22 -05:00
|
|
|
{view: 'button', id: 'cmd_new_partner', label: 'Nuevo', type: 'iconButton',
|
|
|
|
autowidth: true, icon: 'user-plus'},
|
|
|
|
{view: 'button', id: 'cmd_edit_partner', label: 'Editar', type: 'iconButton',
|
|
|
|
autowidth: true, icon: 'user'},
|
|
|
|
{view: 'button', id: 'cmd_delete_partner', label: 'Eliminar', type: 'iconButton',
|
|
|
|
autowidth: true, icon: 'user-times'},
|
2018-02-12 16:01:46 -06:00
|
|
|
{},
|
2018-09-16 00:34:35 -05:00
|
|
|
//~ {view: 'button', id: 'cmd_partner_zero', label: 'Saldo 0', type: 'iconButton',
|
|
|
|
//~ autowidth: true, icon: 'power-off', disabled: true},
|
2017-06-27 17:07:22 -05:00
|
|
|
]
|
2017-06-27 15:43:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
var grid_partners_cols = [
|
2017-11-16 01:17:22 -06:00
|
|
|
{id: 'index', header:'#', css: 'right',
|
2017-12-21 01:13:28 -06:00
|
|
|
footer: {content: 'countRows', colspan: 2, css: 'right'}},
|
2017-11-16 01:17:22 -06:00
|
|
|
{id: 'id', header: 'Clave', sort: 'int', css: 'right'},
|
2017-11-26 23:40:14 -06:00
|
|
|
{id: 'rfc', header: ['RFC', {content: 'textFilter'}], adjust: 'data',
|
2017-10-02 20:34:30 -05:00
|
|
|
sort: 'string', footer: {text: 'Clientes y Proveedores', colspan: 2}},
|
|
|
|
{id: 'nombre', header: ['RazĆ³n Social', {content: 'textFilter'}],
|
2017-06-27 23:58:03 -05:00
|
|
|
fillspace:true, sort: 'string'},
|
2017-11-12 21:56:45 -06:00
|
|
|
{id: 'saldo_cliente', header: ['Saldo Cliente', {content: 'numberFilter'}],
|
|
|
|
width: 150, sort: 'int', format: webix.i18n.priceFormat, css: 'right'},
|
2017-06-27 17:07:22 -05:00
|
|
|
]
|
2017-06-27 15:43:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
var grid_partners = {
|
2017-06-27 17:07:22 -05:00
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_partners',
|
|
|
|
select: 'row',
|
2017-06-27 15:43:02 -05:00
|
|
|
adjust: true,
|
|
|
|
footer: true,
|
|
|
|
resizeColumn: true,
|
|
|
|
headermenu: true,
|
|
|
|
columns: grid_partners_cols,
|
2017-11-16 01:17:22 -06:00
|
|
|
pager: 'pager_clientes',
|
|
|
|
//~ datafetch: 100,
|
|
|
|
//~ loadahead: 100,
|
|
|
|
//~ url: '/partners',
|
|
|
|
ready:function(){
|
|
|
|
this.adjustColumn('index');
|
|
|
|
this.adjustColumn('id');
|
|
|
|
this.adjustColumn('rfc');
|
|
|
|
},
|
2017-06-27 15:43:02 -05:00
|
|
|
on:{
|
|
|
|
'data->onStoreUpdated':function(){
|
|
|
|
this.data.each(function(obj, i){
|
|
|
|
obj.index = i+1;
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-06-27 23:58:03 -05:00
|
|
|
var persons_type = [
|
|
|
|
{id: 1, value: 'FĆsica'},
|
|
|
|
{id: 2, value: 'Moral'},
|
|
|
|
{id: 3, value: 'PĆŗblico'},
|
|
|
|
{id: 4, value: 'Extranjero'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-06-27 15:43:02 -05:00
|
|
|
var controls_fiscales = [
|
2017-06-28 23:55:53 -05:00
|
|
|
{template: 'Tipo de Persona', type: 'section'},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'radio', id: 'tipo_persona', name: 'tipo_persona', label: 'Tipos: ',
|
2017-06-27 23:58:03 -05:00
|
|
|
labelWidth: 150, value: 1, options: persons_type, required: true,
|
|
|
|
invalidMessage: 'El Tipo de Persona es requerido'},
|
|
|
|
{template: 'DirecciĆ³n Fiscal', type: 'section'},
|
|
|
|
{cols: [{view: 'text', id: 'rfc', name: 'rfc', label: 'RFC: ', width: 300,
|
2018-02-17 21:33:02 -06:00
|
|
|
required: true, invalidMessage: 'RFC invƔlido', attributes: {maxlength: 13}},
|
|
|
|
{view: 'text', id: 'id_fiscal', name: 'id_fiscal', label: 'ID Fiscal: ',
|
|
|
|
width: 400, required: false, attributes: {maxlength: 40}, hidden: true},
|
|
|
|
{}]},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'nombre', name: 'nombre', label: 'RazĆ³n Social: ', required: true,
|
2017-06-27 23:58:03 -05:00
|
|
|
invalidMessage: 'La RazĆ³n Social es requerida'},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'calle', name: 'calle', label: 'Calle: '},
|
|
|
|
{cols: [{view: 'text', id: 'no_exterior', name: 'no_exterior', width: 300,
|
2017-06-27 23:58:03 -05:00
|
|
|
label: 'No Exterior: '},{}]},
|
2017-10-02 00:12:22 -05:00
|
|
|
{cols: [{view: 'text', id: 'no_interior', name: 'no_interior', width: 300,
|
2017-06-27 23:58:03 -05:00
|
|
|
label: 'No Interior: '},{}]},
|
2017-10-02 00:12:22 -05:00
|
|
|
{cols: [{view: 'search', id: 'codigo_postal', name: 'codigo_postal',
|
|
|
|
width: 300, label: 'C.P.: ', attributes: {maxlength: 5}},{}]},
|
2017-06-27 23:58:03 -05:00
|
|
|
{view: 'text', id: 'colonia', name: 'colonia', label: 'Colonia: '},
|
|
|
|
{view: 'text', id: 'municipio', name: 'municipio', label: 'Municipio: '},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'estado', name: 'estado', label: 'Estado: '},
|
2018-02-17 21:33:02 -06:00
|
|
|
{view: 'text', id: 'pais', name: 'pais', label: 'PaĆs: ', value: 'MĆ©xico',
|
|
|
|
readonly: true, placeholder: 'Usa solo tres letras de acuerdo al catalogo del SAT'},
|
2017-06-27 23:58:03 -05:00
|
|
|
{template: 'Condiciones Comerciales', type: 'section'},
|
|
|
|
{cols: [
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'richselect', id: 'forma_pago', name: 'forma_pago',
|
|
|
|
label: 'Forma de Pago: ', required: true, options: [],
|
|
|
|
invalidMessage: 'La Forma de pago es requerida'},
|
|
|
|
{view: 'text', id: 'condicion_pago', name: 'condicion_pago',
|
2017-11-02 23:24:31 -06:00
|
|
|
label: 'Condiciones de Pago: ', suggest: []},
|
2017-06-27 23:58:03 -05:00
|
|
|
]},
|
|
|
|
{cols: [
|
2017-10-02 20:34:30 -05:00
|
|
|
{view: 'counter', id: 'dias_pago', name: 'dias_pago',
|
|
|
|
label: 'DĆas de pago', step: 5, value: 0, min: 0, max: 365,
|
|
|
|
tooltip: 'Permite calcular las fechas de pago', width: 250},
|
|
|
|
{view: 'checkbox', id: 'dias_habiles', name: 'dias_habiles',
|
|
|
|
label: 'HƔbiles: ', value: false, width: 180},
|
|
|
|
{},
|
2017-10-06 00:10:27 -05:00
|
|
|
]},
|
|
|
|
{cols: [
|
|
|
|
{view: 'richselect', id: 'lst_uso_cfdi_socio', name: 'uso_cfdi_socio',
|
|
|
|
label: 'Uso del CFDI', options: []},
|
|
|
|
{},
|
2017-06-27 23:58:03 -05:00
|
|
|
]}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var controls_others = [
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'checkbox', id: 'es_activo', name: 'es_activo', label: 'Activo: ',
|
2018-09-16 00:34:35 -05:00
|
|
|
value: true, bottomLabel: ' Se recomienda solo desactivar y no eliminar'},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'commercial_name', name: 'nombre_comercial',
|
|
|
|
label: 'Nombre Comercial: '},
|
|
|
|
{view: 'text', id: 'telefonos', name: 'telefonos', label: 'TelƩfonos: '},
|
|
|
|
{view: 'text', id: 'web', name: 'web', label: 'PƔgina Web: '},
|
2018-09-28 02:17:17 -05:00
|
|
|
{cols: [
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'correo_facturas', name: 'correo_facturas',
|
|
|
|
label: 'Correos para Facturas: ', tooltip: 'Separados por comas',
|
|
|
|
bottomLabel: 'Uno o mĆ”s correos electrĆ³nicos separados por comas'},
|
2018-09-28 02:17:17 -05:00
|
|
|
{view: 'text', id: 'partner_email_fp', name: 'partner_email_fp',
|
|
|
|
label: 'Para Facturas de pago: ', tooltip: 'Separados por comas',
|
|
|
|
bottomLabel: 'Uno o mĆ”s correos electrĆ³nicos separados por comas'},
|
|
|
|
]},
|
2017-06-27 23:58:03 -05:00
|
|
|
{cols: [
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'checkbox', id: 'es_cliente', name: 'es_cliente',
|
2017-06-27 23:58:03 -05:00
|
|
|
label: 'Es Cliente: ', value: true, width: 180},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'cuenta_cliente', name: 'cuenta_cliente',
|
2018-09-16 00:34:35 -05:00
|
|
|
label: 'Cuenta Cliente: ', disabled: true},
|
|
|
|
{view: "currency", type: "text", id: 'partner_balance', width: 300,
|
|
|
|
name: 'partner_balance', label: 'Saldo', labelWidth: 100,
|
|
|
|
labelAlign: "right", required: true, inputAlign: "right",
|
|
|
|
invalidMessage: "Captura un valor nĆŗmerico", readonly: true},
|
|
|
|
]
|
2017-06-27 23:58:03 -05:00
|
|
|
},
|
|
|
|
{cols: [
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'checkbox', id: 'es_proveedor', name: 'es_proveedor',
|
2017-06-27 23:58:03 -05:00
|
|
|
label: 'Es Proveedor: ', value: false, width: 180},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'text', id: 'cuenta_proveedor', name: 'cuenta_proveedor',
|
2017-06-27 23:58:03 -05:00
|
|
|
label: 'Cuenta Proveedor: ', disabled: true}, {}]
|
|
|
|
},
|
2017-10-02 00:12:22 -05:00
|
|
|
{view: 'checkbox', name: 'es_ong', label: 'Es ONG: ', value: false},
|
|
|
|
{view: 'text', name: 'tags', label: 'Etiquetas',
|
|
|
|
tooltip: 'Utiles para filtrados rƔpidos. Separa por comas.'},
|
|
|
|
{view: 'textarea' , height: 200, name: 'notas', label: 'Notas'},
|
2017-06-27 23:58:03 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2018-10-08 01:13:46 -05:00
|
|
|
var grid_partner_account_bank_cols = [
|
|
|
|
{id: 'id', header: 'ID', hidden: true},
|
|
|
|
{id: 'delete', header: '', width: 30, css: 'delete'},
|
|
|
|
{id: 'banco', header: 'Banco', fillspace: 1},
|
|
|
|
{id: 'cuenta', header: 'Cuenta', fillspace: 1},
|
|
|
|
{id: 'clabe', header: 'CLABE', fillspace: 1},
|
|
|
|
//~ {id: 'moneda', header: 'Moneda', fillspace: 1},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_partner_account_bank = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_partner_account_bank',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
autoheight: true,
|
|
|
|
columns: grid_partner_account_bank_cols,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var controls_partner_bank = [
|
|
|
|
{template: 'Agregar cuenta de banco', type: 'section'},
|
|
|
|
{view: 'form', id: 'form_partner_account_bank', rows: [
|
|
|
|
{cols: [
|
|
|
|
{view: 'richselect', id: 'lst_partner_bank', name: 'partner_bank',
|
|
|
|
label: 'Banco: ', required: true, options: []},
|
|
|
|
{view: 'text', id: 'partner_account', name: 'partner_account',
|
|
|
|
label: 'Cuenta: ', required: true},
|
|
|
|
{view: 'text', id: 'partner_clabe', name: 'partner_clabe',
|
|
|
|
label: 'CLABE: ', required: true},
|
|
|
|
]},
|
|
|
|
{minHeight: 10},
|
|
|
|
{cols: [{},
|
|
|
|
{view: 'button', id: 'cmd_partner_add_account_bank', maxWidth: 200,
|
|
|
|
label: 'Agregar cuenta'},
|
|
|
|
{}]},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{minHeight: 20, maxHeight: 20},
|
|
|
|
{template: 'Cuentas de banco existentes', type: 'section'},
|
|
|
|
grid_partner_account_bank,
|
|
|
|
{minHeight: 50},
|
|
|
|
]
|
|
|
|
|
2017-06-27 23:58:03 -05:00
|
|
|
|
|
|
|
var toolbar_contacts = [
|
|
|
|
{view: 'button', id: 'cmd_new_contact', label: 'Nuevo', type: 'iconButton',
|
|
|
|
autowidth: true, icon: 'user-plus'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_contacts_cols = [
|
2017-10-16 23:36:10 -05:00
|
|
|
{id: 'index', header: '#', adjust:'data', css:'right',
|
2017-12-21 01:13:28 -06:00
|
|
|
footer: {content: 'countRows'}},
|
2017-06-27 23:58:03 -05:00
|
|
|
{id: 'id', header: '', hidden: true},
|
|
|
|
{id: 'title', header: 'TĆtulo', adjust:'data', sort: 'string',
|
|
|
|
footer: 'Contactos'},
|
|
|
|
{id: 'first_name', header: ['Nombre', {content: 'textFilter'}], adjust:'data',
|
|
|
|
sort: 'string'},
|
|
|
|
{id: 'paterno', header: ['Apellido Paterno', {content: 'textFilter'}],
|
|
|
|
fillspace:true, sort: 'string'},
|
|
|
|
{id: 'materno', header: ['Apellido Materno', {content: 'textFilter'}],
|
|
|
|
fillspace:true, sort: 'string'},
|
|
|
|
{id: 'date_born', header: ['Fecha de Nacimiento'],
|
|
|
|
adjust: 'data'},
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
var grid_contacts = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_contacts',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
height: 400,
|
|
|
|
footer: true,
|
|
|
|
resizeColumn: true,
|
|
|
|
headermenu: true,
|
|
|
|
columns: grid_contacts_cols,
|
|
|
|
on:{
|
|
|
|
'data->onStoreUpdated':function(){
|
|
|
|
this.data.each(function(obj, i){
|
2017-10-16 23:36:10 -05:00
|
|
|
obj.index = i + 1
|
2017-06-27 23:58:03 -05:00
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var grid_email = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_email',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
height: 200,
|
|
|
|
resizeColumn: true,
|
|
|
|
columns: [
|
|
|
|
{id: 'id', header: '', hidden: true},
|
|
|
|
{id: 'type', header: 'Tipo', adjust:'data', sort: 'string'},
|
|
|
|
{id: 'email', header: ['Correo ElectrĆ³nico'], fillspace:true, sort: 'string'},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var grid_phone = {
|
|
|
|
view: 'datatable',
|
|
|
|
id: 'grid_phone',
|
|
|
|
select: 'row',
|
|
|
|
adjust: true,
|
|
|
|
height: 200,
|
|
|
|
resizeColumn: true,
|
|
|
|
columns: [
|
|
|
|
{id: 'id', header: '', hidden: true},
|
|
|
|
{id: 'type', header: 'Tipo', adjust:'data', sort: 'string'},
|
|
|
|
{id: 'phone', header: ['TelƩfono'], fillspace:true, sort: 'string'},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var controls_contact = [
|
|
|
|
{template: 'Datos Generales', type: 'section' },
|
|
|
|
{cols: [
|
|
|
|
{view: 'combo', id: 'cbo_title_contact', name: 'cbo_title_contact',
|
|
|
|
label: 'TĆtulo: ', width: 150},
|
|
|
|
{view: 'text', id: 'name_contact', name: 'name_contact',
|
|
|
|
label: 'Nombre: '},
|
|
|
|
{view: 'text', id: 'paterno_contact', name: 'paterno_contact',
|
|
|
|
label: 'A. Paterno: '},
|
|
|
|
{view: 'text', id: 'materno_contact', name: 'materno_contact',
|
|
|
|
label: 'A. Materno: '},
|
|
|
|
{view: 'datepicker', id: 'date_contact', name: 'date_contact',
|
|
|
|
label: 'Fecha de Nacimiento: ', format: '%d-%M-%Y'},
|
|
|
|
]},
|
|
|
|
{template: 'Correos y TelƩfonos', type: 'section' },
|
|
|
|
{cols: [
|
|
|
|
grid_email,
|
|
|
|
{maxWidth: 10},
|
|
|
|
grid_phone,
|
|
|
|
]},
|
|
|
|
{},
|
|
|
|
{ template:"", type: "section" },
|
|
|
|
{ margin: 10, cols: [{},
|
|
|
|
{view: "button", id: "cmd_save_conctact", label: "Guardar Contacto" , type: "form", autowidth: true, align:"center"},
|
|
|
|
{view: "button", id: "cmd_cancel_contact", label: "Regresar" , type: "danger", autowidth: true, align:"center"},
|
|
|
|
{}]
|
|
|
|
},
|
|
|
|
|
2017-06-27 15:43:02 -05:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2017-06-27 23:58:03 -05:00
|
|
|
var form_contact = {
|
|
|
|
type: 'space',
|
|
|
|
cols: [{
|
|
|
|
view: 'form',
|
|
|
|
id: 'form_contact',
|
|
|
|
complexData: true,
|
|
|
|
elements: controls_contact,
|
|
|
|
elementsConfig: {
|
|
|
|
labelPosition: 'top',
|
|
|
|
},
|
|
|
|
autoheight: true,
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var multi_contacts = {
|
|
|
|
id: 'multi_contacts',
|
|
|
|
animate: true,
|
|
|
|
cells:[
|
|
|
|
{id: 'contacts_home', rows:[
|
|
|
|
{view: 'toolbar', elements: toolbar_contacts},
|
|
|
|
grid_contacts,
|
|
|
|
]},
|
|
|
|
{id: 'contacts_new', rows:[form_contact, {}]}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-06-27 15:43:02 -05:00
|
|
|
var controls_partner = [
|
|
|
|
{
|
2017-06-27 23:58:03 -05:00
|
|
|
view: 'tabview',
|
2017-10-02 20:34:30 -05:00
|
|
|
id: 'tab_partner',
|
2018-10-08 01:13:46 -05:00
|
|
|
tabbar: {ptions: ['Datos Fiscales', 'Otros Datos', 'Cuentas de Banco']},
|
|
|
|
animate: true,
|
2017-06-27 15:43:02 -05:00
|
|
|
cells: [
|
2017-06-27 23:58:03 -05:00
|
|
|
{id: 'Datos Fiscales', rows: controls_fiscales},
|
|
|
|
{id: 'Otros Datos', rows: controls_others},
|
2018-10-08 01:13:46 -05:00
|
|
|
{id: 'Cuentas de Banco', rows: controls_partner_bank}
|
2017-06-27 15:43:02 -05:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{rows: [
|
|
|
|
{ template:"", type: "section" },
|
|
|
|
{ margin: 10, cols: [{},
|
|
|
|
{view: "button", id: "cmd_save_partner", label: "Guardar" , type: "form", autowidth: true, align:"center"},
|
|
|
|
{view: "button", id: "cmd_cancel_partner", label: "Cancelar" , type: "danger", autowidth: true, align:"center"},
|
|
|
|
{}]
|
|
|
|
},
|
|
|
|
]}
|
2017-10-07 00:16:58 -05:00
|
|
|
]
|
2017-06-27 15:43:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
var form_partner = {
|
2017-06-27 23:58:03 -05:00
|
|
|
type: 'space',
|
2017-06-27 15:43:02 -05:00
|
|
|
cols: [{
|
2017-06-27 23:58:03 -05:00
|
|
|
view: 'form',
|
|
|
|
id: 'form_partner',
|
2017-06-27 15:43:02 -05:00
|
|
|
complexData: true,
|
2017-11-15 19:29:51 -06:00
|
|
|
scroll: true,
|
2017-06-27 15:43:02 -05:00
|
|
|
elements: controls_partner,
|
|
|
|
elementsConfig: {
|
2017-06-27 23:58:03 -05:00
|
|
|
labelWidth: 150,
|
|
|
|
labelAlign: 'right'
|
2017-06-27 15:43:02 -05:00
|
|
|
},
|
|
|
|
rules: {
|
2017-10-02 00:12:22 -05:00
|
|
|
nombre: function(value){ return value.trim() != '';},
|
2017-06-27 15:43:02 -05:00
|
|
|
rfc: validate_rfc,
|
|
|
|
}
|
|
|
|
}]
|
2017-10-07 00:16:58 -05:00
|
|
|
}
|
2017-06-27 15:43:02 -05:00
|
|
|
|
|
|
|
|
2017-11-16 01:17:22 -06:00
|
|
|
var pager_clientes = {
|
|
|
|
view: "pager",
|
|
|
|
id: "pager_clientes",
|
|
|
|
template: "{common.prev()} {common.pages()} {common.next()}",
|
|
|
|
size: 100,
|
|
|
|
group: 10,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-06-27 15:43:02 -05:00
|
|
|
var multi_partners = {
|
2017-06-27 23:58:03 -05:00
|
|
|
id: 'multi_partners',
|
2017-06-27 15:43:02 -05:00
|
|
|
animate: true,
|
|
|
|
cells:[
|
2017-06-27 23:58:03 -05:00
|
|
|
{id: 'partners_home', rows:[
|
|
|
|
{view: 'toolbar', elements: toolbar_partners},
|
2017-06-27 15:43:02 -05:00
|
|
|
grid_partners,
|
2017-11-16 01:17:22 -06:00
|
|
|
pager_clientes,
|
2017-06-27 15:43:02 -05:00
|
|
|
]},
|
2017-11-15 19:29:51 -06:00
|
|
|
{id: 'partners_new', rows:[form_partner]}
|
2017-06-27 15:43:02 -05:00
|
|
|
]
|
2017-06-27 23:58:03 -05:00
|
|
|
}
|
2017-06-27 15:43:02 -05:00
|
|
|
|
|
|
|
|
2017-06-27 23:58:03 -05:00
|
|
|
var title_partners = 'AdministraciĆ³n de Clientes y Proveedores'
|
2017-06-27 15:43:02 -05:00
|
|
|
var app_partners = {
|
2017-06-27 23:58:03 -05:00
|
|
|
id: 'app_partners',
|
2017-06-27 15:43:02 -05:00
|
|
|
rows:[
|
2017-06-27 23:58:03 -05:00
|
|
|
{view: 'template', id: 'th_partner', type: 'header', template: title_partners},
|
2017-06-27 15:43:02 -05:00
|
|
|
multi_partners
|
|
|
|
]
|
2017-06-27 23:58:03 -05:00
|
|
|
}
|
2017-06-27 15:43:02 -05:00
|
|
|
|
|
|
|
|