$VAR1 = { 'columnsettings' => 'stname,Cost Center, date,Invoice Date, sname,Supplier Name, invoice,Invoice Nr, name,Product Name, pqty,QTY,align:right, price,Price,align:right, gross,Amount,total:sum;number:yes;align:right, discount,Disc.Rec,total:sum;number:yes;align:right, amount,Nett Amount,total:sum;number:yes;align:right, vat,Vat Input,total:sum;number:yes;align:right, inclusive,Amount(incl),total:sum;number:yes;align:right,', 'selector' => '2', 'data' => 'SELECT `purchases`.`shop_id` , `purchases`.`date` , `suppliers`.`name` AS sname , `purchases`.`invoice` , `purchases`.`vat` AS rate , `purchases`.`discount` , `purchases`.`org_qty` AS pqty , ROUND(`purchases`.`price`,2) AS price , ROUND((`purchases`.`org_qty`*price),2) AS `gross` , `purchases`.`org_qty`*`purchases`.`discount` AS discount , ROUND((`purchases`.`org_qty`*price)-(`purchases`.`org_qty`*discount),2) AS `amount` , ROUND(((`purchases`.`org_qty`*price)-(`purchases`.`org_qty`*discount))*`purchases`.`vat`*.15,2) AS vat , ROUND((((`purchases`.`org_qty`*price)-(`purchases`.`org_qty`*discount))+((`purchases`.`org_qty`*price)-(`purchases`.`org_qty`*discount))*`purchases`.`vat`*.15),2) AS inclusive , `stockitems`.`name` , `stockitems`.`type` , `stocktypes`.`name` AS stname FROM `purchases` INNER JOIN `suppliers` ON (`purchases`.`supplier_id` = `suppliers`.`id`) INNER JOIN `stockitems` ON (`purchases`.`stockitems_id` = `stockitems`.`id`) INNER JOIN `stocktypes` ON (`stocktypes`.`id` = `stockitems`.`type`) WHERE purchases.type = 2 AND stockitems.type >= 0 AND purchases.supplier_id >= 0 AND cnote = 0 AND purchases.f_status < 101 AND othertype = 0 AND purchases.date >= \'[sdate]\' AND purchases.date <= \'[edate]\';', 'description' => 'COS All Invoices', 'settings' => 'sdate,date,Start Date edate,date,End Date', 'rollup' => 'stname', 'id' => '50', 'title' => 'COS INVOICES FOR PERIOD', 'category' => 'PURCHASES', 'code' => 'S01' };