<workbook>
[%
    PROCESS 'dynatable.odst';
    columns = [
              { col_id = 'parts_id',
                  type = 'hidden' },
              { col_id = 'int_partnumber'
                  name = text('Partnumber')
                  type = 'text'
                },
                { col_id = 'description'
                  name = text('Description')
                  type = 'text'
                } ];
     IF account_class == 1;
         columns.push(
                  {col_id = 'lastcost'
                     name = text('Last Cost') #'
                     type = 'text_input'},
                  {col_id = 'partnumber',
                     name = text('Vendor Partnumber') #'
                     type = 'text_input'},
                  {col_id = 'leadtime',
                     name = text('Lead Time') #'
                     type = 'input_text'}
         );
     ELSE;
         columns.push(
                  {col_id = 'sellprice'
                     name = text('Sell Price') #'
                     type = 'input_text'},
                  {col_id = 'validfrom',
                     name = text('Valid From') #'
                     type = 'input_text'},
                  {col_id = 'validto',
                     name = text('Valid To') #'
                     type = 'input_text'},
                  {col_id = 'qty',
                     name = text('Min Qty') #'
                     type = 'input_text'},
         );

     END;
     columns.push({col_id = 'currency',
                     name = text('Currency'),
                     type = 'text'}
     );
    PROCESS dynatable
         attributes = { id = 'pricematrix' }
         tbody = { rows = pricematrix };
    IF pricematrix_pricegroup.size;
         PROCESS dynatable
             attributes = { id = 'pricegroup' }
             tbody = { rows = pricematrix_pricegroup };
    END;
%]
</workbook>
