-- Table structure for table `ui_config`
--

CREATE TABLE `ui_config` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `ui_name` varchar(50) NOT NULL,
  `Module` varchar(50) DEFAULT NULL,
  `ui_type` varchar(20) DEFAULT NULL,
  `sub_type` varchar(20) DEFAULT NULL,
  `query` longtext DEFAULT NULL,
  `filters` longtext DEFAULT NULL,
  `display_options` longtext DEFAULT NULL,
  `redirect_to` longtext DEFAULT NULL,
  `Extras` longtext DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ui_config`
--

INSERT INTO `ui_config` VALUES
(1,'Groupwise Sales Report','Inventory','Reports','Inventory','select Ind,ID,itemGrp.group_name as Name,SUM(Quantity) as Quantity, SUM(Subtotal) as Value from $trans_db.sales_invoice_details det inner join (select ItemGrp1.group_name, Item.item_id, \'G\' as Ind,ItemGrp1.group_id as ID from $master_db.sales_inventory_items item inner join (with recursive cte (group_id, group_name, parent_id, item_id) as ( select grp.group_id,grp.group_name,grp.parent_id, item.item_id from $master_db.sales_inventory_items item left outer join sales_inventory_groups grp on item.group_id = grp.group_id union all select p.group_id, p.group_name,p.parent_id, item_id from $master_db.sales_inventory_groups p inner join cte on p.group_id = cte.parent_id ) select cte.group_name, cte.item_id, cte.group_id from cte where cte.parent_id = \'$f1\') itemGrp1 on itemGrp1.item_id = item.item_id union select Item2.Item_name, Item2.Item_id, \'I\' as ind,Item2.Item_id as ID from $master_db.sales_inventory_items Item2 where Item2.group_id = \'$f1\') itemGrp on det.inventory_item_id = itemGrp.item_id where det.Voucher_no in ( SELECT Voucher_No from $trans_db.Sales_Invoice_Main main where str_to_Date(concat(main.voucher_date, substr(timestamp, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\')and str_to_Date(concat(main.voucher_date, substr(timestamp, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') <=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') ) group by itemGrp.group_name ORDER BY 1,2','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"group\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":2, \"keyList\":[{\"var-name\":\"f1\", \"col-pos\":1, \"filter-type\":\"item\"}]}}]}',NULL),
(2,'Itemwise Billwise Sales Report','Inventory','Reports','Inventory','SELECT \'V\' as Ind, main.Voucher_No, main.Voucher_Prefix, \'SALESVOUCHER\' as Voucher_Type, main.Voucher_Date as Date, concat(main.Voucher_No ,\'-\', main.Voucher_Prefix) as \'Voucher No\', (SELECT Ledger_Name from $master_db.Ledger_Master where Ledger_ID=main.Ledger_ID) as Ledger,det.quantity as Quantity, det.SubTotal as \'Total Amount\' From $trans_db.Sales_invoice_Main main JOIN Sales_Invoice_Details det ON main.voucher_no = det.voucher_no and main.voucher_prefix = det.voucher_prefix WHERE det.inventory_item_id = \'$f1\' AND (str_to_Date(concat(main.voucher_date, substr(timestamp, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(main.voucher_date, substr(timestamp, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') <=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') ) order BY cast(main.Voucher_No as unsigned) desc ','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"item\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7,8], \"Hide\":[0,1,2,3], \"Key-col\":[1,2], \"width-list\":[10,10,30,20,20], \"align-list\":[0,0,0,1,1], \"print-cols\":[4,5,6,7,8], \"stretch\":6}',NULL,NULL),
(3,'Itemwise Transaction Summary','Inventory','Reports','Inventory','SELECT \'I\' as Ind, ItemID, (SELECT Item_Name FROM $master_db.Sales_Inventory_Items WHERE Item_Id = ItemID) as \'Item\', SUM(Cr_Qty) as \'Cr Qty\', SUM(Dr_Qty) as \'Dr Qty\', SUM(Cr_Amount) as \'Credit Amount\', SUM(Dr_Amount) as \'Debit Amount\' FROM $trans_db.Transaction_Item_Helper WHERE VoucherDate >=\'$fromDateTime\' AND VoucherDate <=\'$toDateTime\' AND VoucherType like \'$f2\' GROUP BY ItemID ORDER BY Item','{\"filter by\":[{\"var-name\":\"f2\",\"var-value\":\"voucherType\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4,5,6], \"Hide\":[0,1], \"width-list\":[20,20,20,20,20], \"align-list\":[0,1,1,1,1], \"print-cols\":[2,3,4,5,6], \"stretch\":0}','{\"redirect-to\":[{\"default\":{\"id\":5, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}',NULL),
(4,'Groupwise Purchase Report','Inventory','Reports','Inventory','select Ind,ID,itemGrp.group_name as Name, SUM(Quantity) as Quantity, SUM(Subtotal) as Amount from $trans_db.Purchase_invoice_details det inner join (select ItemGrp1.group_name, Item.item_id, \'G\' as Ind,ItemGrp1.group_id as ID from $master_db.sales_inventory_items item inner join (with recursive cte (group_id, group_name, parent_id, item_id) as (select grp.group_id,grp.group_name,grp.parent_id, item.item_id from $master_db.sales_inventory_items item left outer join sales_inventory_groups grp on item.group_id = grp.group_id union all select p.group_id, p.group_name,p.parent_id, item_id from $master_db.sales_inventory_groups p inner join cte on p.group_id = cte.parent_id ) select cte.group_name, cte.item_id, cte.group_id from cte where cte.parent_id = \'$f1\' ) itemGrp1 on itemGrp1.item_id = item.item_id union select Item2.Item_name, Item2.Item_id, \'I\' as ind,Item2.Item_id as ID from $master_db.sales_inventory_items Item2 where Item2.group_id = \'$f1\' ) itemGrp on det.inventory_item_id = itemGrp.item_id where det.Voucher_no in (SELECT Voucher_No from $trans_db.Purchase_Invoice_Main main where  str_to_Date(concat(main.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(main.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') ) group by itemGrp.group_name ORDER BY 1,2','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"group\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}',' {\"redirect-to\":[{\"default\":{\"id\":5, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}\r\n',NULL),
(5,'Item Movement Analysis','Inventory','Reports','Inventory','SELECT \'V\' as Ind, VoucherId, VoucherPrefix, VoucherType, date(VOUCHERDATE) as \'Voucher Date\' , cast(VOUCHERID as Integer) as \'Voucher No\' , VOUCHERTYPE as \'Voucher Type\' , (case when To_Location = \'OUT\' then (select ledger_name from $master_db.ledger_master where ledger_id = To_Ledger) else (select ledger_name from $master_db.ledger_master where ledger_id = From_Ledger) end ) as Ledger,  CAST(SUM(CR_QTY) AS DECIMAL(10,2)) as \'Outward\' , CAST(SUM(DR_QTY) AS DECIMAL(10,2)) as \'Inward\'  FROM $trans_db.TRANSACTION_ITEM_HELPER WHERE ITEMID = \'$f1\' AND VOUCHERDATE >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND VOUCHERDATE <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\')  AND VOUCHERTYPE like \'$f2\' GROUP BY  VOUCHERTYPE, VOUCHERID, VOUCHERPREFIX  ORDER BY 1, VOUCHERTYPE, 2, VOUCHERPREFIX','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"item\"}, {\"var-name\":\"f2\",\"var-value\":\"voucherType\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[8,9], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20,20], \"align-list\":[0,0,0,0,1,1], \"print-cols\":[4,5,6,7,8,9], \"stretch\":7}',NULL,NULL),
(6,'Negative Stock Report','Inventory','Reports','Inventory','SELECT \'I\' as Ind, itemID, INV.item_name as Item ,\r\ntrans.difference as Stock FROM $master_db.Sales_Inventory_Items as INV LEFT OUTER JOIN (SELECT itemID, \r\nSUM(COALESCE(Cr_Qty,0) -COALESCE(Dr_Qty,0)) AS difference FROM $trans_db.Transaction_Item_Helper \r\n  WHERE VoucherDate<= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') Group BY ItemID)\r\n as trans on INV.Item_Id=trans.ItemID  WHERE trans.difference<0  AND Inv.isStockItem = 1 order by Item','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3], \"Hide\":[0,1], \"width-list\":[20,20], \"align-list\":[0,1,0,1], \"print-cols\":[2,3], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":5, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}',NULL),
(7,'Groupwise Transaction Summary','Inventory','Reports','Inventory','select Ind,ID,itemGrp.group_name as Name, ABS(SUM(CR_QTY - DR_QTY)) as Quantity, ABS(SUM(CR_AMOUNT - DR_AMOUNT)) as Value  from $trans_db.Transaction_Item_Helper det  inner join  (select ItemGrp1.group_name, Item.item_id, \'G\' as Ind,ItemGrp1.group_id as ID from  $master_db.Sales_Inventory_Items item inner join  (with recursive cte (group_id, group_name, parent_id, item_id) as (  select     grp.group_id,grp.group_name,grp.parent_id, item.item_id  FROM $master_db.Sales_Inventory_Items item left outer join Sales_Inventory_Groups  grp  on item.group_id = grp.group_id  union all   select     p.group_id, p.group_name,p.parent_id, item_id  from       $master_db.Sales_Inventory_Groups  p  inner join cte   on p.group_id = cte.parent_id ) select cte.group_name, cte.item_id, cte.group_id  from cte where cte.parent_id = \'$f2\' ) itemGrp1  on itemGrp1.item_id = item.item_id  union  select Item2.Item_name, Item2.Item_id, \'I\' as ind,Item2.Item_id as ID  from  $master_db.Sales_Inventory_Items Item2  where Item2.group_id = \'$f2\' ) itemGrp  on det.ItemID = itemGrp.item_id  where  ( str_to_Date(addTime(det.VoucherDate, det.Time) ,\'%Y-%m-%d %H:%i:%s\')>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(addTime(det.VoucherDate, det.Time) ,\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')) AND det.voucherType like \'$f1\' group by itemGrp.group_name ORDER BY 1,3','{\"filter by\":[{\"var-name\":\"f2\",\"var-value\":\"group\"}, {\"var-name\":\"f1\",\"var-value\":\"voucherType\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":5, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}',NULL),
(8,'Item Movement Summary By Ledger','Inventory','Reports','Inventory','SELECT \'I\' as Ind, trans.ItemID, (SELECT ITEM_NAME FROM $master_db.Sales_Inventory_Items WHERE ITEM_ID = TRANS.ITEMID) AS ITEM,CR_QTY as Cr,DR_QTY as Dr, COALESCE(SUM(CR_QTY),0) AS CREDIT, COALESCE(SUM(DR_QTY),0) AS DEBIT  FROM $trans_db.TRANSACTION_ITEM_HELPER TRANS WHERE FROM_LEDGER = \'$f1\' OR TO_LEDGER = \'$f1\' AND TRANS.VOUCHERDATE >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND TRANS.VOUCHERDATE <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') GROUP BY ITEMID','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"ledger\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"width-list\":[20,20,20,20,20], \"align-list\":[0,1,1,1,1], \"print-cols\":[2,3,4,5,6], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":28, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}, {\"var-name\":\"f2\", \"var-value\":\"f1\"}]}}]}',NULL),
(9,'Re-Order Report','Inventory','Reports','Inventory','SELECT \'I\' as Ind, inv.Item_Id as ID,inv.Item_Name as Item, inv.Reorder_Level as Level,  coalesce(SO.qty,0) as \'Sales Order\\n Pending\',  inv.Reorder_Level + COALESCE(SO.qty,0) as \'Required\\n Total\',  coalesce(stock,0) as \'Current Stock\'  FROM $master_db.Sales_Inventory_Items inv  left outer join ( select itemID, round(sum(debitQty - creditQty),3) as stock from (  select trans.VoucherDate, ItemID,  sum(trans.Cr_Qty) as creditQty, sum(trans.Dr_Qty) as debitQty, \'purchase\' as type  from $trans_db.Transaction_Item_Helper trans where VoucherDate <= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') group by ItemID UNION ALL  select trans.VoucherDate, ItemID,  sum(trans.Cr_Qty), sum(trans.Dr_Qty), \'sales\' as type  from $trans_db.Transaction_Bom_Helper trans where VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') group by ItemID ) A group by itemID ) stk  on inv.item_id = stk.itemID  left outer join  ( select inventory_item_id, sum(qty) as qty from  (select inventory_item_id , sum(quantity) as qty from $trans_db.sales_order_details  where itemProductionStatus = 110 group by inventory_item_id union select ing.purchase_item, sum(quantity) * ing.purchase_item_qty / ing.sales_item_qty from  $trans_db.sales_order_Details inner join  $master_db.ingredients  ing on inventory_item_id = ing.sales_item  where itemProductionStatus = 110 group by purchase_item) X  group by inventory_item_id ) SO on inv.Item_ID = SO.inventory_item_id WHERE isPurchaseItem = 1 and coalesce(Reorder_Level ,0) + coalesce(SO.qty ,0) - coalesce(stock ,0) > 0  ORDER BY Item','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[4,5,6], \"Hide\":[0,1], \"width-list\":[20,20,20,20,20], \"align-list\":[0,1,1,1,1], \"print-cols\":[2,3,4,5,6], \"stretch\":0}','{\"redirect-to\":[{\"default\":{\"id\":5, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}','[{\"widget-type\":\"QtMaterialFlatButton\", \"Layout\":\"filterLayout\", \"widget-id\":1, \"text\":\"Export to Purchase Order\", \"action\":\"ExportToPurchaseOrder\", \"widget-align\":\"AlignRight\", \"col-pos\":{\"itemID\": 1, \"stock\": 5, \"reqTotal\": 6}}]'),
(10,'Godownwise Sales Report','Inventory','Reports','Inventory','SELECT \'I\' as Ind, ItemID,  ( SELECT Item_Name FROM $master_db.Sales_Inventory_Items where item_id = itemID ) as Item,  SUM(CR_QTY) as Quantity, SUM(Cr_Amount) as Value  FROM $trans_db.transaction_item_helper  Where from_location like \'$f1\' AND VoucherDate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') group by ItemID','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"godown\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":29, \"keyList\":[{\"filter-type\":\"item\",\"var-name\":\"f1\", \"col-pos\":1}, {\"var-name\":\"f2\", \"var-value\":\"f1\"}]}}]}',NULL),
(11,'Mode of Servicewise Sales Report','Inventory','Reports','Inventory','SELECT sim.MODE_OF_SERVICE, (SELECT Price_List_Name from $master_db.Price_Lists where Price_List_ID=sim.MODE_OF_SERVICE)as \'Mode\',  SUM(Total) as \'Total\' from $trans_db.Sales_Invoice_Main sim where  ( `TimeStamp`>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and `TimeStamp`<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')) group by MODE_OF_SERVICE','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[2], \"Hide\":[0], \"width-list\":[40,20], \"align-list\":[0,1], \"print-cols\":[1,2], \"stretch\":1}',NULL,NULL),
(12,'Time Based Sales Report','Inventory','Reports','Inventory','SELECT CONCAT(\'Hour : \',HOUR(`TimeStamp`)) as Hour, SUM(Total) as Amount, Count(Voucher_No) as Count  FROM $trans_db.Sales_Invoice_Main Where Voucher_No in (SELECT Voucher_No from $trans_db.Sales_Invoice_Main stable  WHERE str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') <=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')) GROUP BY HOUR(`TimeStamp`) ORDER BY HOUR(`TimeStamp`)','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[1,2],  \"width-list\":[20,20,20], \"align-list\":[0,1,1], \"print-cols\":[0,1,2], \"stretch\":1}',NULL,NULL),
(13,'Day Book','Finance','Reports','Finance','SELECT \'V\' as Ind, subq.Voucher_ID, subq.Voucher_Prefix, subq.Voucher_Type, subq.Ledger_ID , (SELECT ledger_name FROM $master_db.Ledger_Master where ledger_id = subq.Ledger_ID) AS Ledger, subq.Voucher_Date \'Voucher Date\', subq.Voucher_ID \'Voucher No\', subq.Voucher_Type as \'Voucher Type\', case when subq.deb>0 then subq.deb else 0 end as Debit, case when subq.cred>0 then subq.cred else 0 end as Credit FROM ( SELECT Ledger_ID, Credit_Amount-Debit_Amount as cred, Debit_Amount-Credit_Amount as deb, Voucher_Date, Voucher_ID, Voucher_Prefix, Voucher_Type, MIN(_id) From $trans_db.Transaction_Helper Where Voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND Voucher_Date <=str_to_date(\'$toDateTime\',\'%Y-%m-%d\') GROUP BY Voucher_ID, Voucher_Type ORDER BY Voucher_Date, Cast(Voucher_ID as unsigned), Voucher_Type ) subq','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[9,10], \"Hide\":[0,1,2,3,4], \"width-list\":[20,20,20,20,20,20], \"align-list\":[0,0,0,0,1,1], \"print-cols\":[5,6,7,8,9,10], \"stretch\":5}',NULL,NULL),
(14,'Ledger Report','Finance','Reports','Finance','SELECT \'V\' as Ind, A.Voucher_ID, A.Voucher_Prefix, A.Voucher_Type, Ledger, A.Voucher_Date as \'Date\', A.Voucher_ID as \'Voucher NO\', A.Voucher_Type as \'Voucher Type\', DrAmount as \'Dr Amount\', CrAmount as \'Cr Amount\',  case when running_bal<0 then concat(-1 *running_bal, \' Cr\') else concat(running_bal, \' Dr\') end as \'Running Balance\' FROM ( with subq as (SELECT Against_Ledger, sum(Credit_Amount) as cred,sum(Debit_Amount) as deb,  Voucher_Date, Voucher_ID, Voucher_Type, Voucher_Prefix  From $trans_db.Transaction_Helper Where Ledger_ID=\'$f1\'  GROUP BY Voucher_ID, Voucher_Type, voucher_prefix  ORDER BY Voucher_Date, cast(voucher_id as int), Voucher_Type, _id ) SELECT (SELECT ledger_name FROM $master_db.Ledger_Master where ledger_id = subq.Against_Ledger) AS LEDGER,  subq.Voucher_Date , subq.Voucher_ID , subq.Voucher_Type ,  case when subq.deb  > 0 then subq.deb else 0 end as \'DrAmount\',  case when subq.cred  > 0 then subq.cred else 0 end as \'CrAmount\',  subq.Voucher_Prefix , sum(subq.deb - subq.cred)  OVER (ORDER BY voucher_date, cast(voucher_id as int), voucher_type) as running_bal  from subq  group by subq.voucher_type, subq.voucher_id, subq.voucher_prefix ) A  WHERE Voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND Voucher_Date <=str_to_date(\'$toDateTime\',\'%Y-%m-%d\') order by Voucher_Date, cast(voucher_id as int), voucher_type\r\n','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"ledger\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[8,9], \"Hide\":[0,1,2,3],  \"width-list\":[20,15,15,15,20,20], \"align-list\":[0,0,0,0,1,1], \"print-cols\":[4,5,6,7,8,9,10], \"stretch\":4, \"additional\":[{\"widget-name\":\"Opening Balance\", \"widget-type\":\"QLabel\", \"value-type\":\"amount\", \"value-from\":\"query\", \"query\":\"SELECT Round(SUM(Credit_Amount-Debit_Amount),2) FROM $trans_db.Transaction_Helper WHERE Ledger_ID= \'$f1\' AND Voucher_Date<str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') \", \"layout\":\"additionalLay1\", \"alignment\":\"right\"}, {\"widget-name\":\"Closing Balance\", \"widget-type\":\"QLabel\", \"value-type\":\"amount\", \"value-from\":\"query\", \"query\":\"SELECT Round(SUM(Credit_Amount-Debit_Amount),2) FROM $trans_db.Transaction_Helper WHERE Ledger_ID= \'$f1\' AND Voucher_Date<str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') + INTERVAL 1 DAY \", \"layout\":\"additionalLay2\", \"alignment\":\"right\"}]}',NULL,'[{\"widget-type\":\"QtMaterialFlatButton\", \"Layout\":\"filterLayout\", \"widget-id\":1, \"text\":\"Clear Dues\", \"action\":\"PendingBills\", \"widget-align\":\"AlignRight\"}]\r\n'),
(15,'Over-Due Bills By Ledger','Finance','Reports','Finance','SELECT \'V\' as Ind, RefNo, RefPrefix, RefType, min(VoucherDate) as \'Voucher Date\', RefNo as \'Voucher No\', RefType as \'Voucher Type\', (select sum(DebitAmount - creditAmount) from $trans_db.billwise_records where voucherNo = Ref.RefNo AND voucherType = Ref.RefType AND voucherPrefix = Ref.RefPrefix) as \'Bill Amount\', SUM(COALESCE(DebitAmount,0)) -  SUM(COALESCE(CreditAmount,0)) as \'Balance Amount\'  FROM $trans_db.Billwise_Records Ref WHERE Ref.LedgerId = \'$f1\' AND Ref.VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND (Method_Of_Adj<> \'ON ACC\' OR Method_Of_Adj IS NULL) GROUP BY RefNo, RefType, RefPrefix HAVING SUM(COALESCE(CreditAmount,0)) - SUM(COALESCE(DebitAmount,0)) <> 0 ORDER BY 1','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"ledger\"}],\"dateTime\":[\"toDateTime\"]}','{\"Totals\":[7,8], \"Hide\":[0,1,2,3],  \"width-list\":[25,15,25,15,20], \"align-list\":[0,0,0,1,1], \"print-cols\":[4,5,6,7,8], \"stretch\":6}',NULL,NULL),
(16,'Billwise Sales Report','Finance','Reports','Finance','SELECT \'V\' as Ind, Voucher_No, Voucher_Prefix, \'SALESVOUCHER\' as VoucherType, Voucher_Date as Date, cast(Voucher_No as unsigned) as Voucher, (SELECT Ledger_Name from $master_db.Ledger_Master where Ledger_ID=stable.Ledger_ID) as Ledger,Total as \'Total Amount\' From $trans_db.Sales_Invoice_Main stable WHERE  ( str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')>= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')) order BY cast(Voucher_No as unsigned) desc','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3],  \"width-list\":[15,15,30,20], \"align-list\":[0,1,0,1,0,1], \"print-cols\":[4,5,6,7], \"stretch\":6}',NULL,NULL),
(17,'Groupwise Outstanding','Finance','Reports','Finance','SELECT \'L\' as Ind, LEDGER_ID, LEDGER_NAME as Ledger, (CASE WHEN CLOSING < 0 THEN -1*CLOSING  ELSE NULL END) Debit,   (CASE WHEN CLOSING > 0 THEN CLOSING  ELSE NULL END) Credit FROM  (SELECT LED.LEDGER_NAME, LED.LEDGER_ID,   CAST( COALESCE(SUM(TRANS.CREDIT_AMOUNT),0) - COALESCE(SUM(TRANS.DEBIT_AMOUNT),0) AS DECIMAL(10,2)) AS CLOSING  FROM $master_db.Ledger_Master LED  INNER JOIN   (SELECT  GROUP_ID,          GROUP_NAME,          PARENT_ID   FROM    (SELECT * FROM $master_db.account_groups ORDER BY PARENT_ID, GROUP_ID) GROUPS_SORTED, (SELECT @PV := \'$f1\') INITIALISATION  WHERE   FIND_IN_SET(PARENT_ID, @PV)  AND     LENGTH(@PV := CONCAT(@PV, \',\', GROUP_ID))  UNION   SELECT  GROUP_ID,          GROUP_NAME,          PARENT_ID   FROM    $master_db.account_groups    WHERE GROUP_ID = \'$f1\') AS ACC_GROUP  ON LED.GROUP_ID = ACC_GROUP.GROUP_ID  LEFT OUTER JOIN $trans_db.TRANSACTION_HELPER TRANS  ON LED.LEDGER_ID = TRANS.LEDGER_ID  AND TRANS.VOUCHER_DATE <= \'$toDateTime\'  GROUP BY LED.LEDGER_ID)A  WHERE CLOSING <>0','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"account_group\"}],\"dateTime\":[\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1],  \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":15, \"keyList\":[{\"filter-type\":\"ledger\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}',NULL),
(18,'Salesman-wise Sales','Finance','Reports','Finance','SELECT \'E\' as Ind, sal.Salesman_ID, (SELECT Name FROM Employee_Details WHERE _id= sal.Salesman_ID) Name, COUNT(Voucher_No) Count,SUM(Total) Amount  FROM $trans_db.Sales_Invoice_Main sal  WHERE  ( str_to_Date(concat(sal.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(sal.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')) group by Salesman_ID','{\"dateTime\":[\"fromDateTime\", \"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1],  \"width-list\":[40,20,20], \"align-list\":[], \"print-cols\":[2,3,4], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":19, \"keyList\":[{\"filter-type\":\"employee\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}',NULL),
(19,'Billwise Report By Salesman','Finance','Reports','Finance','SELECT \'V\' as Ind, Voucher_No, Voucher_Prefix, \'SALESVOUCHER\' as Voucher_Type, Voucher_Date as \'Date\', Voucher_No as \'Voucher\', Total as Amount  FROM $trans_db.Sales_Invoice_Main sal WHERE  str_to_Date(concat(sal.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(sal.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') and Salesman_ID = \'$f1\'','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"employee\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[6], \"Hide\":[0,1,2,3],  \"width-list\":[40,20,20], \"align-list\":[], \"print-cols\":[4,5,6], \"stretch\":4}',NULL,NULL),
(20,'Discount Report','Finance','Reports','Finance','SELECT \'V\' as Ind , Voucher_No as \'Voucher No\',Voucher_Prefix,\'SALESVOUCHER\' as VoucherType,  Voucher_Date as \'Voucher Date\', Reference as Reference, cast(SUM(Discount_In_Amount) as Decimal(10,2)) as Discount FROM $trans_db.Sales_Invoice_Main stable  where Discount_In_Amount >0 and  ( str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')>= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')) GROUP BY Voucher_No Order BY Voucher_No\r\n','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[6], \"Hide\":[0,2,3],  \"width-list\":[40,20,20,20], \"align-list\":[0,0,0,1], \"print-cols\":[1,4,5,6], \"stretch\":0}',NULL,NULL),
(21,'Complimentary Report','Finance','Reports','Finance','SELECT \'V\' as Ind, main.Voucher_No, main.Voucher_Prefix, \'SALESVOUCHER\' VoucherType, main.Voucher_Date as \'Voucher Date\',  main.Voucher_No as \'Voucher No\', Cast(SUM(sa.Quantity*sa.Price) as DECIMAL(10,2)) as Amount, main.Reference FROM $trans_db.Sales_Invoice_Details sa join $trans_db.sales_invoice_main main on main.Voucher_No =sa.Voucher_No and main.voucher_prefix = sa.voucher_prefix Where str_to_Date(concat(main.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(main.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') and main.total = 0  GROUP BY main.Voucher_No, main.voucher_prefix Order BY main.Voucher_No','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[6], \"Hide\":[0,1,2,3],  \"width-list\":[40,20,20,20], \"align-list\":[], \"print-cols\":[4,5,6,7], \"stretch\":0}',NULL,NULL),
(22,'Shift Report','Finance','Reports','Finance','SELECT `_id`,`ShiftDate` \'Date\', `StartVoucherNo` \'From\' , `StopVoucherNo` \'To\',`SalesValue` Sales,  `CashSales` \'Cash Sales\', `CardSales` \'Card\', `CreditSales` \'Credit\',`PaymentCash`\'Payment Cash\', (SELECT name from  Employee_Details  where _id = shift.cashierID) as Cashier,`paxCount` PAX , `ShiftStart_DateTime` \'Start\' , `ShiftEnd_DateTime` \'END\',`TotalCash`\'Total Cash\' , `CasinCounter` \'Cash In Counter\' , `TillDifference` \'Till Difference\' , `Narration`,CashWithDrawn \'Cash WithDrawn\'   FROM $trans_db.`shifttable` shift  where  ( `ShiftDate`>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and `ShiftDate`<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\'))','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[4,5,6,7,8,10,13,14,15,17], \"Hide\":[0],  \"width-list\":[10,10,10,10,20,10,30,10,20,20,20,20,20,20,20,20,20], \"align-list\":[], \"print-cols\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17], \"stretch\":0}','{\"redirect-to\":[{\"default\":{\"id\":13, \"keyList\":[]}}]}',NULL),
(23,'Trial Balance','Finance','Reports','Finance','SELECT \'L\' as Ind, LEDGER_ID, LEDGER_NAME as \'Ledger Name\', (CASE WHEN CLOSING < 0 THEN -1*CLOSING  ELSE NULL END) DEBIT,   (CASE WHEN CLOSING > 0 THEN CLOSING  ELSE NULL END) CREDIT FROM  (SELECT LED.LEDGER_NAME, LED.LEDGER_ID, LED.LEDGER_TYPE, LED.GROUP_ID,  CAST(COALESCE(LED.OPENING_BALANCE,0)+  ROUND(COALESCE(SUM(TRANS.CREDIT_AMOUNT),0),2) - ROUND(COALESCE(SUM(TRANS.DEBIT_AMOUNT),0),2)  AS DECIMAL(10,2)) AS CLOSING FROM $master_db.Ledger_Master LED  LEFT OUTER JOIN $trans_db.TRANSACTION_HELPER TRANS  ON LED.LEDGER_ID = TRANS.LEDGER_ID  AND TRANS.VOUCHER_DATE <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')  GROUP BY LED.LEDGER_ID)A  WHERE CLOSING <>0 ORDER BY LEDGER_TYPE,GROUP_ID','{\"dateTime\":[\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1],  \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}','{\"redirect-to\":[{\"default\":{\"id\":14, \"keyList\":[{\"filter-type\":\"ledger\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}',NULL),
(24,'Itemwise Stock Report By Group And Godown And LPP','Inventory','Reports','Inventory','select \'I\' as Ind, A.item_id as Id,  Item_Name as Item,   cast(sum(Opening) as decimal(10,3)) as Opening,    cast(sum(Inward) as decimal(10,3)) as Inward,    cast(sum(Issue) as decimal(10,3)) as Issued ,    cast(sum(Opening)+sum(Inward)-sum(Issue) as decimal(10,3)) AS \'Closing Stock\',   round(coalesce(purch.price , coalesce(std_cost,0)) *(sum(Opening)+sum(Inward)-sum(Issue)),2)   as \'Stock Value\' from    (    select trans.VoucherDate vDate, ItemID as item_id,  (case when VoucherDate < str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') or VoucherDate is null then (dr_qty) - (cr_qty)  else 0 end) as Opening,  (case when VoucherDate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') then (dr_qty)  else 0 end )as Inward ,  (case when VoucherDate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') then (cr_qty) else 0 end )as Issue,   trans.Dr_Amount , trans.Cr_Amount  from $trans_db.Transaction_Item_Helper trans where      VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') UNION ALL  select trans.VoucherDate vDate, ItemID as item_id,  (case when VoucherDate < str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') or VoucherDate is null then (dr_qty) - (cr_qty)  else 0 end) as Opening,  (case when VoucherDate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') then (dr_qty)  else 0 end )as Inward ,  (case when VoucherDate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') then (cr_qty) else 0 end )as Issue,   trans.Dr_Amount , trans.Cr_Amount  from $trans_db.Transaction_BOM_Helper trans where      VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') ) A  inner join $master_db.Sales_Inventory_Items inv  on A.item_id = inv.item_id  left outer join (SELECT Inventory_Item_ID, Voucher_Date, Price  FROM (SELECT  *, ROW_NUMBER() OVER (PARTITION BY Inventory_Item_ID ORDER By Voucher_Date desc, _id desc) AS rn  FROM $trans_db.purchase_invoice_details where Voucher_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') ) x  WHERE rn = 1) purch  on A.item_id = purch.inventory_item_id  where inv.isStockItem = 1  group by inv.item_id   having sum(Opening)+sum(Inward)-sum(Issue) <> 0  order by Item','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"group\"}, {\"var-name\":\"f2\",\"var-value\":\"godown\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4,5,6,7], \"Hide\":[0,1],  \"width-list\":[30,20,20,20,20], \"align-list\":[0,1,1,1,1,1], \"print-cols\":[2,3,4,5,6,7], \"stretch\":2}',NULL,NULL),
(25,'Groupwise Stock Report By Godown And LPP','Inventory','Reports','Inventory','SELECT Ind, Id, Name, Opening, Inward, Issued, ClosingStock as \'Closing Stock\', StockValue \'Stock Value\' from ( select ItemGrp.Ind, ItemGrp.Id, Name,    cast(sum(Opening) as decimal(10,3)) as Opening,   cast(sum(Inward) as decimal(10,3)) as Inward,   cast(sum(Issue) as decimal(10,3)) as Issued ,   cast(sum(Opening)+sum(Inward)-sum(Issue) as decimal(10,3)) AS \'ClosingStock\',   cast(sum(Price) as decimal(10,3)) as \'StockValue\' from   ( select  item_id,  (case when vdate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and vdate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') then (creditQty) else 0 end )as Issue,  (case when vdate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and vdate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') then (debitQty)  else 0 end )as Inward,  (case when vdate <  str_to_date(\'$fromDateTime\',\'%Y-%m-%d\')  or vdate is null then (debitQty) - (creditQty)  else 0 end) as Opening,  cr_amount, dr_amount,  coalesce((SELECT Price from Purchase_Invoice_Details where Inventory_Item_ID= item_ID order by Voucher_Date desc limit 1), (select std_cost FROM Sales_Inventory_Items where item_id = A.item_id)) * (debitQty - creditQty) as Price  from   (  select trans.VoucherDate vDate, ItemID as item_id,  0 debitQty , (trans.Cr_Qty) creditQty,  trans.Dr_Amount , trans.Cr_Amount, \'FROM\' as type   from Transaction_Item_Helper trans where (1=1)  and VoucherDate <= str_to_date(\'2020-11-19\',\'%Y-%m-%d\') and (select isStockItem FROM Sales_Inventory_Items where itemID = item_ID) = 1  and From_Location like \'$f2\'  and To_Location not like \'OUT\'  UNION ALL  select trans.VoucherDate, ItemID,  (trans.Dr_Qty) , 0,  trans.Dr_Amount , trans.Cr_Amount, \'TO\' as type   from Transaction_Item_Helper trans where  (1=1)  and To_Location like \'$f2\'  and From_Location  like \'OUT\'  and VoucherDate <= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and (select isStockItem FROM Sales_Inventory_Items where itemID = item_ID) = 1  UNION ALL select trans.VoucherDate, ItemID as item_id,  0 , (trans.Cr_Qty),  trans.Dr_Amount , trans.Cr_Amount, \'FROM\' as type   from Transaction_Bom_Helper trans where (1=1)  and VoucherDate <= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and (select isStockItem FROM Sales_Inventory_Items where item_ID = itemID) = 1  and From_Location like \'$f2\'  and To_Location  like \'OUT\'  UNION ALL  select trans.VoucherDate, ItemID,  (trans.Dr_Qty) , 0,  trans.Dr_Amount , trans.Cr_Amount, \'TO\' as type   from Transaction_Bom_Helper trans where  (1=1)  and To_Location like \'$f2\'  and From_Location  like \'OUT\'  and VoucherDate <= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and (select isStockItem FROM Sales_Inventory_Items where item_ID = itemID) = 1  ) A where item_id is not null ) B  right outer join  (select ItemGrp1.group_name as Name, Item.item_id, \'G\' as Ind, ItemGrp1.group_id as Id from  Sales_Inventory_Items item inner join  (with recursive cte (group_id, group_name, parent_id, item_id) as (  select     grp.group_id,grp.group_name,grp.parent_id, item.item_id  FROM Sales_Inventory_Items item left outer join Sales_Inventory_Groups grp   on item.group_id = grp.group_id  union all   select     p.group_id, p.group_name,p.parent_id, item_id  from       Sales_Inventory_Groups p   inner join cte   on p.group_id = cte.parent_id ) select cte.group_name, cte.item_id, cte.group_id  from cte where cte.parent_id = \'$f1\' ) itemGrp1  on itemGrp1.item_id = item.item_id  union  select Item2.Item_name as Name, Item2.Item_id, \'I\' as ind, Item2.Item_Id as Id from  Sales_Inventory_Items Item2  where Item2.group_id = \'$f1\' ) ItemGrp on B.Item_Id = ItemGrp.Item_Id   group by Name ) X $f3 order by Name','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"group\"}, {\"var-name\":\"f2\",\"var-value\":\"godown\"}, {\"var-name\":\"f3\", \"var-value\" : \"query\", \"queryString\": \" having (Inward) <> 0 or (Issued) <> 0 or ClosingStock <> 0 \", \"var-type\" : \"flag\" , \"display-text\" : \"Hide 0 stock Items\", \"default\": \"\", \"default-state\":true}, {\"var-name\":\"f4\", \"var-value\" : \"query\", \"queryString\": \"OUT\", \"var-type\" : \"flag\" , \"display-text\" : \"Hide Godown Transfer\", \"default\": \"%\", \"default-state\":true}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4,5,6,7], \"Hide\":[0,1],  \"width-list\":[30,20,20,20,20], \"align-list\":[0,1,1,1,1,1], \"print-cols\":[2,3,4,5,6,7], \"stretch\":2}',NULL,NULL),
(26,'GST Report By HSN','Finance','Reports','Finance','select HSN_Code as \'HSN Code\', cast(Taxable_Value as decimal(10,2)) as \'Taxable Value\', Vat_Rate as \'Tax Rate\', cast(max(CGST) as decimal(10,2)) as CGST, cast(Max(SGST) as decimal(10,2)) SGST, cast(Max(IGST) as decimal(10,2)) IGST, cast(Taxable_Value + max(cgst) + max(sgst) + max(igst) as decimal(10,2)) as \'Total\' from ( SELECT HSN_Code as \'HSN Code\', abs(sum(cr_amount - dr_amount)) as Taxable_Value, Vat_Rate, ledger_id, ( case when Ledger_ID like \'0x2x14xOCG%\' then ABS(SUM(Credit_Amount-Debit_Amount)) else 0 end) as CGST, ( case when Ledger_ID like \'0x2x14xOSG%\' then ABS(SUM(Credit_Amount-Debit_Amount)) else 0 end) as SGST, ( case when Ledger_ID like \'0x2x14xOIG%\' then ABS(SUM(Credit_Amount-Debit_Amount)) else 0 end) as IGST From $trans_db.Transaction_Helper trans join $trans_db.transaction_item_helper itemtrans on trans.voucher_id = itemtrans.voucherID  join $master_db.Sales_Inventory_Items item on itemtrans.itemid = item.item_id  where ( (item.Vat_Rate = 5 and (Ledger_ID = \'0x2x14xOCG25\' or ledger_id = \'0x2x14xOSG25\')) OR (item.Vat_Rate = 12 and (Ledger_ID = \'0x2x14xOCG6\' or ledger_id = \'0x2x14xOSG6\')) OR (item.Vat_Rate = 18 and (Ledger_ID = \'0x2x14xOCG9\' or ledger_id = \'0x2x14xOSG9\')) OR (item.Vat_Rate = 28 and (Ledger_ID = \'0x2x14xOCG14\' or ledger_id = \'0x2x14xOSG14\')) ) and voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and voucher_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') group by hsn_code, ledger_id ) A group by HSN_Code','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[1,3,4,5,6], \"Hide\":[], \"width-list\":[30,15,15,15,15,15,15], \"align-list\":[0,1,0,1,0,1,0,1], \"print-cols\":[1,2,3,4,5,6,7], \"stretch\":1}',NULL,NULL),
(27,'Cess Report','Finance','Reports','Finance','SELECT \'V\' as Ind, Voucher_ID as \'Voucher No\', Voucher_Prefix, Voucher_Type, SUM(Credit_Amount-Debit_Amount) as \'Cess Amount\'  From $trans_db.Transaction_Helper where Ledger_ID=\'0x2x14xCess\' and voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and voucher_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') and Voucher_Type=\'SALESVOUCHER\' group by Voucher_ID, Voucher_Prefix','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[4], \"Hide\":[0,2,3],  \"width-list\":[40,20,20,20], \"align-list\":[], \"print-cols\":[1,4], \"stretch\":1}',NULL,NULL),
(28,'Item Movement Detailed By Ledger','Inventory','Reports','Inventory','SELECT \'V\' as Ind, VoucherId, VoucherPrefix, VoucherType, date(VOUCHERDATE) as \'Voucher Date\' , cast(VOUCHERID as Integer) as \'Voucher No\' , VOUCHERTYPE as \'Voucher Type\' ,   CAST(SUM(CR_QTY) AS DECIMAL(10,2)) as \'Outward\' , CAST(SUM(DR_QTY) AS DECIMAL(10,2)) as \'Inward\'  FROM $trans_db.TRANSACTION_ITEM_HELPER WHERE ITEMID = \'$f1\' AND VOUCHERDATE >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND VOUCHERDATE <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') AND (case when To_Location = \'OUT\' then To_Ledger else From_Ledger end ) = \'$f2\' GROUP BY  VOUCHERTYPE, VOUCHERID, VOUCHERPREFIX  ORDER BY 1, VOUCHERTYPE, 2, VOUCHERPREFIX','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"item\"}, {\"var-name\":\"f2\",\"var-value\":\"ledger\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7,8], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7,8]}',NULL,NULL),
(29,'Godownwise Billwise Sales','Inventory','Reports','Inventory','SELECT \'V\' as Ind, VoucherID,  VoucherPrefix, VoucherType, VoucherDate as \'Date\', VoucherID as Voucher, (select ledger_name from $master_db.ledger_master where ledger_id = to_ledger) as Ledger,  (CR_QTY) as Quantity, (Cr_Amount) as Value  FROM $trans_db.transaction_item_helper  Where from_location like \'$f2\' AND VoucherDate >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND VoucherDate <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') and ItemID =\'$f1\'','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"item\"}, {\"var-name\":\"f2\",\"var-value\":\"godown\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7,8], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7,8]}',NULL,NULL),
(30,'Sales Voucher Register','Finance','Registers','SALESVOUCHER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'SALESVOUCHER\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Sales_Invoice_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(31,'Ledgerwise Transaction Summary','Finance','Reports','Finance','SELECT \'L\' as Ind, Ledger_Id, (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_Id = trans.Ledger_Id) as \'Ledger\',  SUM(Credit_Amount) as \'Credit Amount\', SUM(Debit_Amount) as \'Debit Amount\' FROM $trans_db.Transaction_Helper trans WHERE Voucher_Date >=\'$fromDateTime\' AND Voucher_Date <=\'$toDateTime\' AND Voucher_Type like \'$f1\' GROUP BY Ledger_ID ORDER BY Ledger','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"voucherType\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"width-list\":[30,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(32,'Sales Margin Report','Inventory','Reports','Inventory',' SELECT \'I\' as Ind,Item_ID, item_name as \'Item\',round(Quantity,3) as \'Sales Qty\',round(Subtotal,2) as \'Sales Amount\',round(Std_Cost,2) as \'Std Cost\',round(TotalCost,2) as \'Cost Total\',round(subTotal - Totalcost,2) as \'Margin Amount\',round(COALESCE((COALESCE(SubTotal,0)-COALESCE(TotalCost,0))*100/coalesce(TotalCost,0),0),2) as \'Margin %\' from  (  select inv.item_id, inv.item_name, det.Quantity, det.Subtotal,INV.STD_COST,INV.STD_COST * DET.QUANTITY as TotalCost FROM $master_db.Sales_Inventory_Items inv inner join (select inventory_item_id,sum(quantity) as Quantity,sum(subTotal) as SubTotal from $trans_db.Sales_Invoice_Details where voucher_Date >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') and voucher_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') group by inventory_item_id)det on inv.Item_ID = det.Inventory_Item_ID group by inv.Item_ID) A\r\n',' {\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[4,6,7], \"Hide\":[0,1], \"Key-col\":[1,2], \"width-list\":[20,15,15,15,15,20,20], \"align-list\":[0,1,1,1,1,1,1], \"print-cols\":[2,3,4,5,6,7,8], \"stretch\":2}\r\n',NULL,NULL),
(33,'Datewise Sales Report','Finance','Reports','Finance','SELECT  Date_format(Voucher_Date,\'%d-%m-%Y\') as \'Date\', cast(COALESCE(sum(Gross_Total),0.00) as Decimal(10,2)) As \'Taxable Amount\', cast(COALESCE(SUM(VAT_Amount),0) as decimal(10,2)) as \'Vat Amount\', Cast(COALESCE(SUM(Total),0) as Decimal(10,2)) as \'Total Amount\'  FROM $trans_db.Sales_Invoice_Main WHERE `TimeStamp` >=\'$fromDateTime\' AND `TimeStamp`<=\'$toDateTime\'  GROUP By(Voucher_Date)\r\n','\r\n  {\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[1,2,3], \"Hide\":[], \"Key-col\":[1,2], \"width-list\":[25,25,25,25], \"align-list\":[0,1,1,1], \"print-cols\":[0,1,2,3]}',NULL,NULL),
(34,'Customer List','Finance','Reports','Finance','SELECT DISTINCT \'Phone\' as Ind, cust.phone_number as \'Phone\' ,cust.Name, cust.Address FROM $trans_db.Sales_Invoice_Main tab JOIN $master_db.address_book  cust ON cust.phone_number =tab.POC_Phone where  tab.Voucher_Date>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and  tab.Voucher_Date<=str_to_date(\'$toDateTime\',\'%Y-%m-%d\') and tab.POC_Phone <> \'\'','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[], \"Hide\":[0],  \"width-list\":[10,10,40,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[1,2,3], \"stretch\":2}','	{\"redirect-to\":[{\"default\":{\"id\":41, \"keyList\":[{\"filter-type\":\"phone\",\"var-name\":\"f1\", \"col-pos\":1}]}}]}\r\n',NULL),
(35,'Deleted Billwise Sales Report','Finance','Reports','Finance','SELECT \'L\' as Ind,ledger_id, Voucher_Date as Date,cast(Voucher_No as unsigned) as Voucher_No,(SELECT Ledger_Name from $master_db.Ledger_Master where Ledger_ID=stable.Ledger_ID) as Ledger,Total as \'Total Amount\', Voucher_Prefix From $trans_db.Sales_Invoice_Main_Deleted stable WHERE ( str_to_Date(concat(stable.Voucher_Date,substr(`TimeStamp`,11,19)),\'%Y-%m-%d %H:%i:%s\')<= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') and str_to_Date(concat(stable.Voucher_Date, substr(`TimeStamp`,11,19)) ,\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\')) order BY cast(Voucher_No as unsigned) desc','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[5], \"Hide\":[0,1,6], \"Key-col\":[1,2], \"width-list\":[10,10,40,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[2,3,4,5]}',NULL,NULL),
(36,'Itemwise Purchase Orders','Inventory','Reports','Inventory','SELECT \'I\' as Ind,inventory_item_id,(select item_name FROM $master_db.Sales_Inventory_Items where item_id = Inventory_Item_ID) as Item,SUM(Quantity) as Quantity FROM (SELECT Inventory_Item_ID,Quantity FROM $trans_db.Purchase_Order_Main main JOIN $trans_db.Purchase_Order_Details det ON main.Voucher_No = det.Voucher_No WHERE main.Voucher_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND main.Voucher_Date >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\')) items GROUP BY Inventory_Item_ID order by 1','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3], \"Hide\":[0,1], \"Key-col\":[1,2], \"width-list\":[80,20], \"align-list\":[0,1], \"print-cols\":[2,3],\"stretch\":2}\r\n',NULL,NULL),
(37,'Notifications','Finance','Reports','Finance','SELECT max(id),  (SELECT Ledger_Name FROM $master_db.Ledger_Master where DbName = FromDBName) as \'From Ledger\',TypeOfData as Type, max(Time_Stamp) as \'Received Time\',  (case when min(Action) = 1001 then \'NEW\' when min(Action) = 1002 then \'UPDATE\' when min(Action) = 1003 then \'DELETE\' end) as Action,  case when TypeOfData = \'Voucher\' then  json_extract(Notification_Data, \'$.Voucher_Type\')  when TypeOfData = \'Inventory Item\' then  json_extract(Notification_Data, \'$.BaseItem.Item_Name\') when TypeOfData = \'Inventory Group\' then  json_extract(Notification_Data, \'$.GroupName\') when TypeOfData = \'Brand\' then  json_extract(Notification_Data, \'$.Brand_Name\') when TypeOfData = \'UOM\' then  json_extract(Notification_Data, \'$.UomName\') when TypeOfData = \'Acknowledgement\' then  concat( json_extract(Notification_Data, \'$.Status\'))  end as Description  FROM ReceiveChannel WHERE Status = 0 GROUP BY Generated_TransactionID',NULL,'{\"Totals\":[], \"Hide\":[0], \"Key-col\":[1,2], \"width-list\":[10,10,40,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7,8], \"stretch\":}\r\n',NULL,NULL),
(38,'Visitors List',NULL,'Reports',NULL,'SELECT substr(`DATEVAL`,1,10) as Date, substr(`DATEVAL`, 12,8) as Time, `NAME` as Name, `PHONENUMBER` as Phone , `ADDRESS` as Address , `TEMPERATURE` as Temperature FROM `visitorsregister` WHERE TIME_STAMP >= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND TIME_STAMP <= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[], \"Hide\":[], \"Key-col\":[1,2], \"width-list\":[10,10,40,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7,8], \"stretch\":}',NULL,NULL),
(39,'Pending Orders','Inventory','Reports','Inventory','SELECT \'V\' as Ind, Voucher_No as \'Voucher No\', Voucher_Prefix,\'SALES ORDER\' as voucher_type, Voucher_Date as \'Booking Date\', Delivery_Date as \'Delivery Date\', POC_Name as \'Customer Name\', Total as \'Total Amount\'  FROM $trans_db.Sales_Order_Main WHERE Delivery_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Delivery_Date >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND VoucherStatus < 170 ORDER BY Delivery_Date, Voucher_No','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"Key-col\":[1,2], \"width-list\":[20,20,20,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7], \"stretch\":6, \"tabs\":[{ \"tab-name\":\"Orders\", \"tab-pos\":0, \"current-tab\":1}, { \"tab-name\":\"Itemwise\", \"tab-pos\":1, \"current-tab\":0}]}','{\"redirect-to\":[{\"tabs\":[{\"id\":60, \"tab-pos\":1}]}]}',NULL),
(40,'Itemwise Purchase Report','Inventory','Reports','Inventory','SELECT \'I\' as Ind,inventory_item_id,(SELECT ITEM_NAME FROM $master_db.Sales_Inventory_Items WHERE ITEM_ID = INVENTORY_ITEM_ID) AS Item,SUM(QUANTITY) as Qty, SUM(SUBTOTAL) as Amount FROM $trans_db.PURCHASE_INVOICE_DETAILS WHERE VOUCHER_DATE >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND VOUCHER_DATE <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') GROUP BY INVENTORY_ITEM_ID ORDER BY 1','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[4], \"Hide\":[0,1], \"Key-col\":[1,2], \"width-list\":[60,20,20], \"align-list\":[1,0,0], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(41,'Customerwise Itemwise Sales Report','Finance','Reports','Finance','SELECT \'I\' as Ind, INV.Item_ID as ID, INV.Item_Name as ITEM, SALES.Quantity,  SALES.Subtotal from Sales_Inventory_Items as INV LEFT outer JOIN  (SELECT Inventory_Item_ID,SUM(SALES.Quantity ) as Quantity,  SUM(SALES.Subtotal )  as SubTotal  from Sales_Invoice_Details as SALES  JOIN Sales_Invoice_Main main  ON SALES.Voucher_No = main.Voucher_No WHERE str_to_Date(concat(main.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') >=str_to_Date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_Date(concat(main.Voucher_Date, substr(`TimeStamp`, 11,19)) ,\'%Y-%m-%d %H:%i:%s\') <=str_to_Date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND main.POC_Phone like \'$f1\' group by SALES.Inventory_Item_ID ) as SALES on  INV.Item_Id=SALES.Inventory_Item_ID where COALESCE(SALES.Quantity,0)>0','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"phone\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"Key-col\":[1], \"width-list\":[10,10,40,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7,8], \"stretch\":0}',NULL,NULL),
(43,'Payment Voucher Summary','Finance','Reports','Finance','SELECT  \'L\', trans.Ledger_ID,  led.Ledger_Name as \'Ledger\', SUM(Credit_Amount) as \'Cr Amount\',  SUM(Debit_Amount) as \'Dr Amount\' FROM $trans_db.Transaction_Helper trans JOIN $master_db.Ledger_Master led  ON trans.ledger_id = led.ledger_id  WHERE Voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Voucher_Date <=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Voucher_Type = \'PaymentVoucher\' GROUP BY trans.Ledger_ID ORDER BY Ledger','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3,4], \"Hide\":[0,1], \"Key-col\":[1,2], \"width-list\":[30,30], \"align-list\":[0,1], \"print-cols\":[2,3]}',NULL,NULL),
(44,'Receipt Voucher Summary','Finance','Reports','Finance','SELECT  \'L\', trans.Ledger_ID,  led.Ledger_Name as \'Ledger\', SUM(Credit_Amount) as \'Cr Amount\',  SUM(Debit_Amount) as \'Dr Amount\' FROM $trans_db.Transaction_Helper trans JOIN $master_db.Ledger_Master led  ON trans.ledger_id = led.ledger_id  WHERE Voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Voucher_Date <=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Voucher_Type = \'ReceiptVoucher\' GROUP BY trans.Ledger_ID ORDER BY Ledger','\r\n{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}\r\n','{\"Totals\":[3,4], \"Hide\":[0,1], \"Key-col\":[1,2], \"width-list\":[30,30], \"align-list\":[0,1], \"print-cols\":[2,4]}\r\n',NULL,NULL),
(45,'Purchase Voucher Register','Finance','Registers','PURCHASEVOUCHER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'PURCHASEVOUCHER\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Purchase_Invoice_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(46,'Sales Order Register','Finance','Registers','SALESORDER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'SALESORDER\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total,  VoucherStatus as \'Status\', POC_Phone as Phone, POC_Name as Name FROM $trans_db.Sales_Order_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,10,10,10,20,20], \"align-list\":[0,0,0,1,1,1,0], \"print-cols\":[4,5,6,7,8,9,10]}',NULL,NULL),
(47,'Purchase Order Register','Finance','Registers','PURCHASEORDER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'PURCHASEORDER\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Purchase_Order_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(48,'Payment Voucher Register','Finance','Registers','PAYMENTVOUCHER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'PAYMENTVOUCHER\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Payment_Voucher_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,'[{\"widget-type\":\"QtMaterialFlatButton\", \"Layout\":\"filterLayout\", \"widget-id\":1, \"text\":\"Print Details List\", \"action\":\"printList\", \"widget-align\":\"AlignRight\", \"query\":\"SELECT main.Voucher_Date,  main.Voucher_No , (select ledger_name from $master_db.ledger_master led where led.ledger_id = det.Ledger_ID ) \'Ledger\', ( select ledger_name from ledger_master led where led.ledger_id = main.Ledger_ID ) \'Mode Of Pay\', Dr_Amount  as Amount,  main.Narration  FROM $trans_db.Payment_Voucher_Main main JOIN $trans_db.Payment_Voucher_Details  det ON main.Voucher_No  = det.Voucher_No  AND main.Voucher_Prefix  = det.Voucher_Prefix  where  main.Voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\')  and  main.Voucher_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')  order by 1\"}]'),
(49,'Receipt Voucher Register','Finance','Registers','RECEIPTVOUCHER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'RECEIPTVOUCHER\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Receipt_Voucher_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(50,'Journal Register','Finance','Registers','JOURNALVOUCHER','SELECT \'V\' ,  som.Voucher_No, som.Voucher_Prefix, \'JOURNALVOUCHER\',  som.Voucher_Date as \'Voucher Date\',  CONCAT(som.Voucher_Prefix, \'-\', som.Voucher_No) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= det.Ledger_Id) Ledger,  det.total  FROM $trans_db.Journal_Voucher_Main som  JOIN (SELECT Voucher_ID, Voucher_Prefix,  Sum(credit_amount) as total, Ledger_Id FROM $trans_db.Transaction_Helper WHERE Voucher_Type = \'JOURNALVOUCHER\' GROUP BY Voucher_ID, Voucher_Type, Voucher_Prefix  ) det ON som.Voucher_No = det.Voucher_ID AND som.Voucher_Prefix = det.Voucher_Prefix WHERE str_to_date(concat(som.Voucher_Date,\' \',CAST(som.`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(som.Voucher_Date,\' \',CAST(som.`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(51,'Delivery Note Register','Inventory','Registers','DELIVERYNOTE','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'DELIVERYNOTE\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Delivery_Note_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(52,'Receipt Note Register','Inventory','Registers','RECEIPTNOTE','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'RECEIPTNOTE\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Receipt_Note_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(53,'Credit Note Register','Finance','Registers','CREDITNOTE','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'CREDITNOTE\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Credit_Note_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(54,'Debit Note Register','Finance','Registers','DEBITNOTE','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'DEBITNOTE\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Debit_Note_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(56,'Wastage Entries','Inventory','Registers','WASTAGEENTRY','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'WASTAGEENTRY\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', Total FROM $trans_db.Wastage_Entry_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30], \"align-list\":[0,0,1], \"print-cols\":[4,5,6]}',NULL,NULL),
(57,'Stock Request/Issue','Inventory','Registers','Stock Request','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'Stock Request\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (select godown_name from $master_db.godown where godown_id = to_location) as \'To Section\' FROM $trans_db.Stock_Request_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`Time_Stamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`Time_Stamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(58,'Stock Journal','Inventory','Registers','STOCKJOURNAL','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'STOCKJOURNAL\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', Total FROM $trans_db.Stock_Journal_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30], \"align-list\":[0,0,1], \"print-cols\":[4,5,6]}',NULL,NULL),
(59,'Current Stock Entry','Inventory','Registers','STOCK','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'STOCK\',  Voucher_Date as \'Voucher Date\', CAST(Voucher_No as int) as \'Voucher No\', Total FROM $trans_db.Stock_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30], \"align-list\":[0,0,1], \"print-cols\":[4,5,6]}',NULL,NULL),
(60,'Pending Orders','Inventory','Reports','Inventory','SELECT \'I\' as Ind, inventory_item_id as ID, (select item_name FROM $master_db.Sales_Inventory_Items where item_id = Inventory_Item_ID) as Item,  SUM(Quantity) as Quantity FROM  ( SELECT Inventory_Item_ID , Quantity FROM $trans_db.Sales_Order_Main main  JOIN $trans_db.Sales_Order_Details det  ON main.Voucher_No = det.Voucher_No WHERE Delivery_Date <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Delivery_Date >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND VoucherStatus < 170 ) items GROUP BY Inventory_Item_ID','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[3], \"Hide\":[0,1], \"Key-col\":[1,2], \"width-list\":[50,50], \"align-list\":[0,1], \"print-cols\":[2,3], \"stretch\":2, \"tabs\":[{ \"tab-name\":\"Orders\", \"tab-pos\":0, \"current-tab\":0}, { \"tab-name\":\"Itemwise\", \"tab-pos\":1, \"current-tab\":1}]}','{\"redirect-to\":[{\"tabs\":[{\"id\":39, \"tab-pos\":0}]}]}',NULL),
(61,'Datewise Purchase Report','Finance','Reports','Finance','SELECT  Date_format(Voucher_Date,\'%d-%m-%Y\') as \'Date\', cast(COALESCE(sum(Gross_Total),0.00) as Decimal(10,2)) As \'Taxable Amount\', cast(COALESCE(SUM(VAT_Amount),0) as decimal(10,2)) as \'Vat Amount\', Cast(COALESCE(SUM(Total),0) as Decimal(10,2)) as \'Total Amount\'  FROM $trans_db.Purchase_Invoice_Main WHERE `TimeStamp` >=\'$fromDateTime\' AND `TimeStamp`<=\'$toDateTime\'  GROUP By(Voucher_Date)','\r\n  {\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[1,2,3], \"Hide\":[], \"Key-col\":[1,2], \"width-list\":[25,25,25,25], \"align-list\":[0,1,1,1], \"print-cols\":[0,1,2,3]}',NULL,NULL),
(62,'Inventory Groups','Inventory','Masters','G','SELECT \'G\', Group_Id as \'Group Id\', Group_Name as \'Group Name\', (SELECT Group_Name FROM Sales_Inventory_Groups B  WHERE B.Group_Id = A.Parent_ID) as \'Parent Group\', Group_Type as \'Group Type\'  FROM Sales_Inventory_Groups A',NULL,'{ \"Hide\":[0,1], \"width-list\":[30,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(63,'Inventory Items','Inventory','Masters','I','SELECT  \'I\', Item_Id as \'ItemID\' , Item_Name as \'Item\' , Item_Code as \'Code\' , Price as \'Std Rate\' , (Select Brand_Name from Brands WHERE _id= INV.Brand_Id) AS Brand, (SELECT Group_Name from Sales_Inventory_Groups WHERE Group_Id = INV.Group_Id) as \'Group\'  FROM Sales_Inventory_Items INV WHERE 1 ORDER BY Item_Name',NULL,'{ \"Hide\":[0,1,5], \"width-list\":[40,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4,6], \"stretch\":2}',NULL,NULL),
(64,'Units of Measurement','Inventory','Masters','U','SELECT  \'U\', UOM_ID, UOM_Name as \'UOM Name\', UOM_Decimal_Points as \'UOM Decimal Points\', UOM_Symbol \'UOM Symbol\', UOM_Narration as \'UOM Narration\' FROM UOMLIST',NULL,'{ \"Hide\":[0,1], \"width-list\":[40,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4,5], \"stretch\":0}',NULL,NULL),
(65,'Unit Conversions','Inventory','Masters','UC','SELECT  \'U\', UOM_ID, UOM_Name as \'UOM Name\', UOM_Decimal_Points as \'UOM Decimal Points\', UOM_Symbol as \'UOM Symbol\', UOM_Narration as \'UOM Narration\' FROM UOMLIST\r\n',NULL,'{ \"Hide\":[0,1], \"width-list\":[40,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(66,'Price Lists','Inventory','Masters','Pl','SELECT  \'Pl\', Price_List_ID , Price_List_Name \'Price List\', Price_List_Start_Date \'Start Date\', Price_List_End_Date \'End Date\'  FROM Price_Lists',NULL,'{ \"Hide\":[0,1], \"width-list\":[40,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(67,'Godowns','Inventory','Masters','Gd',' Select  \'Gd\', Godown_ID as Godown, Godown_Name as\'Godown Name\', Godown_Location as \'Godown Location\' from GODOWN',NULL,'{ \"Hide\":[0,1], \"width-list\":[50,50], \"align-list\":[0,0], \"print-cols\":[2,3], \"stretch\":0}',NULL,NULL),
(68,'Account Groups','Finance','Masters','A','SELECT  \'A\', Group_Id as \'Group Id\', Group_Name as \'Group Name\', (SELECT Group_Name FROM account_groups B  WHERE B.Group_Id = A.Parent_ID) as \'Parent Group\'  FROM account_groups A ORDER BY _id',NULL,'{ \"Hide\":[0,1], \"width-list\":[50,50], \"align-list\":[0,0], \"print-cols\":[2,3]}',NULL,NULL),
(69,'Ledgers','Finance','Masters','L','SELECT  \'L\', Ledger_ID as \'Ledger Id\', Ledger_Name as \'Ledger Name\', (SELECT Group_Name FROM account_groups WHERE Group_Id = LED.Group_Id) as \'Group\'  FROM Ledger_Master LED order by Ledger_Name',NULL,'{ \"Hide\":[0,1], \"width-list\":[50,50], \"align-list\":[0,0], \"print-cols\":[2,3]}',NULL,NULL),
(70,'Employees','HR','Masters','E','SELECT  \'E\', _id, Name, Designation, Department FROM employee_details order by Name',NULL,'{ \"Hide\":[0,1], \"width-list\":[40,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(71,'Attendance Report','HR','Reports',NULL,'select employee_id,  Employee, worked_days as \'Worked Days\',  total_num_of_Days - worked_days as \'No.of Leaves Taken\',   OverTime from  ( SELECT a.Employee_Id, E.Name as Employee,  sum(case when a.Working_Hours >0 and HalfDay =0 then 1  when a.Working_Hours >0 and HalfDay = 1 then 0.5 else 0 end ) as worked_days ,  case when E.date_of_joining  >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') then datediff(str_to_date(\'$toDateTime\',\'%Y-%m-%d\'), date_of_joining) else  datediff(str_to_date(\'$toDateTime\',\'%Y-%m-%d\'), str_to_date(\'$fromDateTime\',\'%Y-%m-%d\')) end as total_num_of_days,  sum(a.Overtime) as OverTime  FROM Attendance_Details a JOIN Employee_Details E ON A.Employee_Id = E._id  WHERE Working_Day >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and Working_Day <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') group by Employee_Id) X ','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Hide\":[0,1],  \"width-list\":[30,20,20], \"align-list\":[1,1,1], \"print-cols\":[2,3,4], \"stretch\":0}',NULL,NULL),
(72,'Payslip Report','HR','Reports',NULL,' select \'E\', employee_id,  ( select name from   Employee_Details   where _id = X.employee_id) Employee,  worked_days as \'No of \\n Days Worked\', total_num_of_days as \'Total no of \\n Working days\', basic_salary as \'Basic Salary\', hra \'HRA\', da \'DA\', conveyance \'Conveyance\',  total_num_of_Days - worked_days as \'Total leave taken\',  paid_leave \'Paid leave\',  basic_salary/total_num_of_days*(total_num_of_Days - worked_days - paid_leave) as \'Salary \\n Deducted\' ,  OverTime \'Overtime \\n (hours)\' ,OverTime_Pay \'Overtime Pay\' ,  basic_salary+ da+ hra + conveyance - (basic_salary/total_num_of_days*(total_num_of_Days - worked_days - paid_leave)) + OverTime_Pay as \'Total Salary\' from ( SELECT s.Employee_Id,  sum(case when a.Working_Hours >0 and HalfDay =0 then 1  when a.Working_Hours >0 and HalfDay = 1 then 0.5 else 0 end ) as worked_days ,  case when E.date_of_joining  >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') then datediff(str_to_date(\'$toDateTime\',\'%Y-%m-%d\'), date_of_joining) else  datediff(str_to_date(\'$toDateTime\',\'%Y-%m-%d\'), str_to_date(\'$fromDateTime\',\'%Y-%m-%d\')) end as total_num_of_days,  sum(a.Overtime) as OverTime, sum(a.OverTime) * s.OverTime_Pay  as OverTime_Pay,  s.Basic_Salary, s.HRA, s.DA , s.Conveyance, s.Monthly_Leave as paid_leave   FROM Attendance_Details a JOIN Employee_Details E ON a.Employee_Id = E._id  join Employee_Salary_Details s on a.Employee_Id = s.Employee_ID WHERE Working_Day >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') and Working_Day <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\') group by Employee_Id) X ','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Hide\":[0,1],  \"width-list\":[20,20,20,20,20,20,20,20,20,20,20,20,20], \"align-list\":[0,1,1,1,1,1,1,1,1,1,1,1,1], \"print-cols\":[2,3,4,5,6,7,8,9,10,11,12,13,14], \"stretch\":0}',NULL,NULL),
(73,'Passport Expiry List','HR','Reports',NULL,'SELECT \'E\', _id, Name, Passport_Expiry FROM Employee_Details WHERE DATEDIFF(Passport_Expiry, CURRENT_DATE ) <= $f1','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"Expiry within (months) \"}]}','{\"Hide\":[0,1],  \"width-list\":[30,20], \"align-list\":[0,1], \"print-cols\":[2,3], \"stretch\":2}',NULL,NULL),
(74,'Visa Expiry List','HR','Reports',NULL,'SELECT \'E\', _id, Name, Visa_Expiry FROM Employee_Details WHERE DATEDIFF(Visa_Expiry, CURRENT_DATE ) <= $f1','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"Expiry within (months) \"}]}','{\"Hide\":[0,1],  \"width-list\":[30,20], \"align-list\":[0,1], \"print-cols\":[2,3], \"stretch\":2}',NULL,NULL),
(75,'User Groups','HR','Masters','UG','SELECT \'UG\', _id, Name  from User_Group_Permissions',NULL,'{ \"Hide\":[0,1], \"width-list\":[40,30,30], \"align-list\":[0,0,0], \"print-cols\":[2], \"stretch\":2}',NULL,NULL),
(76,'Terms & Conditions','Finance','Masters','TC','SELECT \'TC\' , _id, Title, Validity FROM terms_and_conditions',NULL,'{ \"Hide\":[0,1], \"width-list\":[50,50], \"align-list\":[0,0], \"print-cols\":[2,3], \"stretch\":2}',NULL,NULL),
(77,'Bank  Reconciliation','Finance','Bank',NULL,'SELECT _id, ( SELECT Ledger_Name FROM Ledger_Master WHERE Ledger_Id = chq.Ledger_ID) as Ledger, ( SELECT Ledger_Name FROM Ledger_Master WHERE Ledger_Id = chq.Our_Bank_Id) as \'Our Bank\', Debit_Amount \'Debit Amount\', Credit_Amount \'Credit Amount\',  CASE WHEN is_Returned = 1 THEN \'Rejected\'  WHEN is_Presented = 1 THEN \'Presented\' END AS \'Current Status\', Issued_On \'Issued On\', Presented_On \'Presented On\',   \'\' as \'Update Status\', \'\' as \'Status Date\'  FROM Cheque_Details chq  WHERE is_Cleared <> 1 AND Issued_On <= str_to_date(\'$toDateTime\',\'%Y-%m-%d\')','{\"dateTime\":[\"toDateTime\"]}','{\"Hide\":[0,1]}',NULL,NULL),
(78,'Work Orders','Inventory','Registers','WORK ORDER','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'WORK ORDER\',  Voucher_Date as \'Voucher Date\',  CONCAT(Voucher_Prefix, \'-\', Voucher_No) as \'WorkOrder No\' ,VoucherStatus as \'Status\' FROM Work_Order_Main som WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')\r\n','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Hide\":[0,1,2,3], \"width-list\":[20,20,20], \"align-list\":[0,0,1], \"print-cols\":[4,5,6]}',NULL,NULL),
(79,'Inventory Item Editor',NULL,'Masters','Editor',NULL,NULL,NULL,NULL,NULL),
(80,'Production Rate Report','Inventory','Reports',NULL,'SELECT  \'I\', ItemID,  (SELECT Item_Name FROM $master_db.Sales_Inventory_Items WHERE Item_Id = ItemID) as \'Item\', SUM(Dr_Qty) as \'Qty\' , SUM(Dr_Qty) /  cast(DATEDIFF(str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\'),str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') ) as Int) as \'Production Rate\'  FROM $trans_db.Transaction_Item_Helper WHERE VoucherDate >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND VoucherDate <=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\') AND VoucherType = \'Work Order\' GROUP BY ItemID ORDER BY Item','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Hide\":[0,1], \"width-list\":[30,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(81,'Customer Report','Finance','Reports',NULL,'SELECT * from ( SELECT \'V\' as Ind, subq.Voucher_ID, subq.Voucher_Prefix, subq.Voucher_Type, (select ledger_name from $master_db.ledger_master where ledger_id = Against_Ledger) as Ledger,  subq.Voucher_Date as \'Voucher Date\', subq.Voucher_ID as \'Voucher No\', subq.Voucher_Type \'Voucher Type\', case when subq.deb>0 then subq.deb else \'\' end as Debit, case when subq.cred>0 then subq.cred else \'\' end as Credit FROM ( SELECT Against_Ledger, SUM(Credit_Amount-Debit_Amount) as cred, SUM(Debit_Amount-Credit_Amount) as deb,Voucher_Date, Voucher_ID,  Voucher_Type, Voucher_Prefix From Transaction_Helper Where Ledger_ID=\'0x2x15A95\' AND Voucher_Date >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND Voucher_Date  <=str_to_date(\'$toDateTime\',\'%Y-%m-%d\') AND ( case when Voucher_Type = \'SalesVoucher\' then Voucher_ID in  ( SELECT Voucher_No from Sales_Invoice_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'PurchaseVoucher\' then Voucher_ID in  ( SELECT Voucher_No from Purchase_Invoice_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'PaymentVoucher\' then  Voucher_ID in  ( SELECT Voucher_No from Payment_Voucher_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'ReceiptVoucher\' then Voucher_ID in ( SELECT Voucher_No from  Receipt_Voucher_Main Where POC_Phone = \'$f1\') end ) GROUP BY Voucher_ID, Voucher_Type ORDER BY Voucher_Date, Voucher_ID, Voucher_Type ) subq UNION SELECT \'V\' as Ind, so.Voucher_No, so.Voucher_Prefix, \'SalesOrder\', (select ledger_name from $master_db.ledger_master where ledger_id = so.ledger_id) as Ledger,  so.Voucher_Date,  so.Voucher_No, \'SALES ORDER\', cast(so.Total as decimal(10,2)) as Debit, 0 as Credit  FROM Sales_Order_Main so Where POC_Phone = \'$f1\' AND  so.Voucher_Date  >=str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND so.Voucher_Date  <=str_to_date(\'$toDateTime\',\'%Y-%m-%d\') AND so.VoucherStatus  < 170) A order by 1','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"phone\"}],\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[8,9], \"Hide\":[0,1,2,3], \"width-list\":[30,15,15,15,20,20], \"align-list\":[0,0,0,0,1,1], \"print-cols\":[4,5,6,7,8,9], \"stretch\":4, \"additional\":[{\"widget-name\":\"Opening Balance\",\"widget-type\":\"QLabel\", \"value-type\":\"amount\", \"value-from\":\"query\", \"query\":\"SELECT round(coalesce(sum(credit - debit),0),2) from ( SELECT  subq.Voucher_Date, subq.Voucher_ID, subq.Voucher_Type, case when subq.deb>0 then subq.deb else \'\' end as Debit,case when subq.cred>0 then subq.cred else \'\' end as Credit ,subq.Voucher_Prefix FROM ( SELECT Against_Ledger, SUM(Credit_Amount-Debit_Amount) as cred, SUM(Debit_Amount-Credit_Amount)as deb,Voucher_Date, Voucher_ID,  Voucher_Type, Voucher_Prefix From Transaction_Helper Where Ledger_ID=\'0x2x15A95\' AND Voucher_Date < str_to_date(\'$fromDateTime\',\'%Y-%m-%d\') AND ( case when Voucher_Type = \'SalesVoucher\' then Voucher_ID in  ( SELECT Voucher_No from Sales_Invoice_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'PurchaseVoucher\' then Voucher_ID in ( SELECT Voucher_No from Purchase_Invoice_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'PaymentVoucher\' then  Voucher_ID in ( SELECT Voucher_No from Payment_Voucher_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'ReceiptVoucher\' then Voucher_ID in ( SELECT Voucher_No from Receipt_Voucher_Main Where POC_Phone = \'$f1\') end ) GROUP BY Voucher_ID, Voucher_Type ORDER BY Voucher_Date, Voucher_ID, Voucher_Type ) subq UNION SELECT so.Voucher_Date, so.Voucher_No, \'SALES ORDER\', cast(so.Total as decimal(10,2)) as Debit, 0 as Credit , so.Voucher_Prefix  FROM Sales_Order_Main so Where POC_Phone = \'$f1\' AND so.Voucher_Date  <str_to_date(\'$fromDateTime\',\'%Y-%m-%d\')  AND so.VoucherStatus  < 170) A\", \"layout\":\"additionalLay1\", \"alignment\":\"right\"}, {\"widget-name\":\"Closing Balance\", \"widget-type\":\"QLabel\", \"value-type\":\"amount\", \"value-from\":\"query\", \"query\":\"SELECT round(coalesce(sum(credit - debit),0),2) from ( SELECT  subq.Voucher_Date, subq.Voucher_ID, subq.Voucher_Type, case when subq.deb>0 then subq.deb else \'\' end as Debit,case when subq.cred>0 then subq.cred else \'\' end as Credit ,subq.Voucher_Prefix FROM ( SELECT Against_Ledger, SUM(Credit_Amount-Debit_Amount) as cred, SUM(Debit_Amount-Credit_Amount)as deb,Voucher_Date, Voucher_ID,  Voucher_Type, Voucher_Prefix From Transaction_Helper Where Ledger_ID=\'0x2x15A95\' AND Voucher_Date < str_to_date(\'$toDateTime\',\'%Y-%m-%d\') AND( case when Voucher_Type = \'SalesVoucher\' then Voucher_ID in  ( SELECT Voucher_No from Sales_Invoice_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'PurchaseVoucher\' then Voucher_ID in  ( SELECT Voucher_No from Purchase_Invoice_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'PaymentVoucher\' then  Voucher_ID in  ( SELECT Voucher_No from Payment_Voucher_Main Where POC_Phone = \'$f1\') when Voucher_Type = \'ReceiptVoucher\' then Voucher_ID in ( SELECT Voucher_No from Receipt_Voucher_Main Where POC_Phone = \'$f1\') end ) GROUP BY Voucher_ID, Voucher_Type ORDER BY Voucher_Date, Voucher_ID, Voucher_Type ) subq UNION SELECT so.Voucher_Date, so.Voucher_No, \'SALES ORDER\', cast(so.Total as decimal(10,2)) as Debit, 0 as Credit , so.Voucher_Prefix  FROM Sales_Order_Main so Where POC_Phone = \'$f1\' AND so.Voucher_Date  <str_to_date(\'$toDateTime\',\'%Y-%m-%d\')  AND so.VoucherStatus  < 170) A\",  \"layout\":\"additionalLay2\", \"alignment\":\"right\"}]}',NULL,NULL),
(82,'Proforma Register','Finance','Registers','Proforma','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'Proforma\', Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Proforma_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(83,'Contra Voucher Register','Finance','Registers','ContraVoucher','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'Proforma\', Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Contra_Voucher_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20], \"align-list\":[0,0,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(84,'Quotations','Finance','Registers','Quotation','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'Proforma\', Voucher_Date as \'Voucher Date\', CAST(Voucher_No as UNSIGNED) as \'Voucher No\', (SELECT Ledger_Name FROM $master_db.Ledger_Master WHERE Ledger_ID= sim.Ledger_ID) Ledger, Total FROM $trans_db.Qutation_Main sim WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20], \"align-list\":[0,1,0,1], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(85,'Itemwise Sales Orders','Inventory','Registers','ItemwiseOrder','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'ItemwiseOrder\', Voucher_Date as \'Voucher Date\', Voucher_No as \'Voucher No\',( SELECT Item_Name from $master_db.Sales_Inventory_Items si WHERE si.Item_Id= soi.Item_ID) as \'Item \',Qty_Total as \'Total Quantity\',(SELECT Name From $master_db.Employee_Details ed WHERE ed._id = soi.Salesman_ID) as \'Salesman\',Total_Amount as \'Total Amount\' FROM $trans_db.Sales_Order_Itemwise soi  WHERE Voucher_Date>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Voucher_Date<=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7,9], \"Hide\":[0,1,2,3], \"width-list\":[10,10,20,20,20,20], \"align-list\":[0,0,0,1,0,1], \"print-cols\":[4,5,6,7,8,9],\"stretch\":0}',NULL,NULL),
(86,'Itemwise Purchase Order Entry','Inventory','Registers','ItemwisePurchaseOrde','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'ItemwisePurchaseOrder\',  Voucher_Date as \'Voucher Date\', Voucher_No as \'Voucher No\',( SELECT Item_Name from $master_db.Sales_Inventory_Items si WHERE si.Item_Id= soi.Item_ID) as \'Item \',Qty_Total as \'Total Quantity\',(SELECT Name From $master_db.Employee_Details ed WHERE ed._id = soi.Salesman_ID) as \'Salesman\',Total_Amount as \'Total Amount\' FROM $trans_db.Purchase_Order_Itemwise soi  WHERE Voucher_Date>=str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND Voucher_Date<=str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Totals\":[7,9], \"Hide\":[0,1,2,3], \"width-list\":[20,20,30,20,20,20], \"align-list\":[0,0,0,1,0,1], \"print-cols\":[4,5,6,7,8,9]}',NULL,NULL),
(87,'Brands','Inventory','Masters','B','select \'B\' as Ind, _id , Brand_Name as \'Brand Name\', Brand_description as \'Description\' from $master_db.brands',NULL,'{ \"Hide\":[0,1], \"width-list\":[30,30,30], \"align-list\":[0,0,0], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL),
(88,'Godown Transfer Register','Warehouse','Registers','GodownTransfer','SELECT \'V\' , Voucher_No, Voucher_Prefix, \'GodownTransfer\',  Voucher_Date as \'Voucher Date\',  CONCAT(Voucher_Prefix, \'-\', Voucher_No) as \'Voucher No\' ,(select godown_name from $master_db.godown where godown_id = From_Location ) as \'From Location\', (select godown_name from $master_db.godown where godown_id = To_Location ) as \'To Location\' FROM $trans_db.Godown_Tranfer_Main som WHERE str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') >= str_to_date(\'$fromDateTime\',\'%Y-%m-%d %H:%i:%s\') AND str_to_date(concat(Voucher_Date,\' \',CAST(`TimeStamp` AS TIME)),\'%Y-%m-%d %H:%i:%s\') <= str_to_date(\'$toDateTime\',\'%Y-%m-%d %H:%i:%s\')','{\"dateTime\":[\"fromDateTime\",\"toDateTime\"]}','{\"Hide\":[0,1,2,3], \"width-list\":[20,20,20,20], \"align-list\":[0,0,0,0], \"print-cols\":[4,5,6,7]}',NULL,NULL),
(89,'Purchase Item Quantity Report','Inventory','Reports','Inventory','SELECT \'I\' as Ind, sales_item as Item_ID, (SELECT Item_Name FROM Sales_Inventory_Items where Item_ID = sales_item) AS \'Sales Item\', sales_item_qty AS \'Sales Qty\', Cast(purchase_item_qty AS Decimal(10,2)) AS \'Purchase Qty\'  FROM ingredients WHERE purchase_item = \'$f1\' UNION SELECT \'I\' as Ind, Item_ID,  ITEM_NAME, 1,1 FROM Sales_Inventory_Items Where Item_id = \'$f1\' and isSalesItem = 1','{\"filter by\":[{\"var-name\":\"f1\",\"var-value\":\"item\", \"var-filter\":\"2\"}]}','{\"Totals\":[], \"Hide\":[0,1],  \"width-list\":[40,20,20], \"align-list\":[0,1,1], \"print-cols\":[2,3,4], \"stretch\":2}',NULL,NULL);

--
-- Table structure for table `uom_conversion`
--

CREATE TABLE `uom_conversion` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `baseUnit` varchar(500) NOT NULL,
  `toUnit` varchar(500) NOT NULL,
  `conValue` varchar(50) NOT NULL,
  `itemID` varchar(500) DEFAULT NULL,
  `narration` varchar(5000) DEFAULT NULL,
  `Hidden_row` varchar(50) DEFAULT NULL,
  `barcode` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=404 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `uom_conversion`
--

INSERT INTO `uom_conversion` VALUES
(1,'1','1','1','0x2x1','self conversion',NULL,'NULL'),
(2,'1','1','1','0x2x2','self conversion',NULL,'NULL'),
(3,'1','1','1','0x2x3','self conversion',NULL,'NULL'),
(4,'1','1','1','0x2x4','self conversion',NULL,'NULL'),
(5,'1','1','1','0x2x5','self conversion',NULL,'NULL'),
(6,'1','1','1','0x2x6','self conversion',NULL,'NULL'),
(7,'1','1','1','0x2x7','self conversion',NULL,'NULL'),
(8,'1','1','1','0x2x8','self conversion',NULL,'NULL'),
(9,'1','1','1','0x2x9','self conversion',NULL,'NULL'),
(10,'1','1','1','0x2x10','self conversion',NULL,'NULL'),
(11,'1','1','1','0x2x11','self conversion',NULL,'NULL'),
(12,'1','1','1','0x2x12','self conversion',NULL,'NULL'),
(13,'1','1','1','0x2x13','self conversion',NULL,'NULL'),
(14,'1','1','1','0x2x14','self conversion',NULL,'NULL'),
(15,'1','1','1','0x2x15','self conversion',NULL,'NULL'),
(16,'1','1','1','0x2x16','self conversion',NULL,'NULL'),
(17,'1','1','1','0x2x17','self conversion',NULL,'NULL'),
(18,'1','1','1','0x2x18','self conversion',NULL,'NULL'),
(19,'1','1','1','0x2x19','self conversion',NULL,'NULL'),
(20,'1','1','1','0x2x20','self conversion',NULL,'NULL'),
(21,'1','1','1','0x2x21','self conversion',NULL,'NULL'),
(22,'1','1','1','0x2x22','self conversion',NULL,'NULL'),
(23,'1','1','1','0x2x23','self conversion',NULL,'NULL'),
(24,'1','1','1','0x2x24','self conversion',NULL,'NULL'),
(25,'1','1','1','0x3x25','self conversion',NULL,'NULL'),
(26,'1','1','1','0x3x26','self conversion',NULL,'NULL'),
(27,'1','1','1','0x3x27','self conversion',NULL,'NULL'),
(28,'1','1','1','0x3x28','self conversion',NULL,'NULL'),
(29,'1','1','1','0x3x29','self conversion',NULL,'NULL'),
(30,'1','1','1','0x3x30','self conversion',NULL,'NULL'),
(31,'1','1','1','0x3x31','self conversion',NULL,'NULL'),
(32,'1','1','1','0x3x32','self conversion',NULL,'NULL'),
(33,'1','1','1','0x3x33','self conversion',NULL,'NULL'),
(34,'1','1','1','0x3x34','self conversion',NULL,'NULL'),
(35,'1','1','1','0x3x35','self conversion',NULL,'NULL'),
(36,'1','1','1','0x3x36','self conversion',NULL,'NULL'),
(37,'1','1','1','0x3x37','self conversion',NULL,'NULL'),
(38,'1','1','1','0x3x38','self conversion',NULL,'NULL'),
(39,'1','1','1','0x3x39','self conversion',NULL,'NULL'),
(40,'1','1','1','0x3x40','self conversion',NULL,'NULL'),
(41,'1','1','1','0x3x41','self conversion',NULL,'NULL'),
(42,'1','1','1','0x3x42','self conversion',NULL,'NULL'),
(43,'1','1','1','0x3x43','self conversion',NULL,'NULL'),
(44,'1','1','1','0x3x44','self conversion',NULL,'NULL'),
(45,'1','1','1','0x3x45','self conversion',NULL,'NULL'),
(46,'1','1','1','0x3x46','self conversion',NULL,'NULL'),
(47,'1','1','1','0x3x47','self conversion',NULL,'NULL'),
(48,'1','1','1','0x3x48','self conversion',NULL,'NULL'),
(49,'1','1','1','0x3x49','self conversion',NULL,'NULL'),
(50,'1','1','1','0x3x50','self conversion',NULL,'NULL'),
(51,'1','1','1','0x3x51','self conversion',NULL,'NULL'),
(52,'1','1','1','0x3x52','self conversion',NULL,'NULL'),
(53,'1','1','1','0x4x53','self conversion',NULL,'NULL'),
(54,'1','1','1','0x4x54','self conversion',NULL,'NULL'),
(55,'1','1','1','0x4x55','self conversion',NULL,'NULL'),
(56,'1','1','1','0x4x56','self conversion',NULL,'NULL'),
(57,'1','1','1','0x4x57','self conversion',NULL,'NULL'),
(58,'1','1','1','0x4x58','self conversion',NULL,'NULL'),
(59,'1','1','1','0x4x59','self conversion',NULL,'NULL'),
(60,'1','1','1','0x4x60','self conversion',NULL,'NULL'),
(61,'1','1','1','0x4x61','self conversion',NULL,'NULL'),
(62,'1','1','1','0x4x62','self conversion',NULL,'NULL'),
(63,'1','1','1','0x4x63','self conversion',NULL,'NULL'),
(64,'1','1','1','0x4x64','self conversion',NULL,'NULL'),
(65,'1','1','1','0x4x65','self conversion',NULL,'NULL'),
(66,'1','1','1','0x4x66','self conversion',NULL,'NULL'),
(67,'1','1','1','0x4x67','self conversion',NULL,'NULL'),
(68,'1','1','1','0x4x68','self conversion',NULL,'NULL'),
(69,'1','1','1','0x4x69','self conversion',NULL,'NULL'),
(70,'1','1','1','0x4x70','self conversion',NULL,'NULL'),
(71,'1','1','1','0x4x71','self conversion',NULL,'NULL'),
(72,'1','1','1','0x4x72','self conversion',NULL,'NULL'),
(73,'1','1','1','0x4x73','self conversion',NULL,'NULL'),
(74,'1','1','1','0x4x74','self conversion',NULL,'NULL'),
(75,'1','1','1','0x5x75','self conversion',NULL,'NULL'),
(76,'1','1','1','0x5x76','self conversion',NULL,'NULL'),
(77,'1','1','1','0x5x77','self conversion',NULL,'NULL'),
(78,'1','1','1','0x5x78','self conversion',NULL,'NULL'),
(79,'1','1','1','0x5x79','self conversion',NULL,'NULL'),
(80,'1','1','1','0x5x80','self conversion',NULL,'NULL'),
(81,'1','1','1','0x5x81','self conversion',NULL,'NULL'),
(82,'1','1','1','0x5x82','self conversion',NULL,'NULL'),
(83,'1','1','1','0x5x83','self conversion',NULL,'NULL'),
(84,'1','1','1','0x5x84','self conversion',NULL,'NULL'),
(85,'1','1','1','0x5x85','self conversion',NULL,'NULL'),
(86,'1','1','1','0x5x86','self conversion',NULL,'NULL'),
(87,'1','1','1','0x5x87','self conversion',NULL,'NULL'),
(88,'1','1','1','0x5x88','self conversion',NULL,'NULL'),
(89,'1','1','1','0x5x89','self conversion',NULL,'NULL'),
(90,'1','1','1','0x5x90','self conversion',NULL,'NULL'),
(91,'1','1','1','0x5x91','self conversion',NULL,'NULL'),
(92,'1','1','1','0x5x92','self conversion',NULL,'NULL'),
(93,'1','1','1','0x5x93','self conversion',NULL,'NULL'),
(94,'1','1','1','0x5x94','self conversion',NULL,'NULL'),
(95,'1','1','1','0x5x95','self conversion',NULL,'NULL'),
(96,'1','1','1','0x5x96','self conversion',NULL,'NULL'),
(97,'1','1','1','0x5x97','self conversion',NULL,'NULL'),
(98,'1','1','1','0x5x98','self conversion',NULL,'NULL'),
(99,'1','1','1','0x6x99','self conversion',NULL,'NULL'),
(100,'1','1','1','0x6x100','self conversion',NULL,'NULL'),
(101,'1','1','1','0x6x101','self conversion',NULL,'NULL'),
(102,'1','1','1','0x6x102','self conversion',NULL,'NULL'),
(103,'1','1','1','0x6x103','self conversion',NULL,'NULL'),
(104,'1','1','1','0x6x104','self conversion',NULL,'NULL'),
(105,'1','1','1','0x6x105','self conversion',NULL,'NULL'),
(106,'1','1','1','0x6x106','self conversion',NULL,'NULL'),
(107,'1','1','1','0x6x107','self conversion',NULL,'NULL'),
(108,'1','1','1','0x6x108','self conversion',NULL,'NULL'),
(109,'1','1','1','0x6x109','self conversion',NULL,'NULL'),
(110,'1','1','1','0x6x110','self conversion',NULL,'NULL'),
(111,'1','1','1','0x6x111','self conversion',NULL,'NULL'),
(112,'1','1','1','0x6x112','self conversion',NULL,'NULL'),
(113,'1','1','1','0x6x113','self conversion',NULL,'NULL'),
(114,'1','1','1','0x6x114','self conversion',NULL,'NULL'),
(115,'1','1','1','0x6x115','self conversion',NULL,'NULL'),
(116,'1','1','1','0x6x116','self conversion',NULL,'NULL'),
(117,'1','1','1','0x6x117','self conversion',NULL,'NULL'),
(118,'1','1','1','0x6x118','self conversion',NULL,'NULL'),
(119,'1','1','1','0x7x119','self conversion',NULL,'NULL'),
(120,'1','1','1','0x7x120','self conversion',NULL,'NULL'),
(121,'1','1','1','0x7x121','self conversion',NULL,'NULL'),
(122,'1','1','1','0x7x122','self conversion',NULL,'NULL'),
(123,'1','1','1','0x7x123','self conversion',NULL,'NULL'),
(124,'1','1','1','0x7x124','self conversion',NULL,'NULL'),
(125,'1','1','1','0x8x125','self conversion',NULL,'NULL'),
(126,'1','1','1','0x8x126','self conversion',NULL,'NULL'),
(127,'1','1','1','0x8x127','self conversion',NULL,'NULL'),
(128,'1','1','1','0x8x128','self conversion',NULL,'NULL'),
(129,'1','1','1','0x8x129','self conversion',NULL,'NULL'),
(130,'1','1','1','0x8x130','self conversion',NULL,'NULL'),
(131,'1','1','1','0x8x131','self conversion',NULL,'NULL'),
(132,'1','1','1','0x8x132','self conversion',NULL,'NULL'),
(133,'1','1','1','0x8x133','self conversion',NULL,'NULL'),
(134,'1','1','1','0x8x134','self conversion',NULL,'NULL'),
(135,'1','1','1','0x8x135','self conversion',NULL,'NULL'),
(136,'1','1','1','0x8x136','self conversion',NULL,'NULL'),
(137,'1','1','1','0x8x137','self conversion',NULL,'NULL'),
(138,'1','1','1','0x8x138','self conversion',NULL,'NULL'),
(139,'1','1','1','0x8x139','self conversion',NULL,'NULL'),
(140,'1','1','1','0x8x140','self conversion',NULL,'NULL'),
(141,'1','1','1','0x8x141','self conversion',NULL,'NULL'),
(142,'1','1','1','0x8x142','self conversion',NULL,'NULL'),
(143,'1','1','1','0x8x143','self conversion',NULL,'NULL'),
(144,'1','1','1','0x8x144','self conversion',NULL,'NULL'),
(145,'1','1','1','0x8x145','self conversion',NULL,'NULL'),
(146,'1','1','1','0x8x146','self conversion',NULL,'NULL'),
(147,'1','1','1','0x9x147','self conversion',NULL,'NULL'),
(148,'1','1','1','0x9x148','self conversion',NULL,'NULL'),
(149,'1','1','1','0x9x149','self conversion',NULL,'NULL'),
(150,'1','1','1','0x9x150','self conversion',NULL,'NULL'),
(151,'1','1','1','0x9x151','self conversion',NULL,'NULL'),
(152,'1','1','1','0x9x152','self conversion',NULL,'NULL'),
(153,'1','1','1','0x9x153','self conversion',NULL,'NULL'),
(154,'1','1','1','0x9x154','self conversion',NULL,'NULL'),
(155,'1','1','1','0x9x155','self conversion',NULL,'NULL'),
(156,'1','1','1','0x9x156','self conversion',NULL,'NULL'),
(157,'1','1','1','0x10x157','self conversion',NULL,'NULL'),
(158,'1','1','1','0x10x158','self conversion',NULL,'NULL'),
(159,'1','1','1','0x10x159','self conversion',NULL,'NULL'),
(160,'1','1','1','0x10x160','self conversion',NULL,'NULL'),
(161,'1','1','1','0x10x161','self conversion',NULL,'NULL'),
(162,'1','1','1','0x10x162','self conversion',NULL,'NULL'),
(163,'1','1','1','0x10x163','self conversion',NULL,'NULL'),
(164,'1','1','1','0x10x164','self conversion',NULL,'NULL'),
(165,'1','1','1','0x10x165','self conversion',NULL,'NULL'),
(166,'1','1','1','0x10x166','self conversion',NULL,'NULL'),
(167,'1','1','1','0x10x167','self conversion',NULL,'NULL'),
(168,'1','1','1','0x10x168','self conversion',NULL,'NULL'),
(169,'1','1','1','0x10x169','self conversion',NULL,'NULL'),
(170,'1','1','1','0x10x170','self conversion',NULL,'NULL'),
(171,'1','1','1','0x11x171','self conversion',NULL,'NULL'),
(172,'1','1','1','0x11x172','self conversion',NULL,'NULL'),
(173,'1','1','1','0x11x173','self conversion',NULL,'NULL'),
(174,'1','1','1','0x11x174','self conversion',NULL,'NULL'),
(175,'1','1','1','0x11x175','self conversion',NULL,'NULL'),
(176,'1','1','1','0x11x176','self conversion',NULL,'NULL'),
(177,'1','1','1','0x12x177','self conversion',NULL,'NULL'),
(178,'1','1','1','0x12x178','self conversion',NULL,'NULL'),
(179,'1','1','1','0x12x179','self conversion',NULL,'NULL'),
(180,'1','1','1','0x12x180','self conversion',NULL,'NULL'),
(181,'1','1','1','0x12x181','self conversion',NULL,'NULL'),
(182,'1','1','1','0x12x182','self conversion',NULL,'NULL'),
(183,'1','1','1','0x12x183','self conversion',NULL,'NULL'),
(184,'1','1','1','0x12x184','self conversion',NULL,'NULL'),
(185,'1','1','1','0x12x185','self conversion',NULL,'NULL'),
(186,'1','1','1','0x12x186','self conversion',NULL,'NULL'),
(187,'1','1','1','0x12x187','self conversion',NULL,'NULL'),
(188,'1','1','1','0x12x188','self conversion',NULL,'NULL'),
(189,'1','1','1','0x12x189','self conversion',NULL,'NULL'),
(190,'1','1','1','0x12x190','self conversion',NULL,'NULL'),
(191,'1','1','1','0x12x191','self conversion',NULL,'NULL'),
(192,'1','1','1','0x12x192','self conversion',NULL,'NULL'),
(193,'1','1','1','0x12x193','self conversion',NULL,'NULL'),
(194,'1','1','1','0x12x194','self conversion',NULL,'NULL'),
(195,'1','1','1','0x12x195','self conversion',NULL,'NULL'),
(196,'1','1','1','0x12x196','self conversion',NULL,'NULL'),
(197,'1','1','1','0x12x197','self conversion',NULL,'NULL'),
(198,'1','1','1','0x12x198','self conversion',NULL,'NULL'),
(199,'1','1','1','0x12x199','self conversion',NULL,'NULL'),
(200,'1','1','1','0x12x200','self conversion',NULL,'NULL'),
(201,'1','1','1','0x12x201','self conversion',NULL,'NULL'),
(202,'1','1','1','0x12x202','self conversion',NULL,'NULL'),
(203,'1','1','1','0x12x203','self conversion',NULL,'NULL'),
(204,'1','1','1','0x12x204','self conversion',NULL,'NULL'),
(205,'1','1','1','0x12x205','self conversion',NULL,'NULL'),
(206,'1','1','1','0x12x206','self conversion',NULL,'NULL'),
(207,'1','1','1','0x12x207','self conversion',NULL,'NULL'),
(208,'1','1','1','0x12x208','self conversion',NULL,'NULL'),
(209,'1','1','1','0x13x209','self conversion',NULL,'NULL'),
(210,'1','1','1','0x13x210','self conversion',NULL,'NULL'),
(211,'1','1','1','0x13x211','self conversion',NULL,'NULL'),
(212,'1','1','1','0x13x212','self conversion',NULL,'NULL'),
(213,'1','1','1','0x13x213','self conversion',NULL,'NULL'),
(214,'1','1','1','0x13x214','self conversion',NULL,'NULL'),
(215,'1','1','1','0x13x215','self conversion',NULL,'NULL'),
(216,'1','1','1','0x13x216','self conversion',NULL,'NULL'),
(217,'1','1','1','0x13x217','self conversion',NULL,'NULL'),
(218,'1','1','1','0x13x218','self conversion',NULL,'NULL'),
(219,'1','1','1','0x14x219','self conversion',NULL,'NULL'),
(220,'1','1','1','0x14x220','self conversion',NULL,'NULL'),
(221,'1','1','1','0x14x221','self conversion',NULL,'NULL'),
(222,'1','1','1','0x14x222','self conversion',NULL,'NULL'),
(223,'1','1','1','0x14x223','self conversion',NULL,'NULL'),
(224,'1','1','1','0x14x224','self conversion',NULL,'NULL'),
(225,'1','1','1','0x14x225','self conversion',NULL,'NULL'),
(226,'1','1','1','0x14x226','self conversion',NULL,'NULL'),
(227,'1','1','1','0x14x227','self conversion',NULL,'NULL'),
(228,'1','1','1','0x14x228','self conversion',NULL,'NULL'),
(229,'1','1','1','0x14x229','self conversion',NULL,'NULL'),
(230,'1','1','1','0x14x230','self conversion',NULL,'NULL'),
(231,'1','1','1','0x14x231','self conversion',NULL,'NULL'),
(232,'1','1','1','0x14x232','self conversion',NULL,'NULL'),
(233,'1','1','1','0x14x233','self conversion',NULL,'NULL'),
(234,'1','1','1','0x14x234','self conversion',NULL,'NULL'),
(235,'1','1','1','0x14x235','self conversion',NULL,'NULL'),
(236,'1','1','1','0x14x236','self conversion',NULL,'NULL'),
(237,'1','1','1','0x14x237','self conversion',NULL,'NULL'),
(238,'1','1','1','0x14x238','self conversion',NULL,'NULL'),
(239,'1','1','1','0x14x239','self conversion',NULL,'NULL'),
(240,'1','1','1','0x14x240','self conversion',NULL,'NULL'),
(241,'1','1','1','0x14x241','self conversion',NULL,'NULL'),
(242,'1','1','1','0x14x242','self conversion',NULL,'NULL'),
(243,'1','1','1','0x15x243','self conversion',NULL,'NULL'),
(244,'1','1','1','0x15x244','self conversion',NULL,'NULL'),
(245,'1','1','1','0x15x245','self conversion',NULL,'NULL'),
(246,'1','1','1','0x15x246','self conversion',NULL,'NULL'),
(247,'1','1','1','0x15x247','self conversion',NULL,'NULL'),
(248,'1','1','1','0x15x248','self conversion',NULL,'NULL'),
(249,'1','1','1','0x15x249','self conversion',NULL,'NULL'),
(250,'1','1','1','0x15x250','self conversion',NULL,'NULL'),
(251,'1','1','1','0x15x251','self conversion',NULL,'NULL'),
(252,'1','1','1','0x15x252','self conversion',NULL,'NULL'),
(253,'1','1','1','0x15x253','self conversion',NULL,'NULL'),
(254,'1','1','1','0x15x254','self conversion',NULL,'NULL'),
(255,'1','1','1','0x15x255','self conversion',NULL,'NULL'),
(256,'1','1','1','0x15x256','self conversion',NULL,'NULL'),
(257,'1','1','1','0x15x257','self conversion',NULL,'NULL'),
(258,'1','1','1','0x15x258','self conversion',NULL,'NULL'),
(259,'1','1','1','0x15x259','self conversion',NULL,'NULL'),
(260,'1','1','1','0x15x260','self conversion',NULL,'NULL'),
(261,'1','1','1','0x15x261','self conversion',NULL,'NULL'),
(262,'1','1','1','0x15x262','self conversion',NULL,'NULL'),
(263,'1','1','1','0x15x263','self conversion',NULL,'NULL'),
(264,'1','1','1','0x15x264','self conversion',NULL,'NULL'),
(265,'1','1','1','0x15x265','self conversion',NULL,'NULL'),
(266,'1','1','1','0x15x266','self conversion',NULL,'NULL'),
(267,'1','1','1','0x16x267','self conversion',NULL,'NULL'),
(268,'1','1','1','0x16x268','self conversion',NULL,'NULL'),
(269,'1','1','1','0x16x269','self conversion',NULL,'NULL'),
(270,'1','1','1','0x16x270','self conversion',NULL,'NULL'),
(271,'1','1','1','0x16x271','self conversion',NULL,'NULL'),
(272,'1','1','1','0x16x272','self conversion',NULL,'NULL'),
(273,'1','1','1','0x16x273','self conversion',NULL,'NULL'),
(274,'1','1','1','0x16x274','self conversion',NULL,'NULL'),
(275,'1','1','1','0x16x275','self conversion',NULL,'NULL'),
(276,'1','1','1','0x16x276','self conversion',NULL,'NULL'),
(277,'1','1','1','0x16x277','self conversion',NULL,'NULL'),
(278,'1','1','1','0x16x278','self conversion',NULL,'NULL'),
(279,'1','1','1','0x16x279','self conversion',NULL,'NULL'),
(280,'1','1','1','0x16x280','self conversion',NULL,'NULL'),
(281,'1','1','1','0x16x281','self conversion',NULL,'NULL'),
(282,'1','1','1','0x16x282','self conversion',NULL,'NULL'),
(283,'1','1','1','0x17x283','self conversion',NULL,'NULL'),
(284,'1','1','1','0x17x284','self conversion',NULL,'NULL'),
(285,'1','1','1','0x17x285','self conversion',NULL,'NULL'),
(286,'1','1','1','0x17x286','self conversion',NULL,'NULL'),
(287,'1','1','1','0x17x287','self conversion',NULL,'NULL'),
(288,'1','1','1','0x17x288','self conversion',NULL,'NULL'),
(289,'1','1','1','0x17x289','self conversion',NULL,'NULL'),
(290,'1','1','1','0x17x290','self conversion',NULL,'NULL'),
(291,'1','1','1','0x17x291','self conversion',NULL,'NULL'),
(292,'1','1','1','0x17x292','self conversion',NULL,'NULL'),
(293,'1','1','1','0x18x293','self conversion',NULL,'NULL'),
(294,'1','1','1','0x18x294','self conversion',NULL,'NULL'),
(295,'1','1','1','0x18x295','self conversion',NULL,'NULL'),
(296,'1','1','1','0x18x296','self conversion',NULL,'NULL'),
(297,'1','1','1','0x18x297','self conversion',NULL,'NULL'),
(298,'1','1','1','0x18x298','self conversion',NULL,'NULL'),
(299,'1','1','1','0x18x299','self conversion',NULL,'NULL'),
(300,'1','1','1','0x18x300','self conversion',NULL,'NULL'),
(301,'1','1','1','0x18x301','self conversion',NULL,'NULL'),
(302,'1','1','1','0x18x302','self conversion',NULL,'NULL'),
(303,'1','1','1','0x18x303','self conversion',NULL,'NULL'),
(304,'1','1','1','0x18x304','self conversion',NULL,'NULL'),
(305,'1','1','1','0x24x305','self conversion',NULL,'NULL'),
(306,'1','1','1','0x24x306','self conversion',NULL,'NULL'),
(307,'1','1','1','0x24x307','self conversion',NULL,'NULL'),
(308,'1','1','1','0x24x308','self conversion',NULL,'NULL'),
(309,'1','1','1','0x24x309','self conversion',NULL,'NULL'),
(310,'1','1','1','0x24x310','self conversion',NULL,'NULL'),
(311,'1','1','1','0x24x311','self conversion',NULL,'NULL'),
(312,'1','1','1','0x19x312','self conversion',NULL,'NULL'),
(313,'1','1','1','0x19x313','self conversion',NULL,'NULL'),
(314,'1','1','1','0x19x314','self conversion',NULL,'NULL'),
(315,'1','1','1','0x19x315','self conversion',NULL,'NULL'),
(316,'1','1','1','0x19x316','self conversion',NULL,'NULL'),
(317,'1','1','1','0x19x317','self conversion',NULL,'NULL'),
(318,'1','1','1','0x19x318','self conversion',NULL,'NULL'),
(319,'1','1','1','0x19x319','self conversion',NULL,'NULL'),
(320,'1','1','1','0x19x320','self conversion',NULL,'NULL'),
(321,'1','1','1','0x19x321','self conversion',NULL,'NULL'),
(322,'1','1','1','0x19x322','self conversion',NULL,'NULL'),
(323,'1','1','1','0x19x323','self conversion',NULL,'NULL'),
(324,'1','1','1','0x20x324','self conversion',NULL,'NULL'),
(325,'1','1','1','0x20x325','self conversion',NULL,'NULL'),
(326,'1','1','1','0x20x326','self conversion',NULL,'NULL'),
(327,'1','1','1','0x20x327','self conversion',NULL,'NULL'),
(328,'1','1','1','0x20x328','self conversion',NULL,'NULL'),
(329,'1','1','1','0x20x329','self conversion',NULL,'NULL'),
(330,'1','1','1','0x20x330','self conversion',NULL,'NULL'),
(331,'1','1','1','0x20x331','self conversion',NULL,'NULL'),
(332,'1','1','1','0x20x332','self conversion',NULL,'NULL'),
(333,'1','1','1','0x20x333','self conversion',NULL,'NULL'),
(334,'1','1','1','0x20x334','self conversion',NULL,'NULL'),
(335,'1','1','1','0x20x335','self conversion',NULL,'NULL'),
(336,'1','1','1','0x20x336','self conversion',NULL,'NULL'),
(337,'1','1','1','0x20x337','self conversion',NULL,'NULL'),
(338,'1','1','1','0x20x338','self conversion',NULL,'NULL'),
(339,'1','1','1','0x20x339','self conversion',NULL,'NULL'),
(340,'1','1','1','0x20x340','self conversion',NULL,'NULL'),
(341,'1','1','1','0x20x341','self conversion',NULL,'NULL'),
(342,'1','1','1','0x20x342','self conversion',NULL,'NULL'),
(343,'1','1','1','0x20x343','self conversion',NULL,'NULL'),
(344,'1','1','1','0x21x344','self conversion',NULL,'NULL'),
(345,'1','1','1','0x21x345','self conversion',NULL,'NULL'),
(346,'1','1','1','0x21x346','self conversion',NULL,'NULL'),
(347,'1','1','1','0x21x347','self conversion',NULL,'NULL'),
(348,'1','1','1','0x21x348','self conversion',NULL,'NULL'),
(349,'1','1','1','0x31x349','self conversion',NULL,'NULL'),
(350,'1','1','1','0x31x350','self conversion',NULL,'NULL'),
(351,'1','1','1','0x31x351','self conversion',NULL,'NULL'),
(352,'1','1','1','0x31x352','self conversion',NULL,'NULL'),
(353,'1','1','1','0x31x353','self conversion',NULL,'NULL'),
(354,'1','1','1','0x32x354','self conversion',NULL,'NULL'),
(355,'1','1','1','0x32x355','self conversion',NULL,'NULL'),
(356,'1','1','1','0x32x356','self conversion',NULL,'NULL'),
(357,'1','1','1','0x32x357','self conversion',NULL,'NULL'),
(358,'1','1','1','0x33x358','self conversion',NULL,'NULL'),
(359,'1','1','1','0x33x359','self conversion',NULL,'NULL'),
(360,'1','1','1','0x33x360','self conversion',NULL,'NULL'),
(361,'1','1','1','0x33x361','self conversion',NULL,'NULL'),
(362,'1','1','1','0x33x362','self conversion',NULL,'NULL'),
(363,'1','1','1','0x33x363','self conversion',NULL,'NULL'),
(364,'1','1','1','0x33x364','self conversion',NULL,'NULL'),
(365,'1','1','1','0x33x365','self conversion',NULL,'NULL'),
(366,'1','1','1','0x33x366','self conversion',NULL,'NULL'),
(367,'1','1','1','0x33x367','self conversion',NULL,'NULL'),
(368,'1','1','1','0x33x368','self conversion',NULL,'NULL'),
(369,'1','1','1','0x19x369','self conversion',NULL,'NULL'),
(370,'1','1','1','0x19x370','self conversion',NULL,'NULL'),
(371,'1','1','1','0x20x371','self conversion',NULL,'NULL'),
(372,'1','1','1','0x20x372','self conversion',NULL,'NULL'),
(373,'1','1','1','0x20x373','self conversion',NULL,'NULL'),
(374,'1','1','1','0x20x374','self conversion',NULL,'NULL'),
(375,'1','1','1','0x20x375','self conversion',NULL,'NULL'),
(376,'1','1','1','0x20x376','self conversion',NULL,'NULL'),
(377,'1','1','1','0x20x377','self conversion',NULL,'NULL'),
(378,'1','1','1','0x20x378','self conversion',NULL,'NULL'),
(379,'1','1','1','0x20x379','self conversion',NULL,'NULL'),
(380,'1','1','1','0x20x380','self conversion',NULL,'NULL'),
(381,'1','1','1','0x20x381','self conversion',NULL,'NULL'),
(382,'1','1','1','0x20x382','self conversion',NULL,'NULL'),
(383,'1','1','1','0x20x383','self conversion',NULL,'NULL'),
(384,'1','1','1','0x20x384','self conversion',NULL,'NULL'),
(385,'1','1','1','0x20x385','self conversion',NULL,'NULL'),
(386,'1','1','1','0x20x386','self conversion',NULL,'NULL'),
(387,'1','1','1','0x20x387','self conversion',NULL,'NULL'),
(388,'1','1','1','0x21x388','self conversion',NULL,'NULL'),
(389,'1','1','1','0x21x389','self conversion',NULL,'NULL'),
(390,'1','1','1','0x21x390','self conversion',NULL,'NULL'),
(391,'1','1','1','0x21x391','self conversion',NULL,'NULL'),
(392,'1','1','1','0x21x392','self conversion',NULL,'NULL'),
(393,'1','1','1','0x21x393','self conversion',NULL,'NULL'),
(394,'1','1','1','0x25x394','self conversion',NULL,''),
(395,'1','1','1','0x25x395','self conversion',NULL,''),
(396,'1','1','1','0x3x396','self conversion',NULL,''),
(397,'1','1','1','0x3x397','self conversion',NULL,''),
(398,'1','1','1','0x14x398','self conversion',NULL,''),
(399,'1','1','1','0x17x399','self conversion',NULL,''),
(400,'1','1','1','0x17x400','self conversion',NULL,''),
(401,'1','1','1','0x17x401','self conversion',NULL,''),
(402,'1','1','1','0x9x402','self conversion',NULL,''),
(403,'1','1','1','0x3x403','self conversion',NULL,'');

--
-- Table structure for table `uomlist`
--

CREATE TABLE `uomlist` (
  `UOM_id` int(11) NOT NULL AUTO_INCREMENT,
  `uom_Name` varchar(200) NOT NULL,
  `uom_symbol` varchar(50) DEFAULT NULL,
  `UOM_decimal_Points` int(11) DEFAULT 0,
  `UOM_Narration` varchar(2000) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `Last_Modified` timestamp NULL DEFAULT NULL,
  `Hidden_row` varchar(50) DEFAULT NULL,
  `SubUom` longtext DEFAULT NULL,
  PRIMARY KEY (`UOM_id`),
  UNIQUE KEY `UOM_id` (`UOM_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `uomlist`
--

INSERT INTO `uomlist` VALUES
(1,'Number','Nos',0,'','2017-07-31 03:09:32',NULL,NULL,NULL),
(2,'Meter','M',2,'','2017-07-31 03:10:08','2023-03-05 09:52:23',NULL,NULL),
(3,'Gram','GM',2,'','2019-01-12 13:25:30','2023-03-05 09:54:18',NULL,NULL),
(4,'Kilo Gram','KG',2,'','2019-01-12 13:25:49','2023-03-09 16:56:35',NULL,NULL),
(5,'Litre','LTR',2,'','2020-02-08 07:01:12','2023-03-05 09:54:47',NULL,NULL),
(6,'TRAY','TRAY',0,'','2020-02-28 16:56:31','2023-03-05 09:54:39',NULL,NULL),
(7,'Packet','PKT',0,'','2021-06-23 15:42:20','2023-03-05 09:52:43',NULL,NULL),
(8,'Box','BOX',0,'','2023-02-28 13:38:39','2023-03-05 09:52:34',NULL,NULL),
(9,'TIN','TIN',0,'','2023-03-03 17:59:07','2023-03-05 09:55:09',NULL,NULL),
(10,'EXTRA ','',0,'','2024-06-25 08:24:07','2024-06-25 08:24:07',NULL,NULL);

--
-- Table structure for table `user_access_permissions`
--

CREATE TABLE `user_access_permissions` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `User_Group_Id` int(11) DEFAULT NULL,
  `Ui_Id` int(11) DEFAULT NULL,
  `Allow_Create` tinyint(1) DEFAULT NULL,
  `Allow_Read` tinyint(1) DEFAULT NULL,
  `Allow_Update` tinyint(1) DEFAULT NULL,
  `Allow_Delete` tinyint(1) DEFAULT NULL,
  `Allow_Share` tinyint(1) DEFAULT NULL,
  `Extras` longtext DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1391 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_access_permissions`
--

INSERT INTO `user_access_permissions` VALUES
(229,6,97,1,1,1,1,1,''),
(230,4,68,1,1,1,1,1,''),
(231,4,1008,1,1,1,1,1,''),
(232,4,69,1,1,1,1,1,''),
(233,4,76,1,1,1,1,1,''),
(234,4,83,1,1,1,1,1,''),
(235,4,53,1,1,1,1,1,''),
(236,4,54,1,1,1,1,1,''),
(237,4,50,1,1,1,1,1,''),
(238,4,48,1,1,1,1,1,''),
(239,4,82,1,1,1,1,1,''),
(240,4,47,1,1,1,1,1,''),
(241,4,45,1,1,1,1,1,''),
(242,4,84,1,1,1,1,1,''),
(243,4,49,1,1,1,1,1,''),
(244,4,46,1,1,1,1,1,''),
(245,4,30,1,1,1,1,1,''),
(246,4,19,1,1,1,1,1,''),
(247,4,1010,1,1,1,1,1,''),
(248,4,91,1,1,1,1,1,''),
(249,4,27,1,1,1,1,1,''),
(250,4,21,1,1,1,1,1,''),
(251,4,34,1,1,1,1,1,''),
(252,4,81,1,1,1,1,1,''),
(253,4,41,1,1,1,1,1,''),
(254,4,61,1,1,1,1,1,''),
(255,4,33,1,1,1,1,1,''),
(256,4,13,1,1,1,1,1,''),
(257,4,35,1,1,1,1,1,''),
(258,4,20,1,1,1,1,1,''),
(259,4,90,1,1,1,1,1,''),
(260,4,17,1,1,1,1,1,''),
(261,4,1009,1,1,1,1,1,''),
(262,4,26,1,1,1,1,1,''),
(263,4,14,1,1,1,1,1,''),
(264,4,31,1,1,1,1,1,''),
(265,4,15,1,1,1,1,1,''),
(266,4,43,1,1,1,1,1,''),
(267,4,44,1,1,1,1,1,''),
(268,4,18,1,1,1,1,1,''),
(269,4,22,1,1,1,1,1,''),
(270,4,92,1,1,1,1,1,''),
(271,4,23,1,1,1,1,1,''),
(272,4,1006,1,1,1,1,1,''),
(273,4,1023,1,1,1,1,1,''),
(274,4,1024,1,1,1,1,1,''),
(275,4,87,1,1,1,1,1,''),
(276,4,67,1,1,1,1,1,''),
(277,4,62,1,1,1,1,1,''),
(278,4,63,1,1,1,1,1,''),
(279,4,66,1,1,1,1,1,''),
(280,4,65,1,1,1,1,1,''),
(281,4,64,1,1,1,1,1,''),
(282,4,59,1,1,1,1,1,''),
(283,4,51,1,1,1,1,1,''),
(284,4,86,1,1,1,1,1,''),
(285,4,85,1,1,1,1,1,''),
(286,4,52,1,1,1,1,1,''),
(287,4,58,1,1,1,1,1,''),
(288,4,57,1,1,1,1,1,''),
(289,4,56,1,1,1,1,1,''),
(290,4,78,1,1,1,1,1,''),
(291,4,1002,1,1,1,1,1,''),
(292,4,1001,1,1,1,1,1,''),
(293,4,29,1,1,1,1,1,''),
(294,4,10,1,1,1,1,1,''),
(295,4,4,1,1,1,1,1,''),
(296,4,1021,1,1,1,1,1,''),
(297,4,7,1,1,1,1,1,''),
(298,4,5,1,1,1,1,1,''),
(299,4,28,1,1,1,1,1,''),
(300,4,8,1,1,1,1,1,''),
(301,4,2,1,1,1,1,1,''),
(302,4,1017,1,1,1,1,1,''),
(303,4,36,1,1,1,1,1,''),
(304,4,40,1,1,1,1,1,''),
(305,4,3,1,1,1,1,1,''),
(306,4,11,1,1,1,1,1,''),
(307,4,6,1,1,1,1,1,''),
(308,4,39,1,1,1,1,1,''),
(309,4,60,1,1,1,1,1,''),
(310,4,80,1,1,1,1,1,''),
(311,4,1004,1,1,1,1,1,''),
(312,4,9,1,1,1,1,1,''),
(313,4,32,1,1,1,1,1,''),
(314,4,1000,1,1,1,1,1,''),
(315,4,12,1,1,1,1,1,''),
(316,4,1003,1,1,1,1,1,''),
(317,4,1020,1,1,1,1,1,''),
(318,4,1018,1,1,1,1,1,''),
(319,4,1019,1,1,1,1,1,''),
(320,4,89,1,1,1,1,1,''),
(321,4,88,1,1,1,1,1,''),
(322,4,97,1,1,1,1,1,''),
(666,0,1008,1,1,0,0,0,''),
(667,0,69,1,1,0,0,0,''),
(668,0,1024,1,1,0,0,0,''),
(669,0,48,1,1,0,0,0,''),
(670,0,47,1,1,0,0,0,''),
(671,0,49,1,1,0,0,0,''),
(672,0,46,1,1,0,0,0,''),
(673,0,30,1,1,0,0,0,''),
(674,0,1037,0,0,0,0,0,''),
(675,0,52,1,1,0,0,0,''),
(676,0,59,1,1,0,0,0,''),
(677,0,88,0,0,0,0,0,''),
(678,0,1023,1,1,0,0,0,''),
(679,0,1029,0,0,0,0,0,''),
(680,0,95,0,0,0,0,0,''),
(681,0,45,1,1,0,0,0,''),
(682,0,22,1,1,0,0,0,''),
(683,0,1027,0,0,0,0,0,''),
(684,0,152,0,0,0,0,0,''),
(685,0,61,1,1,0,0,0,''),
(686,0,19,0,0,0,0,0,''),
(687,0,56,1,1,0,0,0,''),
(688,0,1003,0,0,0,0,0,''),
(689,0,1000,0,0,0,0,0,''),
(690,0,1030,0,0,0,0,0,''),
(691,0,83,1,1,0,0,0,''),
(692,0,50,1,1,0,0,0,''),
(693,0,98,1,1,0,0,0,''),
(694,0,86,1,1,0,0,0,''),
(695,0,85,1,1,0,0,0,''),
(696,0,57,1,1,0,0,0,''),
(697,0,53,1,1,0,0,0,''),
(698,0,36,1,1,0,0,0,''),
(699,0,73,0,1,0,0,0,''),
(1249,1,1027,1,1,1,1,1,''),
(1250,1,68,1,1,1,1,1,''),
(1251,1,1008,1,1,1,1,1,''),
(1252,1,69,1,1,1,1,1,''),
(1253,1,112,1,1,1,1,1,''),
(1254,1,93,1,1,1,1,1,''),
(1255,1,76,1,1,1,1,1,''),
(1256,1,1024,1,1,1,1,1,''),
(1257,1,83,1,1,1,1,1,''),
(1258,1,53,1,1,1,1,1,''),
(1259,1,54,1,1,1,1,1,''),
(1260,1,50,1,1,1,1,1,''),
(1261,1,48,1,1,1,1,1,''),
(1262,1,82,1,1,1,1,1,''),
(1263,1,47,1,1,1,1,1,''),
(1264,1,45,1,1,1,1,1,''),
(1265,1,84,1,1,1,1,1,''),
(1266,1,95,1,1,1,1,1,''),
(1267,1,49,1,1,1,1,1,''),
(1268,1,46,1,1,1,1,1,''),
(1269,1,30,1,1,1,1,1,''),
(1270,1,1030,1,1,1,1,1,''),
(1271,1,1031,1,1,1,1,1,''),
(1272,1,1032,1,1,1,1,1,''),
(1273,1,1025,1,1,1,1,1,''),
(1274,1,19,1,1,1,1,1,''),
(1275,1,1010,1,1,1,1,1,''),
(1276,1,91,1,1,1,1,1,''),
(1277,1,27,1,1,1,1,1,''),
(1278,1,21,1,1,1,1,1,''),
(1279,1,34,1,1,1,1,1,''),
(1280,1,81,1,1,1,1,1,''),
(1281,1,41,1,1,1,1,1,''),
(1282,1,98,1,1,1,1,1,''),
(1283,1,61,1,1,1,1,1,''),
(1284,1,33,1,1,1,1,1,''),
(1285,1,13,1,1,1,1,1,''),
(1286,1,35,1,1,1,1,1,''),
(1287,1,20,1,1,1,1,1,''),
(1288,1,90,1,1,1,1,1,''),
(1289,1,110,1,1,1,1,1,''),
(1290,1,17,1,1,1,1,1,''),
(1291,1,1009,1,1,1,1,1,''),
(1292,1,26,1,1,1,1,1,''),
(1293,1,106,1,1,1,1,1,''),
(1294,1,109,1,1,1,1,1,''),
(1295,1,1037,1,1,1,1,1,''),
(1296,1,14,1,1,1,1,1,''),
(1297,1,151,1,1,1,1,1,''),
(1298,1,31,1,1,1,1,1,''),
(1299,1,108,1,1,1,1,1,''),
(1300,1,15,1,1,1,1,1,''),
(1301,1,43,1,1,1,1,1,''),
(1302,1,1026,1,1,1,1,1,''),
(1303,1,44,1,1,1,1,1,''),
(1304,1,105,1,1,1,1,1,''),
(1305,1,104,1,1,1,1,1,''),
(1306,1,103,1,1,1,1,1,''),
(1307,1,107,1,1,1,1,1,''),
(1308,1,18,1,1,1,1,1,''),
(1309,1,152,1,1,1,1,1,''),
(1310,1,22,1,1,1,1,1,''),
(1311,1,92,1,1,1,1,1,''),
(1312,1,23,1,1,1,1,1,''),
(1313,1,170,1,1,1,1,1,''),
(1314,1,1006,1,1,1,1,1,''),
(1315,1,87,1,1,1,1,1,''),
(1316,1,67,1,1,1,1,1,''),
(1317,1,62,1,1,1,1,1,''),
(1318,1,63,1,1,1,1,1,''),
(1319,1,1036,1,1,1,1,1,''),
(1320,1,164,1,1,1,1,1,''),
(1321,1,66,1,1,1,1,1,''),
(1322,1,65,1,1,1,1,1,''),
(1323,1,64,1,1,1,1,1,''),
(1324,1,59,1,1,1,1,1,''),
(1325,1,51,1,1,1,1,1,''),
(1326,1,86,1,1,1,1,1,''),
(1327,1,85,1,1,1,1,1,''),
(1328,1,52,1,1,1,1,1,''),
(1329,1,58,1,1,1,1,1,''),
(1330,1,57,1,1,1,1,1,''),
(1331,1,56,1,1,1,1,1,''),
(1332,1,78,1,1,1,1,1,''),
(1333,1,1028,1,1,1,1,1,''),
(1334,1,157,1,1,1,1,1,''),
(1335,1,1002,1,1,1,1,1,''),
(1336,1,1001,1,1,1,1,1,''),
(1337,1,29,1,1,1,1,1,''),
(1338,1,10,1,1,1,1,1,''),
(1339,1,4,1,1,1,1,1,''),
(1340,1,1021,1,1,1,1,1,''),
(1341,1,7,1,1,1,1,1,''),
(1342,1,5,1,1,1,1,1,''),
(1343,1,28,1,1,1,1,1,''),
(1344,1,8,1,1,1,1,1,''),
(1345,1,2,1,1,1,1,1,''),
(1346,1,1017,1,1,1,1,1,''),
(1347,1,114,1,1,1,1,1,''),
(1348,1,36,1,1,1,1,1,''),
(1349,1,40,1,1,1,1,1,''),
(1350,1,158,1,1,1,1,1,''),
(1351,1,97,1,1,1,1,1,''),
(1352,1,3,1,1,1,1,1,''),
(1353,1,11,1,1,1,1,1,''),
(1354,1,96,1,1,1,1,1,''),
(1355,1,6,1,1,1,1,1,''),
(1356,1,39,1,1,1,1,1,''),
(1357,1,60,1,1,1,1,1,''),
(1358,1,113,1,1,1,1,1,''),
(1359,1,80,1,1,1,1,1,''),
(1360,1,1004,1,1,1,1,1,''),
(1361,1,9,1,1,1,1,1,''),
(1362,1,32,1,1,1,1,1,''),
(1363,1,1000,1,1,1,1,1,''),
(1364,1,12,1,1,1,1,1,''),
(1365,1,1003,1,1,1,1,1,''),
(1366,1,1020,1,1,1,1,1,''),
(1367,1,1018,1,1,1,1,1,''),
(1368,1,178,1,1,1,1,1,''),
(1369,1,159,1,1,1,1,1,''),
(1370,1,180,1,1,1,1,1,''),
(1371,1,179,1,1,1,1,1,''),
(1372,1,1019,1,1,1,1,1,''),
(1373,1,89,1,1,1,1,1,''),
(1374,1,88,1,1,1,1,1,''),
(1375,1,1007,1,1,1,1,1,''),
(1376,1,70,1,1,1,1,1,''),
(1377,1,75,1,1,1,1,1,''),
(1378,1,71,1,1,1,1,1,''),
(1379,1,73,1,1,1,1,1,''),
(1380,1,72,1,1,1,1,1,''),
(1381,1,74,1,1,1,1,1,''),
(1382,1,1023,1,1,1,1,1,''),
(1383,1,1029,1,1,1,1,1,''),
(1384,1,1005,1,1,1,1,1,''),
(1385,1,38,1,1,1,1,1,''),
(1386,1,250,1,1,1,1,1,''),
(1387,1,5022,1,1,1,1,1,''),
(1388,1,6000,1,1,1,1,1,''),
(1389,1,5019,1,1,1,1,1,''),
(1390,1,5020,1,1,1,1,1,'');

--
-- Table structure for table `user_group_permissions`
--

CREATE TABLE `user_group_permissions` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `Name` varchar(100) NOT NULL,
  `Requirements_View` tinyint(4) DEFAULT NULL,
  `Requirements_Add` tinyint(4) DEFAULT NULL,
  `Requirements_Update` tinyint(4) DEFAULT NULL,
  `Requirements_Delete` tinyint(4) DEFAULT NULL,
  `Quotes_View` tinyint(4) DEFAULT NULL,
  `Quotes_Add` tinyint(4) DEFAULT NULL,
  `Quotes_Update` tinyint(4) DEFAULT NULL,
  `Quotes_Delete` tinyint(4) DEFAULT NULL,
  `exportQuote` tinyint(4) DEFAULT NULL,
  `clientApprove` tinyint(4) DEFAULT NULL,
  `managerApprove` tinyint(4) DEFAULT NULL,
  `reviseQuote` tinyint(4) DEFAULT NULL,
  `DraftsMan_View` tinyint(4) DEFAULT NULL,
  `DraftsMan_Add` tinyint(4) DEFAULT NULL,
  `DraftsMan_Update` tinyint(4) DEFAULT NULL,
  `DraftsMan_Delete` tinyint(4) DEFAULT NULL,
  `Sales_Orders_View` tinyint(4) DEFAULT NULL,
  `Sales_Orders_Add` tinyint(4) DEFAULT NULL,
  `Sales_Orders_Update` tinyint(4) DEFAULT NULL,
  `Sales_Orders_Delete` tinyint(4) DEFAULT NULL,
  `Sales_Invoices_View` tinyint(4) DEFAULT NULL,
  `Sales_Invoices_Add` tinyint(4) DEFAULT NULL,
  `Sales_Invoices_Update` tinyint(4) DEFAULT NULL,
  `Sales_Invoices_Delete` tinyint(4) DEFAULT NULL,
  `Purchase_Orders_View` tinyint(4) DEFAULT NULL,
  `Purchase_Orders_Add` tinyint(4) DEFAULT NULL,
  `Purchase_Orders_Update` tinyint(4) DEFAULT NULL,
  `Purchase_Orders_Delete` tinyint(4) DEFAULT NULL,
  `Purchase_Invoices_View` tinyint(4) DEFAULT NULL,
  `Purchase_Invoices_Add` tinyint(4) DEFAULT NULL,
  `Purchase_Invoices_Update` tinyint(4) DEFAULT NULL,
  `Purchase_Invoices_Delete` tinyint(4) DEFAULT NULL,
  `Delivery_Notes_View` tinyint(4) DEFAULT NULL,
  `Delivery_Notes_Add` tinyint(4) DEFAULT NULL,
  `Delivery_Notes_Update` tinyint(4) DEFAULT NULL,
  `Delivery_Notes_Delete` tinyint(4) DEFAULT NULL,
  `Credit_Notes_View` tinyint(4) DEFAULT NULL,
  `Credit_Notes_Add` tinyint(4) DEFAULT NULL,
  `Credit_Notes_Update` tinyint(4) DEFAULT NULL,
  `Credit_Notes_Delete` tinyint(4) DEFAULT NULL,
  `Debit_Notes_View` tinyint(4) DEFAULT NULL,
  `Debit_Notes_Add` tinyint(4) DEFAULT NULL,
  `Debit_Notes_Update` tinyint(4) DEFAULT NULL,
  `Debit_Notes_Delete` tinyint(4) DEFAULT NULL,
  `Receipt_Notes_View` tinyint(4) DEFAULT NULL,
  `Receipt_Notes_Add` tinyint(4) DEFAULT NULL,
  `Receipt_Notes_Update` tinyint(4) DEFAULT NULL,
  `Receipt_Notes_Delete` tinyint(4) DEFAULT NULL,
  `Journals_View` tinyint(4) DEFAULT NULL,
  `Journals_Add` tinyint(4) DEFAULT NULL,
  `Journals_Update` tinyint(4) DEFAULT NULL,
  `Journals_Delete` tinyint(4) DEFAULT NULL,
  `Payments_View` tinyint(4) DEFAULT NULL,
  `Payments_Add` tinyint(4) DEFAULT NULL,
  `Payments_Update` tinyint(4) DEFAULT NULL,
  `Payments_Delete` tinyint(4) DEFAULT NULL,
  `Purchases_View` tinyint(4) DEFAULT NULL,
  `Purchases_Add` tinyint(4) DEFAULT NULL,
  `Purchases_Update` tinyint(4) DEFAULT NULL,
  `Purchases_Delete` tinyint(4) DEFAULT NULL,
  `Receipts_View` tinyint(4) DEFAULT NULL,
  `Receipts_Add` tinyint(4) DEFAULT NULL,
  `Receipts_Update` tinyint(4) DEFAULT NULL,
  `Receipts_Delete` tinyint(4) DEFAULT NULL,
  `Stock_Entries_View` tinyint(4) DEFAULT NULL,
  `Stock_Entries_Add` tinyint(4) DEFAULT NULL,
  `Stock_Entries_Update` tinyint(4) DEFAULT NULL,
  `Stock_Entries_Delete` tinyint(4) DEFAULT NULL,
  `Stock_Journals_View` tinyint(4) DEFAULT NULL,
  `Stock_Journals_Add` tinyint(4) DEFAULT NULL,
  `Stock_Journals_Update` tinyint(4) DEFAULT NULL,
  `Stock_Journals_Delete` tinyint(4) DEFAULT NULL,
  `Material_In_Out_View` tinyint(4) DEFAULT NULL,
  `Material_In_Out_Add` tinyint(4) DEFAULT NULL,
  `Material_In_Out_Update` tinyint(4) DEFAULT NULL,
  `Material_In_Out_Delete` tinyint(4) DEFAULT NULL,
  `Godown_Transfer_View` tinyint(4) DEFAULT NULL,
  `Godown_Transfer_Add` tinyint(4) DEFAULT NULL,
  `Godown_Transfer_Update` tinyint(4) DEFAULT NULL,
  `Godown_Transfer_Delete` tinyint(4) DEFAULT NULL,
  `Account_Groups_View` tinyint(4) DEFAULT NULL,
  `Account_Groups_Add` tinyint(4) DEFAULT NULL,
  `Account_Groups_Update` tinyint(4) DEFAULT NULL,
  `Account_Groups_Delete` tinyint(4) DEFAULT NULL,
  `Ledgers_View` tinyint(4) DEFAULT NULL,
  `Ledgers_Add` tinyint(4) DEFAULT NULL,
  `Ledgers_Update` tinyint(4) DEFAULT NULL,
  `Ledgers_Delete` tinyint(4) DEFAULT NULL,
  `Bank_View` tinyint(4) DEFAULT NULL,
  `Bank_Add` tinyint(4) DEFAULT NULL,
  `Bank_Update` tinyint(4) DEFAULT NULL,
  `Bank_Delete` tinyint(4) DEFAULT NULL,
  `Brands_View` tinyint(4) DEFAULT NULL,
  `Brands_Add` tinyint(4) DEFAULT NULL,
  `Brands_Update` tinyint(4) DEFAULT NULL,
  `Brands_Delete` tinyint(4) DEFAULT NULL,
  `Godowns_View` tinyint(4) DEFAULT NULL,
  `Godowns_Add` tinyint(4) DEFAULT NULL,
  `Godowns_Update` tinyint(4) DEFAULT NULL,
  `Godowns_Delete` tinyint(4) DEFAULT NULL,
  `Properties_View` tinyint(4) DEFAULT NULL,
  `Properties_Add` tinyint(4) DEFAULT NULL,
  `Properties_Update` tinyint(4) DEFAULT NULL,
  `Properties_Delete` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Groups_View` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Groups_Add` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Groups_Update` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Groups_Delete` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Items_View` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Items_Add` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Items_Update` tinyint(4) DEFAULT NULL,
  `Sales_Inventory_Items_Delete` tinyint(4) DEFAULT NULL,
  `UOM_View` tinyint(4) DEFAULT NULL,
  `UOM_Add` tinyint(4) DEFAULT NULL,
  `UOM_Update` tinyint(4) DEFAULT NULL,
  `UOM_Delete` tinyint(4) DEFAULT NULL,
  `Price_Lists_View` tinyint(4) DEFAULT NULL,
  `Price_Lists_Add` tinyint(4) DEFAULT NULL,
  `Price_Lists_Update` tinyint(4) DEFAULT NULL,
  `Price_Lists_Delete` tinyint(4) DEFAULT NULL,
  `InventoryMasters` tinyint(4) DEFAULT NULL,
  `InventoryTransactions` tinyint(4) DEFAULT NULL,
  `FinanceMasters` tinyint(4) DEFAULT NULL,
  `FinanceTransactions` tinyint(4) DEFAULT NULL,
  `HR` tinyint(4) DEFAULT NULL,
  `Purchases` tinyint(4) DEFAULT NULL,
  `WareHouse` tinyint(4) DEFAULT NULL,
  `HelpDesk` tinyint(4) DEFAULT NULL,
  `Services` tinyint(4) DEFAULT NULL,
  `Finances` tinyint(4) DEFAULT NULL,
  `Inventory` tinyint(4) DEFAULT NULL,
  `Projects` tinyint(4) DEFAULT NULL,
  `Projects_View` tinyint(4) DEFAULT NULL,
  `Projects_Add` tinyint(4) DEFAULT NULL,
  `Projects_Update` tinyint(4) DEFAULT NULL,
  `Projects_Delete` tinyint(4) DEFAULT NULL,
  `Doucuments_View` tinyint(4) DEFAULT NULL,
  `Doucuments_Add` tinyint(4) DEFAULT NULL,
  `Doucuments_Update` tinyint(4) DEFAULT NULL,
  `Doucuments_Delete` tinyint(4) DEFAULT NULL,
  `WorkOrder_View` tinyint(4) DEFAULT NULL,
  `WorkOrder_Add` tinyint(4) DEFAULT NULL,
  `WorkOrder_Update` tinyint(4) DEFAULT NULL,
  `WorkOrder_Delete` tinyint(4) DEFAULT NULL,
  `DraftsExtraDocs` tinyint(4) DEFAULT NULL,
  `DraftStatus` tinyint(4) DEFAULT NULL,
  `MaxDiscountPercent` float DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `user_group_permissions`
--

INSERT INTO `user_group_permissions` VALUES
(0,'2021-07-10 16:55:29','Service boys',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1,'2017-09-14 18:28:15','Manager',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(2,'2017-10-16 05:50:24','FM',1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(3,'2017-10-16 05:51:39','Admin',1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-24,4,-4,8,0,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,NULL,NULL,NULL),
(4,'2019-04-25 12:31:04','MD',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(6,'2021-07-17 07:09:27','HR',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `visitorsregister`
--

CREATE TABLE `visitorsregister` (
  `_ID` int(11) NOT NULL AUTO_INCREMENT,
  `DATEVAL` datetime NOT NULL,
  `PHONENUMBER` varchar(100) DEFAULT NULL,
  `NAME` varchar(500) DEFAULT NULL,
  `ADDRESS` varchar(500) DEFAULT NULL,
  `TEMPERATURE` float DEFAULT NULL,
  `TIME_STAMP` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `visitorsregister`
--


--
-- Table structure for table `voucher_no_seq`
--

CREATE TABLE `voucher_no_seq` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `voucher_type` varchar(100) NOT NULL,
  `voucher_prefix` varchar(100) NOT NULL,
  `voucher_no` varchar(100) NOT NULL,
  PRIMARY KEY (`_id`),
  UNIQUE KEY `voucher_type` (`voucher_type`,`voucher_prefix`),
  UNIQUE KEY `voucher_type_2` (`voucher_type`,`voucher_prefix`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `voucher_no_seq`
--

INSERT INTO `voucher_no_seq` VALUES
(1,'SalesVoucher','A','345'),
(2,'PaymentVoucher','A','11'),
(3,'SalesOrder','A','240'),
(4,'DELTEDSALESVOUCHER','A','4');

--
-- Table structure for table `wastage_entry_details`
--

CREATE TABLE `wastage_entry_details` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `Voucher_No` varchar(100) NOT NULL,
  `Voucher_Prefix` varchar(100) NOT NULL,
  `Voucher_Date` date NOT NULL,
  `Inventory_Item_ID` varchar(100) NOT NULL,
  `drQty` float DEFAULT NULL,
  `crQty` float DEFAULT NULL,
  `Price` float NOT NULL,
  `UOM_id` varchar(50) DEFAULT NULL,
  `PriceLevel` varchar(100) DEFAULT NULL,
  `isCompoundItem` tinyint(1) DEFAULT NULL,
  `subItemOff_list_ID` varchar(100) DEFAULT NULL,
  `Discount_Percent` float DEFAULT NULL,
  `Discount_Amount` float DEFAULT NULL,
  `Subtotal` float DEFAULT NULL,
  `Project_ID` varchar(100) DEFAULT NULL,
  `Item_Narration` varchar(2000) DEFAULT NULL,
  `Item_Description` varchar(2000) DEFAULT NULL,
  `Salesman_ID` varchar(100) DEFAULT NULL,
  `Requirement_ItemID` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `wastage_entry_details`
--


--
-- Table structure for table `wastage_entry_main`
--

CREATE TABLE `wastage_entry_main` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `Voucher_No` varchar(100) NOT NULL,
  `Voucher_Prefix` varchar(100) NOT NULL,
  `Date_Created` date NOT NULL,
  `Voucher_Date` date NOT NULL,
  `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `Last_Updated` datetime(6) DEFAULT current_timestamp(6),
  `Ledger_ID` varchar(100) DEFAULT NULL,
  `Billing_Name` varchar(100) DEFAULT NULL,
  `Total` float DEFAULT NULL,
  `Narration` varchar(2000) DEFAULT NULL,
  `Added_By` varchar(100) DEFAULT NULL,
  `delivery_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Completion_Probability` float DEFAULT NULL,
  `Credit_Period` int(11) DEFAULT NULL,
  `POC_Name` varchar(100) DEFAULT NULL,
  `POC_Phone` varchar(100) DEFAULT NULL,
  `POC_Email` varchar(100) DEFAULT NULL,
  `Project_ID` varchar(100) DEFAULT NULL,
  `Revision_Number` varchar(100) DEFAULT NULL,
  `Converted_To_Sales_Order` tinyint(1) DEFAULT NULL,
  `Quotation_Dropped` tinyint(1) DEFAULT NULL,
  `Quotation_Dropped_Reason` varchar(2000) DEFAULT NULL,
  `Requirement_Voucher_No` varchar(100) DEFAULT NULL,
  `Salesman_ID` varchar(100) DEFAULT NULL,
  `VoucherStatus` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`_id`),
  UNIQUE KEY `Voucher_No` (`Voucher_No`,`Voucher_Prefix`),
  UNIQUE KEY `Voucher_No_2` (`Voucher_No`,`Voucher_Prefix`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `wastage_entry_main`
--


--
-- Table structure for table `widget_master`
--

CREATE TABLE `widget_master` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `Widget_Id` int(11) NOT NULL,
  `Widget_Name` varchar(100) NOT NULL,
  `Category` varchar(100) NOT NULL,
  `Parent_Widget` int(11) NOT NULL,
  `Widget_Type` varchar(100) NOT NULL,
  `Modules` varchar(200) NOT NULL,
  `Priority` float NOT NULL,
  `isConfiguredInDb` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=198 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `widget_master`
--

INSERT INTO `widget_master` VALUES
(1,1021,'Groupwise Sales Report','Screen',0,'C|Reports','Inventory',3,0),
(2,2,'Itemwise Billwise Sales Report','Screen',0,'C|Reports','Inventory',1.3,1),
(3,3,'Itemwise Transaction Summary','Screen',0,'C|Reports','Inventory',1,1),
(4,4,'Groupwise Purchase Report','Screen',0,'C|Reports','Inventory',0,1),
(5,5,'Item Movement Analysis','Screen',0,'C|Reports','Inventory',8,1),
(6,6,'Negative Stock Report','Screen',0,'C|Reports','Inventory',10,1),
(7,7,'Groupwise Transaction Summary','Screen',0,'C|Reports','Inventory',1.1,1),
(8,8,'Item Movement Summary By Ledger','Screen',0,'C|Reports','Inventory',1.9,1),
(9,9,'Re-Order Report','Screen',0,'C|Reports','Inventory|Purchases',11,1),
(10,10,'Godownwise Sales Report','Screen',0,'C|Reports','Inventory',9,1),
(11,11,'Mode of Servicewise Sales Report','Screen',0,'C|Reports','Inventory',13,1),
(12,12,'Time Based Sales Report','Screen',0,'C|Reports','Inventory',14,1),
(13,13,'Day Book','Screen',0,'C|Reports','Finance',1,1),
(14,14,'Ledger Report','Screen',0,'C|Reports','Finance|Purchases',2,1),
(15,15,'Over-Due Bills By Ledger','Screen',0,'C|Reports','Finance|Purchases',8,1),
(16,1010,'Billwise Sales Report','Screen',0,'C|Reports','Finance',3,0),
(17,17,'Groupwise Outstanding','Screen',0,'C|Reports','Finance',7,1),
(18,18,'Salesman-wise Sales','Screen',0,'C|Reports','Finance',9,1),
(19,19,'Billwise Report By Salesman','Screen',0,'C|Reports','Finance',0,1),
(20,20,'Discount Report','Screen',0,'C|Reports','Finance',10,1),
(21,21,'Complimentary Report','Screen',0,'C|Reports','Finance',11,1),
(22,22,'Shift Report','Screen',0,'C|Reports','Finance',12,1),
(23,23,'Trial Balance','Screen',0,'C|Reports','Finance',19,1),
(24,24,'Itemwise Stock Report By Group And Godown And LPP','Screen',0,'C|Reports','',0,1),
(25,25,'Groupwise Stock Report By Godown And LPP','Screen',0,'C|Reports','',0,1),
(26,26,'GST Report By HSN','Screen',0,'C|Reports','Finance',0,1),
(27,27,'Cess Report','Screen',0,'C|Reports','Finance',0,1),
(28,28,'Item Movement Detailed By Ledger','Screen',0,'C|Reports','Inventory',0,1),
(29,29,'Godownwise Billwise Sales','Screen',0,'C|Reports','Inventory',0,1),
(30,30,'Sales Voucher Register','Screen',0,'B|Registers','Finance',1,1),
(31,31,'Ledgerwise Transaction Summary','Screen',0,'C|Reports','Finance',13,1),
(32,32,'Sales Margin Report','Screen',0,'C|Reports','Inventory',15,1),
(33,33,'Datewise Sales Report','Screen',0,'C|Reports','Finance',14,1),
(34,34,'Customer List','Screen',0,'C|Reports','Finance',15,1),
(35,35,'Deleted Billwise Sales Report','Screen',0,'C|Reports','Finance',0,1),
(36,36,'Itemwise Purchase Orders','Screen',0,'C|Reports','Inventory|Purchases',0,1),
(38,38,'Visitors List','Screen',0,'C|Reports','',0,1),
(39,39,'Pending Orders','Screen',0,'C|Reports','Inventory',16,1),
(40,40,'Itemwise Purchase Report','Screen',0,'C|Reports','Inventory',0,1),
(41,41,'Customerwise Itemwise Sales Report','Screen',0,'C|Reports','Finance',0,1),
(42,43,'Payment Voucher Summary','Screen',0,'C|Reports','Finance',16,1),
(43,44,'Receipt Voucher Summary','Screen',0,'C|Reports','Finance',17,1),
(44,45,'Purchase Voucher Register','Screen',0,'B|Registers','Finance|Purchases',2,1),
(45,46,'Sales Order Register','Screen',0,'B|Registers','Finance',3,1),
(46,47,'Purchase Order Register','Screen',0,'B|Registers','Finance|Purchases|Warehouse',4,1),
(47,48,'Payment Voucher Register','Screen',0,'B|Registers','Finance|Purchases',6,1),
(48,49,'Receipt Voucher Register','Screen',0,'B|Registers','Finance',5,1),
(49,50,'Journal Register','Screen',0,'B|Registers','Finance',7,1),
(50,51,'Delivery Note Register','Screen',0,'B|Registers','Inventory|Warehouse',1,1),
(51,52,'Receipt Note Register','Screen',0,'B|Registers','Inventory|Purchases',2,1),
(52,53,'Credit Note Register','Screen',0,'B|Registers','Finance|Purchases',8,1),
(53,54,'Debit Note Register','Screen',0,'B|Registers','Finance',9,1),
(54,56,'Wastage Entries','Screen',0,'B|Registers','Inventory',7,1),
(55,57,'Stock Request/Issue','Screen',0,'B|Registers','Inventory',6,1),
(56,58,'Stock Journal','Screen',0,'B|Registers','Inventory',3,1),
(57,59,'Current Stock Entry','Screen',0,'B|Registers','Inventory|Warehouse',4,1),
(58,60,'Pending Orders','Screen',0,'C|Reports','Inventory',0,1),
(59,61,'Datewise Purchase Report','Screen',0,'C|Reports','Finance',18,1),
(60,62,'Inventory Groups','Screen',0,'A|Masters','Inventory',2,1),
(61,63,'Inventory Items','Screen',0,'A|Masters','Inventory|Purchases',1,1),
(62,64,'Units of Measurement','Screen',0,'A|Masters','Inventory',3,1),
(63,65,'Unit Conversions','Screen',0,'A|Masters','Inventory',4,1),
(64,66,'Price Lists','Screen',0,'A|Masters','Inventory',5,1),
(65,67,'Godowns','Screen',0,'A|Masters','Inventory|Warehouse',6,1),
(66,68,'Account Groups','Screen',0,'A|Masters','Finance',2,1),
(67,69,'Ledgers','Screen',0,'A|Masters','Finance|Purchases',1,1),
(68,70,'Employees','Screen',0,'A|Masters','HR',1,1),
(69,71,'Attendance Report','Screen',0,'C|Reports','HR',1,1),
(70,72,'Payslip Report','Screen',0,'C|Reports','HR',2,1),
(71,73,'Passport Expiry List','Screen',0,'C|Reports','HR',3,1),
(72,74,'Visa Expiry List','Screen',0,'C|Reports','HR',4,1),
(73,75,'User Groups','Screen',0,'A|Masters','HR',2,1),
(74,76,'Terms & Conditions','Screen',0,'A|Masters','Finance',3,1),
(75,1006,'Bank  Reconciliation','Screen',0,'D|Bank','Finance',1,0),
(76,78,'Work  Orders','Screen',0,'B|Registers','Inventory',5,1),
(77,79,'Inventory Item Editor','Screen',0,'A|Masters','',0,1),
(78,80,'Production Rate Report','Screen',0,'C|Reports','Inventory',12,1),
(79,1000,'Stock Report','Screen',0,'C|Reports','Inventory|WareHouse|Purchases',2,0),
(80,1001,'Debit Note Report','Screen',0,'C|Reports','Inventory',5,0),
(81,1002,'Credit Note Report','Screen',0,'C|Reports','Inventory',6,0),
(82,1003,'Wastage Report','Screen',0,'C|Reports','Inventory',7,0),
(83,1004,'Purchase Report','Screen',0,'C|Reports','Inventory|Purchases',4,0),
(84,1007,'Attendance','Screen',0,'A|Admin','HR',1,0),
(85,1008,'Ledger Opening','Screen',0,'A|Masters','Finance',4,0),
(86,1009,'GST Report','Screen',0,'C|Reports','Finance',12,0),
(87,1011,'Accounts','Screen',0,'D|Dashboards','Dashboard',1,0),
(88,1012,'Items','Screen',0,'D|Dashboards','Dashboard',2,0),
(89,1013,'Customers','Screen',0,'D|Dashboards','Dashboard',3,0),
(90,1014,'Sales','Screen',0,'D|Dashboards','Dashboard',4,0),
(91,1015,'Purchases','Screen',0,'D|Dashboards','Dashboard',5,0),
(92,1016,'Receipts','Screen',0,'D|Dashboards','Dashboard',6,0),
(93,81,'Customer Report','Screen',0,'C|Reports','Finance',4,1),
(94,82,'Proforma Register','Screen',0,'B|Registers','Finance',10,1),
(187,83,'Contra Voucher Register','Screen',0,'B|Registers','Finance',10,1),
(188,84,'Quotations','Screen',0,'B|Registers','Finance',11,1),
(189,85,'Itemwise Sales Order Entry','Screen',0,'B|Registers','Inventory',1,1),
(190,86,'Itemwise Purchase Order Entry','Screen',0,'B|Registers','Inventory',1,1),
(191,1017,'Itemwise Order report','Screen',0,'C|Reports','Inventory',1,0),
(192,87,'Brands','Screen',0,'A|Masters','Inventory',10,1),
(193,88,'Godown Transfer Register','Screen',0,'B|Registers','Warehouse',1,1),
(194,1018,'Godownwise Item Movement','Screen',0,'D|Items','Inventory',3,0),
(195,1019,'Ledgerwise Item Movement','Screen',0,'D|Items','Inventory',2,0),
(196,1020,'Account Groupwise Item Movement','Screen',0,'D|Items','Inventory',1,0),
(197,89,'Purchase Item Quantity Report','Screen',0,'D|Items','Inventory|Purchases',7,1);

--
-- Table structure for table `work_order_detail`
--

CREATE TABLE `work_order_detail` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `WorkOrder_id` varchar(100) DEFAULT NULL,
  `SalesOrder_Id` varchar(100) DEFAULT NULL,
  `requirement_no` varchar(100) DEFAULT NULL,
  `Quantity` int(11) DEFAULT NULL,
  `Price` float DEFAULT NULL,
  `itemID` varchar(100) DEFAULT NULL,
  `SerialNo` varchar(100) DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `TechnicanID` varchar(50) DEFAULT NULL,
  `CompletedDate` datetime DEFAULT NULL,
  `Expected_Date` date DEFAULT NULL,
  `TimeStamp` datetime NOT NULL DEFAULT current_timestamp(),
  `Remarks` varchar(500) DEFAULT NULL,
  `DN_id` varchar(100) DEFAULT NULL,
  `Voucher_Prefix` varchar(10) DEFAULT NULL,
  `Start_TimeStamp` timestamp NULL DEFAULT NULL,
  `Completion_Timestamp` timestamp NULL DEFAULT NULL,
  `Section` varchar(20) DEFAULT NULL,
  `UOM_Id` varchar(50) DEFAULT NULL,
  `ItemVoucherStatus` int(11) DEFAULT NULL,
  `itemProductionStatus` int(11) DEFAULT NULL,
  `Requirement_ItemID` varchar(100) DEFAULT NULL,
  `Salesman_ID` varchar(100) DEFAULT NULL,
  `Project_ID` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `work_order_detail`
--


--
-- Table structure for table `work_order_main`
--

CREATE TABLE `work_order_main` (
  `_id` int(11) NOT NULL AUTO_INCREMENT,
  `Voucher_No` varchar(100) NOT NULL,
  `Voucher_Prefix` varchar(100) NOT NULL,
  `Date_Created` date NOT NULL,
  `Voucher_Date` date NOT NULL,
  `TimeStamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `Last_Updated` datetime(6) DEFAULT current_timestamp(6),
  `Ledger_ID` varchar(100) DEFAULT NULL,
  `Billing_Name` varchar(100) DEFAULT NULL,
  `Total` float NOT NULL,
  `Discount_in_Amount` float DEFAULT NULL,
  `Discount_in_Percent` float DEFAULT NULL,
  `Narration` varchar(2000) DEFAULT NULL,
  `Added_By` varchar(100) DEFAULT NULL,
  `delivery_date` timestamp NULL DEFAULT NULL,
  `Completion_Probability` float DEFAULT NULL,
  `Credit_Period` int(11) DEFAULT NULL,
  `POC_Name` varchar(100) DEFAULT NULL,
  `POC_Phone` varchar(100) DEFAULT NULL,
  `POC_Email` varchar(100) DEFAULT NULL,
  `Project_ID` varchar(100) DEFAULT NULL,
  `Revision_Number` varchar(100) DEFAULT NULL,
  `Converted_To_Sales_Order` varchar(100) DEFAULT NULL,
  `Quotation_Dropped` tinyint(1) DEFAULT NULL,
  `Quotation_Dropped_Reason` varchar(2000) DEFAULT NULL,
  `Requirement_Voucher_No` varchar(100) DEFAULT NULL,
  `Salesman_ID` varchar(100) DEFAULT NULL,
  `PaymentCompleted` varchar(50) DEFAULT NULL,
  `VoucherStatus` varchar(50) DEFAULT NULL,
  `LPO_Ref` varchar(100) DEFAULT NULL,
  `MODE_OF_SERVICE` varchar(10) DEFAULT NULL,
  `Vat_Amount` float DEFAULT NULL,
  `Gross_Total` float DEFAULT NULL,
  `ContactID` int(11) DEFAULT NULL,
  `Reference` varchar(50) DEFAULT NULL,
  `Currency` varchar(10) DEFAULT NULL,
  `Boxes_Count` int(11) DEFAULT NULL,
  `Total_Weight` float DEFAULT NULL,
  `LR_No` varchar(20) DEFAULT NULL,
  `Voucher_No_Display` varchar(20) DEFAULT NULL,
  `Requirement_Voucher_List` longtext DEFAULT NULL,
  `Origin` int(20) DEFAULT NULL,
  `Customer_Expected_Date` date DEFAULT NULL,
  `Round_Off` float DEFAULT NULL,
  `TransactionId` varchar(50) DEFAULT NULL,
  `Section` varchar(100) DEFAULT NULL,
  `Completed_TimeStamp` datetime DEFAULT NULL,
  PRIMARY KEY (`_id`),
  UNIQUE KEY `Voucher_No` (`Voucher_No`,`Voucher_Prefix`),
  UNIQUE KEY `Voucher_No_2` (`Voucher_No`,`Voucher_Prefix`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `work_order_main`
--



