var itemsTable = 'itemsTable'; var items = new Array(); var displayArray = new Array(); var searchedProducts = new Array(); var ajax_url = "index.php?module=EcmInsideOrders&action=javahelper&to_pdf=1"; function FillTable(data, allReadOnly) { html = ''; // loop throw data rows var comp_count = 0; var color; $.each( data, function (row_index, row) { if (row.product_component == 0) { comp_count++; color = '#D4D9DB'; } else { color = '#ffffff'; } html += ''; //alert(row_index); //alert(comp_count); // and insert columns $ .each( columns, function (col_index, column) { // row must have code and name if (!row.product_code || row.product_code == '' || !row.name || row.name == '') return; // return in each = // continue in php for // loop // special types if (column.name == 'number') { html += ''; } else if (column.name == 'name') { html += '