117 lines
3.6 KiB
JavaScript
117 lines
3.6 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'][1] = {'name' : 'brand_label', 'type': 'hidden',};
|
|
columns[1]['content'][2] = {'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' : '',
|
|
'label' : 'Ilość<br>Na magazynie',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[3]['content'][0] = {'name' : 'quantity', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
|
|
columns[3]['content'][1] = {'name' : 'stock_state','style':'color:blue;text-align: right; font-style: italic;', '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',
|
|
'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
|
|
columns[6] = {
|
|
'name' : 'discount',
|
|
'label' : 'Upust (%)',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[6]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'onChange' : 'calculateRow($(this).parent(\'td\').parent(\'tr\').index());'};
|
|
//end: discount
|
|
//begin: price_netto
|
|
columns[7] = {
|
|
'name' : 'price_netto',
|
|
'label' : 'Cena<br>po upuście',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[7]['content'][0] = {'name' : '', 'type': 'text', 'isNumber' : true, 'readonly' : true};
|
|
//end: price_start
|
|
//begin: ecmvat
|
|
columns[8] = {
|
|
'name' : 'ecmvat_',
|
|
'label' : 'VAT (%)',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[8]['content'][0] = {'name' : 'name', 'type': 'text'};
|
|
columns[8]['content'][1] = {'name' : 'value', 'type': 'hidden'};
|
|
columns[8]['content'][2] = {'name' : 'id', 'type': 'hidden'};
|
|
//end: ecmvat
|
|
//begin: total
|
|
columns[9] = {
|
|
'name' : 'total_',
|
|
'label' : 'Wartość',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[9]['content'][0] = {'name' : 'netto', 'type': 'text', 'isNumber' : true, 'readonly' : true};
|
|
//end: total
|
|
//begin: recipient_code
|
|
columns[10] = {
|
|
'name' : 'recipient_code',
|
|
'label' : 'Kod Odbiorcy',
|
|
'width' : 5,
|
|
'content' : new Array(),
|
|
'align' : 'right',
|
|
};
|
|
columns[10]['content'][0] = {'name' : '', 'type': 'text'};
|
|
//end: recipient_code
|