162 lines
3.0 KiB
JavaScript
162 lines
3.0 KiB
JavaScript
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'][3] = {
|
|
'name' : 'total',
|
|
'type' : 'hidden'
|
|
};
|
|
// 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());'
|
|
};
|
|
columns[3]['content'][1] = {
|
|
'name' : '_consignment_doc',
|
|
'type' : 'text',
|
|
|
|
};
|
|
columns[3]['content'][2] = {
|
|
'name' : '_consignment_id',
|
|
'type' : 'hidden',
|
|
};
|
|
// end: quantity
|
|
// begin: price
|
|
columns[4] = {
|
|
'name' : 'price',
|
|
'label' : 'Cena',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[4]['content'][0] = {
|
|
'name' : '',
|
|
'type' : 'text',
|
|
'isNumber' : true,
|
|
'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'
|
|
};
|
|
columns[4]['content'][1] = {
|
|
'name' : '_old',
|
|
'type' : 'text',
|
|
'isNumber' : true,
|
|
'readonly': true,
|
|
};
|
|
// end: price
|
|
// begin: unit
|
|
columns[5] = {
|
|
'name' : 'unit_',
|
|
'label' : 'J.M.',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'center',
|
|
};
|
|
columns[5]['content'][0] = {
|
|
'name' : 'name',
|
|
'type' : 'text',
|
|
'readonly' : true
|
|
};
|
|
columns[5]['content'][1] = {
|
|
'name' : 'id',
|
|
'type' : 'hidden'
|
|
};
|
|
// end: unit
|
|
// begin: stock_state
|
|
columns[6] = {
|
|
'name' : 'stock_state',
|
|
'label' : 'Stan',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[6]['content'][0] = {
|
|
'name' : '',
|
|
'type' : 'text',
|
|
'isNumber' : true,
|
|
'readonly' : true
|
|
};
|
|
// end: stock_state
|
|
// begin: options
|
|
columns[7] = {
|
|
'name' : 'ecmvat_',
|
|
'label' : 'VAT (%)',
|
|
'width' : 0,
|
|
'style' : 'display:none',
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[7]['content'][0] = {
|
|
'name' : 'name',
|
|
'type' : 'hidden'
|
|
};
|
|
columns[7]['content'][1] = {
|
|
'name' : 'value',
|
|
'type' : 'hidden'
|
|
};
|
|
columns[7]['content'][2] = {
|
|
'name' : 'id',
|
|
'type' : 'hidden'
|
|
};
|
|
columns[8] = {
|
|
'name' : 'options',
|
|
'label' : 'Opcje',
|
|
'width' : 3,
|
|
'content' : new Array(),
|
|
}; |