Files
crm.e5.pl/modules/EcmReceipts/javascript/columndefs.js

114 lines
3.3 KiB
JavaScript
Raw Normal View History

2024-04-27 09:23:34 +02:00
columns = new Array();
//define columns
//begin: number
columns[0] = {
'name' : 'number',
'label' : 'Lp.',
'width' : 4,
'content' : new Array(),
};
columns[0]['content'][0] = {'name' : '', 'type': 'text', 'readonly' : true};
//end: number
//begin: code
columns[1] = {
'name' : 'product_',
'label' : 'Kod',
'width' : 6,
'content' : new Array(),
};
columns[1]['content'][0] = {'name' : 'code', 'type': 'hidden', 'readonly' : true};
columns[1]['content'][1] = {'name' : 'id', 'type': 'hidden'};
columns[1]['content'][2] = {'name' : 'item', 'type': 'hidden'};
columns[1]['content'][3] = {'name' : 'item_id', 'type': 'hidden'};
columns[1]['content'][4] = {'name' : 'itemold_id', 'type': 'hidden'};
columns[1]['content'][5] = {'name' : 'link', 'type': 'text', 'readonly' : true};
//end: code
//begin: name
columns[2] = {
'name' : 'name',
'label' : 'Nazwa',
'width' : 20,
'content' : new Array(),
};
columns[2]['content'][0] = {'name' : '', 'type': 'text'};
//end: name
//begin: quantity
columns[3] = {
'name' : 'quantity',
'label' : 'Ilość',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[3]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
//end: quantity
//begin: unit
columns[4] = {
'name' : 'unit_',
'label' : 'J.M.',
'width' : 5,
'content' : new Array(),
'align' : 'center',
};
columns[4]['content'][0] = {'name' : 'name', 'type': 'text','readonly' : true};
columns[4]['content'][1] = {'name' : 'id', 'type': 'hidden'};
//end: unit
//begin: price_start
columns[5] = {
'name' : 'price_start',
'label' : 'Cena<br>początkowa brutto',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[5]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
columns[5]['content'][1] = {'name' : '_div', 'type': 'text'};
//end: price_start
//begin: discount
//end: discount
//begin: price_netto
columns[6] = {
'name' : 'price_',
'label' : 'Cena sprzedaży',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[6]['content'][0] = {'name' : 'sell', 'type': 'text', 'isNumber' : true, 'readonly' : true};
columns[6]['content'][1] = {'name' : 'netto', 'type': 'hidden'};
columns[6]['content'][2] = {'name' : 'brutto', 'type': 'hidden'};
//end: price_start
//begin: ecmvat
columns[7] = {
'name' : 'ecmvat_',
'label' : 'VAT (%)',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[7]['content'][0] = {'name' : 'name', 'type': 'text'};
columns[7]['content'][1] = {'name' : 'value', 'type': 'hidden'};
columns[7]['content'][2] = {'name' : 'id', 'type': 'hidden'};
//end: ecmvat
//begin: total
columns[8] = {
'name' : 'total_',
'label' : 'Wartość brutto',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[8]['content'][0] = {'name' : 'brutto', 'type': 'text', 'isNumber' : true, 'readonly' : true};
columns[8]['content'][1] = {'name' : 'netto', 'type': 'hidden'};
columns[8]['content'][2] = {'name' : 'vat', 'type': 'hidden'};
//end: total
//end: remarks
//begin: options
columns[9] = {
'name' : 'options',
'label' : 'Opcje',
'width' : 3,
'content' : new Array(),
};