Files
crm.twinpol.com/modules/EcmStockDocOuts/javascript/columndefs.js
2025-05-12 15:45:17 +00:00

244 lines
4.4 KiB
JavaScript
Executable File

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' : 'link',
'type' : 'text',
'readonly' : true
};
columns[1]['content'][3] = {
'name' : 'category_id',
'type' : 'hidden'
};
columns[1]['content'][4] = {
'name' : 'precision',
'type' : 'hidden'
};
columns[1]['content'][5] = {
'name' : 'is_consignment',
'type' : 'hidden'
};
columns[1]['content'][6] = {
'name' : 'consignment_part',
'type' : 'text',
};
columns[1]['content'][7] = {
'name' : 'consignment_id',
'type' : 'hidden',
};
columns[1]['content'][8] = {
'name' : 'is_oo',
'type' : 'hidden'
};
columns[1]['content'][9] = {
'name' : 'consignment_qty',
'type' : 'hidden',
};
// end: code
// begin: name
columns[2] = {
'name' : 'name',
'label' : 'Nazwa',
'width' : 14,
'content' : new Array(),
};
columns[2]['content'][0] = {
'name' : '',
'type' : 'text'
};
// end: name
// begin: quantity
columns[3] = {
'name' : 'quantity',
'label' : 'Ilość',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[3]['content'][0] = {
'name' : '',
'type' : 'text',
'isNumber' : true,
'onChange' : "setRowDate($(this).parent('td').parent('tr').index());calculateRow($(this).parent(\'td\').parent(\'tr\').index());"
};
// end: quantity
// begin: unit
columns[4] = {
'name' : 'unit_',
'label' : 'J.M.',
'width' : 2,
'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
columns[5] = {
'name' : 'price_',
'label' : 'Cena<br>sprzedaży',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[5]['content'][0] = {
'name' : 'netto',
'type' : 'text',
'isNumber' : true,
'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'
};
columns[5]['content'][1] = {
'name' : 'brutto',
'type' : 'hidden',
'isNumber' : true
};
// end: price
// begin: vat
columns[6] = {
'name' : 'ecmvat_',
'label' : 'VAT',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[6]['content'][0] = {
'name' : 'id',
'type' : 'hidden'
};
columns[6]['content'][1] = {
'name' : 'name',
'type' : 'text'
};
columns[6]['content'][2] = {
'name' : 'value',
'type' : 'hidden'
};
// end: vat
// begin: total
columns[7] = {
'name' : 'total_',
'label' : 'Wartość',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[7]['content'][0] = {
'name' : 'netto',
'type' : 'text',
'isNumber' : true
};
columns[7]['content'][1] = {
'name' : 'brutto',
'type' : 'hidden',
'isNumber' : true
};
columns[7]['content'][2] = {
'name' : 'vat',
'type' : 'hidden',
'isNumber' : true
};
// end: total
// begin: stock_state
columns[8] = {
'name' : 'stock_state',
'label' : 'Stan',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[8]['content'][0] = {
'name' : '',
'type' : 'text',
'isNumber' : true
};
// end: stock_state
columns[9] = {
'name' : 'product_',
'label' : 'Sztuk<br>w kartonie',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[9]['content'][0] = {
'name' : 'pieces_per_carton',
'type': 'text',
'isNumber' : true,
'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'
};
columns[10] = {
'name' : 'product_',
'label' : 'Ilość<br>kartonów',
'width' : 3,
'content' : new Array(),
'align' : 'right',
};
columns[10]['content'][0] = {
'name' : 'cartons',
'type': 'text',
'isNumber' : true,
'readonly' : true
};
columns[11] = {
'name' : 'part_no',
'label' : 'Numer partii',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[11]['content'][0] = {
'name' : '',
'type': 'text'
};
columns[12] = {
'name' : 'un_code',
'label' : 'Kod UN',
'width' : 5,
'content' : new Array(),
'align' : 'right',
};
columns[12]['content'][0] = {
'name' : '',
'type': 'text'
};
// begin: options
columns[13] = {
'name' : 'options',
'label' : 'Opcje',
'width' : 3,
'content' : new Array(),
};