postgresql-2024-01-17_000000.log:2024-01-17 08:02:11 +04,10505 LOG: duration: 3141.979 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:02:08','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_000000.log:2024-01-17 08:02:28 +04,10534 LOG: duration: 3417.261 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:02:24','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_000000.log:2024-01-17 08:07:02 +04,10655 LOG: duration: 1807.110 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_000000.log:2024-01-17 08:07:05 +04,26363 LOG: duration: 4516.474 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_000000.log:2024-01-17 08:07:35 +04,26362 LOG: duration: 34635.948 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_081347.log:2024-01-17 08:14:57 +04,10645 LOG: duration: 3020.472 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:14:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:15:56 +04,10645 LOG: duration: 2951.237 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:15:53','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:18:26 +04,10935 LOG: duration: 3141.156 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:18:23','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:18:58 +04,10935 LOG: duration: 2957.022 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:18:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:19:15 +04,10934 LOG: duration: 3100.135 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:19:12','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:20:41 +04,10984 LOG: duration: 2598.346 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='P' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:20:38','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:20:53 +04,11005 LOG: duration: 2552.783 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='D' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:20:51','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:21:07 +04,11005 LOG: duration: 3372.279 ms execute : SELECT COALESCE(SUM(COALESCE(currencyBase(o.C_Conversion_Rate_ID,(ol.QtyDelivered-ol.QtyInvoiced)*ol.PriceActual,o.C_Currency_ID,o.DateOrdered, o.AD_Client_ID,o.AD_Org_ID) ,0)),0) FROM C_OrderLine ol INNER JOIN C_Order o ON (ol.C_Order_ID=o.C_Order_ID) WHERE o.IsSOTrx='Y' AND o.isinvoiced='N' AND Bill_BPartner_ID=$1 AND o.isactive='Y' AND o.docstatus in ('CO','CL') postgresql-2024-01-17_081347.log:2024-01-17 08:23:24 +04,11094 LOG: duration: 1986.433 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:25 +04,11094 LOG: duration: 762.148 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:27 +04,11094 LOG: duration: 1943.336 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:36 +04,11094 LOG: duration: 8745.392 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:42 +04,11094 LOG: duration: 5769.106 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:45 +04,11094 LOG: duration: 1784.662 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:46 +04,11094 LOG: duration: 1394.063 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:48 +04,11094 LOG: duration: 1834.623 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:50 +04,11094 LOG: duration: 1839.640 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:52 +04,11094 LOG: duration: 1840.048 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:54 +04,11094 LOG: duration: 1842.000 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:57 +04,11094 LOG: duration: 1842.082 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:23:59 +04,11094 LOG: duration: 1799.448 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:01 +04,11094 LOG: duration: 1796.313 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:03 +04,11094 LOG: duration: 1809.772 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:05 +04,11094 LOG: duration: 1841.441 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:07 +04,11094 LOG: duration: 1847.027 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:08 +04,11094 LOG: duration: 1044.031 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:10 +04,11094 LOG: duration: 1885.895 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:12 +04,11094 LOG: duration: 1856.385 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:14 +04,11094 LOG: duration: 1805.381 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:16 +04,11094 LOG: duration: 1785.865 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:18 +04,11094 LOG: duration: 1788.806 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:20 +04,11094 LOG: duration: 1816.940 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:22 +04,11094 LOG: duration: 1842.934 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:25 +04,11094 LOG: duration: 1837.709 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:27 +04,11094 LOG: duration: 1836.557 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:29 +04,11094 LOG: duration: 1834.088 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:31 +04,11094 LOG: duration: 1812.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:33 +04,11094 LOG: duration: 1782.144 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:35 +04,11094 LOG: duration: 1782.839 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:37 +04,11094 LOG: duration: 1811.582 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:38 +04,11094 LOG: duration: 802.004 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:40 +04,11094 LOG: duration: 1863.038 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:41 +04,11094 LOG: duration: 1181.596 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:43 +04,11094 LOG: duration: 2525.666 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:44 +04,11094 LOG: duration: 969.756 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:46 +04,11094 LOG: duration: 1844.975 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:48 +04,11094 LOG: duration: 1785.696 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:50 +04,11094 LOG: duration: 1794.203 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:24:52 +04,11094 LOG: duration: 1787.039 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_081347.log:2024-01-17 08:28:29 +04,11182 LOG: duration: 679.022 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND ((st.qtyonhand+st.qtyreserved+st.qtyordered+st.qtyintransit+st.cwqtyonhand) <> 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0 )) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.m_warehouse_id = 1000000 group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP') AND m.m_locatorto_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y' AND pr.ad_org_id IN (0,1000000) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name having sum(st.qtyonhand)> 25 order by name postgresql-2024-01-17_081347.log:2024-01-17 08:30:27 +04,11242 LOG: duration: 1017.673 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:30:25','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:35:04 +04,11242 LOG: duration: 946.303 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:35:03','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:35:14 +04,11242 LOG: duration: 3083.539 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:35:11','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_081347.log:2024-01-17 08:36:09 +04,11242 LOG: duration: 940.185 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:36:08','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:24 +04,11545 LOG: duration: 2051.274 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:24 +04,11580 LOG: duration: 2011.982 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:25 +04,11545 LOG: duration: 772.113 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:25 +04,11580 LOG: duration: 771.278 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:27 +04,11545 LOG: duration: 2137.532 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:27 +04,11580 LOG: duration: 2139.379 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:37 +04,11545 LOG: duration: 8821.347 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:37 +04,11580 LOG: duration: 8878.135 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:43 +04,11545 LOG: duration: 5808.116 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:43 +04,11580 LOG: duration: 5776.799 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:46 +04,11545 LOG: duration: 1900.347 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:46 +04,11580 LOG: duration: 1899.424 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:47 +04,11594 LOG: duration: 3026.074 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:39:44','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:47 +04,11545 LOG: duration: 1395.509 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:47 +04,11580 LOG: duration: 1410.569 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:49 +04,11545 LOG: duration: 1936.217 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:49 +04,11580 LOG: duration: 1936.186 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:51 +04,11545 LOG: duration: 1961.254 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:52 +04,11580 LOG: duration: 1962.304 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:54 +04,11545 LOG: duration: 1958.855 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:54 +04,11580 LOG: duration: 1960.098 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:56 +04,11545 LOG: duration: 1971.324 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:56 +04,11580 LOG: duration: 1970.621 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:57 +04,11594 LOG: duration: 3004.414 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:39:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:58 +04,11545 LOG: duration: 1963.634 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:39:58 +04,11580 LOG: duration: 1958.590 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:00 +04,11545 LOG: duration: 1916.955 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:00 +04,11580 LOG: duration: 1918.414 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:02 +04,11545 LOG: duration: 1928.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:03 +04,11580 LOG: duration: 1927.691 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:05 +04,11545 LOG: duration: 1935.992 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:05 +04,11580 LOG: duration: 1942.390 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:07 +04,11545 LOG: duration: 1954.468 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:07 +04,11580 LOG: duration: 1955.007 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:09 +04,11545 LOG: duration: 1904.506 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:09 +04,11580 LOG: duration: 1891.436 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:10 +04,11545 LOG: duration: 1041.368 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:10 +04,11580 LOG: duration: 1041.827 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:12 +04,11545 LOG: duration: 1994.159 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:12 +04,11580 LOG: duration: 1994.263 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:13 +04,11380 LOG: duration: 4785.433 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and cdl.orderdeliverystatus='S' and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:40:08','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:14 +04,11545 LOG: duration: 1981.005 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:15 +04,11580 LOG: duration: 1980.129 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:17 +04,11545 LOG: duration: 1915.896 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:17 +04,11580 LOG: duration: 1914.106 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:19 +04,11545 LOG: duration: 1917.252 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:19 +04,11580 LOG: duration: 1915.478 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:21 +04,11545 LOG: duration: 1918.522 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:21 +04,11580 LOG: duration: 1929.171 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:23 +04,11545 LOG: duration: 1959.469 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:23 +04,11580 LOG: duration: 1958.379 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:25 +04,11545 LOG: duration: 1953.234 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:26 +04,11580 LOG: duration: 1950.924 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:28 +04,11545 LOG: duration: 1948.017 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:28 +04,11580 LOG: duration: 1947.828 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:30 +04,11545 LOG: duration: 1937.447 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:30 +04,11580 LOG: duration: 1938.781 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:32 +04,11545 LOG: duration: 1923.990 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:32 +04,11580 LOG: duration: 1920.698 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:34 +04,11545 LOG: duration: 1914.023 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:34 +04,11580 LOG: duration: 1906.039 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:36 +04,11545 LOG: duration: 1910.188 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:36 +04,11580 LOG: duration: 1910.070 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:38 +04,11545 LOG: duration: 1925.925 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:39 +04,11580 LOG: duration: 1931.144 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:41 +04,11545 LOG: duration: 1963.897 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:41 +04,11580 LOG: duration: 1965.061 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:41 +04,11545 LOG: duration: 799.291 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:42 +04,11580 LOG: duration: 799.554 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:43 +04,11545 LOG: duration: 1985.509 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:44 +04,11580 LOG: duration: 1985.710 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:45 +04,11545 LOG: duration: 1181.533 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:45 +04,11580 LOG: duration: 1181.942 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:47 +04,11545 LOG: duration: 2524.089 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:47 +04,11580 LOG: duration: 2529.648 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:48 +04,11545 LOG: duration: 962.880 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:49 +04,11580 LOG: duration: 961.676 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:50 +04,11545 LOG: duration: 1913.474 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:50 +04,11580 LOG: duration: 1911.829 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:52 +04,11545 LOG: duration: 1905.502 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:53 +04,11580 LOG: duration: 1905.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:55 +04,11545 LOG: duration: 1893.477 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:55 +04,11580 LOG: duration: 1896.026 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:57 +04,11545 LOG: duration: 1928.444 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:40:57 +04,11580 LOG: duration: 1928.462 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:41:17 +04,11594 LOG: duration: 2938.909 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:41:14','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:42:24 +04,11380 LOG: duration: 966.979 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:42:23','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:47:48 +04,11823 LOG: duration: 1782.658 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_083701.log:2024-01-17 08:47:50 +04,11755 LOG: duration: 3070.116 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:47:47','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:47:51 +04,26362 LOG: duration: 4551.067 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_083701.log:2024-01-17 08:47:58 +04,11814 LOG: duration: 2977.367 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:47:55','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:45 +04,11868 LOG: duration: 1923.296 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:45 +04,11905 LOG: duration: 1920.619 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:46 +04,11868 LOG: duration: 770.193 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:46 +04,11905 LOG: duration: 766.445 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:48 +04,11868 LOG: duration: 2041.967 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:48 +04,11905 LOG: duration: 2057.679 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:57 +04,11868 LOG: duration: 8768.683 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:48:58 +04,11905 LOG: duration: 8741.911 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:03 +04,11868 LOG: duration: 5510.128 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:03 +04,11905 LOG: duration: 5487.881 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:06 +04,11868 LOG: duration: 1875.693 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:06 +04,11905 LOG: duration: 1879.512 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:07 +04,11868 LOG: duration: 1408.864 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:08 +04,11905 LOG: duration: 1411.054 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:09 +04,11868 LOG: duration: 1925.379 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:10 +04,11905 LOG: duration: 1933.609 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:11 +04,11868 LOG: duration: 1937.324 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:12 +04,11905 LOG: duration: 1940.899 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:13 +04,11868 LOG: duration: 1927.679 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:14 +04,11905 LOG: duration: 1945.012 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:16 +04,11868 LOG: duration: 1886.259 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:16 +04,11905 LOG: duration: 1886.981 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:18 +04,11868 LOG: duration: 1872.375 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:18 +04,11905 LOG: duration: 1880.742 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:20 +04,11868 LOG: duration: 1885.809 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:20 +04,11905 LOG: duration: 1881.172 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:22 +04,11868 LOG: duration: 1937.275 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:23 +04,11905 LOG: duration: 1916.417 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:24 +04,11868 LOG: duration: 1949.452 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:25 +04,11905 LOG: duration: 1941.219 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:26 +04,11868 LOG: duration: 1936.911 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:27 +04,11905 LOG: duration: 1934.944 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:29 +04,11868 LOG: duration: 1922.920 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:29 +04,11905 LOG: duration: 1917.426 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:30 +04,11868 LOG: duration: 1046.169 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:30 +04,11905 LOG: duration: 1046.611 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:32 +04,11868 LOG: duration: 1905.671 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:32 +04,11905 LOG: duration: 1913.360 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:34 +04,11868 LOG: duration: 1874.860 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:34 +04,11905 LOG: duration: 1879.824 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:36 +04,11868 LOG: duration: 1883.132 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:37 +04,11905 LOG: duration: 1874.854 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:38 +04,11868 LOG: duration: 1927.281 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:39 +04,11905 LOG: duration: 1930.602 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:40 +04,11868 LOG: duration: 1932.257 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:41 +04,11905 LOG: duration: 1940.427 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:43 +04,11868 LOG: duration: 1928.832 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:43 +04,11905 LOG: duration: 1938.309 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:45 +04,11868 LOG: duration: 1916.794 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:45 +04,11905 LOG: duration: 1922.777 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:47 +04,11868 LOG: duration: 1906.756 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:48 +04,11905 LOG: duration: 1914.367 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:49 +04,11868 LOG: duration: 1882.496 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:50 +04,11905 LOG: duration: 1861.725 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:51 +04,11868 LOG: duration: 1883.612 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:52 +04,11905 LOG: duration: 1868.917 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:53 +04,11868 LOG: duration: 1897.538 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:54 +04,11905 LOG: duration: 1909.975 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:55 +04,11868 LOG: duration: 1934.445 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:56 +04,11905 LOG: duration: 1930.101 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:58 +04,11868 LOG: duration: 1923.512 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:49:58 +04,11905 LOG: duration: 1936.174 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:00 +04,11868 LOG: duration: 1920.226 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:00 +04,11905 LOG: duration: 1900.008 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:01 +04,11868 LOG: duration: 801.862 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:01 +04,11905 LOG: duration: 801.217 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:03 +04,11868 LOG: duration: 1910.125 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:03 +04,11905 LOG: duration: 1903.947 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:04 +04,11868 LOG: duration: 1178.039 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:04 +04,11905 LOG: duration: 1167.196 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:06 +04,11868 LOG: duration: 2447.330 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:07 +04,11905 LOG: duration: 2431.169 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:07 +04,11868 LOG: duration: 951.975 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:08 +04,11905 LOG: duration: 950.861 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:09 +04,11868 LOG: duration: 1883.663 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:10 +04,11905 LOG: duration: 1895.683 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:11 +04,11868 LOG: duration: 1915.172 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:12 +04,11905 LOG: duration: 1924.781 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:14 +04,11868 LOG: duration: 1900.608 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:14 +04,11905 LOG: duration: 1917.138 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:16 +04,11868 LOG: duration: 1925.213 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:50:16 +04,11905 LOG: duration: 1883.628 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:26 +04,12052 LOG: duration: 1914.861 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:27 +04,12052 LOG: duration: 757.681 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:29 +04,12052 LOG: duration: 1887.528 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:38 +04,12052 LOG: duration: 8754.884 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:44 +04,12052 LOG: duration: 5572.638 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:47 +04,12052 LOG: duration: 1773.806 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:48 +04,12052 LOG: duration: 1406.485 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:50 +04,12052 LOG: duration: 1815.342 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:52 +04,12052 LOG: duration: 1815.498 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:54 +04,12052 LOG: duration: 1817.226 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:56 +04,12052 LOG: duration: 1813.811 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:53:58 +04,12052 LOG: duration: 1793.965 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:00 +04,12052 LOG: duration: 1765.511 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:02 +04,12052 LOG: duration: 1777.533 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:04 +04,12052 LOG: duration: 1809.578 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:06 +04,12052 LOG: duration: 1821.673 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:09 +04,12052 LOG: duration: 1813.352 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:10 +04,12052 LOG: duration: 1045.716 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:12 +04,12052 LOG: duration: 1863.596 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:14 +04,12052 LOG: duration: 1824.344 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:16 +04,12052 LOG: duration: 1757.648 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:18 +04,12052 LOG: duration: 1762.050 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:20 +04,12052 LOG: duration: 1780.290 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:22 +04,12052 LOG: duration: 1821.190 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:24 +04,12052 LOG: duration: 1824.563 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:26 +04,12052 LOG: duration: 1818.750 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:28 +04,12052 LOG: duration: 1814.873 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:30 +04,12052 LOG: duration: 1811.042 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:32 +04,12052 LOG: duration: 1764.572 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:34 +04,12052 LOG: duration: 1760.189 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:36 +04,12052 LOG: duration: 1772.444 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:38 +04,12052 LOG: duration: 1814.692 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:39 +04,12052 LOG: duration: 803.884 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:41 +04,12052 LOG: duration: 1845.169 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:42 +04,12052 LOG: duration: 1187.533 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:45 +04,12052 LOG: duration: 2509.701 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:46 +04,12052 LOG: duration: 966.566 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:48 +04,12052 LOG: duration: 1789.612 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:50 +04,12052 LOG: duration: 1772.657 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:52 +04,12052 LOG: duration: 1768.322 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:54:54 +04,12052 LOG: duration: 1802.129 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_083701.log:2024-01-17 08:55:52 +04,11773 LOG: duration: 3064.809 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 08:55:48','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 08:56:43 +04,12121 LOG: duration: 17044.796 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) AND cds.documentNo = '1002543' group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced postgresql-2024-01-17_083701.log:2024-01-17 08:57:41 +04,11963 LOG: duration: 4891.417 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) AND cds.documentNo = '1002543' group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced postgresql-2024-01-17_083701.log:2024-01-17 09:02:02 +04,12402 LOG: duration: 992.532 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:02:01','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 09:05:52 +04,12513 LOG: duration: 3548.276 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and ol.m_warehouse_id = 1000000 AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:05:48','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 09:14:19 +04,12733 LOG: duration: 712.008 ms execute : SELECT mp.m_product_id AS PRODUCTID, mp.name AS PRODUCTNAME, SUM(coalesce((linetotalamt - taxamt), 0)) AS RETAIL, SUM(coalesce(col.qtyinvoiced, 0)) AS QTY, mpl.istaxincluded, ctax.rate, mp.description, co.ordertype, ci.c_invoice_id, mp.m_product_category_id as proCategoryId, pc.name as proCategoryName, (coalesce(mp.group1,' ')||' '||coalesce(mp.group2,' ')) as group, ci.documentno, ci.dateinvoiced , b.name customer, coalesce(mp.UPC,mp.SKU)as barcode, round( SUM(coalesce(mcd.amt, 0)),cr.stdprecision) as cost, mp.isconsigned, productAttribute(col.m_attributesetinstance_id) instanceAttribute, col.m_attributesetinstance_id ,mp.c_uom_id as prdtUomId,ci.ad_org_id,ci.c_currency_id, co.dateordered, col.priceactual, productAttribute(mp.m_attributesetinstance_id) nonInstanceAttribute, dt.docbasetype, mp.sku,col.c_uom_id trxuomid, mp.commodity_code, mp.upc, mp.group1, mp.group2, mp.m_baseproduct_id as baseProductId,null as firstAttributeValue, au.name as salesrep, SUM(ROUND(coalesce(ol.promodiscount, 0), cr.stdprecision)) AS promodisc, NULL as subGroupValue, 0 as subGrpId, coalesce(ol.pricecost,0) pricecost, case when mp.cw_uom_id > 0 then cw.uomsymbol else '' end as cwuom, case when mp.cw_uom_id > 0 then SUM(round(coalesce(col.qtypriced, 0), cw.stdprecision)) else 0 end as cwqty, COALESCE(v.name, '') as vendor, v.c_bpartner_id vendorId FROM C_Invoiceline col LEFT JOIN LATERAL (select mil.c_orderline_id,sum(case when qty < 0 then mcd.amt else mcd.amt *-1 end) amt from M_Inoutline mil join m_inout mino on mino.m_inout_id = mil.m_inout_id LEFT JOIN M_Costdetail mcd on mcd.m_inoutline_id = mil.m_inoutline_id where mino.docstatus in ('CO','CL') and col.c_orderline_id=mil.c_orderline_id group by 1 ) as mcd on col.c_orderline_id=mcd.c_orderline_id join C_Invoice ci on ci.C_invoice_id = col.C_invoice_id JOIN C_OrderLine ol ON ol.C_OrderLine_ID = col.C_OrderLine_ID join c_doctype dt on dt.c_doctype_id = ci.c_doctype_id join c_currency cr on cr.c_currency_id=ci.c_currency_id join M_Product mp on mp.M_Product_id = col.M_Product_id join M_pricelist mpl on mpl.m_pricelist_id = ci.m_pricelist_id join C_tax ctax on col.c_tax_id = ctax.c_tax_id join M_PRODUCT_CATEGORY pc on mp.m_product_category_id = pc.m_product_category_id left join C_Order co on co.C_Order_id = ci.C_Order_id left JOIN c_bpartner b on ci.c_bpartner_id = b.c_bpartner_id LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = col.m_attributesetinstance_id and ass.m_attributeset_id = mp.m_attributeset_id LEFT JOIN AD_User au ON ci.salesrep_id = au.AD_User_ID LEFT JOIN c_uom cw ON cw.c_uom_id = col.price_uom_id LEFT JOIN LATERAL (SELECT bp.c_bpartner_id, bp.name, bp.value, po.m_product_id FROM c_bpartner bp JOIN m_product_po po ON po.c_bpartner_id = bp.c_bpartner_id WHERE po.m_product_id = mp.m_product_id AND po.iscurrentvendor='Y' order by po.updated desc limit 1) v ON v.m_product_id = mp.m_product_id WHERE ci.ad_client_id = 1000000 AND dt.docbasetype in ('ARI','ARC') and ci.docstatus in ('CO','CL') AND ci.dateacct BETWEEN TO_TIMESTAMP('2023-11-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 09:14:18','YYYY-MM-DD HH24:MI:SS') AND ci.ad_org_id in (1000002) AND b.c_bp_group_id = 1000050 and mp.isbaseproduct = 'N' GROUP BY mp.name, mp.description, mp.m_product_id, mpl.m_pricelist_id, mpl.istaxincluded, ctax.rate, co.C_Order_id, ci.C_Invoice_id,ci.documentno, ci.dateinvoiced, co.ordertype, mp.m_product_category_id, pc.name, mp.group1, mp.group2, b.name,mp.isconsigned, mp.UPC, mp.SKU, col.m_attributesetinstance_id,cr.stdprecision,prdtUomId,col.c_uom_id, ci.ad_org_id,ci.c_currency_id, co.dateordered, col.priceactual, mp.m_attributesetinstance_id, dt.docbasetype, m_baseproduct_id, firstAttributeValue, mp.commodity_code,ol.pricecost, cw.uomsymbol, mcd.amt, au.name, subGroupValue, subGrpId, v.name, vendorId Order By mp.name postgresql-2024-01-17_083701.log:2024-01-17 09:22:11 +04,12965 LOG: duration: 11504.963 ms execute : select distinct pro.m_product_id,pro.description,pro.name, sum(coalesce(st.qtyOrdered, 0)) as qty_ordered, puom.c_uom_id,puom.uomsymbol,puom.stdprecision,max(ss.mdate), sum(coalesce(st.qtyonhand, 0)) as qty_onhand, coalesce(pro.UPC,pro.SKU)as barcode, (coalesce(pro.group1,' ')||' '||coalesce(pro.group2,' ')) as group,pc.name as proCategoryName ,coalesce(uomc.dividerate,1),uomc.c_uom_to_id,uom.uomsymbol,max(coalesce(intransit.qty, 0)) as intransitQty, pro.group1, pro.group2, pro.commodity_code, pro.classification as pclassification, productAttribute(pro.m_attributesetinstance_id) AS nonInstanceAttribute, pro.unitsperpack from m_product pro left join lateral (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pro.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = pro.m_product_id) left join c_uom as uom on uomc.c_uom_to_id = uom.c_uom_id left join m_storage st on st.m_product_id=pro.m_product_id left join m_locator l on st.m_locator_id = l.m_locator_id left join c_uom as puom on puom.c_uom_id = pro.c_uom_id left join lateral (select max(mn.movementdate) mdate from m_inoutline mnl join m_inout mn on (mn.m_inout_id = mnl.m_inout_id and mn.issotrx = 'N' and mn.docstatus in ('CO','CL') and mn.movementtype = 'V+') where m_product_id = pro.m_product_id and m_locator_id = l.m_locator_id group by mnl.m_product_id) as ss on true LEFT JOIN M_PRODUCT_CATEGORY pc on pro.m_product_category_id = pc.m_product_category_id left join lateral (select sum(mil.pickedqty) qty from m_inoutline mil join m_inout mi on mi.m_inout_id=mil.m_inout_id where mi.docstatus='IP' and m_product_id= pro.m_product_id and m_locator_id = l.m_locator_id group By mil.m_product_id) intransit on true LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = st.m_attributesetinstance_id and ass.m_attributeset_id = pro.m_attributeset_id WHERE pro.AD_CLIENT_ID = 1000000 and pro.isactive = 'Y'AND pro.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND l.M_Warehouse_Id = 1000000 group by pro.m_product_id,pro.description,pro.name,puom.c_uom_id,puom.uomsymbol,puom.stdprecision,uomc.dividerate,uomc.c_uom_to_id,uom.uomsymbol, pro.UPC, pro.SKU, pro.group1, pro.group2, pc.name order by qty_ordered postgresql-2024-01-17_083701.log:2024-01-17 09:22:56 +04,11597 LOG: duration: 726.707 ms postgresql-2024-01-17_083701.log:2024-01-17 09:22:59 +04,13015 LOG: duration: 1775.999 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_083701.log:2024-01-17 09:23:02 +04,12998 LOG: duration: 4582.627 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_083701.log:2024-01-17 09:23:02 +04,13020 LOG: duration: 4537.881 ms execute : SELECT seriesname, case when rank<10 then labelname else 'Others' END as labelname, postgresql-2024-01-17_083701.log:2024-01-17 09:23:32 +04,13016 LOG: duration: 34399.118 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_083701.log:2024-01-17 09:30:59 +04,11365 LOG: duration: 717.836 ms postgresql-2024-01-17_083701.log:2024-01-17 09:32:52 +04,13259 LOG: duration: 9991.928 ms execute : SELECT iv.documentno,coalesce(jn.amt,ivl.linetotalamt),iv.dateAcct as TIMESTAMP,ch.name,bp.name,ur.name,dc.name, jn.revenue,jn.name expense,iv.c_invoice_id,bp.c_bpartner_id,iv.c_order_id, iv.docstatus, iv.description,ivl.created as dateCreated,'N' as isBaStatement,dep.name,dep.hr_department_id,iv.user1_id , dc.docbasetype as docBase from c_Invoice iv join c_invoiceline ivl on ivl.c_invoice_id = iv.c_invoice_id join c_Charge ch on ivl.c_charge_id = ch.c_charge_id AND ivl.c_charge_id= 1000018 join c_Doctype dc on dc.c_doctype_id = iv.c_doctype_id join c_Bpartner bp on bp.c_bpartner_id = iv.c_bpartner_id join ad_user ur on ur.ad_user_id = iv.createdby left join ((SELECT rev.name as revenue,case when acc.amtacctcr <> 0 then acc.amtacctcr else acc.amtacctdr end as amt ,acc.record_id,acc.line_id line from fact_acct acc join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id AND acc.ad_table_id = 318 and acc.line_id > 0) acc join Fact_Acct acct on acct.record_id = acc.record_id join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id and acct.line_id is null and acct.ad_table_id = 318 and (c_tax_id =0 or c_tax_id is null)) jn on jn.line = ivl.c_invoiceline_id left join hr_department dep on (iv.hr_department_id=dep.hr_department_id) left join c_elementvalue elv on (iv.user1_id=elv.c_elementvalue_id and elv.isActive='Y') WHERE iv.ad_client_id = $1 AND (iv.DESCRIPTION NOT LIKE 'DESC JE%' OR iv.DESCRIPTION IS NULL) and iv.docstatus in ('CO','CL','IP') AND iv.c_invoice_id not in (SELECT cin.c_invoice_id from c_invoice cin join c_invoiceline cline on cin.c_invoice_id = cline.c_invoice_id join c_landedcost land on land.c_invoiceline_id = cline.c_invoiceline_id ) AND ivl.ad_org_id in (0,1000000,1000002,1000001) AND iv.Dateinvoiced BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') UNION ALL SELECT distinct iv.documentno,coalesce(case when dc.docbasetype in ('ARI','APC') then jn.cramt else jn.amt end,iv.grandtotal),iv.dateAcct as TIMESTAMP,'Charge Tax ' || tx.name || '-'|| tx.rate,bp.name,ur.name,dc.name, jn.revenue,jn.expense,iv.c_invoice_id,bp.c_bpartner_id,iv.c_order_id, iv.docstatus, iv.description,ivt.created as dateCreated,'N' as isBaStatement,dep.name,dep.hr_department_id,iv.user1_id , dc.docbasetype as docBase from c_Invoice iv join c_invoicetax ivt on ivt.c_invoice_id=iv.c_invoice_id join c_Charge ch on iv.c_charge_id = ch.c_charge_id AND iv.c_charge_id= 1000018 join c_Doctype dc on dc.c_doctype_id = iv.c_doctype_id join c_Bpartner bp on bp.c_bpartner_id = iv.c_bpartner_id join ad_user ur on ur.ad_user_id = iv.createdby left join (SELECT rev.name as revenue,acct.amtacctdr amt, acc.amtacctcr cramt,exp.name as expense,coalesce(acc.record_id,acct.record_id) record_id,coalesce(acc.c_tax_id,acct.c_tax_id) tax from fact_acct acc left join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id join Fact_Acct acct on acct.record_id = acc.record_id left join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id where acc.amtacctcr != 0 AND acct.amtacctdr != 0 AND acc.ad_table_id = 318 and acct.ad_table_id = 318 and acct.line_id is null and acc.line_id is null) jn on jn.record_id = iv.c_invoice_id left join c_tax tx on tx.c_tax_id=jn.tax left join hr_department dep on (iv.hr_department_id=dep.hr_department_id) left join c_elementvalue elv on (iv.user1_id=elv.c_elementvalue_id and elv.isActive='Y') WHERE iv.ad_client_id = $2 AND ivt.taxamt<> 0 AND (iv.DESCRIPTION NOT LIKE 'DESC JE%' OR iv.DESCRIPTION IS NULL) and iv.docstatus in ('CO','CL','IP') AND iv.c_invoice_id not in (SELECT cin.c_invoice_id from c_invoice cin join c_invoiceline cline on cin.c_invoice_id = cline.c_invoice_id join c_landedcost land on land.c_invoiceline_id = cline.c_invoiceline_id ) AND iv.ad_org_id in (0,1000000,1000002,1000001) AND iv.Dateinvoiced BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') UNION ALL SELECT pc.documentno,pc.payamt,pc.datetrx as TIMESTAMP,ch.name,bp.name,ur.name,dc.name, jn.revenue,jn.expense,pc.c_payment_id,bp.c_bpartner_id,pc.c_order_id, pc.docstatus, pc.description,pc.created as dateCreated,'N' as isBaStatement,dep.name,dep.hr_department_id,pc.user1_id, dc.docbasetype as docBase from c_Payment pc join c_Charge ch on ch.c_charge_id = pc.c_charge_id join c_Doctype dc on dc.c_doctype_id = pc.c_doctype_id join c_Bpartner bp on bp.c_bpartner_id = pc.c_bpartner_id join ad_user ur on ur.ad_user_id = pc.createdby left join (select rev.name as revenue,acct.amtacctdr amt,exp.name as expense,acc.record_id from fact_acct acc join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id join Fact_Acct acct on acct.record_id = acc.record_id join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id where acc.amtacctcr != 0 AND acct.amtacctdr != 0 AND acc.ad_table_id = 335 and acct.ad_table_id = 335) jn on jn.record_id = pc.c_payment_id left join hr_department dep on (pc.hr_department_id=dep.hr_department_id) left join c_elementvalue elv on (dep.user1_id=elv.c_elementvalue_id and elv.isActive='Y') WHERE pc.ad_client_id = $3 AND pc.c_charge_id= 1000018 AND pc.ad_org_id in (0,1000000,1000002,1000001) AND pc.datetrx BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') AND pc.docstatus in ('CO','CL','IP') Union ALL SELECT distinct ba.accountno,coalesce(bsl.chargeamt,0),bs.statementdate as TIMESTAMP,ch.name,'Bank Statement',ur.name,'', jn.revenue,jn.expense,0,0,0, bs.docstatus, '',bs.created as dateCreated,'Y' as isBaStatement,'',0,0, NULL as docBase FROM c_bankstatementline bsl join c_bankstatement bs on bsl.c_bankstatement_id = bs.c_bankstatement_id JOIN adempiere.C_BankAccount ba ON bs.c_bankaccount_id= ba.c_bankaccount_id join c_bank b on ba.c_bank_id = b.c_bank_id JOIN adempiere.ad_org o ON o.ad_org_id=b.ad_org_id join c_charge ch on bsl.c_charge_id = ch.c_charge_id join ad_user ur on ur.ad_user_id = bs.createdby left join (select rev.name as revenue,acct.amtacctdr amt,exp.name as expense,acc.record_id,acc.line_id from fact_acct acc join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id join Fact_Acct acct on acct.record_id = acc.record_id join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id where acc.amtacctcr != 0 AND acct.amtacctdr != 0 AND acc.ad_table_id = 392 and acct.ad_table_id = 392) jn on (jn.record_id = bs.c_bankstatement_id and jn.line_id = bsl.c_bankstatementline_id) WHERE b.AD_Client_ID=$4 AND b.IsActive='Y' AND b.routingno!='999999999' AND ba.IsActive='Y' AND o.IsActive='Y' AND ba.bankAccountType != 'B' and b.name != 'BANK ACCOUNT FOR TRANSFERS' AND ba.accountno not like '%Cash' AND NOT EXISTS (SELECT * FROM AD_OrgInfo oi WHERE oi.TransferBank_ID=b.C_Bank_ID) AND bsl.c_charge_id= 1000018 AND bsl.ad_org_id in (0,1000000,1000002,1000001) AND bsl.created BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') AND bs.docstatus in ('CO','CL','IP') order by TIMESTAMP DESC, dateCreated DESC, 1 DESC postgresql-2024-01-17_083701.log:2024-01-17 09:34:26 +04,13254 LOG: duration: 9180.727 ms execute : SELECT iv.documentno,coalesce(jn.amt,ivl.linetotalamt),iv.dateAcct as TIMESTAMP,ch.name,bp.name,ur.name,dc.name, jn.revenue,jn.name expense,iv.c_invoice_id,bp.c_bpartner_id,iv.c_order_id, iv.docstatus, iv.description,ivl.created as dateCreated,'N' as isBaStatement,dep.name,dep.hr_department_id,iv.user1_id , dc.docbasetype as docBase from c_Invoice iv join c_invoiceline ivl on ivl.c_invoice_id = iv.c_invoice_id join c_Charge ch on ivl.c_charge_id = ch.c_charge_id AND ivl.c_charge_id= 1000241 join c_Doctype dc on dc.c_doctype_id = iv.c_doctype_id join c_Bpartner bp on bp.c_bpartner_id = iv.c_bpartner_id join ad_user ur on ur.ad_user_id = iv.createdby left join ((SELECT rev.name as revenue,case when acc.amtacctcr <> 0 then acc.amtacctcr else acc.amtacctdr end as amt ,acc.record_id,acc.line_id line from fact_acct acc join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id AND acc.ad_table_id = 318 and acc.line_id > 0) acc join Fact_Acct acct on acct.record_id = acc.record_id join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id and acct.line_id is null and acct.ad_table_id = 318 and (c_tax_id =0 or c_tax_id is null)) jn on jn.line = ivl.c_invoiceline_id left join hr_department dep on (iv.hr_department_id=dep.hr_department_id) left join c_elementvalue elv on (iv.user1_id=elv.c_elementvalue_id and elv.isActive='Y') WHERE iv.ad_client_id = $1 AND (iv.DESCRIPTION NOT LIKE 'DESC JE%' OR iv.DESCRIPTION IS NULL) and iv.docstatus in ('CO','CL','IP') AND iv.c_invoice_id not in (SELECT cin.c_invoice_id from c_invoice cin join c_invoiceline cline on cin.c_invoice_id = cline.c_invoice_id join c_landedcost land on land.c_invoiceline_id = cline.c_invoiceline_id ) AND ivl.ad_org_id in (0,1000000,1000002,1000001) AND iv.Dateinvoiced BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') UNION ALL SELECT distinct iv.documentno,coalesce(case when dc.docbasetype in ('ARI','APC') then jn.cramt else jn.amt end,iv.grandtotal),iv.dateAcct as TIMESTAMP,'Charge Tax ' || tx.name || '-'|| tx.rate,bp.name,ur.name,dc.name, jn.revenue,jn.expense,iv.c_invoice_id,bp.c_bpartner_id,iv.c_order_id, iv.docstatus, iv.description,ivt.created as dateCreated,'N' as isBaStatement,dep.name,dep.hr_department_id,iv.user1_id , dc.docbasetype as docBase from c_Invoice iv join c_invoicetax ivt on ivt.c_invoice_id=iv.c_invoice_id join c_Charge ch on iv.c_charge_id = ch.c_charge_id AND iv.c_charge_id= 1000241 join c_Doctype dc on dc.c_doctype_id = iv.c_doctype_id join c_Bpartner bp on bp.c_bpartner_id = iv.c_bpartner_id join ad_user ur on ur.ad_user_id = iv.createdby left join (SELECT rev.name as revenue,acct.amtacctdr amt, acc.amtacctcr cramt,exp.name as expense,coalesce(acc.record_id,acct.record_id) record_id,coalesce(acc.c_tax_id,acct.c_tax_id) tax from fact_acct acc left join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id join Fact_Acct acct on acct.record_id = acc.record_id left join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id where acc.amtacctcr != 0 AND acct.amtacctdr != 0 AND acc.ad_table_id = 318 and acct.ad_table_id = 318 and acct.line_id is null and acc.line_id is null) jn on jn.record_id = iv.c_invoice_id left join c_tax tx on tx.c_tax_id=jn.tax left join hr_department dep on (iv.hr_department_id=dep.hr_department_id) left join c_elementvalue elv on (iv.user1_id=elv.c_elementvalue_id and elv.isActive='Y') WHERE iv.ad_client_id = $2 AND ivt.taxamt<> 0 AND (iv.DESCRIPTION NOT LIKE 'DESC JE%' OR iv.DESCRIPTION IS NULL) and iv.docstatus in ('CO','CL','IP') AND iv.c_invoice_id not in (SELECT cin.c_invoice_id from c_invoice cin join c_invoiceline cline on cin.c_invoice_id = cline.c_invoice_id join c_landedcost land on land.c_invoiceline_id = cline.c_invoiceline_id ) AND iv.ad_org_id in (0,1000000,1000002,1000001) AND iv.Dateinvoiced BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') UNION ALL SELECT pc.documentno,pc.payamt,pc.datetrx as TIMESTAMP,ch.name,bp.name,ur.name,dc.name, jn.revenue,jn.expense,pc.c_payment_id,bp.c_bpartner_id,pc.c_order_id, pc.docstatus, pc.description,pc.created as dateCreated,'N' as isBaStatement,dep.name,dep.hr_department_id,pc.user1_id, dc.docbasetype as docBase from c_Payment pc join c_Charge ch on ch.c_charge_id = pc.c_charge_id join c_Doctype dc on dc.c_doctype_id = pc.c_doctype_id join c_Bpartner bp on bp.c_bpartner_id = pc.c_bpartner_id join ad_user ur on ur.ad_user_id = pc.createdby left join (select rev.name as revenue,acct.amtacctdr amt,exp.name as expense,acc.record_id from fact_acct acc join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id join Fact_Acct acct on acct.record_id = acc.record_id join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id where acc.amtacctcr != 0 AND acct.amtacctdr != 0 AND acc.ad_table_id = 335 and acct.ad_table_id = 335) jn on jn.record_id = pc.c_payment_id left join hr_department dep on (pc.hr_department_id=dep.hr_department_id) left join c_elementvalue elv on (dep.user1_id=elv.c_elementvalue_id and elv.isActive='Y') WHERE pc.ad_client_id = $3 AND pc.c_charge_id= 1000241 AND pc.ad_org_id in (0,1000000,1000002,1000001) AND pc.datetrx BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') AND pc.docstatus in ('CO','CL','IP') Union ALL SELECT distinct ba.accountno,coalesce(bsl.chargeamt,0),bs.statementdate as TIMESTAMP,ch.name,'Bank Statement',ur.name,'', jn.revenue,jn.expense,0,0,0, bs.docstatus, '',bs.created as dateCreated,'Y' as isBaStatement,'',0,0, NULL as docBase FROM c_bankstatementline bsl join c_bankstatement bs on bsl.c_bankstatement_id = bs.c_bankstatement_id JOIN adempiere.C_BankAccount ba ON bs.c_bankaccount_id= ba.c_bankaccount_id join c_bank b on ba.c_bank_id = b.c_bank_id JOIN adempiere.ad_org o ON o.ad_org_id=b.ad_org_id join c_charge ch on bsl.c_charge_id = ch.c_charge_id join ad_user ur on ur.ad_user_id = bs.createdby left join (select rev.name as revenue,acct.amtacctdr amt,exp.name as expense,acc.record_id,acc.line_id from fact_acct acc join c_elementvalue rev on rev.c_elementvalue_id = acc.account_id join Fact_Acct acct on acct.record_id = acc.record_id join C_Elementvalue exp on exp.c_elementvalue_id = acct.account_id where acc.amtacctcr != 0 AND acct.amtacctdr != 0 AND acc.ad_table_id = 392 and acct.ad_table_id = 392) jn on (jn.record_id = bs.c_bankstatement_id and jn.line_id = bsl.c_bankstatementline_id) WHERE b.AD_Client_ID=$4 AND b.IsActive='Y' AND b.routingno!='999999999' AND ba.IsActive='Y' AND o.IsActive='Y' AND ba.bankAccountType != 'B' and b.name != 'BANK ACCOUNT FOR TRANSFERS' AND ba.accountno not like '%Cash' AND NOT EXISTS (SELECT * FROM AD_OrgInfo oi WHERE oi.TransferBank_ID=b.C_Bank_ID) AND bsl.c_charge_id= 1000241 AND bsl.ad_org_id in (0,1000000,1000002,1000001) AND bsl.created BETWEEN TO_TIMESTAMP('2022-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') AND bs.docstatus in ('CO','CL','IP') order by TIMESTAMP DESC, dateCreated DESC, 1 DESC postgresql-2024-01-17_083701.log:2024-01-17 09:34:33 +04,13254 LOG: duration: 3107.720 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:34:30','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 09:34:39 +04,13340 LOG: duration: 3201.126 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:34:36','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_083701.log:2024-01-17 09:37:25 +04,13340 LOG: duration: 537.186 ms execute : SELECT AD_Client_ID,AD_Org_ID,Amt,C_AcctSchema_ID,C_InvoiceLine_ID,C_OrderLine_ID,C_ProjectIssue_ID,Created,CreatedBy,CumulatedAmt,CumulatedQty,CurrentCostPrice,CurrentQty,DeltaAmt,DeltaQty,Description,IsActive,IsSOTrx,M_AttributeSetInstance_ID,M_CostDetail_ID,M_CostElement_ID,M_InOutLine_ID,M_InventoryLine_ID,M_MovementLine_ID,M_Product_ID,M_ProductionLine_ID,PP_Cost_Collector_ID,(CASE WHEN Qty=0 THEN 0 ELSE Amt/Qty END) AS Price,Processed,Qty,Updated,UpdatedBy FROM M_CostDetail WHERE (M_InventoryLine_ID=$1 AND M_AttributeSetInstance_ID=$2 AND C_AcctSchema_ID=$3) postgresql-2024-01-17_093726.log:2024-01-17 09:40:19 +04,13340 LOG: duration: 3088.003 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:40:16','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:40:29 +04,13306 LOG: duration: 4522.304 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='R' and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:40:24','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:40:35 +04,13467 LOG: duration: 941.369 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:36 +04,13467 LOG: duration: 676.543 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:37 +04,13467 LOG: duration: 677.211 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:38 +04,13467 LOG: duration: 677.372 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:39 +04,13467 LOG: duration: 678.353 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:40 +04,13467 LOG: duration: 766.395 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:40 +04,13467 LOG: duration: 759.917 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:41 +04,13467 LOG: duration: 773.984 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:42 +04,13467 LOG: duration: 769.266 ms postgresql-2024-01-17_093726.log:2024-01-17 09:40:43 +04,13467 LOG: duration: 757.891 ms postgresql-2024-01-17_093726.log:2024-01-17 09:43:13 +04,13559 LOG: duration: 3189.597 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:43:10','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:43:34 +04,13340 LOG: duration: 3060.469 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:43:31','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:43:56 +04,13340 LOG: duration: 4203.829 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:44:15 +04,13559 LOG: duration: 995.050 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:44:14','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:46:25 +04,13254 LOG: duration: 694198.199 ms execute : select distinct pr.m_product_id, pr.name, pr.upc, pr.sku, pr.description, pr.group1, pr.group2, pr.commodity_code, coalesce(dividerate,1) dividerate,uomc.c_uom_to_id,uom.uomsymbol,uom.stdprecision,pr.c_uom_id, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId from m_product pr join M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id join M_TRANSACTION v on v.m_product_id = pr.m_product_id JOIN m_locator l on v.m_locator_id = l.m_locator_id LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on invl.m_inventory_id = inv.m_inventory_id WHERE v.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on io.m_inout_id = iol.m_inout_id WHERE v.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on mml.m_movement_id = mm.m_movement_id WHERE v.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on pp.m_production_id = ppl.m_production_id WHERE v.m_productionline_id = ppl.m_productionline_id ) pl on true LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = pr.m_product_id) LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = v.m_attributesetinstance_id and ass.m_attributeset_id = pr.m_attributeset_id where pr.ad_client_id = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) and l.ad_org_id in (0,0,1000000,1000002,1000001) and l.M_warehouse_ID=1000000 and v.movementdate between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:34:51','YYYY-MM-DD HH24:MI:SS') and v.movementqty != 0 And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') and v.AD_CLIENT_ID=1000000 order by name postgresql-2024-01-17_093726.log:2024-01-17 09:47:39 +04,13559 LOG: duration: 811.438 ms execute : SELECT COALESCE(SUM(COALESCE(currencyBase(o.C_Conversion_Rate_ID,(ol.QtyDelivered-ol.QtyInvoiced)*ol.PriceActual,o.C_Currency_ID,o.DateOrdered, o.AD_Client_ID,o.AD_Org_ID) ,0)),0) FROM C_OrderLine ol INNER JOIN C_Order o ON (ol.C_Order_ID=o.C_Order_ID) WHERE o.IsSOTrx='Y' AND o.isinvoiced='N' AND Bill_BPartner_ID=$1 AND o.isactive='Y' AND o.docstatus in ('CO','CL') postgresql-2024-01-17_093726.log:2024-01-17 09:49:48 +04,13731 LOG: duration: 683.160 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND ((st.qtyonhand+st.qtyreserved+st.qtyordered+st.qtyintransit+st.cwqtyonhand) <> 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0 )) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.m_warehouse_id = 1000000 group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP') AND m.m_locatorto_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y' AND pr.ad_org_id IN (0,1000000) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name having sum(st.qtyonhand)> 25 order by name postgresql-2024-01-17_093726.log:2024-01-17 09:49:56 +04,13786 LOG: duration: 2416.640 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:49:56 +04,13793 LOG: duration: 2451.260 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:49:57 +04,13786 LOG: duration: 804.050 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:49:57 +04,13793 LOG: duration: 772.190 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:49:59 +04,13786 LOG: duration: 2184.486 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:49:59 +04,13793 LOG: duration: 2128.380 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:09 +04,13786 LOG: duration: 9004.924 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:09 +04,13793 LOG: duration: 8993.609 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:15 +04,13793 LOG: duration: 5912.756 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:15 +04,13786 LOG: duration: 5935.510 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:18 +04,13786 LOG: duration: 2237.156 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:18 +04,13793 LOG: duration: 2236.844 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:20 +04,13786 LOG: duration: 1418.959 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:20 +04,13793 LOG: duration: 1419.061 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:22 +04,13786 LOG: duration: 2255.593 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:22 +04,13793 LOG: duration: 2255.201 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:24 +04,13793 LOG: duration: 2296.516 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:24 +04,13786 LOG: duration: 2296.604 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:27 +04,13793 LOG: duration: 2290.521 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:27 +04,13786 LOG: duration: 2290.521 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:29 +04,13786 LOG: duration: 2265.902 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:29 +04,13793 LOG: duration: 2265.902 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:32 +04,13786 LOG: duration: 2250.362 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:32 +04,13793 LOG: duration: 2250.345 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:34 +04,13786 LOG: duration: 2256.826 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:34 +04,13793 LOG: duration: 2256.574 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:37 +04,13786 LOG: duration: 2285.357 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:37 +04,13793 LOG: duration: 2285.124 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:40 +04,13793 LOG: duration: 2296.212 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:40 +04,13786 LOG: duration: 2296.485 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:42 +04,13786 LOG: duration: 2294.589 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:42 +04,13793 LOG: duration: 2294.718 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:45 +04,13786 LOG: duration: 2289.048 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:45 +04,13793 LOG: duration: 2289.043 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:46 +04,13793 LOG: duration: 1043.949 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:46 +04,13786 LOG: duration: 1041.011 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:47 +04,13655 LOG: duration: 1005.730 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:50:46','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:48 +04,13793 LOG: duration: 2297.699 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:48 +04,13786 LOG: duration: 2298.238 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:51 +04,13786 LOG: duration: 2268.398 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:51 +04,13793 LOG: duration: 2269.068 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:53 +04,13793 LOG: duration: 2275.471 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:53 +04,13786 LOG: duration: 2275.563 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:56 +04,13786 LOG: duration: 2285.962 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:56 +04,13793 LOG: duration: 2285.993 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:58 +04,13786 LOG: duration: 2292.531 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:50:58 +04,13793 LOG: duration: 2292.511 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:01 +04,13786 LOG: duration: 2294.438 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:01 +04,13793 LOG: duration: 2294.561 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:03 +04,13793 LOG: duration: 2262.413 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:03 +04,13786 LOG: duration: 2262.413 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:06 +04,13786 LOG: duration: 2246.444 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:06 +04,13793 LOG: duration: 2246.404 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:08 +04,13793 LOG: duration: 2188.159 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:08 +04,13786 LOG: duration: 2202.955 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:11 +04,13793 LOG: duration: 2275.606 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:11 +04,13786 LOG: duration: 2275.044 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:13 +04,13793 LOG: duration: 2291.783 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:13 +04,13786 LOG: duration: 2291.171 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:16 +04,13793 LOG: duration: 2283.475 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:16 +04,13786 LOG: duration: 2283.176 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:18 +04,13793 LOG: duration: 2285.561 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:18 +04,13786 LOG: duration: 2285.111 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:21 +04,13793 LOG: duration: 2248.272 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:21 +04,13786 LOG: duration: 2247.716 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:22 +04,13793 LOG: duration: 799.982 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:22 +04,13786 LOG: duration: 791.048 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:24 +04,13793 LOG: duration: 2275.990 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:24 +04,13786 LOG: duration: 2275.624 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:25 +04,13786 LOG: duration: 1272.566 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:25 +04,13793 LOG: duration: 1280.500 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:28 +04,13786 LOG: duration: 2975.855 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:28 +04,13793 LOG: duration: 2974.641 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:30 +04,13786 LOG: duration: 974.575 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:30 +04,13793 LOG: duration: 974.054 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:32 +04,13793 LOG: duration: 2292.889 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:32 +04,13786 LOG: duration: 2293.111 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:34 +04,13793 LOG: duration: 2290.835 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:34 +04,13786 LOG: duration: 2290.976 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:37 +04,13793 LOG: duration: 2280.113 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:37 +04,13786 LOG: duration: 2279.696 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:39 +04,13786 LOG: duration: 2240.488 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:51:39 +04,13793 LOG: duration: 2240.488 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_093726.log:2024-01-17 09:57:28 +04,14010 LOG: duration: 502.606 ms execute : SELECT COUNT(*) FROM C_Payment WHERE (C_Payment.C_BPartner_ID IS NOT NULL) AND (Processed='N' OR Updated>CURRENT_TIMESTAMP-1) AND C_Payment.AD_Client_ID IN(0,1000000) AND C_Payment.AD_Org_ID IN(0,1000000) postgresql-2024-01-17_093726.log:2024-01-17 09:57:29 +04,14010 LOG: duration: 524.277 ms execute /C_7: SELECT AD_Client_ID,AD_Org_ID,DocumentNo,C_BankAccount_ID,C_DocType_ID,IsReceipt,DateTrx,DateAcct,Description,C_BPartner_ID,C_Invoice_ID,C_Order_ID,C_Project_ID,C_Charge_ID,IsPrepayment,C_Activity_ID,C_Campaign_ID,AD_OrgTrx_ID,User1_ID,User2_ID,PayAmt,C_Currency_ID,C_ConversionType_ID,DiscountAmt,WriteOffAmt,IsOverUnderPayment,OverUnderAmt,TenderType,IsOnline,RoutingNo,AccountNo,CheckNo,Micr,CreditCardType,TrxType,CreditCardNumber,CreditCardVV,CreditCardExpMM,CreditCardExpYY,A_Name,A_Street,A_City,A_Zip,A_State,A_Country,A_Ident_DL,A_Ident_SSN,A_EMail,TaxAmt,PONum,VoiceAuthCode,Orig_TrxID,OProcessing,IsApproved,R_Result,R_RespMsg,R_PnRef,R_AuthCode,R_AvsZip,R_AvsAddr,DocStatus,DocAction,IsSelfService,Posted,IsAllocated,C_CashBook_ID,CheckDate,U_POSTerminal_ID,ProcessedOn,Reversal_ID,transactionNo,IsActive,IsDelayedCapture,Processing,Processed,Swipe,IsReconciled,C_PaymentBatch_ID,Ref_Payment_ID,R_Info,C_BP_BankAccount_ID,C_Payment_ID,R_PnRef_DC,R_AuthCode_DC,ChargeAmt,R_CVV2Match,Created,CreatedBy,Updated,UpdatedBy FROM C_Payment WHERE (C_Payment.C_BPartner_ID IS NOT NULL) AND (Processed='N' OR Updated>CURRENT_TIMESTAMP-1) AND C_Payment.AD_Client_ID IN(0,1000000) AND C_Payment.AD_Org_ID IN(0,1000000) ORDER BY C_Payment_ID postgresql-2024-01-17_093726.log:2024-01-17 09:59:39 +04,13982 LOG: duration: 3081.706 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 09:59:36','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_093726.log:2024-01-17 09:59:53 +04,13982 LOG: duration: 3101.672 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_100310.log:2024-01-17 10:03:19 +04,13982 LOG: duration: 57727.679 ms execute : select distinct pr.m_product_id, pr.name, pr.upc, pr.sku, pr.description, pr.group1, pr.group2, pr.commodity_code, coalesce(dividerate,1) dividerate,uomc.c_uom_to_id,uom.uomsymbol,uom.stdprecision,pr.c_uom_id, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId from m_product pr join M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id join M_TRANSACTION v on v.m_product_id = pr.m_product_id JOIN m_locator l on v.m_locator_id = l.m_locator_id LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on invl.m_inventory_id = inv.m_inventory_id WHERE v.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on io.m_inout_id = iol.m_inout_id WHERE v.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on mml.m_movement_id = mm.m_movement_id WHERE v.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on pp.m_production_id = ppl.m_production_id WHERE v.m_productionline_id = ppl.m_productionline_id ) pl on true LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = pr.m_product_id) LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = v.m_attributesetinstance_id and ass.m_attributeset_id = pr.m_attributeset_id where pr.ad_client_id = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) and l.ad_org_id in (0,0,1000000,1000002,1000001) and l.M_warehouse_ID=1000000 and v.movementdate between TO_TIMESTAMP('2024-01-06 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:02:21','YYYY-MM-DD HH24:MI:SS') and v.movementqty != 0 And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') and v.AD_CLIENT_ID=1000000 order by name postgresql-2024-01-17_100310.log:2024-01-17 10:03:25 +04,14207 LOG: duration: 676.413 ms postgresql-2024-01-17_100310.log:2024-01-17 10:03:41 +04,13982 LOG: duration: 21654.501 ms execute : SELECT aa.*, coalesce(DivideRate,1) as dividerate, uomc.C_UoM_To_ID, uom.UoMSymbol, uom.StdPrecision FROM (select DISTINCT pr.M_Product_ID, pr.Name, pr.UPC, pr.SKU, pr.Description, pr.group1, pr.group2, pr.commodity_code, pr.C_UoM_ID, sum(MovementQty) MovementQty, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId,null as firstAttributeValue FROM M_Product pr JOIN M_Transaction tr ON tr.M_Product_ID = pr.M_Product_ID LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on (invl.m_inventory_id = inv.m_inventory_id) WHERE tr.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on (io.m_inout_id = iol.m_inout_id ) WHERE tr.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on (mml.m_movement_id = mm.m_movement_id) WHERE tr.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on (pp.m_production_id = ppl.m_production_id) WHERE tr.m_productionline_id = ppl.m_productionline_id ) pl on true JOIN M_Product_Category pc ON pr.M_Product_Category_ID = pc.M_Product_Category_ID JOIN M_Locator l ON tr.M_Locator_ID = l.M_Locator_ID WHERE pr.AD_Client_ID = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ( $1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND l.AD_Org_ID in (0,0,1000000,1000002,1000001) AND l.M_warehouse_ID=1000000 AND MovementDate < TO_TIMESTAMP('2024-01-06 00:00:00','YYYY-MM-DD HH24:MI:SS') GROUP BY pr.M_Product_ID, pr.Name, pr.UPC, pr.SKU, pr.Description, pr.C_UoM_ID, pr.group1, pr.group2, pr.commodity_code, firstAttributeValue, pr.m_product_category_id, pc.name) as aa LEFT JOIN (select DISTINCT pr.M_Product_ID, MovementQty MovementQty, pr.m_baseproduct_id as baseProductId,null as firstAttributeValue FROM M_Product pr JOIN M_Transaction tr ON tr.M_Product_ID = pr.M_Product_ID LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on (invl.m_inventory_id = inv.m_inventory_id ) WHERE tr.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on (io.m_inout_id = iol.m_inout_id) WHERE tr.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on (mml.m_movement_id = mm.m_movement_id) WHERE tr.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on (pp.m_production_id = ppl.m_production_id) WHERE tr.m_productionline_id = ppl.m_productionline_id ) pl on true JOIN M_Product_Category pc ON pr.M_Product_Category_ID = pc.M_Product_Category_ID JOIN M_Locator l ON tr.M_Locator_ID = l.M_Locator_ID WHERE pr.AD_Client_ID = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ( $2) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND l.AD_Org_ID in (0,0,1000000,1000002,1000001) AND l.M_Warehouse_ID=1000000 AND MovementQty <> 0 and tr.movementdate between TO_TIMESTAMP('2024-01-06 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:02:21','YYYY-MM-DD HH24:MI:SS') And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') GROUP BY pr.M_Product_ID, MovementQty, firstAttributeValue ) bb on aa.M_Product_ID = bb.M_Product_ID LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =aa.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = aa.m_product_id) LEFT JOIN C_UoM uom ON uom.C_UoM_ID = coalesce(uomc.C_UoM_To_ID, aa.C_UoM_ID) WHERE aa.MovementQty <> 0 and (bb.MovementQty is NULL or bb.MovementQty = 0 ) order by 1 postgresql-2024-01-17_100640.log:2024-01-17 10:11:27 +04,14417 LOG: duration: 3181.246 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:11:23','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_100640.log:2024-01-17 10:11:41 +04,14356 LOG: duration: 3078.278 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:11:38','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:33 +04,14525 LOG: duration: 2011.077 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:34 +04,14525 LOG: duration: 772.269 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:36 +04,14525 LOG: duration: 2065.862 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:46 +04,14525 LOG: duration: 8755.700 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:51 +04,14525 LOG: duration: 5706.926 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:54 +04,14525 LOG: duration: 1958.583 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:56 +04,14525 LOG: duration: 1421.637 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:13:58 +04,14525 LOG: duration: 1967.263 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:00 +04,14525 LOG: duration: 1971.867 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:02 +04,14525 LOG: duration: 1970.896 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:05 +04,14525 LOG: duration: 1945.211 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:07 +04,14525 LOG: duration: 1924.043 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:09 +04,14525 LOG: duration: 1928.991 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:11 +04,14525 LOG: duration: 1958.935 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:13 +04,14525 LOG: duration: 1976.361 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:16 +04,14525 LOG: duration: 1971.946 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:18 +04,14525 LOG: duration: 1970.098 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:19 +04,14525 LOG: duration: 1054.156 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:21 +04,14525 LOG: duration: 2004.980 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:23 +04,14525 LOG: duration: 1944.389 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:26 +04,14525 LOG: duration: 1922.799 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:28 +04,14525 LOG: duration: 1950.770 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:30 +04,14525 LOG: duration: 1971.835 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:32 +04,14525 LOG: duration: 1972.342 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:34 +04,14525 LOG: duration: 1971.504 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:37 +04,14525 LOG: duration: 1965.269 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:39 +04,14525 LOG: duration: 1933.463 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:41 +04,14525 LOG: duration: 1921.783 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:43 +04,14525 LOG: duration: 1926.017 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:45 +04,14525 LOG: duration: 1962.738 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:48 +04,14525 LOG: duration: 1967.147 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:50 +04,14525 LOG: duration: 1966.756 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:51 +04,14525 LOG: duration: 808.056 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:53 +04,14525 LOG: duration: 1994.464 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:54 +04,14525 LOG: duration: 1270.792 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:57 +04,14525 LOG: duration: 2576.851 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:14:58 +04,14525 LOG: duration: 953.026 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:00 +04,14525 LOG: duration: 1928.484 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:02 +04,14525 LOG: duration: 1958.432 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:04 +04,14525 LOG: duration: 1966.439 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:06 +04,14525 LOG: duration: 1966.810 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:34 +04,14646 LOG: duration: 2005.968 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:35 +04,14646 LOG: duration: 785.254 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:37 +04,14646 LOG: duration: 2118.722 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:46 +04,14646 LOG: duration: 8648.105 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:52 +04,14646 LOG: duration: 5651.527 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:55 +04,14646 LOG: duration: 1974.103 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:57 +04,14646 LOG: duration: 1418.270 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:15:59 +04,14646 LOG: duration: 1966.158 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:01 +04,14646 LOG: duration: 1971.488 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:03 +04,14646 LOG: duration: 1940.195 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:05 +04,14646 LOG: duration: 1924.158 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:07 +04,14646 LOG: duration: 1922.170 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:10 +04,14646 LOG: duration: 1960.988 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:12 +04,14646 LOG: duration: 1973.718 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:14 +04,14646 LOG: duration: 1971.380 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:16 +04,14646 LOG: duration: 1969.801 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:19 +04,14646 LOG: duration: 1965.125 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:20 +04,14646 LOG: duration: 1035.352 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:22 +04,14646 LOG: duration: 1983.535 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:24 +04,14646 LOG: duration: 1939.094 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:26 +04,14646 LOG: duration: 1949.837 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:28 +04,14646 LOG: duration: 1972.128 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:31 +04,14646 LOG: duration: 1970.275 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:33 +04,14646 LOG: duration: 1970.506 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:35 +04,14646 LOG: duration: 1963.954 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:37 +04,14646 LOG: duration: 1957.455 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:39 +04,14646 LOG: duration: 1920.299 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:42 +04,14646 LOG: duration: 1919.504 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:44 +04,14646 LOG: duration: 1965.241 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:46 +04,14646 LOG: duration: 1972.214 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:48 +04,14646 LOG: duration: 1963.982 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:50 +04,14646 LOG: duration: 1965.460 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:51 +04,14646 LOG: duration: 810.955 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:53 +04,14646 LOG: duration: 1978.472 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:55 +04,14646 LOG: duration: 1270.059 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:57 +04,14646 LOG: duration: 2559.659 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:16:58 +04,14646 LOG: duration: 967.849 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:17:00 +04,14646 LOG: duration: 1964.263 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:17:03 +04,14646 LOG: duration: 1973.463 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:17:05 +04,14646 LOG: duration: 1962.862 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:17:07 +04,14646 LOG: duration: 1966.637 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_100640.log:2024-01-17 10:19:08 +04,14659 LOG: duration: 698.435 ms postgresql-2024-01-17_100640.log:2024-01-17 10:19:45 +04,14670 LOG: duration: 3164.255 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_100640.log:2024-01-17 10:19:53 +04,14659 LOG: duration: 685.524 ms postgresql-2024-01-17_100640.log:2024-01-17 10:19:56 +04,14670 LOG: duration: 3142.276 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_100640.log:2024-01-17 10:20:05 +04,14769 LOG: duration: 3115.321 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:20:02','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_100640.log:2024-01-17 10:20:12 +04,14821 LOG: duration: 3138.915 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:20:09','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_100640.log:2024-01-17 10:20:44 +04,14799 LOG: duration: 580.591 ms execute : SELECT AD_Client_ID,AD_Org_ID,Amt,C_AcctSchema_ID,C_InvoiceLine_ID,C_OrderLine_ID,C_ProjectIssue_ID,Created,CreatedBy,CumulatedAmt,CumulatedQty,CurrentCostPrice,CurrentQty,DeltaAmt,DeltaQty,Description,IsActive,IsSOTrx,M_AttributeSetInstance_ID,M_CostDetail_ID,M_CostElement_ID,M_InOutLine_ID,M_InventoryLine_ID,M_MovementLine_ID,M_Product_ID,M_ProductionLine_ID,PP_Cost_Collector_ID,(CASE WHEN Qty=0 THEN 0 ELSE Amt/Qty END) AS Price,Processed,Qty,Updated,UpdatedBy FROM M_CostDetail WHERE (M_InventoryLine_ID=$1 AND M_AttributeSetInstance_ID=$2 AND C_AcctSchema_ID=$3) postgresql-2024-01-17_102103.log:2024-01-17 10:21:08 +04,14831 LOG: duration: 3148.811 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:21:05','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:21:17 +04,14799 LOG: duration: 3160.196 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:22:07 +04,14670 LOG: duration: 3082.175 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:22:07 +04,14821 LOG: duration: 4900.295 ms postgresql-2024-01-17_102103.log:2024-01-17 10:22:43 +04,14821 LOG: duration: 3072.613 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:22:59 +04,14799 LOG: duration: 3066.293 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:23:02 +04,14799 LOG: duration: 3062.364 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:23:12 +04,14891 LOG: duration: 3127.970 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:23:08','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:23:21 +04,14891 LOG: duration: 2995.769 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:23:18','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:23:57 +04,14799 LOG: duration: 3006.999 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:23:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:08 +04,14799 LOG: duration: 3064.786 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:11 +04,14934 LOG: duration: 2217.899 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:11 +04,14970 LOG: duration: 2203.948 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:12 +04,14934 LOG: duration: 770.670 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:12 +04,14970 LOG: duration: 772.405 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:14 +04,14934 LOG: duration: 2330.349 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:14 +04,14970 LOG: duration: 2321.605 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:24 +04,14934 LOG: duration: 8862.590 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:24 +04,14970 LOG: duration: 8882.753 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:30 +04,14934 LOG: duration: 5820.979 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:30 +04,14970 LOG: duration: 5830.981 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:33 +04,14934 LOG: duration: 2193.508 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:33 +04,14970 LOG: duration: 2193.508 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:35 +04,14934 LOG: duration: 1411.720 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:35 +04,14970 LOG: duration: 1411.638 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:37 +04,14934 LOG: duration: 2235.579 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:37 +04,14970 LOG: duration: 2235.813 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:39 +04,14934 LOG: duration: 2223.170 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:39 +04,14970 LOG: duration: 2223.355 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:42 +04,14934 LOG: duration: 2229.344 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:42 +04,14970 LOG: duration: 2229.744 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:44 +04,14934 LOG: duration: 2227.580 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:44 +04,14970 LOG: duration: 2227.826 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:47 +04,14934 LOG: duration: 2187.591 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:47 +04,14970 LOG: duration: 2184.079 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:49 +04,14934 LOG: duration: 2173.177 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:49 +04,14970 LOG: duration: 2176.551 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:52 +04,14934 LOG: duration: 2209.203 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:52 +04,14970 LOG: duration: 2211.904 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:54 +04,14934 LOG: duration: 2230.083 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:54 +04,14970 LOG: duration: 2230.146 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:57 +04,14934 LOG: duration: 2227.557 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:57 +04,14970 LOG: duration: 2237.784 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:59 +04,14934 LOG: duration: 2194.308 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:24:59 +04,14970 LOG: duration: 2193.776 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:00 +04,14934 LOG: duration: 1055.551 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:00 +04,14970 LOG: duration: 1048.151 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:02 +04,14934 LOG: duration: 2119.251 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:02 +04,14970 LOG: duration: 2116.301 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:05 +04,14934 LOG: duration: 2217.281 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:05 +04,14970 LOG: duration: 2217.218 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:07 +04,14934 LOG: duration: 2195.357 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:07 +04,14970 LOG: duration: 2195.366 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:10 +04,14934 LOG: duration: 2239.943 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:10 +04,14970 LOG: duration: 2239.556 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:11 +04,14799 LOG: duration: 1946.062 ms execute : select inv.DOCUMENTNO invoiceno, inv.C_INVOICE_ID, inv.C_ORDER_ID, inv.ISSOTRX, inv.DATEINVOICED, pt.NETDAYS, paymenttermduedate(inv.c_paymentterm_id, inv.dateinvoiced::timestamp with time zone) DUEDATE,paymenttermduedays(inv.c_paymentterm_id, inv.dateinvoiced::timestamp with time zone, CURRENT_TIMESTAMP) DAYSDUE,adddays(inv.dateinvoiced::timestamp with time zone, pt.discountdays) DISCOUNTDATE, round(inv.grandtotal * pt.discount / 100::numeric, 2) DISCOUNTAMT , inv.GRANDTOTAL , invoicepaid(inv.c_invoice_id, inv.c_currency_id, 1::numeric) PAIDAMT, invoiceopen(inv.c_invoice_id, 0::numeric) OPENAMT, inv.C_CURRENCY_ID, inv.C_PAYMENTTERM_ID , ips.C_INVOICEPAYSCHEDULE_ID, ord.DOCUMENTNO orderno, cr.ISO_CODE, pt.NAME ptname, bp.name bpname, inv.C_BPARTNER_ID, ord.poreference as ord_reference, inv.poreference as inv_reference, u.name salesrep, bp.value bpcode, pbp.name as paypartnername from c_invoice inv join c_doctype d on inv.c_doctype_id = d.c_doctype_id join c_bpartner bp on inv.C_BPARTNER_ID=bp.C_BPARTNER_ID join c_bpartner_location bpl on inv.c_bpartner_location_id=bpl.c_bpartner_location_id join c_location loc ON bpl.c_location_id = loc.c_location_id join C_CURRENCY cr on inv.C_CURRENCY_ID=cr.C_CURRENCY_ID join C_PAYMENTTERM pt on inv.C_PAYMENTTERM_ID=pt.C_PAYMENTTERM_ID left join ad_user u on bp.salesrep_id = u.ad_user_id left join C_ORDER ord ON inv.C_ORDER_ID=ord.C_ORDER_ID left join c_bpartner pbp on inv.pay_bpartner_id = pbp.c_bpartner_id left JOIN c_invoicepayschedule ips ON inv.c_invoice_id = ips.c_invoice_id where inv.AD_CLIENT_ID=1000000 and inv.docstatus in ('CO','CL') AND (bp.salesrep_id in (1000609,1011225,1011237,1000606,1011234,1000006,1000464,1011273,1011218,1011258,1000608,1011186,1011235,1000635,1011253,1000391,1000552,1011170) OR bp.salesrep_id is null ) AND (bp.c_bp_group_id = 1010061 OR pbp.c_bp_group_id = 1010061) and paymenttermduedate(inv.c_paymentterm_id, inv.dateinvoiced::timestamp with time zone) < TO_TIMESTAMP('2026-01-17','YYYY-MM-DD') and inv.issotrx = 'Y' and d.DocBaseType in('ARI','ARC') and invoiceopen(inv.c_invoice_id, 0::numeric) <> 0 and inv.ispaid='N' group by inv.C_INVOICE_ID, ord.DOCUMENTNO, cr.ISO_CODE, pt.C_PAYMENTTERM_ID, bp.C_BPARTNER_ID, ord.poreference, u.name, pbp.name, ips.c_invoicepayschedule_id order by dueDate desc, DAYSDUE postgresql-2024-01-17_102103.log:2024-01-17 10:25:12 +04,14934 LOG: duration: 2244.006 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:12 +04,14970 LOG: duration: 2244.523 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:15 +04,14934 LOG: duration: 2241.429 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:15 +04,14970 LOG: duration: 2242.127 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:17 +04,14934 LOG: duration: 2232.525 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:17 +04,14970 LOG: duration: 2232.280 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:20 +04,14934 LOG: duration: 2208.577 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:20 +04,14970 LOG: duration: 2205.109 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:22 +04,14934 LOG: duration: 2186.865 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:22 +04,14970 LOG: duration: 2186.821 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:25 +04,14934 LOG: duration: 2184.392 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:25 +04,14970 LOG: duration: 2184.368 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:27 +04,14934 LOG: duration: 2221.850 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:27 +04,14970 LOG: duration: 2223.730 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:29 +04,14934 LOG: duration: 2230.174 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:30 +04,14970 LOG: duration: 2230.165 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:32 +04,14934 LOG: duration: 2239.724 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:32 +04,14970 LOG: duration: 2240.017 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:34 +04,14934 LOG: duration: 2232.179 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:35 +04,14970 LOG: duration: 2231.203 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:35 +04,14934 LOG: duration: 803.981 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:35 +04,14970 LOG: duration: 807.319 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:38 +04,14934 LOG: duration: 2241.492 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:38 +04,14970 LOG: duration: 2239.725 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:39 +04,14934 LOG: duration: 1254.757 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:39 +04,14970 LOG: duration: 1253.516 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:42 +04,14934 LOG: duration: 2610.992 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:42 +04,14970 LOG: duration: 2646.506 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:43 +04,14934 LOG: duration: 959.261 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:43 +04,14970 LOG: duration: 960.993 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:45 +04,14934 LOG: duration: 2234.278 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:45 +04,14970 LOG: duration: 2233.921 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:47 +04,14934 LOG: duration: 2231.868 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:48 +04,14970 LOG: duration: 2232.211 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:50 +04,14934 LOG: duration: 2229.931 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:50 +04,14970 LOG: duration: 2229.982 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:52 +04,14934 LOG: duration: 2225.972 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:25:53 +04,14970 LOG: duration: 2226.223 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_102103.log:2024-01-17 10:26:27 +04,14889 LOG: duration: 3104.348 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:26:24','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:26:54 +04,15048 LOG: duration: 3151.510 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:27:08 +04,15052 LOG: duration: 3133.912 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-18 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:30:06 +04,15175 LOG: duration: 2144.402 ms execute : select count(*) from c_orderline where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:30:28 +04,15175 LOG: duration: 1040.381 ms execute : select count(*) from c_invoiceline where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:30:48 +04,15175 LOG: duration: 927.374 ms execute : select count(*) from m_inoutline where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:30:57 +04,15175 LOG: duration: 867.475 ms execute : select count(*) from m_transaction where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:31:17 +04,15175 LOG: duration: 1869.800 ms execute : select count(*) from m_productprice where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:31:31 +04,15192 LOG: duration: 3219.678 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:31:28','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:31:35 +04,15175 LOG: duration: 3421.937 ms execute : select count(*) from Fact_Acct where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:31:45 +04,14891 LOG: duration: 3072.682 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:31:42','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:32:08 +04,15175 LOG: duration: 977.005 ms execute : select count(*) from M_CostDetail where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:32:10 +04,15209 LOG: duration: 2600.985 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='P' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:32:07','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:32:22 +04,15175 LOG: duration: 2437.118 ms execute : select count(*) from c_orderline where isActive='Y' and ad_client_id =1000000 and ad_org_id=1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:32:23 +04,15209 LOG: duration: 2749.537 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='R' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:32:20','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_102103.log:2024-01-17 10:32:44 +04,15175 LOG: duration: 1072.086 ms execute : select count(*) from c_invoiceline where isActive='Y' and ad_client_id =1000000 and ad_org_id=1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:32:52 +04,15175 LOG: duration: 1041.793 ms execute : select count(*) from m_inoutline where isActive='Y' and ad_client_id =1000000 and ad_org_id=1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:32:59 +04,15175 LOG: duration: 1731.897 ms execute : select count(*) from m_transaction where isActive='Y' and ad_client_id =1000000 and m_locator_id in (select m_locator_id from m_locator where ad_org_id=1000000) postgresql-2024-01-17_102103.log:2024-01-17 10:33:10 +04,15175 LOG: duration: 1797.559 ms execute : select count(*) from m_productprice where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_102103.log:2024-01-17 10:33:22 +04,15175 LOG: duration: 837.432 ms execute : select count(*) from M_Transaction where isActive='Y' and ad_client_id =1000000 postgresql-2024-01-17_103746.log:2024-01-17 10:39:53 +04,15438 LOG: duration: 1996.386 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:39:54 +04,15438 LOG: duration: 769.435 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:39:56 +04,15438 LOG: duration: 2107.281 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:06 +04,15438 LOG: duration: 8806.815 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:11 +04,15438 LOG: duration: 5801.060 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:14 +04,15438 LOG: duration: 1977.368 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:16 +04,15438 LOG: duration: 1409.555 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:17 +04,15410 LOG: duration: 3234.459 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:40:14','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:18 +04,15438 LOG: duration: 2007.079 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:20 +04,15438 LOG: duration: 2002.050 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:23 +04,15438 LOG: duration: 1997.497 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:25 +04,15438 LOG: duration: 1995.154 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:27 +04,15438 LOG: duration: 2018.950 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:29 +04,15373 LOG: duration: 3080.004 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:40:26','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:29 +04,15438 LOG: duration: 2151.620 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:32 +04,15438 LOG: duration: 1970.459 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:34 +04,15438 LOG: duration: 2005.912 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:36 +04,15438 LOG: duration: 1997.860 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:38 +04,15438 LOG: duration: 2003.932 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:40 +04,15438 LOG: duration: 1050.215 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:42 +04,15438 LOG: duration: 2043.500 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:44 +04,15438 LOG: duration: 1978.906 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:46 +04,15438 LOG: duration: 1956.840 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:48 +04,15438 LOG: duration: 2020.644 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:51 +04,15438 LOG: duration: 2004.114 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:53 +04,15438 LOG: duration: 2000.623 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:55 +04,15438 LOG: duration: 2001.061 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:40:57 +04,15438 LOG: duration: 2000.269 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:00 +04,15438 LOG: duration: 1979.668 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:02 +04,15438 LOG: duration: 1957.823 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:04 +04,15438 LOG: duration: 1960.699 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:06 +04,15438 LOG: duration: 1989.544 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:09 +04,15438 LOG: duration: 1999.863 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:11 +04,15438 LOG: duration: 1998.424 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:12 +04,15438 LOG: duration: 808.677 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:14 +04,15438 LOG: duration: 2025.823 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:15 +04,15438 LOG: duration: 1268.582 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:18 +04,15438 LOG: duration: 2617.619 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:19 +04,15438 LOG: duration: 958.609 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:21 +04,15438 LOG: duration: 1990.663 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:23 +04,15438 LOG: duration: 1989.382 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:25 +04,15438 LOG: duration: 1996.214 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:41:28 +04,15438 LOG: duration: 1991.403 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 10:47:01 +04,15632 LOG: duration: 3146.775 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:46:58','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_103746.log:2024-01-17 10:47:12 +04,15632 LOG: duration: 3041.262 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:47:09','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_103746.log:2024-01-17 10:47:35 +04,15373 LOG: duration: 3090.619 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 10:47:32','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_103746.log:2024-01-17 11:04:59 +04,16155 LOG: duration: 2262.262 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:00 +04,16191 LOG: duration: 2259.195 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:00 +04,16155 LOG: duration: 770.990 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:01 +04,16191 LOG: duration: 767.644 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:03 +04,16155 LOG: duration: 2154.517 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:03 +04,16191 LOG: duration: 2176.092 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:13 +04,16155 LOG: duration: 8685.375 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:13 +04,16191 LOG: duration: 8745.392 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:19 +04,16155 LOG: duration: 6121.262 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:20 +04,16191 LOG: duration: 6139.216 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:23 +04,16191 LOG: duration: 2178.833 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:24 +04,16155 LOG: duration: 2180.611 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:24 +04,16191 LOG: duration: 1413.279 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:25 +04,16155 LOG: duration: 1412.598 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:26 +04,16191 LOG: duration: 2151.653 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:28 +04,16155 LOG: duration: 2293.380 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:29 +04,16191 LOG: duration: 2283.614 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:30 +04,16155 LOG: duration: 2287.839 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:32 +04,16191 LOG: duration: 2289.917 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:33 +04,16155 LOG: duration: 2285.871 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:34 +04,16191 LOG: duration: 2312.031 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:35 +04,16155 LOG: duration: 2313.747 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:37 +04,16191 LOG: duration: 2321.026 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:38 +04,16155 LOG: duration: 2317.320 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:39 +04,16191 LOG: duration: 2320.753 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:41 +04,16155 LOG: duration: 2316.244 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:42 +04,16191 LOG: duration: 2298.456 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:43 +04,16155 LOG: duration: 2284.342 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:44 +04,16191 LOG: duration: 2258.562 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:46 +04,16155 LOG: duration: 2276.352 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:47 +04,16191 LOG: duration: 2209.261 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:48 +04,16155 LOG: duration: 2227.007 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:49 +04,16191 LOG: duration: 2285.343 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:50 +04,16155 LOG: duration: 2136.157 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:50 +04,16191 LOG: duration: 1051.656 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:52 +04,16155 LOG: duration: 1048.810 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:53 +04,16191 LOG: duration: 2220.322 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:54 +04,16155 LOG: duration: 2238.242 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:55 +04,16191 LOG: duration: 2200.170 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:57 +04,16155 LOG: duration: 2302.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:58 +04,16191 LOG: duration: 2169.274 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:59 +04,16237 LOG: duration: 3204.549 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:05:55','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_103746.log:2024-01-17 11:05:59 +04,16155 LOG: duration: 2036.852 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:00 +04,16191 LOG: duration: 2175.304 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:01 +04,16155 LOG: duration: 2290.029 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:03 +04,16191 LOG: duration: 2269.214 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:04 +04,16155 LOG: duration: 2281.994 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:05 +04,16191 LOG: duration: 2281.038 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:06 +04,16155 LOG: duration: 2302.286 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:08 +04,16191 LOG: duration: 2301.476 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:09 +04,16155 LOG: duration: 2283.885 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:10 +04,16191 LOG: duration: 2298.293 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:12 +04,16155 LOG: duration: 2303.943 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:13 +04,16191 LOG: duration: 2314.773 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:14 +04,16155 LOG: duration: 2304.372 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:15 +04,16191 LOG: duration: 2316.216 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:17 +04,16155 LOG: duration: 2304.703 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:18 +04,16191 LOG: duration: 2285.860 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:19 +04,16155 LOG: duration: 2279.387 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:20 +04,16191 LOG: duration: 2268.442 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:22 +04,16155 LOG: duration: 2276.727 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:23 +04,16191 LOG: duration: 2274.451 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:24 +04,16155 LOG: duration: 2299.072 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:25 +04,16191 LOG: duration: 2301.867 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:26 +04,16191 LOG: duration: 806.140 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:27 +04,16155 LOG: duration: 2184.674 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:27 +04,16155 LOG: duration: 806.545 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:29 +04,16191 LOG: duration: 2238.795 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:30 +04,16155 LOG: duration: 2196.999 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:30 +04,16191 LOG: duration: 1276.978 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:31 +04,16155 LOG: duration: 1269.597 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:33 +04,16191 LOG: duration: 2700.458 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:34 +04,16155 LOG: duration: 2663.739 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:34 +04,16191 LOG: duration: 954.553 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:35 +04,16155 LOG: duration: 953.044 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:36 +04,16191 LOG: duration: 2122.989 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:37 +04,16155 LOG: duration: 2260.982 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:38 +04,16191 LOG: duration: 2273.637 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:40 +04,16155 LOG: duration: 2285.988 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:41 +04,16191 LOG: duration: 2305.094 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:42 +04,16155 LOG: duration: 2307.433 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:44 +04,16191 LOG: duration: 2301.605 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:45 +04,16155 LOG: duration: 2163.130 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_103746.log:2024-01-17 11:06:50 +04,16236 LOG: duration: 3102.596 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:06:47','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:10:19 +04,14658 LOG: duration: 921.804 ms postgresql-2024-01-17_110716.log:2024-01-17 11:10:46 +04,14658 LOG: duration: 682.623 ms postgresql-2024-01-17_110716.log:2024-01-17 11:13:05 +04,14658 LOG: duration: 674.035 ms postgresql-2024-01-17_110716.log:2024-01-17 11:13:55 +04,16380 LOG: duration: 1127.506 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:13:54','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_110716.log:2024-01-17 11:14:04 +04,14658 LOG: duration: 689.325 ms postgresql-2024-01-17_110716.log:2024-01-17 11:14:04 +04,14658 LOG: duration: 683.931 ms postgresql-2024-01-17_110716.log:2024-01-17 11:15:24 +04,14658 LOG: duration: 759.812 ms postgresql-2024-01-17_110716.log:2024-01-17 11:15:25 +04,14658 LOG: duration: 753.857 ms postgresql-2024-01-17_110716.log:2024-01-17 11:15:54 +04,16380 LOG: duration: 3189.098 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:15:51','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:16:01 +04,16426 LOG: duration: 3383.099 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) AND o.c_pos_id = 1000000 and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:15:58','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:16:15 +04,16380 LOG: duration: 3063.486 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:16:12','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:16:29 +04,16380 LOG: duration: 3055.142 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:16:26','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:17:32 +04,16533 LOG: duration: 1746.125 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_110716.log:2024-01-17 11:17:35 +04,16455 LOG: duration: 4634.980 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_110716.log:2024-01-17 11:19:58 +04,16627 LOG: duration: 2061.800 ms execute : select pr.name as name,coalesce(st.qtyonhand, 0)as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, asi.lot, asi.serno, asi.guaranteedate, st.m_attributesetinstance_id,productAttribute(st.m_attributesetinstance_id) productAttribute, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , s.m_attributesetinstance_id, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) GROUP BY s.m_product_id, s.m_attributesetinstance_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND (coalesce(st.m_attributesetinstance_id,0) = 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0)) LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = st.m_attributesetinstance_id and ass.m_attributeset_id = pr.m_attributeset_id LEFT JOIN m_attributeinstance ai on ai.m_attributesetinstance_id = pr.m_attributesetinstance_id LEFT JOIN m_attributevalue a on a.m_attributevalue_id = ai.m_attributevalue_id LEFT JOIN m_attributeinstance ain on ain.m_attributesetinstance_id = st.m_attributesetinstance_id LEFT JOIN m_attributevalue av on av.m_attributevalue_id = ain.m_attributevalue_id LEFT JOIN m_attributeinstance ai1 on ai1.m_attributesetinstance_id = pr.m_attributesetinstance_id LEFT JOIN m_attributevalue a1 on a1.m_attributevalue_id = ai1.m_attributevalue_id LEFT JOIN m_attributeinstance ain1 on ain1.m_attributesetinstance_id = st.m_attributesetinstance_id LEFT JOIN m_attributevalue av1 on av1.m_attributevalue_id = ain1.m_attributevalue_id left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.m_warehouse_id = 1000000 group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id and minl.m_attributesetinstance_id = st.m_attributesetinstance_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP') AND m.m_locatorto_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id and (mmov.m_attributesetinstance_id = st.m_attributesetinstance_id or st.m_attributesetinstance_id is null) where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y' AND ppo.c_bpartner_id = 1000101 AND (ai.m_attribute_id = 1010000 AND a.value in ('POLY')) AND (ai1.m_attribute_id = 1010002 AND a1.value in ('4 SET')) AND ai1.m_attributesetinstance_id = ai.m_attributesetinstance_id AND pr.ad_org_id in (0, 1000000) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name ,asi.lot,asi.serno,asi.guaranteedate,st.m_attributesetinstance_id ,st.qtyonhand order by name postgresql-2024-01-17_110716.log:2024-01-17 11:20:05 +04,16581 LOG: duration: 1828.562 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_110716.log:2024-01-17 11:20:08 +04,16629 LOG: duration: 4687.487 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_110716.log:2024-01-17 11:21:36 +04,16692 LOG: duration: 3106.033 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:21:33','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:21:45 +04,16692 LOG: duration: 3032.432 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:21:41','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:09 +04,16627 LOG: duration: 4211.765 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:30 +04,16721 LOG: duration: 1691.064 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_110716.log:2024-01-17 11:22:33 +04,16653 LOG: duration: 4677.719 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_110716.log:2024-01-17 11:22:36 +04,16752 LOG: duration: 2115.871 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:37 +04,16787 LOG: duration: 2137.271 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:37 +04,16752 LOG: duration: 787.456 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:38 +04,16787 LOG: duration: 793.921 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:40 +04,16752 LOG: duration: 2395.098 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:40 +04,16787 LOG: duration: 2394.759 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:49 +04,16752 LOG: duration: 8845.676 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:50 +04,16787 LOG: duration: 8823.890 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:55 +04,16752 LOG: duration: 6000.424 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:56 +04,16787 LOG: duration: 5969.383 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:58 +04,16752 LOG: duration: 2033.687 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:22:59 +04,16787 LOG: duration: 2050.244 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:00 +04,16752 LOG: duration: 1417.392 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:01 +04,16787 LOG: duration: 1411.036 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:02 +04,16752 LOG: duration: 2090.178 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:03 +04,16787 LOG: duration: 2117.712 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:04 +04,16581 LOG: duration: 35952.510 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_110716.log:2024-01-17 11:23:05 +04,16752 LOG: duration: 2293.664 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:05 +04,16787 LOG: duration: 2293.448 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:07 +04,16752 LOG: duration: 2242.652 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:08 +04,16787 LOG: duration: 2240.189 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:10 +04,16752 LOG: duration: 2269.052 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:10 +04,16787 LOG: duration: 2269.093 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:12 +04,16752 LOG: duration: 2290.366 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:13 +04,16787 LOG: duration: 2294.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:15 +04,16752 LOG: duration: 2310.999 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:15 +04,16787 LOG: duration: 2277.502 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:17 +04,16752 LOG: duration: 2262.919 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:18 +04,16787 LOG: duration: 2295.496 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:20 +04,16752 LOG: duration: 2287.094 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:20 +04,16787 LOG: duration: 2299.932 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:22 +04,16752 LOG: duration: 2288.000 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:23 +04,16787 LOG: duration: 2270.223 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:25 +04,16752 LOG: duration: 2280.597 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:25 +04,16787 LOG: duration: 2210.954 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:26 +04,16752 LOG: duration: 1045.929 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:27 +04,16787 LOG: duration: 1042.659 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:28 +04,16752 LOG: duration: 2262.982 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:29 +04,16787 LOG: duration: 2290.965 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:31 +04,16752 LOG: duration: 2310.826 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:32 +04,16787 LOG: duration: 2322.895 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:34 +04,16752 LOG: duration: 2287.663 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:34 +04,16787 LOG: duration: 2296.147 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:36 +04,16752 LOG: duration: 2289.895 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:37 +04,16787 LOG: duration: 2290.688 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:39 +04,16752 LOG: duration: 2283.596 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:39 +04,16787 LOG: duration: 2287.944 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:41 +04,16752 LOG: duration: 2265.601 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:42 +04,16787 LOG: duration: 2244.702 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:44 +04,16752 LOG: duration: 2256.974 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:44 +04,16787 LOG: duration: 2257.116 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:46 +04,16752 LOG: duration: 2237.310 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:47 +04,16787 LOG: duration: 2227.379 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:49 +04,16752 LOG: duration: 2275.911 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:49 +04,16787 LOG: duration: 2297.569 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:51 +04,16752 LOG: duration: 2192.765 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:52 +04,16787 LOG: duration: 2177.424 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:54 +04,16752 LOG: duration: 2306.317 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:54 +04,16787 LOG: duration: 2314.369 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:56 +04,16752 LOG: duration: 2299.435 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:57 +04,16787 LOG: duration: 2304.441 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:59 +04,16752 LOG: duration: 2266.725 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:23:59 +04,16787 LOG: duration: 2252.618 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:01 +04,16752 LOG: duration: 2269.067 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:02 +04,16787 LOG: duration: 2214.701 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:02 +04,16752 LOG: duration: 805.618 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:03 +04,16787 LOG: duration: 799.752 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:04 +04,16752 LOG: duration: 2224.187 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:05 +04,16787 LOG: duration: 2222.603 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:06 +04,16752 LOG: duration: 1268.246 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:06 +04,16787 LOG: duration: 1271.138 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:08 +04,16752 LOG: duration: 2702.515 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:09 +04,16787 LOG: duration: 2705.881 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:10 +04,16752 LOG: duration: 968.292 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:10 +04,16787 LOG: duration: 970.029 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:12 +04,16752 LOG: duration: 2259.491 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:12 +04,16787 LOG: duration: 2284.356 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:14 +04,16752 LOG: duration: 2271.032 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:15 +04,16787 LOG: duration: 2286.797 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:17 +04,16752 LOG: duration: 2256.695 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:17 +04,16787 LOG: duration: 2239.477 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:19 +04,16752 LOG: duration: 2243.365 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:24:20 +04,16787 LOG: duration: 2201.895 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:26:53 +04,16936 LOG: duration: 1997.485 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:26:54 +04,16936 LOG: duration: 774.266 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:26:56 +04,16936 LOG: duration: 2103.992 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:05 +04,16936 LOG: duration: 8354.274 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:11 +04,16936 LOG: duration: 5610.857 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:14 +04,16936 LOG: duration: 1954.501 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:15 +04,16936 LOG: duration: 1395.862 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:17 +04,16936 LOG: duration: 1979.286 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:19 +04,16936 LOG: duration: 2056.686 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:21 +04,16990 LOG: duration: 2199.084 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:22 +04,16990 LOG: duration: 762.888 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:22 +04,16936 LOG: duration: 2099.561 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:24 +04,16990 LOG: duration: 2293.995 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:24 +04,16936 LOG: duration: 2231.455 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:26 +04,16936 LOG: duration: 1984.554 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:29 +04,16936 LOG: duration: 1983.963 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:31 +04,16936 LOG: duration: 1986.339 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:33 +04,16936 LOG: duration: 1981.450 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:33 +04,16990 LOG: duration: 8748.019 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:36 +04,16936 LOG: duration: 2113.916 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:38 +04,16936 LOG: duration: 2107.986 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:39 +04,16936 LOG: duration: 1046.855 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:39 +04,16990 LOG: duration: 5793.920 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:41 +04,16936 LOG: duration: 2154.670 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:43 +04,16990 LOG: duration: 2252.453 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:44 +04,16936 LOG: duration: 2136.482 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:44 +04,16990 LOG: duration: 1412.185 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:46 +04,16936 LOG: duration: 2321.266 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:46 +04,16990 LOG: duration: 2320.295 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:49 +04,16936 LOG: duration: 2308.937 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:49 +04,16990 LOG: duration: 2308.961 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:51 +04,16936 LOG: duration: 2263.936 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:52 +04,16990 LOG: duration: 2263.238 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:54 +04,16936 LOG: duration: 2261.027 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:54 +04,16990 LOG: duration: 2260.288 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:56 +04,16936 LOG: duration: 2296.789 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:57 +04,16990 LOG: duration: 2299.395 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:59 +04,16936 LOG: duration: 2253.495 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:27:59 +04,16990 LOG: duration: 2254.654 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:01 +04,16936 LOG: duration: 2293.508 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:02 +04,16990 LOG: duration: 2294.353 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:04 +04,16936 LOG: duration: 2293.681 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:04 +04,16990 LOG: duration: 2293.496 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:06 +04,16936 LOG: duration: 2257.904 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:07 +04,16990 LOG: duration: 2243.052 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:09 +04,16936 LOG: duration: 2270.192 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:09 +04,16990 LOG: duration: 2269.875 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:10 +04,16990 LOG: duration: 1033.558 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:11 +04,16936 LOG: duration: 2086.947 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:13 +04,16990 LOG: duration: 2156.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:14 +04,16936 LOG: duration: 2123.112 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:15 +04,16936 LOG: duration: 806.046 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:15 +04,16990 LOG: duration: 2197.279 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:17 +04,16936 LOG: duration: 2320.862 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:18 +04,16990 LOG: duration: 2225.891 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:18 +04,16936 LOG: duration: 1275.114 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:20 +04,16990 LOG: duration: 1999.744 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:21 +04,16936 LOG: duration: 2703.958 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:22 +04,16990 LOG: duration: 2002.712 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:22 +04,16936 LOG: duration: 967.348 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:24 +04,16936 LOG: duration: 2150.085 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:24 +04,16990 LOG: duration: 2117.861 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:27 +04,16936 LOG: duration: 2255.855 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:27 +04,16990 LOG: duration: 2255.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:29 +04,16936 LOG: duration: 2265.761 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:29 +04,16990 LOG: duration: 2267.220 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:32 +04,16936 LOG: duration: 2314.494 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:32 +04,16990 LOG: duration: 2314.184 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:34 +04,16990 LOG: duration: 1995.934 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:36 +04,16990 LOG: duration: 1997.479 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:38 +04,17011 LOG: duration: 1023.581 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:28:37','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:39 +04,16990 LOG: duration: 1996.759 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:41 +04,16990 LOG: duration: 1997.370 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:43 +04,16894 LOG: duration: 3173.125 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:28:40','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:43 +04,16990 LOG: duration: 2113.439 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:44 +04,16990 LOG: duration: 807.709 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:46 +04,16990 LOG: duration: 1973.958 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:48 +04,16990 LOG: duration: 1258.738 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:50 +04,16990 LOG: duration: 2677.581 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:51 +04,16990 LOG: duration: 968.209 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:53 +04,16990 LOG: duration: 2014.597 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:54 +04,16894 LOG: duration: 3098.296 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:28:51','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:56 +04,16990 LOG: duration: 2003.185 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:28:58 +04,16990 LOG: duration: 1977.145 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:29:00 +04,16990 LOG: duration: 1949.191 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_110716.log:2024-01-17 11:30:41 +04,17102 LOG: duration: 501.723 ms execute : SELECT * FROM (SELECT 'Account Sales' AS type, 1 AS pri, doc.dateacct, NULL payamt, NULL tendertype, NULL c_paymenttype_id, doc.c_invoice_id documentid, doc.documentno documentno, o.c_order_id referenceId, o.documentno referenceno, bp.name bpName, o.c_pos_id terminalId, CASE WHEN dt.docbasetype = 'ARI' THEN doc.grandtotal ELSE doc.grandtotal*-1 END AS grandtotal, dt.docbasetype FROM c_invoice doc JOIN c_order o ON doc.c_order_id = o.c_order_id JOIN c_bpartner bp ON doc.c_bpartner_id = bp.c_bpartner_id JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.paymentrule IN ('P') AND doc.dateacct BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isactive='Y' AND doc.DocStatus IN ('CO','CL') AND dt.docbasetype = 'ARI' AND (doc.description NOT LIKE 'DESC JE%' OR doc.description IS NULL) UNION ALL SELECT 'Account Returns' AS type, 2 AS pri, doc.dateacct, NULL payamt, NULL tendertype, NULL c_paymenttype_id, doc.c_invoice_id documentid, doc.documentno documentno, o.c_order_id referenceId, o.documentno referenceno, bp.name bpName, o.c_pos_id terminalId, CASE WHEN dt.docbasetype = 'ARI' THEN doc.grandtotal ELSE doc.grandtotal*-1 END AS grandtotal, dt.docbasetype FROM c_invoice doc JOIN c_order o ON doc.c_order_id = o.c_order_id JOIN c_bpartner bp ON doc.c_bpartner_id = bp.c_bpartner_id JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.paymentrule IN ('P') AND doc.dateacct BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isactive='Y' AND doc.DocStatus IN ('CO','CL') AND dt.docbasetype = 'ARC' AND (doc.description NOT LIKE 'DESC JE%' OR doc.description IS NULL) UNION ALL SELECT 'Laybuy Sales' AS type, 3 AS pri, doc.dateacct, NULL payamt, NULL tendertype, NULL c_paymenttype_id, doc.c_invoice_id documentid, doc.documentno documentno, o.c_order_id referenceId, o.documentno referenceno, bp.name bpName, o.c_pos_id terminalId, CASE WHEN dt.docbasetype = 'ARI' THEN doc.grandtotal ELSE doc.grandtotal*-1 END AS grandtotal, dt.docbasetype FROM c_invoice doc JOIN c_order o ON doc.c_order_id = o.c_order_id JOIN c_bpartner bp ON doc.c_bpartner_id = bp.c_bpartner_id JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.paymentrule IN ('L') AND doc.dateacct BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isactive='Y' AND doc.DocStatus IN ('CO','CL') AND dt.docbasetype = 'ARI' AND (doc.description NOT LIKE 'DESC JE%' OR doc.description IS NULL) UNION ALL SELECT 'Cash Sales' AS type, 4 AS pri, doc.dateInvoiced dateacct, pay.payamt, pay.tendertype, pay.c_paymenttype_id, doc.c_invoice_id documentid, doc.documentno documentno, o.c_order_id referenceId, o.documentno referenceno, bp.name bpName, o.c_pos_id terminalId, CASE WHEN dt.docbasetype = 'ARI' THEN doc.grandtotal ELSE doc.grandtotal*-1 END AS grandtotal, dt.docbasetype FROM c_invoice doc JOIN c_order o ON doc.c_order_id = o.c_order_id JOIN c_bpartner bp ON doc.c_bpartner_id = bp.c_bpartner_id JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID LEFT JOIN LATERAL (SELECT array_agg(payamt) :: text payamt, array_agg(tendertype) :: text tendertype, array_agg(c_paymenttype_id) :: text c_paymenttype_id FROM (SELECT p.payamt payamt, p.tendertype tendertype, p.c_paymenttype_id FROM c_payment p WHERE c_invoice_id = doc.c_invoice_id UNION ALL SELECT rv.voucheramt * -1 payamt, 'V' tendertype, rv.c_paymenttype_id FROM c_voucher rv WHERE c_invoice_id = doc.c_invoice_id) a) pay on 1=1 WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.paymentrule NOT IN ('P', 'L') AND doc.dateInvoiced BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isactive='Y' AND doc.DocStatus IN ('CO','CL') AND dt.docbasetype = 'ARI' AND (doc.description NOT LIKE 'DESC JE%' OR doc.description IS NULL) UNION ALL SELECT 'Cash Returns' AS type, 5 AS pri, doc.dateInvoiced dateacct, pay.payamt, pay.tendertype, pay.c_paymenttype_id, doc.c_invoice_id documentid, doc.documentno documentno, o.c_order_id referenceId, o.documentno referenceno, bp.name bpName, o.c_pos_id terminalId, CASE WHEN dt.docbasetype = 'ARI' THEN doc.grandtotal ELSE doc.grandtotal*-1 END AS grandtotal, dt.docbasetype FROM c_invoice doc JOIN c_order o ON doc.c_order_id = o.c_order_id JOIN c_bpartner bp ON doc.c_bpartner_id = bp.c_bpartner_id JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID LEFT JOIN LATERAL (SELECT array_agg(payamt) :: text payamt, array_agg(tendertype) :: text tendertype, array_agg(c_paymenttype_id) :: text c_paymenttype_id FROM (SELECT p.payamt payamt, p.tendertype tendertype, p.c_paymenttype_id FROM c_payment p WHERE c_invoice_id = doc.c_invoice_id UNION ALL SELECT rv.voucheramt * -1 payamt, 'V' tendertype, rv.c_paymenttype_id FROM c_voucher rv WHERE c_invoice_id = doc.c_invoice_id) a) pay on 1=1 WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.paymentrule NOT IN ('P', 'L') AND doc.dateInvoiced BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isactive='Y' AND doc.DocStatus IN ('CO','CL') AND dt.docbasetype = 'ARC' AND (doc.description NOT LIKE 'DESC JE%' OR doc.description IS NULL) UNION ALL SELECT 'Debtors Payments' AS type, 6 AS pri, doc.datetrx dateacct, array_agg(al.payamt) :: text payamt, array_agg(tendertype) :: text tendertype, array_agg(coalesce(c_paymenttype_id,0)) :: text c_paymenttype_id, doc.c_payment_id documentid, doc.documentno documentno, o.c_order_id as referenceId, o.documentno as referenceno , bp.name bpName, doc.u_posterminal_id terminalId, sum(al.payamt) grandtotal, dt.docbasetype FROM C_Payment doc JOIN LATERAL (SELECT SUM(amount+discountamt+writeoffamt) payamt, C_Order_ID FROM C_AllocationLine WHERE C_Payment_ID = doc.C_Payment_ID AND isactive = 'Y' GROUP BY 2) al ON TRUE JOIN C_Order o ON al.C_Order_ID = o.C_Order_ID JOIN C_Bpartner bp ON doc.C_Bpartner_ID = bp.C_Bpartner_ID JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.isActive = 'Y' AND doc.datetrx BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isreceipt='Y' AND doc.docStatus in ('CO','CL') AND o.paymentrule = 'P' GROUP BY doc.datetrx , doc.c_payment_id, doc.documentno, bp.name, doc.payamt, dt.docbasetype, o.c_order_id, o.documentno UNION ALL SELECT 'Unallocated Payments' AS type, 7 AS pri, doc.datetrx dateacct, COALESCE(SUM(paymentavailable(doc.c_payment_id, TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS'))), 0) :: text payamt, array_agg(tendertype) :: text tendertype, array_agg(coalesce(c_paymenttype_id,0)) :: text c_paymenttype_id, doc.c_payment_id documentid, doc.documentno documentno, 0 as referenceId, '' as referenceno , bp.name bpName, doc.u_posterminal_id terminalId, COALESCE(SUM(paymentavailable(doc.c_payment_id, TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS'))), 0) grandtotal, dt.docbasetype FROM C_Payment doc JOIN C_Bpartner bp ON doc.C_Bpartner_ID = bp.C_Bpartner_ID JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.isActive = 'Y' AND doc.datetrx BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND doc.isreceipt='Y' AND doc.docStatus in ('CO','CL') AND paymentavailable(doc.c_payment_id, TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS')) <> 0 AND C_Order_ID IS NULL GROUP BY doc.datetrx , doc.c_payment_id, doc.documentno, bp.name, doc.payamt, dt.docbasetype UNION ALL SELECT 'LayBuy Payments' AS type, 8 AS pri, doc.datetrx dateacct, array_agg(payamt) :: text payamt, array_agg(tendertype) :: text tendertype, array_agg(coalesce(c_paymenttype_id,0)) :: text c_paymenttype_id, doc.c_payment_id documentid, doc.documentno documentno, o.c_order_id as referenceId, o.documentno as referenceno , bp.name bpName, doc.u_posterminal_id terminalId, doc.payamt grandtotal, dt.docbasetype FROM C_Payment doc JOIN C_Order o ON doc.C_Order_ID = o.C_Order_ID JOIN C_Bpartner bp ON doc.C_Bpartner_ID = bp.C_Bpartner_ID JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.isActive = 'Y' AND doc.datetrx BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND o.paymentrule = 'L' AND o.docstatus IN ('CO','CL', 'VO') AND doc.docStatus in ('CO','CL') AND payamt > 0 GROUP BY doc.datetrx , doc.c_payment_id, doc.documentno, bp.name, doc.payamt, dt.docbasetype, o.c_order_id, o.documentno UNION ALL SELECT 'LayBuy Refunds' AS type, 9 AS pri, doc.datetrx dateacct, array_agg(payamt) :: text payamt, array_agg(tendertype) :: text tendertype, array_agg(coalesce(c_paymenttype_id,0)) :: text c_paymenttype_id, doc.c_payment_id documentid, doc.documentno documentno, o.c_order_id as referenceId, o.documentno as referenceno , bp.name bpName, doc.u_posterminal_id terminalId, doc.payamt grandtotal, dt.docbasetype FROM C_Payment doc JOIN C_Order o ON doc.C_Order_ID = o.C_Order_ID JOIN C_Bpartner bp ON doc.C_Bpartner_ID = bp.C_Bpartner_ID JOIN C_Doctype dt ON dt.C_Doctype_ID = doc.C_Doctype_ID WHERE doc.ad_client_id =1000000 AND doc.ad_org_id IN (0,1000000,1000002,1000001) AND doc.isActive = 'Y' AND doc.datetrx BETWEEN TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-17 11:30:40','YYYY-MM-DD HH24:MI:SS') AND o.paymentrule = 'L' AND o.docstatus IN ('VO') AND doc.docStatus in ('CO','CL') AND payamt < 0 GROUP BY doc.datetrx , doc.c_payment_id, doc.documentno, bp.name, doc.payamt, dt.docbasetype, o.c_order_id, o.documentno) summary ORDER BY pri, dateacct, documentno postgresql-2024-01-17_110716.log:2024-01-17 11:32:52 +04,17102 LOG: duration: 3118.149 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:32:49','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:32:59 +04,17112 LOG: duration: 3079.083 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:32:56','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_110716.log:2024-01-17 11:33:17 +04,17142 LOG: duration: 2189.967 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:33:15','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_113413.log:2024-01-17 11:36:23 +04,17254 LOG: duration: 2038.569 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:24 +04,17254 LOG: duration: 772.159 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:26 +04,17254 LOG: duration: 2116.875 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:35 +04,17254 LOG: duration: 8369.187 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:41 +04,17254 LOG: duration: 6054.062 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:44 +04,17254 LOG: duration: 1984.165 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:46 +04,17254 LOG: duration: 1415.250 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:48 +04,17254 LOG: duration: 1974.435 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:50 +04,17254 LOG: duration: 1950.747 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:52 +04,17254 LOG: duration: 1944.921 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:55 +04,17254 LOG: duration: 1978.851 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:57 +04,17254 LOG: duration: 1979.073 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:36:59 +04,17254 LOG: duration: 1988.238 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:01 +04,17254 LOG: duration: 1980.875 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:04 +04,17254 LOG: duration: 1966.195 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:06 +04,17254 LOG: duration: 1952.666 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:08 +04,17254 LOG: duration: 1943.444 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:09 +04,17254 LOG: duration: 1035.959 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:11 +04,17254 LOG: duration: 2025.113 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:11 +04,17285 LOG: duration: 2206.220 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:37:09','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_113413.log:2024-01-17 11:37:13 +04,17254 LOG: duration: 2006.687 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:16 +04,17254 LOG: duration: 1987.844 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:18 +04,17254 LOG: duration: 1983.606 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:20 +04,17254 LOG: duration: 1962.846 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:22 +04,17254 LOG: duration: 1957.432 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:25 +04,17254 LOG: duration: 1948.607 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:27 +04,17254 LOG: duration: 1976.629 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:29 +04,17254 LOG: duration: 1987.445 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:31 +04,17254 LOG: duration: 1982.699 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:31 +04,17284 LOG: duration: 1016.616 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:37:30','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:33 +04,17254 LOG: duration: 1990.316 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:36 +04,17254 LOG: duration: 1984.805 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:38 +04,17254 LOG: duration: 1989.350 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:40 +04,17254 LOG: duration: 2020.884 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:40 +04,17284 LOG: duration: 3101.468 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:37:37','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:41 +04,17254 LOG: duration: 798.577 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:43 +04,17254 LOG: duration: 2027.047 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:44 +04,17254 LOG: duration: 1271.885 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:47 +04,17284 LOG: duration: 3086.667 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:37:44','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:47 +04,17254 LOG: duration: 2705.762 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:48 +04,17254 LOG: duration: 966.663 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:50 +04,17254 LOG: duration: 1986.280 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:53 +04,17254 LOG: duration: 1987.113 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:55 +04,17254 LOG: duration: 1962.823 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:37:57 +04,17254 LOG: duration: 1950.088 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:39:02 +04,17319 LOG: duration: 3101.554 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:38:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:39:39 +04,17338 LOG: duration: 5220.135 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='S' and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:38 +04,17319 LOG: duration: 3027.988 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:40:35','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:46 +04,17409 LOG: duration: 2265.090 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:46 +04,17445 LOG: duration: 2262.366 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:47 +04,17409 LOG: duration: 776.386 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:47 +04,17445 LOG: duration: 778.360 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:49 +04,17409 LOG: duration: 2195.592 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:49 +04,17284 LOG: duration: 3226.681 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-18 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:49 +04,17445 LOG: duration: 2182.518 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_113413.log:2024-01-17 11:40:53 +04,17284 LOG: duration: 3225.392 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-18 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 11:40:59 +04,17409 LOG: duration: 9049.949 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:00 +04,17445 LOG: duration: 8913.449 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:05 +04,17409 LOG: duration: 5956.286 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:06 +04,17445 LOG: duration: 5899.982 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:08 +04,17409 LOG: duration: 2125.587 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:09 +04,17445 LOG: duration: 2124.672 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:10 +04,17409 LOG: duration: 1403.317 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:10 +04,17445 LOG: duration: 1413.115 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:12 +04,17409 LOG: duration: 2180.475 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:13 +04,17445 LOG: duration: 2254.852 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:14 +04,17409 LOG: duration: 2263.099 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:15 +04,17445 LOG: duration: 2265.320 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:17 +04,17409 LOG: duration: 2258.375 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:18 +04,17445 LOG: duration: 2259.120 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:19 +04,17409 LOG: duration: 2244.287 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:20 +04,17445 LOG: duration: 2245.976 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:22 +04,17409 LOG: duration: 2216.382 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:23 +04,17445 LOG: duration: 2220.919 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:24 +04,17409 LOG: duration: 2221.839 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:25 +04,17445 LOG: duration: 2223.750 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:26 +04,17319 LOG: duration: 988.445 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:41:25','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:27 +04,17409 LOG: duration: 2239.053 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:28 +04,17445 LOG: duration: 2241.225 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:29 +04,17409 LOG: duration: 2264.393 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:30 +04,17445 LOG: duration: 2260.150 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:32 +04,17409 LOG: duration: 2237.984 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:33 +04,17445 LOG: duration: 2232.905 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:34 +04,17409 LOG: duration: 2259.846 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:35 +04,17445 LOG: duration: 2181.053 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:36 +04,17409 LOG: duration: 1049.878 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:36 +04,17445 LOG: duration: 1044.769 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:38 +04,17409 LOG: duration: 2207.525 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:39 +04,17445 LOG: duration: 2258.472 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:40 +04,17409 LOG: duration: 2199.149 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:41 +04,17445 LOG: duration: 2214.107 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:43 +04,17409 LOG: duration: 2206.307 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:44 +04,17445 LOG: duration: 2205.661 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:45 +04,17409 LOG: duration: 2241.727 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:46 +04,17445 LOG: duration: 2254.388 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:48 +04,17409 LOG: duration: 2254.558 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:49 +04,17445 LOG: duration: 2259.970 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:50 +04,17409 LOG: duration: 2261.650 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:51 +04,17445 LOG: duration: 2251.606 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:53 +04,17409 LOG: duration: 2250.962 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:54 +04,17445 LOG: duration: 2252.354 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:55 +04,17409 LOG: duration: 2235.139 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:56 +04,17445 LOG: duration: 2233.561 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:58 +04,17409 LOG: duration: 2202.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:41:59 +04,17445 LOG: duration: 2213.177 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:00 +04,17409 LOG: duration: 2209.430 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:01 +04,17445 LOG: duration: 2201.354 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:03 +04,17409 LOG: duration: 2232.484 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:03 +04,17445 LOG: duration: 2236.932 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:05 +04,17409 LOG: duration: 2253.610 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:06 +04,17445 LOG: duration: 2254.574 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:08 +04,17409 LOG: duration: 2243.625 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:08 +04,17445 LOG: duration: 2241.078 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:10 +04,17409 LOG: duration: 2242.939 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:11 +04,17445 LOG: duration: 2164.017 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:11 +04,17409 LOG: duration: 804.523 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:12 +04,17445 LOG: duration: 805.078 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:13 +04,17409 LOG: duration: 2161.136 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:14 +04,17445 LOG: duration: 2139.059 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:14 +04,17409 LOG: duration: 1252.179 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:15 +04,17445 LOG: duration: 1252.358 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:17 +04,17409 LOG: duration: 2610.843 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:18 +04,17445 LOG: duration: 2626.341 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:18 +04,17409 LOG: duration: 952.581 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:19 +04,17445 LOG: duration: 956.081 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:20 +04,17409 LOG: duration: 2144.209 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:21 +04,17445 LOG: duration: 2215.130 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:23 +04,17409 LOG: duration: 2232.974 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:24 +04,17445 LOG: duration: 2238.046 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:25 +04,17409 LOG: duration: 2213.231 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:26 +04,17445 LOG: duration: 2231.299 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:28 +04,17409 LOG: duration: 2191.939 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:42:29 +04,17445 LOG: duration: 2104.633 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 11:45:35 +04,17319 LOG: duration: 3060.298 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 11:45:32','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:04:28 +04,14659 LOG: duration: 710.237 ms postgresql-2024-01-17_114057.log:2024-01-17 12:04:45 +04,17851 LOG: duration: 3197.980 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:04:42','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:04:57 +04,14659 LOG: duration: 684.492 ms postgresql-2024-01-17_114057.log:2024-01-17 12:05:02 +04,18049 LOG: duration: 3121.737 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:04:58','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:09:32 +04,14659 LOG: duration: 685.162 ms postgresql-2024-01-17_114057.log:2024-01-17 12:11:02 +04,18120 LOG: duration: 3145.431 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:10:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:11:10 +04,18202 LOG: duration: 3091.183 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:11:06','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:19:23 +04,18421 LOG: duration: 1248.339 ms execute : select lc.m_product_id proId, lc.pName, lc.upc, lc.sku, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno shipNo, mi.m_inout_id shipId, mi.movementdate shipDate, coalesce(mi.poreference, '') shipRef, shipBp.c_bpartner_id shipBpId, shipBp.name shipBpName, shipInv.shipValue, shipInv.shipValueConvAmt, shipInv.shipCurId, array_agg(lc.c_charge_id order by lc.chargeName) lcChargeId, array_agg(lc.chargeName order by lc.chargeName) lcChargeName, array_agg(lc.alloValue order by lc.chargeName) as alloValue, array_agg(lc.allocConvAmt order by lc.chargeName) as allocConvValue, array_agg(lc.c_invoice_id order by lc.chargeName) as lcInvIds, ''::text as subGroupValue from m_inout mi join c_bpartner shipBp on mi.c_bpartner_id = shipBp.c_bpartner_id join lateral (select mp.m_product_id, mp.name pName, coalesce(mp.upc, '') upc, coalesce(mp.sku, '') sku, mp.c_uom_id, u.uomsymbol, u.stdprecision uomprec, c.c_charge_id, c.name chargeName, sum(alloc.amt) as alloValue, inv.c_invoice_id, sum(coalesce(currencybase(inv.c_conversion_rate_id,alloc.amt,inv.c_currency_id,inv.dateacct,inv.ad_client_id,inv.ad_org_id),0)) as allocConvAmt from c_landedcost lc join c_invoiceline invl on invl.c_invoiceline_id = lc.c_invoiceline_id join c_landedcostallocation alloc on invl.c_invoiceline_id = alloc.c_invoiceline_id join m_product mp on mp.m_product_id = alloc.m_product_id join c_uom u on u.c_uom_id = mp.c_uom_id join c_invoice inv on inv.c_invoice_id = invl.c_invoice_id and inv.docstatus in ('CO', 'CL') join c_charge c on c.c_charge_id = invl.c_charge_id where lc.m_inout_id = mi.m_inout_id and alloc.amt != 0 and inv.ad_org_id in ( 0,1000000,1000002,1000001) group by mp.m_product_id, mp.name, mp.upc,mp.sku, mp.c_uom_id, u.uomsymbol, uomprec, c.c_charge_id, c.name ,inv.c_invoice_id) lc on true left join lateral (select sv.shipCurId, sv.qty, sv.amount shipValue, coalesce(currencybase(sv.c_conversion_rate_id,sv.amount,sv.shipCurId,sv.dateacct,sv.ad_client_id,sv.ad_org_id),0) as shipValueConvAmt from (select sum(mil.movementqty) qty, round(sum(mil.movementqty * coalesce(il.linenetamt,cl.linenetamt)/coalesce(il.qtyinvoiced,cl.qtyordered)), max(cr.stdprecision)) as amount, max(coalesce(il.c_currency_id, cl.c_currency_id)) shipCurId, max(coalesce(il.c_conversion_rate_id, cl.c_conversion_rate_id)) c_conversion_rate_id, max(coalesce(il.dateacct, cl.dateacct)) dateacct, max(coalesce(il.ad_client_id, cl.ad_client_id)) ad_client_id, max(coalesce(il.ad_org_id, cl.ad_org_id)) ad_org_id from m_inoutline mil left join lateral (select o.c_currency_id, sum(qtyordered) qtyordered, sum(case when o.istaxincluded ='N' then ol.linenetamt else round(ol.linenetamt/((tx.rate/100)+1), cr.stdprecision) END) AS linenetamt, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem from c_orderline ol join c_order o on (ol.c_order_id = o.c_order_id and ol.qtyordered !=0 and o.issotrx='N' and o.docstatus in ('CO', 'CL')) join c_tax tx on tx.c_tax_id = ol.c_tax_id join c_currency cr on cr.c_currency_id = o.c_currency_id where mil.c_orderline_id = c_orderline_id and o.ad_org_id in ( 0,1000000,1000002,1000001) group by o.c_currency_id, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem) cl on true left join lateral (select i.c_currency_id, sum(inl.qtyinvoiced) qtyinvoiced, sum((inl.linetotalamt-inl.taxamt)) AS linenetamt, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem from c_invoiceline inl join c_orderline ol on ol.c_orderline_id = inl.c_orderline_id join c_invoice i on inl.c_invoice_id = i.c_invoice_id and i.docstatus in ('CO','CL') and i.issotrx='N' where m_inoutline_id = mil.m_inoutline_id and i.ad_org_id in ( 0,1000000,1000002,1000001) group by i.c_currency_id, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem having sum(inl.qtyinvoiced) != 0) il on true left join c_currency cr on cr.c_currency_id = coalesce(il.c_currency_id, cl.c_currency_id) where mi.m_inout_id = mil.m_inout_id and coalesce(il.isfreeitem, cl.isfreeitem)='N' and lc.m_product_id = mil.m_product_id) sv) shipInv on true where mi.movementtype = 'V+' and mi.docstatus in ('CO', 'CL') and mi.ad_client_id = 1000000 and mi.movementdate BETWEEN TO_TIMESTAMP('2024-01-16 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-16 23:59:59','YYYY-MM-DD HH24:MI:SS') group by lc.m_product_id, lc.pName, lc.sku, lc.upc, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno, mi.m_inout_id, mi.movementdate, shipBp.c_bpartner_id, shipBp.name, shipInv.shipCurId, shipInv.shipValue, shipInv.shipValueConvAmt order by shipDate desc, lc.pName postgresql-2024-01-17_114057.log:2024-01-17 12:19:32 +04,18422 LOG: duration: 3166.390 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:19:28','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:19:38 +04,18461 LOG: duration: 3069.340 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:19:35','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:20:20 +04,18492 LOG: duration: 1266.904 ms execute : select lc.m_product_id proId, lc.pName, lc.upc, lc.sku, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno shipNo, mi.m_inout_id shipId, mi.movementdate shipDate, coalesce(mi.poreference, '') shipRef, shipBp.c_bpartner_id shipBpId, shipBp.name shipBpName, shipInv.shipValue, shipInv.shipValueConvAmt, shipInv.shipCurId, array_agg(lc.c_charge_id order by lc.chargeName) lcChargeId, array_agg(lc.chargeName order by lc.chargeName) lcChargeName, array_agg(lc.alloValue order by lc.chargeName) as alloValue, array_agg(lc.allocConvAmt order by lc.chargeName) as allocConvValue, array_agg(lc.c_invoice_id order by lc.chargeName) as lcInvIds, ''::text as subGroupValue from m_inout mi join c_bpartner shipBp on mi.c_bpartner_id = shipBp.c_bpartner_id join lateral (select mp.m_product_id, mp.name pName, coalesce(mp.upc, '') upc, coalesce(mp.sku, '') sku, mp.c_uom_id, u.uomsymbol, u.stdprecision uomprec, c.c_charge_id, c.name chargeName, sum(alloc.amt) as alloValue, inv.c_invoice_id, sum(coalesce(currencybase(inv.c_conversion_rate_id,alloc.amt,inv.c_currency_id,inv.dateacct,inv.ad_client_id,inv.ad_org_id),0)) as allocConvAmt from c_landedcost lc join c_invoiceline invl on invl.c_invoiceline_id = lc.c_invoiceline_id join c_landedcostallocation alloc on invl.c_invoiceline_id = alloc.c_invoiceline_id join m_product mp on mp.m_product_id = alloc.m_product_id join c_uom u on u.c_uom_id = mp.c_uom_id join c_invoice inv on inv.c_invoice_id = invl.c_invoice_id and inv.docstatus in ('CO', 'CL') join c_charge c on c.c_charge_id = invl.c_charge_id where lc.m_inout_id = mi.m_inout_id and alloc.amt != 0 and inv.ad_org_id in ( 0,1000000,1000002,1000001) group by mp.m_product_id, mp.name, mp.upc,mp.sku, mp.c_uom_id, u.uomsymbol, uomprec, c.c_charge_id, c.name ,inv.c_invoice_id) lc on true left join lateral (select sv.shipCurId, sv.qty, sv.amount shipValue, coalesce(currencybase(sv.c_conversion_rate_id,sv.amount,sv.shipCurId,sv.dateacct,sv.ad_client_id,sv.ad_org_id),0) as shipValueConvAmt from (select sum(mil.movementqty) qty, round(sum(mil.movementqty * coalesce(il.linenetamt,cl.linenetamt)/coalesce(il.qtyinvoiced,cl.qtyordered)), max(cr.stdprecision)) as amount, max(coalesce(il.c_currency_id, cl.c_currency_id)) shipCurId, max(coalesce(il.c_conversion_rate_id, cl.c_conversion_rate_id)) c_conversion_rate_id, max(coalesce(il.dateacct, cl.dateacct)) dateacct, max(coalesce(il.ad_client_id, cl.ad_client_id)) ad_client_id, max(coalesce(il.ad_org_id, cl.ad_org_id)) ad_org_id from m_inoutline mil left join lateral (select o.c_currency_id, sum(qtyordered) qtyordered, sum(case when o.istaxincluded ='N' then ol.linenetamt else round(ol.linenetamt/((tx.rate/100)+1), cr.stdprecision) END) AS linenetamt, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem from c_orderline ol join c_order o on (ol.c_order_id = o.c_order_id and ol.qtyordered !=0 and o.issotrx='N' and o.docstatus in ('CO', 'CL')) join c_tax tx on tx.c_tax_id = ol.c_tax_id join c_currency cr on cr.c_currency_id = o.c_currency_id where mil.c_orderline_id = c_orderline_id and o.ad_org_id in ( 0,1000000,1000002,1000001) group by o.c_currency_id, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem) cl on true left join lateral (select i.c_currency_id, sum(inl.qtyinvoiced) qtyinvoiced, sum((inl.linetotalamt-inl.taxamt)) AS linenetamt, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem from c_invoiceline inl join c_orderline ol on ol.c_orderline_id = inl.c_orderline_id join c_invoice i on inl.c_invoice_id = i.c_invoice_id and i.docstatus in ('CO','CL') and i.issotrx='N' where m_inoutline_id = mil.m_inoutline_id and i.ad_org_id in ( 0,1000000,1000002,1000001) group by i.c_currency_id, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem having sum(inl.qtyinvoiced) != 0) il on true left join c_currency cr on cr.c_currency_id = coalesce(il.c_currency_id, cl.c_currency_id) where mi.m_inout_id = mil.m_inout_id and coalesce(il.isfreeitem, cl.isfreeitem)='N' and lc.m_product_id = mil.m_product_id) sv) shipInv on true where mi.movementtype = 'V+' and mi.docstatus in ('CO', 'CL') and mi.ad_client_id = 1000000 and mi.movementdate BETWEEN TO_TIMESTAMP('2024-01-16 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-16 23:59:59','YYYY-MM-DD HH24:MI:SS') group by lc.m_product_id, lc.pName, lc.sku, lc.upc, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno, mi.m_inout_id, mi.movementdate, shipBp.c_bpartner_id, shipBp.name, shipInv.shipCurId, shipInv.shipValue, shipInv.shipValueConvAmt order by shipDate desc, lc.pName postgresql-2024-01-17_114057.log:2024-01-17 12:22:51 +04,18376 LOG: duration: 712.956 ms postgresql-2024-01-17_114057.log:2024-01-17 12:23:40 +04,18546 LOG: duration: 3091.599 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:23:37','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:24:50 +04,18546 LOG: duration: 2983.030 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:24:47','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:19 +04,18669 LOG: duration: 1973.930 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:20 +04,18669 LOG: duration: 759.479 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:22 +04,18669 LOG: duration: 2001.920 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:31 +04,18669 LOG: duration: 8710.809 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:37 +04,18669 LOG: duration: 5908.876 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:40 +04,18669 LOG: duration: 1865.194 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:42 +04,18669 LOG: duration: 1407.465 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:44 +04,18669 LOG: duration: 1909.521 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:46 +04,18669 LOG: duration: 1914.369 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:48 +04,18669 LOG: duration: 1914.636 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:50 +04,18669 LOG: duration: 1912.186 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:52 +04,18669 LOG: duration: 1947.354 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:55 +04,18669 LOG: duration: 1958.296 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:57 +04,18669 LOG: duration: 1867.482 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:25:59 +04,18669 LOG: duration: 1898.279 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:01 +04,18669 LOG: duration: 1914.259 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:03 +04,18669 LOG: duration: 1907.437 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:04 +04,18669 LOG: duration: 1052.511 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:06 +04,18669 LOG: duration: 1965.781 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:09 +04,18669 LOG: duration: 1928.655 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:11 +04,18669 LOG: duration: 1874.882 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:13 +04,18669 LOG: duration: 1863.702 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:15 +04,18669 LOG: duration: 1873.023 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:17 +04,18669 LOG: duration: 1914.758 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:19 +04,18669 LOG: duration: 1917.407 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:21 +04,18669 LOG: duration: 1914.793 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:23 +04,18598 LOG: duration: 1264.583 ms execute : select lc.m_product_id proId, lc.pName, lc.upc, lc.sku, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno shipNo, mi.m_inout_id shipId, mi.movementdate shipDate, coalesce(mi.poreference, '') shipRef, shipBp.c_bpartner_id shipBpId, shipBp.name shipBpName, shipInv.shipValue, shipInv.shipValueConvAmt, shipInv.shipCurId, array_agg(lc.c_charge_id order by lc.chargeName) lcChargeId, array_agg(lc.chargeName order by lc.chargeName) lcChargeName, array_agg(lc.alloValue order by lc.chargeName) as alloValue, array_agg(lc.allocConvAmt order by lc.chargeName) as allocConvValue, array_agg(lc.c_invoice_id order by lc.chargeName) as lcInvIds, ''::text as subGroupValue from m_inout mi join c_bpartner shipBp on mi.c_bpartner_id = shipBp.c_bpartner_id join lateral (select mp.m_product_id, mp.name pName, coalesce(mp.upc, '') upc, coalesce(mp.sku, '') sku, mp.c_uom_id, u.uomsymbol, u.stdprecision uomprec, c.c_charge_id, c.name chargeName, sum(alloc.amt) as alloValue, inv.c_invoice_id, sum(coalesce(currencybase(inv.c_conversion_rate_id,alloc.amt,inv.c_currency_id,inv.dateacct,inv.ad_client_id,inv.ad_org_id),0)) as allocConvAmt from c_landedcost lc join c_invoiceline invl on invl.c_invoiceline_id = lc.c_invoiceline_id join c_landedcostallocation alloc on invl.c_invoiceline_id = alloc.c_invoiceline_id join m_product mp on mp.m_product_id = alloc.m_product_id join c_uom u on u.c_uom_id = mp.c_uom_id join c_invoice inv on inv.c_invoice_id = invl.c_invoice_id and inv.docstatus in ('CO', 'CL') join c_charge c on c.c_charge_id = invl.c_charge_id where lc.m_inout_id = mi.m_inout_id and alloc.amt != 0 and inv.ad_org_id in ( 0,1000000,1000002,1000001) group by mp.m_product_id, mp.name, mp.upc,mp.sku, mp.c_uom_id, u.uomsymbol, uomprec, c.c_charge_id, c.name ,inv.c_invoice_id) lc on true left join lateral (select sv.shipCurId, sv.qty, sv.amount shipValue, coalesce(currencybase(sv.c_conversion_rate_id,sv.amount,sv.shipCurId,sv.dateacct,sv.ad_client_id,sv.ad_org_id),0) as shipValueConvAmt from (select sum(mil.movementqty) qty, round(sum(mil.movementqty * coalesce(il.linenetamt,cl.linenetamt)/coalesce(il.qtyinvoiced,cl.qtyordered)), max(cr.stdprecision)) as amount, max(coalesce(il.c_currency_id, cl.c_currency_id)) shipCurId, max(coalesce(il.c_conversion_rate_id, cl.c_conversion_rate_id)) c_conversion_rate_id, max(coalesce(il.dateacct, cl.dateacct)) dateacct, max(coalesce(il.ad_client_id, cl.ad_client_id)) ad_client_id, max(coalesce(il.ad_org_id, cl.ad_org_id)) ad_org_id from m_inoutline mil left join lateral (select o.c_currency_id, sum(qtyordered) qtyordered, sum(case when o.istaxincluded ='N' then ol.linenetamt else round(ol.linenetamt/((tx.rate/100)+1), cr.stdprecision) END) AS linenetamt, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem from c_orderline ol join c_order o on (ol.c_order_id = o.c_order_id and ol.qtyordered !=0 and o.issotrx='N' and o.docstatus in ('CO', 'CL')) join c_tax tx on tx.c_tax_id = ol.c_tax_id join c_currency cr on cr.c_currency_id = o.c_currency_id where mil.c_orderline_id = c_orderline_id and o.ad_org_id in ( 0,1000000,1000002,1000001) group by o.c_currency_id, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem) cl on true left join lateral (select i.c_currency_id, sum(inl.qtyinvoiced) qtyinvoiced, sum((inl.linetotalamt-inl.taxamt)) AS linenetamt, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem from c_invoiceline inl join c_orderline ol on ol.c_orderline_id = inl.c_orderline_id join c_invoice i on inl.c_invoice_id = i.c_invoice_id and i.docstatus in ('CO','CL') and i.issotrx='N' where m_inoutline_id = mil.m_inoutline_id and i.ad_org_id in ( 0,1000000,1000002,1000001) group by i.c_currency_id, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem having sum(inl.qtyinvoiced) != 0) il on true left join c_currency cr on cr.c_currency_id = coalesce(il.c_currency_id, cl.c_currency_id) where mi.m_inout_id = mil.m_inout_id and coalesce(il.isfreeitem, cl.isfreeitem)='N' and lc.m_product_id = mil.m_product_id) sv) shipInv on true where mi.movementtype = 'V+' and mi.docstatus in ('CO', 'CL') and mi.ad_client_id = 1000000 and mi.movementdate BETWEEN TO_TIMESTAMP('2024-01-16 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-16 23:59:59','YYYY-MM-DD HH24:MI:SS') group by lc.m_product_id, lc.pName, lc.sku, lc.upc, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno, mi.m_inout_id, mi.movementdate, shipBp.c_bpartner_id, shipBp.name, shipInv.shipCurId, shipInv.shipValue, shipInv.shipValueConvAmt order by shipDate desc, lc.pName postgresql-2024-01-17_114057.log:2024-01-17 12:26:24 +04,18669 LOG: duration: 1908.366 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:26 +04,18669 LOG: duration: 1904.566 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:28 +04,18669 LOG: duration: 1892.833 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:30 +04,18669 LOG: duration: 1873.460 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:32 +04,18669 LOG: duration: 1878.785 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:32 +04,18617 LOG: duration: 1247.722 ms execute : select lc.m_product_id proId, lc.pName, lc.upc, lc.sku, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno shipNo, mi.m_inout_id shipId, mi.movementdate shipDate, coalesce(mi.poreference, '') shipRef, shipBp.c_bpartner_id shipBpId, shipBp.name shipBpName, shipInv.shipValue, shipInv.shipValueConvAmt, shipInv.shipCurId, array_agg(lc.c_charge_id order by lc.chargeName) lcChargeId, array_agg(lc.chargeName order by lc.chargeName) lcChargeName, array_agg(lc.alloValue order by lc.chargeName) as alloValue, array_agg(lc.allocConvAmt order by lc.chargeName) as allocConvValue, array_agg(lc.c_invoice_id order by lc.chargeName) as lcInvIds, lc.pName as subGroupValue from m_inout mi join c_bpartner shipBp on mi.c_bpartner_id = shipBp.c_bpartner_id join lateral (select mp.m_product_id, mp.name pName, coalesce(mp.upc, '') upc, coalesce(mp.sku, '') sku, mp.c_uom_id, u.uomsymbol, u.stdprecision uomprec, c.c_charge_id, c.name chargeName, sum(alloc.amt) as alloValue, inv.c_invoice_id, sum(coalesce(currencybase(inv.c_conversion_rate_id,alloc.amt,inv.c_currency_id,inv.dateacct,inv.ad_client_id,inv.ad_org_id),0)) as allocConvAmt from c_landedcost lc join c_invoiceline invl on invl.c_invoiceline_id = lc.c_invoiceline_id join c_landedcostallocation alloc on invl.c_invoiceline_id = alloc.c_invoiceline_id join m_product mp on mp.m_product_id = alloc.m_product_id join c_uom u on u.c_uom_id = mp.c_uom_id join c_invoice inv on inv.c_invoice_id = invl.c_invoice_id and inv.docstatus in ('CO', 'CL') join c_charge c on c.c_charge_id = invl.c_charge_id where lc.m_inout_id = mi.m_inout_id and alloc.amt != 0 and inv.ad_org_id in ( 0,1000000,1000002,1000001) group by mp.m_product_id, mp.name, mp.upc,mp.sku, mp.c_uom_id, u.uomsymbol, uomprec, c.c_charge_id, c.name ,inv.c_invoice_id) lc on true left join lateral (select sv.shipCurId, sv.qty, sv.amount shipValue, coalesce(currencybase(sv.c_conversion_rate_id,sv.amount,sv.shipCurId,sv.dateacct,sv.ad_client_id,sv.ad_org_id),0) as shipValueConvAmt from (select sum(mil.movementqty) qty, round(sum(mil.movementqty * coalesce(il.linenetamt,cl.linenetamt)/coalesce(il.qtyinvoiced,cl.qtyordered)), max(cr.stdprecision)) as amount, max(coalesce(il.c_currency_id, cl.c_currency_id)) shipCurId, max(coalesce(il.c_conversion_rate_id, cl.c_conversion_rate_id)) c_conversion_rate_id, max(coalesce(il.dateacct, cl.dateacct)) dateacct, max(coalesce(il.ad_client_id, cl.ad_client_id)) ad_client_id, max(coalesce(il.ad_org_id, cl.ad_org_id)) ad_org_id from m_inoutline mil left join lateral (select o.c_currency_id, sum(qtyordered) qtyordered, sum(case when o.istaxincluded ='N' then ol.linenetamt else round(ol.linenetamt/((tx.rate/100)+1), cr.stdprecision) END) AS linenetamt, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem from c_orderline ol join c_order o on (ol.c_order_id = o.c_order_id and ol.qtyordered !=0 and o.issotrx='N' and o.docstatus in ('CO', 'CL')) join c_tax tx on tx.c_tax_id = ol.c_tax_id join c_currency cr on cr.c_currency_id = o.c_currency_id where mil.c_orderline_id = c_orderline_id and o.ad_org_id in ( 0,1000000,1000002,1000001) group by o.c_currency_id, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem) cl on true left join lateral (select i.c_currency_id, sum(inl.qtyinvoiced) qtyinvoiced, sum((inl.linetotalamt-inl.taxamt)) AS linenetamt, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem from c_invoiceline inl join c_orderline ol on ol.c_orderline_id = inl.c_orderline_id join c_invoice i on inl.c_invoice_id = i.c_invoice_id and i.docstatus in ('CO','CL') and i.issotrx='N' where m_inoutline_id = mil.m_inoutline_id and i.ad_org_id in ( 0,1000000,1000002,1000001) group by i.c_currency_id, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem having sum(inl.qtyinvoiced) != 0) il on true left join c_currency cr on cr.c_currency_id = coalesce(il.c_currency_id, cl.c_currency_id) where mi.m_inout_id = mil.m_inout_id and coalesce(il.isfreeitem, cl.isfreeitem)='N' and lc.m_product_id = mil.m_product_id) sv) shipInv on true where mi.movementtype = 'V+' and mi.docstatus in ('CO', 'CL') and mi.ad_client_id = 1000000 and mi.movementdate BETWEEN TO_TIMESTAMP('2024-01-16 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-16 23:59:59','YYYY-MM-DD HH24:MI:SS') group by lc.m_product_id, lc.pName, lc.sku, lc.upc, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno, mi.m_inout_id, mi.movementdate, shipBp.c_bpartner_id, shipBp.name, shipInv.shipCurId, shipInv.shipValue, shipInv.shipValueConvAmt order by lc.pName, shipDate desc, shipNo postgresql-2024-01-17_114057.log:2024-01-17 12:26:34 +04,18669 LOG: duration: 1911.816 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:35 +04,18669 LOG: duration: 803.673 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:37 +04,18669 LOG: duration: 1936.692 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:38 +04,18669 LOG: duration: 1270.180 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:41 +04,18669 LOG: duration: 2598.667 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:42 +04,18705 LOG: duration: 1277.711 ms execute : select lc.m_product_id proId, lc.pName, lc.upc, lc.sku, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno shipNo, mi.m_inout_id shipId, mi.movementdate shipDate, coalesce(mi.poreference, '') shipRef, shipBp.c_bpartner_id shipBpId, shipBp.name shipBpName, shipInv.shipValue, shipInv.shipValueConvAmt, shipInv.shipCurId, array_agg(lc.c_charge_id order by lc.chargeName) lcChargeId, array_agg(lc.chargeName order by lc.chargeName) lcChargeName, array_agg(lc.alloValue order by lc.chargeName) as alloValue, array_agg(lc.allocConvAmt order by lc.chargeName) as allocConvValue, array_agg(lc.c_invoice_id order by lc.chargeName) as lcInvIds, mi.documentNo as subGroupValue from m_inout mi join c_bpartner shipBp on mi.c_bpartner_id = shipBp.c_bpartner_id join lateral (select mp.m_product_id, mp.name pName, coalesce(mp.upc, '') upc, coalesce(mp.sku, '') sku, mp.c_uom_id, u.uomsymbol, u.stdprecision uomprec, c.c_charge_id, c.name chargeName, sum(alloc.amt) as alloValue, inv.c_invoice_id, sum(coalesce(currencybase(inv.c_conversion_rate_id,alloc.amt,inv.c_currency_id,inv.dateacct,inv.ad_client_id,inv.ad_org_id),0)) as allocConvAmt from c_landedcost lc join c_invoiceline invl on invl.c_invoiceline_id = lc.c_invoiceline_id join c_landedcostallocation alloc on invl.c_invoiceline_id = alloc.c_invoiceline_id join m_product mp on mp.m_product_id = alloc.m_product_id join c_uom u on u.c_uom_id = mp.c_uom_id join c_invoice inv on inv.c_invoice_id = invl.c_invoice_id and inv.docstatus in ('CO', 'CL') join c_charge c on c.c_charge_id = invl.c_charge_id where lc.m_inout_id = mi.m_inout_id and alloc.amt != 0 and inv.ad_org_id in ( 0,1000000,1000002,1000001) group by mp.m_product_id, mp.name, mp.upc,mp.sku, mp.c_uom_id, u.uomsymbol, uomprec, c.c_charge_id, c.name ,inv.c_invoice_id) lc on true left join lateral (select sv.shipCurId, sv.qty, sv.amount shipValue, coalesce(currencybase(sv.c_conversion_rate_id,sv.amount,sv.shipCurId,sv.dateacct,sv.ad_client_id,sv.ad_org_id),0) as shipValueConvAmt from (select sum(mil.movementqty) qty, round(sum(mil.movementqty * coalesce(il.linenetamt,cl.linenetamt)/coalesce(il.qtyinvoiced,cl.qtyordered)), max(cr.stdprecision)) as amount, max(coalesce(il.c_currency_id, cl.c_currency_id)) shipCurId, max(coalesce(il.c_conversion_rate_id, cl.c_conversion_rate_id)) c_conversion_rate_id, max(coalesce(il.dateacct, cl.dateacct)) dateacct, max(coalesce(il.ad_client_id, cl.ad_client_id)) ad_client_id, max(coalesce(il.ad_org_id, cl.ad_org_id)) ad_org_id from m_inoutline mil left join lateral (select o.c_currency_id, sum(qtyordered) qtyordered, sum(case when o.istaxincluded ='N' then ol.linenetamt else round(ol.linenetamt/((tx.rate/100)+1), cr.stdprecision) END) AS linenetamt, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem from c_orderline ol join c_order o on (ol.c_order_id = o.c_order_id and ol.qtyordered !=0 and o.issotrx='N' and o.docstatus in ('CO', 'CL')) join c_tax tx on tx.c_tax_id = ol.c_tax_id join c_currency cr on cr.c_currency_id = o.c_currency_id where mil.c_orderline_id = c_orderline_id and o.ad_org_id in ( 0,1000000,1000002,1000001) group by o.c_currency_id, o.c_conversion_rate_id, o.dateacct, o.ad_client_id, o.ad_org_id, ol.isfreeitem) cl on true left join lateral (select i.c_currency_id, sum(inl.qtyinvoiced) qtyinvoiced, sum((inl.linetotalamt-inl.taxamt)) AS linenetamt, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem from c_invoiceline inl join c_orderline ol on ol.c_orderline_id = inl.c_orderline_id join c_invoice i on inl.c_invoice_id = i.c_invoice_id and i.docstatus in ('CO','CL') and i.issotrx='N' where m_inoutline_id = mil.m_inoutline_id and i.ad_org_id in ( 0,1000000,1000002,1000001) group by i.c_currency_id, i.c_conversion_rate_id, i.dateacct, i.ad_client_id, i.ad_org_id, ol.isfreeitem having sum(inl.qtyinvoiced) != 0) il on true left join c_currency cr on cr.c_currency_id = coalesce(il.c_currency_id, cl.c_currency_id) where mi.m_inout_id = mil.m_inout_id and coalesce(il.isfreeitem, cl.isfreeitem)='N' and lc.m_product_id = mil.m_product_id) sv) shipInv on true where mi.movementtype = 'V+' and mi.docstatus in ('CO', 'CL') and mi.ad_client_id = 1000000 and mi.movementdate BETWEEN TO_TIMESTAMP('2024-01-16 00:00:00','YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2024-01-16 23:59:59','YYYY-MM-DD HH24:MI:SS') group by lc.m_product_id, lc.pName, lc.sku, lc.upc, lc.c_uom_id, lc.uomsymbol, shipInv.qty, mi.documentno, mi.m_inout_id, mi.movementdate, shipBp.c_bpartner_id, shipBp.name, shipInv.shipCurId, shipInv.shipValue, shipInv.shipValueConvAmt order by shipDate desc, shipNo, lc.pName postgresql-2024-01-17_114057.log:2024-01-17 12:26:42 +04,18669 LOG: duration: 972.192 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:44 +04,18669 LOG: duration: 1885.964 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:46 +04,18669 LOG: duration: 1881.641 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:48 +04,18669 LOG: duration: 1873.160 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:26:51 +04,18669 LOG: duration: 1910.256 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_114057.log:2024-01-17 12:27:00 +04,18705 LOG: duration: 3145.848 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:26:57','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:27:06 +04,18705 LOG: duration: 2976.061 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:27:03','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:29:35 +04,18376 LOG: duration: 670.901 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:36 +04,18376 LOG: duration: 676.617 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:37 +04,18376 LOG: duration: 674.534 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:38 +04,18376 LOG: duration: 683.650 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:38 +04,18376 LOG: duration: 772.653 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:39 +04,18376 LOG: duration: 778.352 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:40 +04,18376 LOG: duration: 778.133 ms postgresql-2024-01-17_114057.log:2024-01-17 12:29:41 +04,18376 LOG: duration: 777.304 ms postgresql-2024-01-17_114057.log:2024-01-17 12:33:50 +04,18859 LOG: duration: 3090.738 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:33:47','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:33:55 +04,18763 LOG: duration: 1012.684 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 12:33:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_114057.log:2024-01-17 12:34:42 +04,18377 LOG: duration: 702.118 ms postgresql-2024-01-17_123545.log:2024-01-17 12:36:00 +04,18376 LOG: duration: 773.475 ms postgresql-2024-01-17_123545.log:2024-01-17 12:37:23 +04,18835 LOG: duration: 1727.770 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_123545.log:2024-01-17 12:37:26 +04,18985 LOG: duration: 4675.952 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_123545.log:2024-01-17 12:37:27 +04,18970 LOG: duration: 4784.229 ms execute : SELECT seriesname, case when rank<10 then labelname else 'Others' END as labelname, postgresql-2024-01-17_123545.log:2024-01-17 12:37:50 +04,18377 LOG: duration: 675.651 ms postgresql-2024-01-17_123545.log:2024-01-17 12:37:57 +04,18837 LOG: duration: 34716.182 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_123545.log:2024-01-17 12:38:04 +04,18377 LOG: duration: 668.358 ms postgresql-2024-01-17_123545.log:2024-01-17 12:38:05 +04,18377 LOG: duration: 679.777 ms postgresql-2024-01-17_123545.log:2024-01-17 12:38:56 +04,18377 LOG: duration: 681.491 ms postgresql-2024-01-17_123545.log:2024-01-17 12:43:36 +04,18377 LOG: duration: 763.201 ms postgresql-2024-01-17_123545.log:2024-01-17 12:49:22 +04,19147 LOG: duration: 711.555 ms postgresql-2024-01-17_123545.log:2024-01-17 12:57:59 +04,19147 LOG: duration: 681.797 ms postgresql-2024-01-17_123545.log:2024-01-17 12:58:26 +04,19147 LOG: duration: 679.614 ms postgresql-2024-01-17_123545.log:2024-01-17 12:59:01 +04,19147 LOG: duration: 670.571 ms postgresql-2024-01-17_123545.log:2024-01-17 12:59:08 +04,19147 LOG: duration: 684.191 ms postgresql-2024-01-17_123545.log:2024-01-17 12:59:10 +04,19147 LOG: duration: 777.591 ms postgresql-2024-01-17_123545.log:2024-01-17 12:59:18 +04,19147 LOG: duration: 764.276 ms postgresql-2024-01-17_123545.log:2024-01-17 12:59:53 +04,19147 LOG: duration: 762.748 ms postgresql-2024-01-17_123545.log:2024-01-17 12:59:54 +04,19147 LOG: duration: 750.450 ms postgresql-2024-01-17_123545.log:2024-01-17 13:00:21 +04,19147 LOG: duration: 776.738 ms postgresql-2024-01-17_123545.log:2024-01-17 13:02:02 +04,19147 LOG: duration: 780.580 ms postgresql-2024-01-17_123545.log:2024-01-17 13:03:53 +04,19147 LOG: duration: 779.309 ms postgresql-2024-01-17_123545.log:2024-01-17 13:04:02 +04,19147 LOG: duration: 762.494 ms postgresql-2024-01-17_123545.log:2024-01-17 13:05:19 +04,19147 LOG: duration: 779.985 ms postgresql-2024-01-17_123545.log:2024-01-17 13:07:14 +04,19147 LOG: duration: 773.334 ms postgresql-2024-01-17_123545.log:2024-01-17 13:07:42 +04,19147 LOG: duration: 773.616 ms postgresql-2024-01-17_123545.log:2024-01-17 13:08:50 +04,18377 LOG: duration: 763.561 ms postgresql-2024-01-17_123545.log:2024-01-17 13:11:09 +04,18377 LOG: duration: 761.459 ms postgresql-2024-01-17_123545.log:2024-01-17 13:20:16 +04,19338 LOG: duration: 4640.639 ms execute : SELECT (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $1 || ')([0-9]*)(' || $2 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $3||'%'||$4 AND AD_Client_Id = $5 AND AD_Org_Id IN (0, $6)) AS invoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $7 || ')([0-9]*)(' || $8 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $9||'%'||$10 AND issotrx = 'N' AND AD_Client_Id = $11 AND AD_Org_Id IN (0, $12)) AS purchaseOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $13 || ')([0-9]*)(' || $14 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $15||'%'||$16 AND issotrx = 'N' AND AD_Client_Id = $17 AND AD_Org_Id IN (0, $18)) AS purchaseInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $19 || ')([0-9]*)(' || $20 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $21||'%'||$22 AND issotrx = 'Y' AND AD_Client_Id = $23 AND AD_Org_Id IN (0, $24)) AS salesOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $25 || ')([0-9]*)(' || $26 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $27||'%'||$28 AND issotrx = 'Y' AND AD_Client_Id = $29 AND AD_Org_Id IN (0, $30)) AS salesInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS shipmentNumber FROM (SELECT regexp_matches(documentno, '(^' || $31 || ')([0-9]*)(' || $32 || '.*)') AS docno FROM M_InOut WHERE documentno LIKE $33||'%'||$34 AND AD_Client_Id = $35 AND AD_Org_Id IN (0, $36)) AS shipmentNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS paymentRecieptNumber FROM (SELECT regexp_matches(documentno, '(^' || $37 || ')([0-9]*)(' || $38 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $39||'%'||$40 AND AD_Client_Id = $41 AND AD_Org_Id IN (0, $42)) AS paymentRecieptNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesQuotationNumber FROM (SELECT regexp_matches(documentno, '(^' || $43 || ')([0-9]*)(' || $44 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $45||'%'||$46 AND issotrx = 'Y' AND AD_Client_Id = $47 AND AD_Org_Id IN (0, $48)) AS salesQuotationNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $49 || ')([0-9]*)(' || $50 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $51||'%'||$52 AND issotrx = 'Y' AND AD_Client_Id = $53 AND AD_Org_Id IN (0, $54)) AS salesReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $55 || ')([0-9]*)(' || $56 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $57||'%'||$58 AND issotrx = 'Y' AND AD_Client_Id = $59 AND AD_Org_Id IN (0, $60)) AS salesReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesEnquiryNumber FROM (SELECT regexp_matches(documentno, '(^' || $61 || ')([0-9]*)(' || $62 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $63||'%'||$64 AND issotrx = 'Y' AND AD_Client_Id = $65 AND AD_Org_Id IN (0, $66)) AS salesEnquiryNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $67 || ')([0-9]*)(' || $68 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $69||'%'||$70 AND issotrx = 'N' AND AD_Client_Id = $71 AND AD_Org_Id IN (0, $72)) AS purchaseReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $73 || ')([0-9]*)(' || $74 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $75||'%'||$76 AND issotrx = 'N' AND AD_Client_Id = $77 AND AD_Org_Id IN (0, $78)) AS purchaseReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNum FROM (SELECT regexp_matches(documentno, '(^' || $79 || ')([0-9]*)(' || $80 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $81||'%'||$82 AND AD_Client_Id = $83 AND AD_Org_Id IN (0, $84)) AS invoiceNum), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS expenseReportNumber FROM (SELECT regexp_matches(documentno, '(^' || $85 || ')([0-9]*)(' || $86 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $87||'%'||$88 AND AD_Client_Id = $89 AND AD_Org_Id IN (0, $90)) AS expenseReportNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS bankTransferNumber FROM (SELECT regexp_matches(documentno, '(^' || $91 || ')([0-9]*)(' || $92 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $93||'%'||$94||'_AR' AND AD_Client_Id = $95 AND AD_Org_Id IN (0, $96)) AS bankTransferNumber) postgresql-2024-01-17_123545.log:2024-01-17 13:24:10 +04,20153 LOG: duration: 4641.131 ms execute : SELECT (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $1 || ')([0-9]*)(' || $2 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $3||'%'||$4 AND AD_Client_Id = $5 AND AD_Org_Id IN (0, $6)) AS invoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $7 || ')([0-9]*)(' || $8 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $9||'%'||$10 AND issotrx = 'N' AND AD_Client_Id = $11 AND AD_Org_Id IN (0, $12)) AS purchaseOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $13 || ')([0-9]*)(' || $14 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $15||'%'||$16 AND issotrx = 'N' AND AD_Client_Id = $17 AND AD_Org_Id IN (0, $18)) AS purchaseInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $19 || ')([0-9]*)(' || $20 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $21||'%'||$22 AND issotrx = 'Y' AND AD_Client_Id = $23 AND AD_Org_Id IN (0, $24)) AS salesOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $25 || ')([0-9]*)(' || $26 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $27||'%'||$28 AND issotrx = 'Y' AND AD_Client_Id = $29 AND AD_Org_Id IN (0, $30)) AS salesInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS shipmentNumber FROM (SELECT regexp_matches(documentno, '(^' || $31 || ')([0-9]*)(' || $32 || '.*)') AS docno FROM M_InOut WHERE documentno LIKE $33||'%'||$34 AND AD_Client_Id = $35 AND AD_Org_Id IN (0, $36)) AS shipmentNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS paymentRecieptNumber FROM (SELECT regexp_matches(documentno, '(^' || $37 || ')([0-9]*)(' || $38 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $39||'%'||$40 AND AD_Client_Id = $41 AND AD_Org_Id IN (0, $42)) AS paymentRecieptNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesQuotationNumber FROM (SELECT regexp_matches(documentno, '(^' || $43 || ')([0-9]*)(' || $44 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $45||'%'||$46 AND issotrx = 'Y' AND AD_Client_Id = $47 AND AD_Org_Id IN (0, $48)) AS salesQuotationNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $49 || ')([0-9]*)(' || $50 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $51||'%'||$52 AND issotrx = 'Y' AND AD_Client_Id = $53 AND AD_Org_Id IN (0, $54)) AS salesReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $55 || ')([0-9]*)(' || $56 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $57||'%'||$58 AND issotrx = 'Y' AND AD_Client_Id = $59 AND AD_Org_Id IN (0, $60)) AS salesReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesEnquiryNumber FROM (SELECT regexp_matches(documentno, '(^' || $61 || ')([0-9]*)(' || $62 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $63||'%'||$64 AND issotrx = 'Y' AND AD_Client_Id = $65 AND AD_Org_Id IN (0, $66)) AS salesEnquiryNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $67 || ')([0-9]*)(' || $68 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $69||'%'||$70 AND issotrx = 'N' AND AD_Client_Id = $71 AND AD_Org_Id IN (0, $72)) AS purchaseReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $73 || ')([0-9]*)(' || $74 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $75||'%'||$76 AND issotrx = 'N' AND AD_Client_Id = $77 AND AD_Org_Id IN (0, $78)) AS purchaseReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNum FROM (SELECT regexp_matches(documentno, '(^' || $79 || ')([0-9]*)(' || $80 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $81||'%'||$82 AND AD_Client_Id = $83 AND AD_Org_Id IN (0, $84)) AS invoiceNum), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS expenseReportNumber FROM (SELECT regexp_matches(documentno, '(^' || $85 || ')([0-9]*)(' || $86 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $87||'%'||$88 AND AD_Client_Id = $89 AND AD_Org_Id IN (0, $90)) AS expenseReportNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS bankTransferNumber FROM (SELECT regexp_matches(documentno, '(^' || $91 || ')([0-9]*)(' || $92 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $93||'%'||$94||'_AR' AND AD_Client_Id = $95 AND AD_Org_Id IN (0, $96)) AS bankTransferNumber) postgresql-2024-01-17_123545.log:2024-01-17 13:26:11 +04,20204 LOG: duration: 4663.239 ms execute : SELECT (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $1 || ')([0-9]*)(' || $2 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $3||'%'||$4 AND AD_Client_Id = $5 AND AD_Org_Id IN (0, $6)) AS invoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $7 || ')([0-9]*)(' || $8 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $9||'%'||$10 AND issotrx = 'N' AND AD_Client_Id = $11 AND AD_Org_Id IN (0, $12)) AS purchaseOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $13 || ')([0-9]*)(' || $14 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $15||'%'||$16 AND issotrx = 'N' AND AD_Client_Id = $17 AND AD_Org_Id IN (0, $18)) AS purchaseInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $19 || ')([0-9]*)(' || $20 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $21||'%'||$22 AND issotrx = 'Y' AND AD_Client_Id = $23 AND AD_Org_Id IN (0, $24)) AS salesOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $25 || ')([0-9]*)(' || $26 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $27||'%'||$28 AND issotrx = 'Y' AND AD_Client_Id = $29 AND AD_Org_Id IN (0, $30)) AS salesInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS shipmentNumber FROM (SELECT regexp_matches(documentno, '(^' || $31 || ')([0-9]*)(' || $32 || '.*)') AS docno FROM M_InOut WHERE documentno LIKE $33||'%'||$34 AND AD_Client_Id = $35 AND AD_Org_Id IN (0, $36)) AS shipmentNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS paymentRecieptNumber FROM (SELECT regexp_matches(documentno, '(^' || $37 || ')([0-9]*)(' || $38 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $39||'%'||$40 AND AD_Client_Id = $41 AND AD_Org_Id IN (0, $42)) AS paymentRecieptNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesQuotationNumber FROM (SELECT regexp_matches(documentno, '(^' || $43 || ')([0-9]*)(' || $44 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $45||'%'||$46 AND issotrx = 'Y' AND AD_Client_Id = $47 AND AD_Org_Id IN (0, $48)) AS salesQuotationNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $49 || ')([0-9]*)(' || $50 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $51||'%'||$52 AND issotrx = 'Y' AND AD_Client_Id = $53 AND AD_Org_Id IN (0, $54)) AS salesReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $55 || ')([0-9]*)(' || $56 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $57||'%'||$58 AND issotrx = 'Y' AND AD_Client_Id = $59 AND AD_Org_Id IN (0, $60)) AS salesReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesEnquiryNumber FROM (SELECT regexp_matches(documentno, '(^' || $61 || ')([0-9]*)(' || $62 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $63||'%'||$64 AND issotrx = 'Y' AND AD_Client_Id = $65 AND AD_Org_Id IN (0, $66)) AS salesEnquiryNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $67 || ')([0-9]*)(' || $68 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $69||'%'||$70 AND issotrx = 'N' AND AD_Client_Id = $71 AND AD_Org_Id IN (0, $72)) AS purchaseReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $73 || ')([0-9]*)(' || $74 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $75||'%'||$76 AND issotrx = 'N' AND AD_Client_Id = $77 AND AD_Org_Id IN (0, $78)) AS purchaseReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNum FROM (SELECT regexp_matches(documentno, '(^' || $79 || ')([0-9]*)(' || $80 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $81||'%'||$82 AND AD_Client_Id = $83 AND AD_Org_Id IN (0, $84)) AS invoiceNum), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS expenseReportNumber FROM (SELECT regexp_matches(documentno, '(^' || $85 || ')([0-9]*)(' || $86 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $87||'%'||$88 AND AD_Client_Id = $89 AND AD_Org_Id IN (0, $90)) AS expenseReportNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS bankTransferNumber FROM (SELECT regexp_matches(documentno, '(^' || $91 || ')([0-9]*)(' || $92 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $93||'%'||$94||'_AR' AND AD_Client_Id = $95 AND AD_Org_Id IN (0, $96)) AS bankTransferNumber) postgresql-2024-01-17_123545.log:2024-01-17 14:04:38 +04,21163 LOG: duration: 1716.137 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_123545.log:2024-01-17 14:04:41 +04,21167 LOG: duration: 3879.663 ms execute : SELECT seriesname, case when rank<10 then labelname else 'Others' END as labelname, postgresql-2024-01-17_123545.log:2024-01-17 14:04:41 +04,21166 LOG: duration: 4688.337 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_123545.log:2024-01-17 14:04:52 +04,21129 LOG: duration: 6299.588 ms execute : select distinct pr.m_product_id, pr.name, pr.upc, pr.sku, pr.description, pr.group1, pr.group2, pr.commodity_code, coalesce(dividerate,1) dividerate,uomc.c_uom_to_id,uom.uomsymbol,uom.stdprecision,pr.c_uom_id, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId from m_product pr join M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id join M_TRANSACTION v on v.m_product_id = pr.m_product_id JOIN m_locator l on v.m_locator_id = l.m_locator_id LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on invl.m_inventory_id = inv.m_inventory_id WHERE v.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on io.m_inout_id = iol.m_inout_id WHERE v.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on mml.m_movement_id = mm.m_movement_id WHERE v.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on pp.m_production_id = ppl.m_production_id WHERE v.m_productionline_id = ppl.m_productionline_id ) pl on true LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = pr.m_product_id) LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = v.m_attributesetinstance_id and ass.m_attributeset_id = pr.m_attributeset_id where pr.ad_client_id = 1000000 and l.ad_org_id = 1000000 and v.movementdate between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 14:04:45','YYYY-MM-DD HH24:MI:SS') and v.movementqty != 0 And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') and v.AD_CLIENT_ID=1000000 order by name postgresql-2024-01-17_123545.log:2024-01-17 14:05:11 +04,18985 LOG: duration: 34627.822 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_123545.log:2024-01-17 14:05:50 +04,21129 LOG: duration: 41496.865 ms execute : SELECT aa.*, coalesce(DivideRate,1) as dividerate, uomc.C_UoM_To_ID, uom.UoMSymbol, uom.StdPrecision FROM (select DISTINCT pr.M_Product_ID, pr.Name, pr.UPC, pr.SKU, pr.Description, pr.group1, pr.group2, pr.commodity_code, pr.C_UoM_ID, sum(MovementQty) MovementQty, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId,null as firstAttributeValue FROM M_Product pr JOIN M_Transaction tr ON tr.M_Product_ID = pr.M_Product_ID LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on (invl.m_inventory_id = inv.m_inventory_id) WHERE tr.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on (io.m_inout_id = iol.m_inout_id ) WHERE tr.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on (mml.m_movement_id = mm.m_movement_id) WHERE tr.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on (pp.m_production_id = ppl.m_production_id) WHERE tr.m_productionline_id = ppl.m_productionline_id ) pl on true JOIN M_Product_Category pc ON pr.M_Product_Category_ID = pc.M_Product_Category_ID JOIN M_Locator l ON tr.M_Locator_ID = l.M_Locator_ID WHERE pr.AD_Client_ID = 1000000 AND l.AD_Org_ID = 1000000 AND MovementDate < TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') GROUP BY pr.M_Product_ID, pr.Name, pr.UPC, pr.SKU, pr.Description, pr.C_UoM_ID, pr.group1, pr.group2, pr.commodity_code, firstAttributeValue, pr.m_product_category_id, pc.name) as aa LEFT JOIN (select DISTINCT pr.M_Product_ID, MovementQty MovementQty, pr.m_baseproduct_id as baseProductId,null as firstAttributeValue FROM M_Product pr JOIN M_Transaction tr ON tr.M_Product_ID = pr.M_Product_ID LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on (invl.m_inventory_id = inv.m_inventory_id ) WHERE tr.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on (io.m_inout_id = iol.m_inout_id) WHERE tr.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on (mml.m_movement_id = mm.m_movement_id) WHERE tr.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on (pp.m_production_id = ppl.m_production_id) WHERE tr.m_productionline_id = ppl.m_productionline_id ) pl on true JOIN M_Product_Category pc ON pr.M_Product_Category_ID = pc.M_Product_Category_ID JOIN M_Locator l ON tr.M_Locator_ID = l.M_Locator_ID WHERE pr.AD_Client_ID = 1000000 AND l.AD_Org_ID = 1000000 AND MovementQty <> 0 and tr.movementdate between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 14:04:45','YYYY-MM-DD HH24:MI:SS') And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') GROUP BY pr.M_Product_ID, MovementQty, firstAttributeValue ) bb on aa.M_Product_ID = bb.M_Product_ID LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =aa.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = aa.m_product_id) LEFT JOIN C_UoM uom ON uom.C_UoM_ID = coalesce(uomc.C_UoM_To_ID, aa.C_UoM_ID) WHERE aa.MovementQty <> 0 and (bb.MovementQty is NULL or bb.MovementQty = 0 ) order by 1 postgresql-2024-01-17_123545.log:2024-01-17 14:10:43 +04,21098 LOG: duration: 3095.879 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 14:10:40','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_143901.log:2024-01-17 14:51:13 +04,18377 LOG: duration: 774.328 ms postgresql-2024-01-17_143901.log:2024-01-17 14:52:01 +04,20565 LOG: duration: 717.006 ms postgresql-2024-01-17_143901.log:2024-01-17 14:52:02 +04,20565 LOG: duration: 681.596 ms postgresql-2024-01-17_143901.log:2024-01-17 14:52:03 +04,20565 LOG: duration: 680.919 ms postgresql-2024-01-17_143901.log:2024-01-17 14:52:04 +04,20565 LOG: duration: 681.966 ms postgresql-2024-01-17_143901.log:2024-01-17 14:52:30 +04,20565 LOG: duration: 668.714 ms postgresql-2024-01-17_143901.log:2024-01-17 14:53:04 +04,20565 LOG: duration: 750.204 ms postgresql-2024-01-17_143901.log:2024-01-17 14:55:03 +04,20565 LOG: duration: 747.628 ms postgresql-2024-01-17_143901.log:2024-01-17 14:55:30 +04,20565 LOG: duration: 781.042 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:20 +04,18377 LOG: duration: 775.199 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:21 +04,18377 LOG: duration: 775.625 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:21 +04,18377 LOG: duration: 772.960 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:22 +04,18377 LOG: duration: 772.626 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:23 +04,18377 LOG: duration: 775.422 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:24 +04,18377 LOG: duration: 772.934 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:25 +04,18377 LOG: duration: 774.056 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:26 +04,18377 LOG: duration: 775.436 ms postgresql-2024-01-17_143901.log:2024-01-17 14:58:50 +04,21960 LOG: duration: 3047.068 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 14:58:47','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_143901.log:2024-01-17 14:59:06 +04,21960 LOG: duration: 2922.838 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 14:59:03','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_143901.log:2024-01-17 15:00:24 +04,22341 LOG: duration: 4251.648 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_143901.log:2024-01-17 15:02:55 +04,22595 LOG: duration: 532.992 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where ad_org_id IN (0,0,1000000,1000002,1000001)) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND (st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0)) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.ad_org_id IN (0,0,1000000,1000002,1000001) group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP')AND m.m_locatorto_id in (select m_locator_id from m_locator where ad_org_id IN (0,0,1000000,1000002,1000001)) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y'AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND pr.ad_org_id IN (0,0,1000000,1000002,1000001) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name order by name postgresql-2024-01-17_143901.log:2024-01-17 15:05:20 +04,18377 LOG: duration: 774.643 ms postgresql-2024-01-17_143901.log:2024-01-17 15:07:17 +04,20565 LOG: duration: 760.555 ms postgresql-2024-01-17_143901.log:2024-01-17 15:08:12 +04,22723 LOG: duration: 589.329 ms execute : SELECT distinct quo.c_order_id, quo.documentno,quo.c_bpartner_id , quo.dateordered,quo.datepromised, quo.docstatus, refo.documentno, refo.c_order_id,bp.name, w.name, org.name,quo.description,refo.isactive,quo.ad_org_id ,quo.grandtotal, CASE WHEN ven.count > 0 THEN true ELSE false END AS hasvendor FROM c_order quo JOIN c_orderline qul ON qul.c_order_id = quo.c_order_id LEFT JOIN c_order refo ON (quo.c_order_id = refo.Ref_Order_ID AND refo.ordertype = 'POS Order') JOIN c_bpartner bp ON bp.c_bpartner_id= quo.c_bpartner_id JOIN m_warehouse w ON w.m_warehouse_id= quo.m_warehouse_id JOIN ad_org org ON org.ad_org_id = quo.ad_org_id JOIN c_doctype doct ON (quo.c_doctypetarget_id = doct.c_doctype_id and doct.DOCSUBTYPESO='ON' and doct.AD_CLient_ID = 1000000) LEFT JOIN LATERAL (SELECT count(mpo.c_bpartner_id) FROM m_product_po mpo JOIN c_orderline ol ON mpo.m_product_id = ol.m_product_id WHERE ol.c_order_id = quo.c_order_id AND NOT EXISTS (SELECT so_orderline_id FROM c_order_to_po WHERE so_orderline_id = ol.c_orderline_id)) ven ON TRUE WHERE quo.AD_CLient_ID= 1000000 and quo.ordertype = 'Quotation' AND quo.AD_Org_ID= 1000002 and quo.dateordered between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 15:08:11','YYYY-MM-DD HH24:MI:SS') and not exists (select * from c_order refq where AD_CLient_ID= 1000000 and quo.c_order_id = refq.ref_Order_ID and refq.ordertype = 'Quotation') Order by quo.dateordered desc,quo.DocumentNo desc postgresql-2024-01-17_143901.log:2024-01-17 15:09:48 +04,22818 LOG: duration: 2099.671 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:09:48 +04,22854 LOG: duration: 2093.675 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:09:49 +04,22818 LOG: duration: 786.787 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:09:49 +04,22854 LOG: duration: 780.445 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:09:51 +04,22818 LOG: duration: 2144.970 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:09:52 +04,22854 LOG: duration: 2151.092 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:01 +04,22818 LOG: duration: 8835.967 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:01 +04,22854 LOG: duration: 8807.424 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:07 +04,22818 LOG: duration: 5594.149 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:07 +04,22854 LOG: duration: 5538.703 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:10 +04,22818 LOG: duration: 1983.623 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:10 +04,22854 LOG: duration: 1991.564 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:11 +04,22818 LOG: duration: 1408.789 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:11 +04,22854 LOG: duration: 1416.060 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:13 +04,22818 LOG: duration: 2008.759 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:13 +04,22854 LOG: duration: 2008.907 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:16 +04,22818 LOG: duration: 2031.338 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:16 +04,22854 LOG: duration: 2030.515 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:18 +04,22818 LOG: duration: 2041.826 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:18 +04,22854 LOG: duration: 2041.937 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:20 +04,22818 LOG: duration: 2037.142 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:20 +04,22854 LOG: duration: 2029.709 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:22 +04,22818 LOG: duration: 1995.872 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:23 +04,22854 LOG: duration: 1994.178 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:25 +04,22818 LOG: duration: 1996.408 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:25 +04,22854 LOG: duration: 1995.427 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:27 +04,22818 LOG: duration: 1998.605 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:27 +04,22854 LOG: duration: 2004.295 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:29 +04,22818 LOG: duration: 2034.280 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:29 +04,22854 LOG: duration: 2033.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:31 +04,22818 LOG: duration: 2021.610 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:32 +04,22854 LOG: duration: 2022.492 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:34 +04,22818 LOG: duration: 2036.708 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:34 +04,22854 LOG: duration: 2037.025 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:35 +04,22818 LOG: duration: 1045.430 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:35 +04,22854 LOG: duration: 1045.225 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:37 +04,22818 LOG: duration: 2084.758 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:37 +04,22854 LOG: duration: 2079.386 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:39 +04,22789 LOG: duration: 505.283 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where ad_org_id IN (0,0,1000000,1000002,1000001)) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND (st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0)) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.ad_org_id IN (0,0,1000000,1000002,1000001) group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP')AND m.m_locatorto_id in (select m_locator_id from m_locator where ad_org_id IN (0,0,1000000,1000002,1000001)) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y'AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND pr.ad_org_id IN (0,0,1000000,1000002,1000001) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name order by name postgresql-2024-01-17_143901.log:2024-01-17 15:10:39 +04,22818 LOG: duration: 2018.990 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:40 +04,22854 LOG: duration: 2019.684 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:42 +04,22818 LOG: duration: 1982.939 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:42 +04,22854 LOG: duration: 1983.148 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:44 +04,22818 LOG: duration: 2008.000 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:44 +04,22854 LOG: duration: 2014.004 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:46 +04,22818 LOG: duration: 2031.556 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:46 +04,22854 LOG: duration: 2031.428 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:48 +04,22818 LOG: duration: 2021.332 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:49 +04,22854 LOG: duration: 2022.954 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:51 +04,22818 LOG: duration: 2024.213 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:51 +04,22854 LOG: duration: 2023.700 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:53 +04,22818 LOG: duration: 2033.720 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:53 +04,22854 LOG: duration: 2033.449 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:55 +04,22818 LOG: duration: 1996.496 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:55 +04,22854 LOG: duration: 1987.416 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:57 +04,22818 LOG: duration: 1988.717 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:10:58 +04,22854 LOG: duration: 1987.337 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:00 +04,22818 LOG: duration: 1987.938 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:00 +04,22854 LOG: duration: 1989.209 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:02 +04,22818 LOG: duration: 2023.482 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:02 +04,22854 LOG: duration: 2031.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:04 +04,22818 LOG: duration: 2030.053 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:04 +04,22854 LOG: duration: 2031.647 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:06 +04,22818 LOG: duration: 2023.372 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:07 +04,22854 LOG: duration: 2019.451 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:07 +04,22818 LOG: duration: 805.717 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:08 +04,22854 LOG: duration: 805.551 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:09 +04,22818 LOG: duration: 2076.745 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:10 +04,22854 LOG: duration: 2075.504 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:11 +04,22818 LOG: duration: 1275.378 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:11 +04,22854 LOG: duration: 1277.003 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:13 +04,22818 LOG: duration: 2506.310 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:13 +04,22854 LOG: duration: 2496.997 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:14 +04,22818 LOG: duration: 953.061 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:15 +04,22854 LOG: duration: 952.789 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:16 +04,22818 LOG: duration: 1989.925 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:17 +04,22854 LOG: duration: 1989.029 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:19 +04,22818 LOG: duration: 2001.649 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:19 +04,22854 LOG: duration: 2001.133 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:21 +04,22818 LOG: duration: 2014.602 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:21 +04,22854 LOG: duration: 2019.653 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:23 +04,22818 LOG: duration: 2026.911 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:11:23 +04,22854 LOG: duration: 2026.754 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_143901.log:2024-01-17 15:14:08 +04,20565 LOG: duration: 758.034 ms postgresql-2024-01-17_143901.log:2024-01-17 15:16:56 +04,18377 LOG: duration: 770.734 ms postgresql-2024-01-17_143901.log:2024-01-17 15:24:51 +04,21364 LOG: duration: 1713.192 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_143901.log:2024-01-17 15:24:54 +04,23257 LOG: duration: 4368.534 ms execute : SELECT seriesname, case when rank<10 then labelname else 'Others' END as labelname, postgresql-2024-01-17_143901.log:2024-01-17 15:24:54 +04,22701 LOG: duration: 4771.465 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_143901.log:2024-01-17 15:25:24 +04,23254 LOG: duration: 34535.570 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_143901.log:2024-01-17 15:26:08 +04,23206 LOG: duration: 58585.584 ms execute : select distinct pr.m_product_id, pr.name, pr.upc, pr.sku, pr.description, pr.group1, pr.group2, pr.commodity_code, coalesce(dividerate,1) dividerate,uomc.c_uom_to_id,uom.uomsymbol,uom.stdprecision,pr.c_uom_id, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId from m_product pr join M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id join M_TRANSACTION v on v.m_product_id = pr.m_product_id JOIN m_locator l on v.m_locator_id = l.m_locator_id LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on invl.m_inventory_id = inv.m_inventory_id WHERE v.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on io.m_inout_id = iol.m_inout_id WHERE v.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on mml.m_movement_id = mm.m_movement_id WHERE v.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on pp.m_production_id = ppl.m_production_id WHERE v.m_productionline_id = ppl.m_productionline_id ) pl on true LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = pr.m_product_id) LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN (m_attributeset ass join m_attributesetinstance asi on ass.m_attributeset_id = asi.m_attributeset_id) on asi.m_attributesetinstance_id = v.m_attributesetinstance_id and ass.m_attributeset_id = pr.m_attributeset_id where pr.ad_client_id = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) and l.ad_org_id = 1000000 and v.movementdate between TO_TIMESTAMP('2024-01-06 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 15:25:10','YYYY-MM-DD HH24:MI:SS') and v.movementqty != 0 And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') and v.AD_CLIENT_ID=1000000 order by name postgresql-2024-01-17_143901.log:2024-01-17 15:26:28 +04,23206 LOG: duration: 19710.805 ms execute : SELECT aa.*, coalesce(DivideRate,1) as dividerate, uomc.C_UoM_To_ID, uom.UoMSymbol, uom.StdPrecision FROM (select DISTINCT pr.M_Product_ID, pr.Name, pr.UPC, pr.SKU, pr.Description, pr.group1, pr.group2, pr.commodity_code, pr.C_UoM_ID, sum(MovementQty) MovementQty, pr.m_product_category_id, pc.name as category_name, pr.m_baseproduct_id as baseProductId,null as firstAttributeValue FROM M_Product pr JOIN M_Transaction tr ON tr.M_Product_ID = pr.M_Product_ID LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on (invl.m_inventory_id = inv.m_inventory_id) WHERE tr.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on (io.m_inout_id = iol.m_inout_id ) WHERE tr.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on (mml.m_movement_id = mm.m_movement_id) WHERE tr.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on (pp.m_production_id = ppl.m_production_id) WHERE tr.m_productionline_id = ppl.m_productionline_id ) pl on true JOIN M_Product_Category pc ON pr.M_Product_Category_ID = pc.M_Product_Category_ID JOIN M_Locator l ON tr.M_Locator_ID = l.M_Locator_ID WHERE pr.AD_Client_ID = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ( $1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND l.AD_Org_ID = 1000000 AND MovementDate < TO_TIMESTAMP('2024-01-06 00:00:00','YYYY-MM-DD HH24:MI:SS') GROUP BY pr.M_Product_ID, pr.Name, pr.UPC, pr.SKU, pr.Description, pr.C_UoM_ID, pr.group1, pr.group2, pr.commodity_code, firstAttributeValue, pr.m_product_category_id, pc.name) as aa LEFT JOIN (select DISTINCT pr.M_Product_ID, MovementQty MovementQty, pr.m_baseproduct_id as baseProductId,null as firstAttributeValue FROM M_Product pr JOIN M_Transaction tr ON tr.M_Product_ID = pr.M_Product_ID LEFT JOIN LATERAL (select inv.docstatus from m_inventoryline invl inner join m_inventory inv on (invl.m_inventory_id = inv.m_inventory_id ) WHERE tr.m_inventoryline_id = invl.m_inventoryline_id ) il on true LEFT JOIN LATERAL (select io.docstatus from m_inoutline iol inner join m_inout io on (io.m_inout_id = iol.m_inout_id) WHERE tr.m_inoutline_id = iol.m_inoutline_id ) ml on true LEFT JOIN LATERAL (select mm.docstatus from m_movementline mml inner join m_movement mm on (mml.m_movement_id = mm.m_movement_id) WHERE tr.m_movementline_id = mml.m_movementline_id ) ol on true LEFT JOIN LATERAL (select pp.docstatus from m_productionline ppl inner join m_production pp on (pp.m_production_id = ppl.m_production_id) WHERE tr.m_productionline_id = ppl.m_productionline_id ) pl on true JOIN M_Product_Category pc ON pr.M_Product_Category_ID = pc.M_Product_Category_ID JOIN M_Locator l ON tr.M_Locator_ID = l.M_Locator_ID WHERE pr.AD_Client_ID = 1000000AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ( $2) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND l.AD_Org_ID = 1000000 AND MovementQty <> 0 and tr.movementdate between TO_TIMESTAMP('2024-01-06 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 15:25:10','YYYY-MM-DD HH24:MI:SS') And coalesce(il.docstatus,ml.docstatus,ol.docstatus,pl.docstatus) in ('CO','CL') GROUP BY pr.M_Product_ID, MovementQty, firstAttributeValue ) bb on aa.M_Product_ID = bb.M_Product_ID LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =aa.m_product_id ORDER BY dividerate DESC limit 1) uomc on (uomc.m_product_id = aa.m_product_id) LEFT JOIN C_UoM uom ON uom.C_UoM_ID = coalesce(uomc.C_UoM_To_ID, aa.C_UoM_ID) WHERE aa.MovementQty <> 0 and (bb.MovementQty is NULL or bb.MovementQty = 0 ) order by 1 postgresql-2024-01-17_152817.log:2024-01-17 15:29:32 +04,23319 LOG: duration: 689.346 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND ((st.qtyonhand+st.qtyreserved+st.qtyordered+st.qtyintransit+st.cwqtyonhand) <> 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0 )) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.m_warehouse_id = 1000000 group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP') AND m.m_locatorto_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y' AND pr.ad_org_id IN (0,1000000) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name having sum(st.qtyonhand)> 25 order by name postgresql-2024-01-17_152817.log:2024-01-17 15:30:14 +04,23415 LOG: duration: 661.728 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND ((st.qtyonhand+st.qtyreserved+st.qtyordered+st.qtyintransit+st.cwqtyonhand) <> 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0 )) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.m_warehouse_id = 1000000 group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP') AND m.m_locatorto_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y' AND pr.ad_org_id IN (0,1000000) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name having sum(st.qtyonhand)> 25 order by name postgresql-2024-01-17_153313.log:2024-01-17 15:33:17 +04,18377 LOG: duration: 775.030 ms postgresql-2024-01-17_153313.log:2024-01-17 15:33:28 +04,23564 LOG: duration: 553.628 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where ad_org_id IN (0,0,1000000,1000002,1000001)) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND ((st.qtyonhand+st.qtyreserved+st.qtyordered+st.qtyintransit+st.cwqtyonhand) <> 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0 )) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.ad_org_id IN (0,0,1000000,1000002,1000001) group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP')AND m.m_locatorto_id in (select m_locator_id from m_locator where ad_org_id IN (0,0,1000000,1000002,1000001)) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y'AND pr.M_Product_ID in (select M_product_id from p_barcodemap where lowercode in ($1) and codetype in ('PS','PU','PC','SN','El','Ey','EM','ED','Ed','EV')) AND pr.ad_org_id IN (0,0,1000000,1000002,1000001) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name having sum(st.qtyonhand)/coalesce(uomc.dividerate,1) > 0 order by name postgresql-2024-01-17_153916.log:2024-01-17 15:41:07 +04,23961 LOG: duration: 1962.488 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:08 +04,23961 LOG: duration: 763.435 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:10 +04,23961 LOG: duration: 1974.585 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:19 +04,23961 LOG: duration: 8437.447 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:25 +04,23961 LOG: duration: 5525.744 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:28 +04,23961 LOG: duration: 1840.444 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:29 +04,23961 LOG: duration: 1396.660 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:31 +04,23961 LOG: duration: 1843.187 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:33 +04,23961 LOG: duration: 1840.999 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:35 +04,23961 LOG: duration: 1832.372 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:37 +04,23961 LOG: duration: 1844.211 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:40 +04,23961 LOG: duration: 1833.036 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:42 +04,23961 LOG: duration: 1836.661 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:44 +04,23961 LOG: duration: 1834.175 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:46 +04,23961 LOG: duration: 1851.190 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:48 +04,23961 LOG: duration: 1836.769 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:50 +04,23961 LOG: duration: 1858.924 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:51 +04,23961 LOG: duration: 1035.725 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:53 +04,23961 LOG: duration: 1880.955 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:55 +04,23961 LOG: duration: 1888.577 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:57 +04,23961 LOG: duration: 1828.528 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:41:59 +04,23961 LOG: duration: 1839.837 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:02 +04,23961 LOG: duration: 1830.674 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:04 +04,23961 LOG: duration: 1830.811 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:06 +04,23961 LOG: duration: 1831.483 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:08 +04,23961 LOG: duration: 1834.059 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:10 +04,23961 LOG: duration: 1852.451 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:12 +04,23961 LOG: duration: 1830.379 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:14 +04,23961 LOG: duration: 1852.508 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:16 +04,23961 LOG: duration: 1831.730 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:18 +04,23961 LOG: duration: 1824.669 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:20 +04,23961 LOG: duration: 1825.339 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:21 +04,23961 LOG: duration: 800.850 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:23 +04,23961 LOG: duration: 1853.954 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:24 +04,23961 LOG: duration: 1259.067 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:27 +04,23961 LOG: duration: 2477.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:28 +04,23961 LOG: duration: 952.589 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:30 +04,23961 LOG: duration: 1847.391 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:32 +04,23961 LOG: duration: 1830.623 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:34 +04,23961 LOG: duration: 1823.647 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:42:36 +04,23961 LOG: duration: 1828.416 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:08 +04,24066 LOG: duration: 1960.127 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:09 +04,24066 LOG: duration: 760.251 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:11 +04,24066 LOG: duration: 1945.414 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:20 +04,24066 LOG: duration: 8268.262 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:25 +04,24066 LOG: duration: 5492.528 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:28 +04,24066 LOG: duration: 1824.306 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:30 +04,24066 LOG: duration: 1398.985 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:31 +04,24066 LOG: duration: 1823.790 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:34 +04,24066 LOG: duration: 1844.368 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:36 +04,24066 LOG: duration: 1822.246 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:38 +04,24066 LOG: duration: 1822.342 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:40 +04,24066 LOG: duration: 1828.948 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:42 +04,24066 LOG: duration: 1831.755 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:44 +04,24066 LOG: duration: 1827.031 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:46 +04,24066 LOG: duration: 1828.510 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:48 +04,24066 LOG: duration: 1837.575 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:50 +04,24066 LOG: duration: 1831.495 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:51 +04,24066 LOG: duration: 1028.751 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:53 +04,24066 LOG: duration: 1868.577 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:55 +04,24066 LOG: duration: 1853.365 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:43:57 +04,24066 LOG: duration: 1822.297 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:00 +04,24066 LOG: duration: 1826.516 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:02 +04,24066 LOG: duration: 1823.461 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:04 +04,24066 LOG: duration: 1825.452 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:06 +04,24066 LOG: duration: 1834.949 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:08 +04,24066 LOG: duration: 1843.555 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:10 +04,24066 LOG: duration: 1820.610 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:12 +04,24066 LOG: duration: 1830.407 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:14 +04,24066 LOG: duration: 1833.122 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:16 +04,24066 LOG: duration: 1828.402 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:18 +04,24066 LOG: duration: 1833.270 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:20 +04,24066 LOG: duration: 1820.696 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:21 +04,24066 LOG: duration: 800.936 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:23 +04,24066 LOG: duration: 1858.627 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:24 +04,24066 LOG: duration: 1246.210 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:27 +04,24066 LOG: duration: 2461.932 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:28 +04,24066 LOG: duration: 951.589 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:30 +04,24066 LOG: duration: 1829.317 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:32 +04,24066 LOG: duration: 1858.858 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:34 +04,24066 LOG: duration: 1833.477 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:44:36 +04,24066 LOG: duration: 1839.208 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_153916.log:2024-01-17 15:49:41 +04,24080 LOG: duration: 232204.370 ms execute : SELECT COALESCE(ROUND(SUM(movementqty), u.stdprecision), 0) AS totalstockqty, COALESCE(ROUND(SUM(plus360), u.stdprecision), 0) AS p360, COALESCE(ROUND(SUM(plus270), u.stdprecision), 0) AS p270, COALESCE(ROUND(SUM(plus180), u.stdprecision), 0) AS p180, COALESCE(ROUND(SUM(plus90), u.stdprecision), 0) AS p90, transactions.name, upc, catname, group1, transactions.description, u.uomsymbol AS uom, asi, m_product_id, m_product_category_id, m_baseproduct_id FROM (SELECT movementqty, CASE WHEN current_date - t.movementdate::TIMESTAMP < '360 days' AND t.movementtype LIKE '%+' THEN movementqty END AS plus360, CASE WHEN current_date - t.movementdate::TIMESTAMP < '270 days' AND t.movementtype LIKE '%+' THEN movementqty END AS plus270, CASE WHEN current_date - t.movementdate::TIMESTAMP < '180 days' AND t.movementtype LIKE '%+' THEN movementqty END AS plus180, CASE WHEN current_date - t.movementdate::TIMESTAMP < '90 days' AND t.movementtype LIKE '%+' THEN movementqty END AS plus90, p.name, p.upc, pc.name AS catname, p.group1 || ' ' || p.group2 AS group1, p.description, p.c_uom_id, COALESCE(productattribute(p.m_attributesetinstance_id), '') AS asi, p.m_product_id, pc.m_product_category_id, p.m_baseproduct_id, 0 AS unitprice FROM m_transaction t JOIN m_product p ON t.m_product_id = p.m_product_id JOIN m_product_category pc ON pc.m_product_category_id = p.m_product_category_id WHERE t.movementtype NOT IN ('I+', 'I-') AND t.AD_CLIENT_ID = 1000000 AND p.m_product_category_id in (1015421,1000039,1000262,1001262,1005197,1015375,1015380,1015377,1015381,1015374,1015378,1015382,1015376,1015379,1000263,1000007,1000021,1000028,1000078,1000053,1000112,1000113,1000108,1000091,1000114,1000115,1000104,1000031,1000264,1001244,1000170,1001245,1000073,1001261,1005281,1005211,1005199,1005200,1005284,1005198,1005282,1005268,1001269,1005294,1005011,1004977,1004993,1005184,1005015,1005016,1015310,1015325,1005288,1015321,1000010,1015311,1015322,1015354,1015385,1015386,1015353,1015412,1015414,1015415,1015628,1015636,1015638,1015640,1015641,1015642,1000029,1000034,1000008,1000056,1000075,1000011,1000047,1000033,1000074,1000083,1000009,1000027,1000036,1000044,1000076,1000043,1000016,1000024,1000069,1000059,1000071,1000049,1000048,1000037,1000025,1000041,1000077,1000093,1000092,1000066,1000147,1000088,1000105,1000121,1000107,1000060,1000082,1000094,1000106,1000116,1000070,1000099,1000089,1000122,1000124,1000050,1000103,1000040,1000118,1000283,1000151,1000158,1000269,1000061,1000035,1000026,1000164,1015334,1000165,1000120,1004992,1000072,1000019,1000101,1000117,1000282,1000058,1000004,1000046,1000167,1000062,1000281,1000280,1000042,1000097,1000162,1000052,1000080,1000163,1001241,1001249,1001260,1000095,1001246,1001242,1000155,1001264,1001263,1001243,1001267,1001272,1001265,1001266,1001250,1001268,1001248,1001271,1001270,1005210,1005270,1005275,1001274,1001275,1001273,1005216,1005185,1005215,1001277,1005273,1001276,1005202,1005269,1005217,1003858,1005292,1005274,1005212,1000045,1005293,1005213,1005296,1004940,1004939,1005214,1005207,1004978,1004991,1004984,1005010,1004989,1004987,1005206,1005005,1004979,1004986,1004994,1005004,1005272,1005201,1005180,1005183,1004988,1004990,1015315,1015313,1015317,1000006,1000169,1015312,1015327,1015328,1004938,1001256,1000054,1015301,1000064,1004983,1015307,1015308,1015299,1015320,1015318,1000156,1001254,1015300,1000020,1015331,1015323,1015332,1015306,1015349,1015351,1015383,1015348,1015352,1000168,1015350,1015373,1015384,1015319,1015629,1015633,1000057,1005006,1004941,1000166,1015649,1000109,1000015,1000055,1000086,1000081,1000012,1000038,1000030,1000032,1000013,1000018,1000110,1000085,1000051,1000100,1000096,1000087,1000084,1000119,1000023,1000003,1000098,1000123,1000068,1000067,1000144,1000146,1000090,1000065,1000274,1000278,1000275,1000279,1000017,1000159,1000160,1000157,1000153,1000265,1000267,1000271,1000272,1000273,1000287,1000148,1000145,1000266,1001247,1000268,1000270,1001231,1001230,1001233,1001251,1001253,1001258,1001235,1001232,1001239,1001238,1001229,1001228,1001234,1001252,1000111,1001255,1001240,1001257,1000161,1005276,1005218,1005187,1005204,1005285,1001236,1005192,1001237,1005203,1005194,1005208,1005209,1005219,1000154,1005278,1005289,1005290,1005189,1005195,1005196,1005190,1005280,1005291,1005297,1005295,1004982,1005017,1004985,1004980,1005181,1005182,1001259,1005012,1005013,1005186,1005191,1005009,1005008,1005019,1005020,1005018,1005007,1005188,1005193,1005205,1004981,1005298,1015324,1005014,1005279,1015305,1015309,1015314,1015316,1005287,1015326,1005003,1000014,1000063,1005286) UNION ALL SELECT SUM(movementqty) AS movementqty, SUM(CASE WHEN current_date - t.movementdate::TIMESTAMP < '360 days' AND t.movementtype = 'I+' THEN movementqty END) AS plus360, SUM(CASE WHEN current_date - t.movementdate::TIMESTAMP < '270 days' AND t.movementtype = 'I+' THEN movementqty END) AS plus270, SUM(CASE WHEN current_date - t.movementdate::TIMESTAMP < '180 days' AND t.movementtype = 'I+' THEN movementqty END) AS plus180, SUM(CASE WHEN current_date - t.movementdate::TIMESTAMP < '90 days' AND t.movementtype = 'I+' THEN movementqty END) AS plus90, p.name, p.upc, pc.name AS catname, p.group1 || ' ' || p.group2 AS group1, p.description, p.c_uom_id, COALESCE(productattribute(p.m_attributesetinstance_id), '') AS asi, p.m_product_id, pc.m_product_category_id, p.m_baseproduct_id, 0 AS unitprice FROM m_transaction t JOIN m_inventoryline il ON (t.m_inventoryline_id = il.m_inventoryline_id) JOIN m_inventory i ON (il.m_inventory_id = i.m_inventory_id) JOIN m_product p ON t.m_product_id = p.m_product_id JOIN m_product_category pc ON pc.m_product_category_id = p.m_product_category_id WHERE t.AD_CLIENT_ID = 1000000 AND p.m_product_category_id in (1015421,1000039,1000262,1001262,1005197,1015375,1015380,1015377,1015381,1015374,1015378,1015382,1015376,1015379,1000263,1000007,1000021,1000028,1000078,1000053,1000112,1000113,1000108,1000091,1000114,1000115,1000104,1000031,1000264,1001244,1000170,1001245,1000073,1001261,1005281,1005211,1005199,1005200,1005284,1005198,1005282,1005268,1001269,1005294,1005011,1004977,1004993,1005184,1005015,1005016,1015310,1015325,1005288,1015321,1000010,1015311,1015322,1015354,1015385,1015386,1015353,1015412,1015414,1015415,1015628,1015636,1015638,1015640,1015641,1015642,1000029,1000034,1000008,1000056,1000075,1000011,1000047,1000033,1000074,1000083,1000009,1000027,1000036,1000044,1000076,1000043,1000016,1000024,1000069,1000059,1000071,1000049,1000048,1000037,1000025,1000041,1000077,1000093,1000092,1000066,1000147,1000088,1000105,1000121,1000107,1000060,1000082,1000094,1000106,1000116,1000070,1000099,1000089,1000122,1000124,1000050,1000103,1000040,1000118,1000283,1000151,1000158,1000269,1000061,1000035,1000026,1000164,1015334,1000165,1000120,1004992,1000072,1000019,1000101,1000117,1000282,1000058,1000004,1000046,1000167,1000062,1000281,1000280,1000042,1000097,1000162,1000052,1000080,1000163,1001241,1001249,1001260,1000095,1001246,1001242,1000155,1001264,1001263,1001243,1001267,1001272,1001265,1001266,1001250,1001268,1001248,1001271,1001270,1005210,1005270,1005275,1001274,1001275,1001273,1005216,1005185,1005215,1001277,1005273,1001276,1005202,1005269,1005217,1003858,1005292,1005274,1005212,1000045,1005293,1005213,1005296,1004940,1004939,1005214,1005207,1004978,1004991,1004984,1005010,1004989,1004987,1005206,1005005,1004979,1004986,1004994,1005004,1005272,1005201,1005180,1005183,1004988,1004990,1015315,1015313,1015317,1000006,1000169,1015312,1015327,1015328,1004938,1001256,1000054,1015301,1000064,1004983,1015307,1015308,1015299,1015320,1015318,1000156,1001254,1015300,1000020,1015331,1015323,1015332,1015306,1015349,1015351,1015383,1015348,1015352,1000168,1015350,1015373,1015384,1015319,1015629,1015633,1000057,1005006,1004941,1000166,1015649,1000109,1000015,1000055,1000086,1000081,1000012,1000038,1000030,1000032,1000013,1000018,1000110,1000085,1000051,1000100,1000096,1000087,1000084,1000119,1000023,1000003,1000098,1000123,1000068,1000067,1000144,1000146,1000090,1000065,1000274,1000278,1000275,1000279,1000017,1000159,1000160,1000157,1000153,1000265,1000267,1000271,1000272,1000273,1000287,1000148,1000145,1000266,1001247,1000268,1000270,1001231,1001230,1001233,1001251,1001253,1001258,1001235,1001232,1001239,1001238,1001229,1001228,1001234,1001252,1000111,1001255,1001240,1001257,1000161,1005276,1005218,1005187,1005204,1005285,1001236,1005192,1001237,1005203,1005194,1005208,1005209,1005219,1000154,1005278,1005289,1005290,1005189,1005195,1005196,1005190,1005280,1005291,1005297,1005295,1004982,1005017,1004985,1004980,1005181,1005182,1001259,1005012,1005013,1005186,1005191,1005009,1005008,1005019,1005020,1005018,1005007,1005188,1005193,1005205,1004981,1005298,1015324,1005014,1005279,1015305,1015309,1015314,1015316,1005287,1015326,1005003,1000014,1000063,1005286) GROUP BY i.m_inventory_id, p.name, p.upc, pc.name, p.description, p.c_uom_id, p.m_product_id, pc.m_product_category_id, p.m_baseproduct_id HAVING SUM(t.movementqty) <> 0) transactions JOIN c_uom u ON u.c_uom_id = transactions.c_uom_id GROUP BY transactions.name, upc, catname, group1, transactions.description, u.stdprecision, u.uomsymbol, asi, m_product_id, m_product_category_id, m_baseproduct_id postgresql-2024-01-17_153916.log:2024-01-17 15:53:30 +04,24164 LOG: duration: 3053.952 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 15:53:26','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_153916.log:2024-01-17 15:53:31 +04,24164 LOG: duration: 955.605 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 15:53:30','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_153916.log:2024-01-17 15:54:45 +04,24366 LOG: duration: 3051.470 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 15:54:42','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 15:59:14 +04,24367 LOG: duration: 548.682 ms execute S_5: COMMIT postgresql-2024-01-17_155654.log:2024-01-17 16:10:05 +04,24701 LOG: duration: 3070.683 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:10:02','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:10:12 +04,24795 LOG: duration: 3040.231 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:10:09','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:11:23 +04,24701 LOG: duration: 601.399 ms execute : SELECT distinct quo.c_order_id, quo.documentno,quo.c_bpartner_id , quo.dateordered,quo.datepromised, quo.docstatus, refo.documentno, refo.c_order_id,bp.name, w.name, org.name,quo.description,refo.isactive,quo.ad_org_id ,quo.grandtotal, CASE WHEN ven.count > 0 THEN true ELSE false END AS hasvendor FROM c_order quo JOIN c_orderline qul ON qul.c_order_id = quo.c_order_id LEFT JOIN c_order refo ON (quo.c_order_id = refo.Ref_Order_ID AND refo.ordertype = 'POS Order') JOIN c_bpartner bp ON bp.c_bpartner_id= quo.c_bpartner_id JOIN m_warehouse w ON w.m_warehouse_id= quo.m_warehouse_id JOIN ad_org org ON org.ad_org_id = quo.ad_org_id JOIN c_doctype doct ON (quo.c_doctypetarget_id = doct.c_doctype_id and doct.DOCSUBTYPESO='ON' and doct.AD_CLient_ID = 1000000) LEFT JOIN LATERAL (SELECT count(mpo.c_bpartner_id) FROM m_product_po mpo JOIN c_orderline ol ON mpo.m_product_id = ol.m_product_id WHERE ol.c_order_id = quo.c_order_id AND NOT EXISTS (SELECT so_orderline_id FROM c_order_to_po WHERE so_orderline_id = ol.c_orderline_id)) ven ON TRUE WHERE quo.AD_CLient_ID= 1000000 and quo.ordertype = 'Quotation' AND quo.AD_Org_ID= 1000002 and quo.dateordered between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:11:23','YYYY-MM-DD HH24:MI:SS') and not exists (select * from c_order refq where AD_CLient_ID= 1000000 and quo.c_order_id = refq.ref_Order_ID and refq.ordertype = 'Quotation') Order by quo.dateordered desc,quo.DocumentNo desc postgresql-2024-01-17_155654.log:2024-01-17 16:13:24 +04,24936 LOG: duration: 2132.846 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:13:22','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_155654.log:2024-01-17 16:13:54 +04,24891 LOG: duration: 2125.523 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:13:52','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_155654.log:2024-01-17 16:16:12 +04,25025 LOG: duration: 3072.117 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:16:09','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:16:19 +04,25025 LOG: duration: 2916.600 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:16:16','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:16:43 +04,24936 LOG: duration: 561.696 ms execute : select postgresql-2024-01-17_155654.log:2024-01-17 16:29:13 +04,23856 LOG: duration: 693.549 ms postgresql-2024-01-17_155654.log:2024-01-17 16:29:21 +04,23856 LOG: duration: 674.618 ms postgresql-2024-01-17_155654.log:2024-01-17 16:29:30 +04,23856 LOG: duration: 668.176 ms postgresql-2024-01-17_155654.log:2024-01-17 16:30:03 +04,25223 LOG: duration: 698.584 ms postgresql-2024-01-17_155654.log:2024-01-17 16:30:26 +04,25406 LOG: duration: 3064.197 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:30:23','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:33:06 +04,25406 LOG: duration: 2971.406 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:33:03','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:36:14 +04,25223 LOG: duration: 668.440 ms postgresql-2024-01-17_155654.log:2024-01-17 16:37:39 +04,25552 LOG: duration: 3093.405 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:37:36','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:37:50 +04,25599 LOG: duration: 2044.859 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:37:48','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_155654.log:2024-01-17 16:52:10 +04,25928 LOG: duration: 3117.006 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:52:07','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 16:52:24 +04,25688 LOG: duration: 2554.835 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='P' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 16:52:21','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:02:13 +04,26178 LOG: duration: 807.860 ms execute : select pr.name as name, sum(coalesce(st.qtyonhand, 0) )as qty, pr.UPC as barcode, pr.m_product_id, sum(st.qtyreserved) as reserved, pr.unitsperpack, pc.name as proCategoryName, (coalesce(pr.group1,' ')||' '||coalesce(pr.group2,' ')) as group, coalesce(sum(st.qtyOrdered), 0) as qty_ordered, sum(coalesce(minl.pickedqty, 0) + coalesce(mmov.movementqty, 0) + coalesce(st.qtyintransit, 0)) as qtyintransit, coalesce(uomc.dividerate,1) as dividerate, uom.c_uom_id, uom.uomsymbol, uom.stdprecision,pr.sku as SKU, productAttribute(pr.m_attributesetinstance_id) AS nonInstanceAttribute ,null as firstAttributeValue , pbp.name as vendorname, pr.group1, pr.group2, pr.commodity_code,pr.classification as pclassification, case when pr.cw_uom_id > 0 then sum(coalesce(st.cwqtyonhand, 0)) else 0 end as cwqty, pr.hscode as hscode, pr.c_taxcategory_id as c_taxcategory_id, sum(coalesce(minl.pickedqty, 0)) venShippedQty FROM M_PRODUCT pr JOIN M_PRODUCT_CATEGORY pc on pr.m_product_category_id = pc.m_product_category_id LEFT JOIN LATERAL (SELECT DISTINCT ON (dividerate) dividerate, c_uom_to_id, m_product_id from c_uom_conversion WHERE isactive='Y' and m_product_id =pr.m_product_id ORDER BY dividerate DESC limit 1) uomc on pr.m_product_id = uomc.m_product_id LEFT JOIN c_uom as uom on uom.c_uom_id = coalesce(uomc.c_uom_to_id,pr.c_uom_id) LEFT JOIN M_product_PO ppo on pr.m_product_id = ppo.m_product_id and ppo.iscurrentvendor='Y' LEFT JOIN C_Bpartner pbp on ppo.c_bpartner_id = pbp.c_bpartner_id JOIN c_taxcategory tc on tc.c_taxcategory_id = pr.c_taxcategory_id LEFT JOIN (SELECT SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.qtyonhand END), 0)) qtyonhand, SUM(COALESCE(s.qtyreserved, 0)) qtyreserved, SUM(COALESCE(s.qtyOrdered, 0)) qtyOrdered, SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN s.qtyonhand ELSE 0 END), 0)) qtyintransit, s.m_product_id , SUM(COALESCE((CASE WHEN wr.isintransit='Y' AND wr.parentwarehouseid > 0 THEN 0 ELSE s.cwqtyonhand END), 0)) cwqtyonhand FROM M_Storage s JOIN M_Locator loc ON loc.m_locator_id = s.m_locator_id JOIN M_Warehouse wr ON wr.m_warehouse_id = loc.m_warehouse_id WHERE s.m_locator_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) GROUP BY s.m_product_id) st ON (st.M_PRODUCT_ID=pr.M_PRODUCT_ID AND ((st.qtyonhand+st.qtyreserved+st.qtyordered+st.qtyintransit+st.cwqtyonhand) <> 0 OR st.qtyonhand <> 0 OR st.qtyreserved <> 0 OR st.qtyordered <> 0 OR st.qtyintransit<>0 OR st.cwqtyonhand <>0 )) left join (select sum(inl.pickedqty) as pickedqty, inl.m_product_id, inl.m_attributesetinstance_id from m_inoutline inl join m_inout min on inl.m_inout_id = min.m_inout_id where min.docstatus in ('IP') AND min.m_warehouse_id = 1000000 group by m_product_id, inl.m_attributesetinstance_id) minl on pr.m_product_id = minl.m_product_id left join (select sum(m.movementqty) as movementqty, m.m_product_id, m.m_attributesetinstance_id from m_movementline m join m_movement mov on m.m_movement_id = mov.m_movement_id and mov.docstatus in ('IP') AND m.m_locatorto_id in (select m_locator_id from m_locator where m_warehouse_id = 1000000) group by m_product_id, m.m_attributesetinstance_id) mmov on pr.m_product_id = mmov.m_product_id where pr.isbaseproduct = 'N' AND pr.AD_CLIENT_ID = 1000000 and pr.isactive = 'Y' AND pr.ad_org_id IN (0,1000000) group by pr.m_product_id, pc.name, uomc.dividerate,uom.c_uom_id, firstAttributeValue,pbp.name having sum(st.qtyonhand)> 0 order by name postgresql-2024-01-17_155654.log:2024-01-17 17:02:46 +04,25552 LOG: duration: 4597.773 ms execute : SELECT (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $1 || ')([0-9]*)(' || $2 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $3||'%'||$4 AND AD_Client_Id = $5 AND AD_Org_Id IN (0, $6)) AS invoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $7 || ')([0-9]*)(' || $8 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $9||'%'||$10 AND issotrx = 'N' AND AD_Client_Id = $11 AND AD_Org_Id IN (0, $12)) AS purchaseOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $13 || ')([0-9]*)(' || $14 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $15||'%'||$16 AND issotrx = 'N' AND AD_Client_Id = $17 AND AD_Org_Id IN (0, $18)) AS purchaseInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesOrderNumber FROM (SELECT regexp_matches(documentno, '(^' || $19 || ')([0-9]*)(' || $20 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $21||'%'||$22 AND issotrx = 'Y' AND AD_Client_Id = $23 AND AD_Org_Id IN (0, $24)) AS salesOrderNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $25 || ')([0-9]*)(' || $26 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $27||'%'||$28 AND issotrx = 'Y' AND AD_Client_Id = $29 AND AD_Org_Id IN (0, $30)) AS salesInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS shipmentNumber FROM (SELECT regexp_matches(documentno, '(^' || $31 || ')([0-9]*)(' || $32 || '.*)') AS docno FROM M_InOut WHERE documentno LIKE $33||'%'||$34 AND AD_Client_Id = $35 AND AD_Org_Id IN (0, $36)) AS shipmentNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS paymentRecieptNumber FROM (SELECT regexp_matches(documentno, '(^' || $37 || ')([0-9]*)(' || $38 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $39||'%'||$40 AND AD_Client_Id = $41 AND AD_Org_Id IN (0, $42)) AS paymentRecieptNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesQuotationNumber FROM (SELECT regexp_matches(documentno, '(^' || $43 || ')([0-9]*)(' || $44 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $45||'%'||$46 AND issotrx = 'Y' AND AD_Client_Id = $47 AND AD_Org_Id IN (0, $48)) AS salesQuotationNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $49 || ')([0-9]*)(' || $50 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $51||'%'||$52 AND issotrx = 'Y' AND AD_Client_Id = $53 AND AD_Org_Id IN (0, $54)) AS salesReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $55 || ')([0-9]*)(' || $56 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $57||'%'||$58 AND issotrx = 'Y' AND AD_Client_Id = $59 AND AD_Org_Id IN (0, $60)) AS salesReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS salesEnquiryNumber FROM (SELECT regexp_matches(documentno, '(^' || $61 || ')([0-9]*)(' || $62 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $63||'%'||$64 AND issotrx = 'Y' AND AD_Client_Id = $65 AND AD_Org_Id IN (0, $66)) AS salesEnquiryNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnNumber FROM (SELECT regexp_matches(documentno, '(^' || $67 || ')([0-9]*)(' || $68 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $69||'%'||$70 AND issotrx = 'N' AND AD_Client_Id = $71 AND AD_Org_Id IN (0, $72)) AS purchaseReturnNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS purchaseReturnInvoiceNumber FROM (SELECT regexp_matches(documentno, '(^' || $73 || ')([0-9]*)(' || $74 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $75||'%'||$76 AND issotrx = 'N' AND AD_Client_Id = $77 AND AD_Org_Id IN (0, $78)) AS purchaseReturnInvoiceNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS invoiceNum FROM (SELECT regexp_matches(documentno, '(^' || $79 || ')([0-9]*)(' || $80 || '.*)') AS docno FROM C_Order WHERE documentno LIKE $81||'%'||$82 AND AD_Client_Id = $83 AND AD_Org_Id IN (0, $84)) AS invoiceNum), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS expenseReportNumber FROM (SELECT regexp_matches(documentno, '(^' || $85 || ')([0-9]*)(' || $86 || '.*)') AS docno FROM C_Invoice WHERE documentno LIKE $87||'%'||$88 AND AD_Client_Id = $89 AND AD_Org_Id IN (0, $90)) AS expenseReportNumber), (SELECT COALESCE(MAX(NULLIF(docno[2], '')::numeric), 0) AS bankTransferNumber FROM (SELECT regexp_matches(documentno, '(^' || $91 || ')([0-9]*)(' || $92 || '.*)') AS docno FROM C_Payment WHERE documentno LIKE $93||'%'||$94||'_AR' AND AD_Client_Id = $95 AND AD_Org_Id IN (0, $96)) AS bankTransferNumber) postgresql-2024-01-17_155654.log:2024-01-17 17:11:04 +04,26361 LOG: duration: 2687.379 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='R' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:11:01','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:16:47 +04,26084 LOG: duration: 699.744 ms postgresql-2024-01-17_155654.log:2024-01-17 17:21:26 +04,26084 LOG: duration: 669.296 ms postgresql-2024-01-17_155654.log:2024-01-17 17:26:18 +04,26775 LOG: duration: 3061.431 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:26:15','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:26:19 +04,26085 LOG: duration: 702.567 ms postgresql-2024-01-17_155654.log:2024-01-17 17:26:20 +04,26085 LOG: duration: 673.674 ms postgresql-2024-01-17_155654.log:2024-01-17 17:26:21 +04,26085 LOG: duration: 669.392 ms postgresql-2024-01-17_155654.log:2024-01-17 17:26:22 +04,26085 LOG: duration: 676.944 ms postgresql-2024-01-17_155654.log:2024-01-17 17:26:25 +04,26774 LOG: duration: 3019.269 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:26:22','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:27:48 +04,26084 LOG: duration: 676.467 ms postgresql-2024-01-17_155654.log:2024-01-17 17:28:07 +04,26084 LOG: duration: 665.820 ms postgresql-2024-01-17_155654.log:2024-01-17 17:28:25 +04,26084 LOG: duration: 667.954 ms postgresql-2024-01-17_155654.log:2024-01-17 17:31:37 +04,26928 LOG: duration: 1990.378 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1000002, ml.m_attributesetinstance_id, m.movementdate ) * ( 1 - coalesce(tax.rate,0) / 100) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:31:35','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_155654.log:2024-01-17 17:33:33 +04,26971 LOG: duration: 3061.062 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:33:29','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:35:39 +04,27037 LOG: duration: 1800.009 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_155654.log:2024-01-17 17:35:42 +04,27038 LOG: duration: 4616.019 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_155654.log:2024-01-17 17:40:40 +04,27132 LOG: duration: 3104.905 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:40:37','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:41:03 +04,27158 LOG: duration: 2548.204 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='P' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:41:00','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:41:56 +04,27193 LOG: duration: 2683.571 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='R' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:41:53','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_155654.log:2024-01-17 17:42:47 +04,27199 LOG: duration: 1914.264 ms postgresql-2024-01-17_155654.log:2024-01-17 17:42:48 +04,27199 LOG: duration: 1759.841 ms postgresql-2024-01-17_155654.log:2024-01-17 17:42:53 +04,27190 LOG: duration: 2585.437 ms postgresql-2024-01-17_155654.log:2024-01-17 17:42:55 +04,27190 LOG: duration: 1635.459 ms postgresql-2024-01-17_155654.log:2024-01-17 17:49:07 +04,27408 LOG: duration: 718.921 ms postgresql-2024-01-17_175206.log:2024-01-17 17:52:58 +04,27199 LOG: duration: 3108.468 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:52:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 17:53:07 +04,27199 LOG: duration: 3038.040 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:53:03','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 17:54:08 +04,27408 LOG: duration: 678.106 ms postgresql-2024-01-17_175206.log:2024-01-17 17:57:26 +04,27627 LOG: duration: 3151.130 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:57:23','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 17:57:47 +04,27627 LOG: duration: 12078.218 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-18 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 17:57:51 +04,27651 LOG: duration: 3141.481 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:57:47','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 17:57:58 +04,27566 LOG: duration: 3089.128 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 17:57:55','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 17:59:22 +04,27627 LOG: duration: 1828.364 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:23 +04,27627 LOG: duration: 1597.301 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:25 +04,27627 LOG: duration: 1674.145 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:27 +04,27627 LOG: duration: 1588.900 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:29 +04,27627 LOG: duration: 1834.833 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:31 +04,27627 LOG: duration: 1882.496 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:35 +04,27408 LOG: duration: 1844.817 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:37 +04,27408 LOG: duration: 1520.767 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:39 +04,27408 LOG: duration: 1569.044 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:40 +04,27408 LOG: duration: 1544.641 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:42 +04,27408 LOG: duration: 1565.669 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:42 +04,27671 LOG: duration: 1825.905 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:43 +04,27408 LOG: duration: 1519.485 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:44 +04,27671 LOG: duration: 1622.378 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:45 +04,27408 LOG: duration: 1593.790 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:47 +04,27408 LOG: duration: 1517.934 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:49 +04,27408 LOG: duration: 1788.734 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:51 +04,27408 LOG: duration: 2024.138 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:54 +04,27408 LOG: duration: 1718.197 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:56 +04,27408 LOG: duration: 1536.185 ms postgresql-2024-01-17_175206.log:2024-01-17 17:59:57 +04,27408 LOG: duration: 668.761 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:10 +04,27671 LOG: duration: 1635.477 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:11 +04,27671 LOG: duration: 1556.790 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:13 +04,27671 LOG: duration: 1677.519 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:15 +04,27671 LOG: duration: 1555.017 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:17 +04,27671 LOG: duration: 1816.647 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:18 +04,27671 LOG: duration: 1697.429 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:22 +04,27408 LOG: duration: 1575.660 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:24 +04,27408 LOG: duration: 1519.021 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:26 +04,27408 LOG: duration: 1588.919 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:27 +04,27693 LOG: duration: 1843.666 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:27 +04,27408 LOG: duration: 1516.433 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:28 +04,27693 LOG: duration: 1607.337 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:29 +04,27408 LOG: duration: 1806.390 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:31 +04,27408 LOG: duration: 1647.752 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:34 +04,27408 LOG: duration: 1702.242 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:36 +04,27408 LOG: duration: 1524.832 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:39 +04,27627 LOG: duration: 1630.540 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:40 +04,27627 LOG: duration: 1565.562 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:42 +04,27627 LOG: duration: 1670.136 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:44 +04,27627 LOG: duration: 1568.858 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:46 +04,27627 LOG: duration: 1841.888 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:48 +04,27627 LOG: duration: 1732.587 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:52 +04,27408 LOG: duration: 1583.485 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:54 +04,27408 LOG: duration: 1519.340 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:55 +04,27408 LOG: duration: 1598.855 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:56 +04,27627 LOG: duration: 1786.393 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:57 +04,27408 LOG: duration: 1540.169 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:57 +04,27627 LOG: duration: 1613.052 ms postgresql-2024-01-17_175206.log:2024-01-17 18:00:59 +04,27408 LOG: duration: 1790.382 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:01 +04,27408 LOG: duration: 1666.845 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:04 +04,27408 LOG: duration: 1702.946 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:05 +04,27408 LOG: duration: 1550.208 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:09 +04,27693 LOG: duration: 1585.255 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:10 +04,27693 LOG: duration: 1566.429 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:12 +04,27693 LOG: duration: 1656.738 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:14 +04,27693 LOG: duration: 1602.669 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:17 +04,27408 LOG: duration: 1570.521 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:18 +04,27408 LOG: duration: 1515.698 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:20 +04,27408 LOG: duration: 1615.740 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:22 +04,27408 LOG: duration: 1523.026 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:22 +04,27693 LOG: duration: 1644.651 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:24 +04,27693 LOG: duration: 1585.536 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:26 +04,27693 LOG: duration: 1685.004 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:28 +04,27693 LOG: duration: 1607.118 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:31 +04,27408 LOG: duration: 1597.584 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:33 +04,27408 LOG: duration: 1526.384 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:35 +04,27408 LOG: duration: 1603.130 ms postgresql-2024-01-17_175206.log:2024-01-17 18:01:36 +04,27408 LOG: duration: 1521.877 ms postgresql-2024-01-17_175206.log:2024-01-17 18:02:05 +04,27408 LOG: duration: 668.489 ms postgresql-2024-01-17_175206.log:2024-01-17 18:02:13 +04,27408 LOG: duration: 666.971 ms postgresql-2024-01-17_175206.log:2024-01-17 18:02:21 +04,27408 LOG: duration: 758.130 ms postgresql-2024-01-17_175206.log:2024-01-17 18:02:30 +04,27408 LOG: duration: 760.254 ms postgresql-2024-01-17_175206.log:2024-01-17 18:02:42 +04,27693 LOG: duration: 3125.937 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and o.datepromised between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:02:38','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:02:56 +04,27815 LOG: duration: 2747.136 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='R' AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:02:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:06:05 +04,27776 LOG: duration: 3089.956 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:06:02','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:07:56 +04,27853 LOG: duration: 3119.371 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:07:53','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:08:14 +04,27948 LOG: duration: 4236.628 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1000001 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-18 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:08:27 +04,27853 LOG: duration: 720.372 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1010047, ml.m_attributesetinstance_id, m.movementdate ) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 AND war.m_warehouse_id = 1000000 AND coalesce(to_par.m_warehouse_id,towar.m_warehouse_id) = 1010024 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:08:27','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_175206.log:2024-01-17 18:08:37 +04,27948 LOG: duration: 963.908 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:08:36','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:08:43 +04,27853 LOG: duration: 964.597 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-18 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:08:55 +04,27776 LOG: duration: 1446.466 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1010047, ml.m_attributesetinstance_id, m.movementdate ) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:08:53','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_175206.log:2024-01-17 18:09:03 +04,27921 LOG: duration: 1433.150 ms execute : SELECT m.M_MOVEMENT_ID, m.DOCUMENTNO, m.movementdate,m.isactive,m.c_doctype_id,m.description, CASE WHEN m.docstatus='CO' and towar.isintransit='Y' and towar.parentwarehouseid <> 0 and confmov.m_movement_id is null then 'IT' ELSE m.docstatus END AS docstatus, m.isapproved,m.created, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmov.movementdate ELSE mc.confirmdate END as confirmdate, org.name as orgfromname, toorg.name as orgtoname, war.name as fromwarename, coalesce(to_par.name,towar.name) towarename, sum(coalesce(bompricestd(ml.m_product_id,1010047, ml.m_attributesetinstance_id, m.movementdate ) * ml.movementqty, 0)) AS totalCost, sum(ml.movementqty) as movementqty, CASE WHEN towar.isintransit='Y' and towar.parentwarehouseid <> 0 then confmovc.documentno ELSE mc.documentno END as confirmno, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='Y' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null) * (1+(tax.rate/100)) ,0) END)),3)) AS inclprice, SUM(round((ml.movementqty) * ((case when pl.istaxincluded ='N' then coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null), 0) else coalesce(bompricestd(ml.m_product_id, 1000001, 0, 0, null)/(1+(tax.rate/100)) ,0) END)),3)) AS exclprice FROM M_MOVEMENT m JOIN M_MOVEMENTLINE ml ON ml.m_movement_id = m.m_movement_id LEFT JOIN m_movementconfirm mc ON mc.m_movement_id = m.m_movement_id JOIN m_locator loc on loc.m_locator_id = ml.m_locator_id join m_locator toloc on toloc.m_locator_id = ml.m_locatorto_id JOIN m_warehouse war ON loc.m_warehouse_id = war.m_warehouse_id and NOT (war.isintransit='Y' and war.parentwarehouseid <> 0) JOIN m_warehouse towar ON towar.m_warehouse_id = toloc.m_warehouse_id LEFT JOIN M_warehouse to_par ON towar.isintransit='Y' and towar.parentwarehouseid = to_par.m_warehouse_id JOIN ad_org org ON org.ad_org_id = war.ad_org_id JOIN ad_org toorg ON toorg.ad_org_id=towar.ad_org_id LEFT JOIN m_costdetail cd on cd.m_movementline_id=ml.m_movementline_id and cd.amt > 0 LEFT JOIN M_Movement confmov on m.m_movement_id = confmov.ref_movement_id and confmov.docstatus in ('CO','CL') LEFT JOIN M_MovementConfirm confmovc on confmov.m_movement_id=confmovc.m_movement_id LEFT JOIN M_Product p on ml.m_product_id = p.m_product_id LEFT JOIN C_TAX tax on p.c_taxcategory_id = tax.c_taxcategory_id and tax.isdefault='Y' , m_pricelist pl WHERE loc.m_warehouse_id <> toloc.m_warehouse_id and m.AD_CLIENT_ID = 1000000 AND war.AD_ORG_ID = 1000000 AND war.m_warehouse_id = 1000000 and m.MOVEMENTDATE between TO_TIMESTAMP('2024-01-17 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:09:02','YYYY-MM-DD HH24:MI:SS') AND pl.m_pricelist_id = 1000001 group by m.m_movement_id,confmov.m_movement_id,mc.m_movementconfirm_id,org.ad_org_id,org.name,toorg.ad_org_id,toorg.name,war.m_warehouse_id,war.name,towar.m_warehouse_id,towar.isintransit,towar.parentwarehouseid,to_par.m_warehouse_id,to_par.name,towar.m_warehouse_id,towar.name,confmovc.documentno ORDER BY movementdate desc, DOCUMENTNO DESC postgresql-2024-01-17_175206.log:2024-01-17 18:10:21 +04,28005 LOG: duration: 3129.915 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:10:18','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:10:34 +04,28005 LOG: duration: 3014.980 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000000 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:10:31','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:12:03 +04,28006 LOG: duration: 3070.536 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:12:00','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:17:00 +04,28006 LOG: duration: 3064.397 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:16:57','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:04 +04,28330 LOG: duration: 2224.388 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:05 +04,28368 LOG: duration: 2219.191 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:05 +04,28330 LOG: duration: 789.386 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:06 +04,28368 LOG: duration: 766.495 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:08 +04,28330 LOG: duration: 2309.657 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:08 +04,28368 LOG: duration: 2303.496 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:17 +04,28330 LOG: duration: 8604.600 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:17 +04,28368 LOG: duration: 8414.926 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:23 +04,28330 LOG: duration: 5825.424 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:23 +04,28368 LOG: duration: 5743.218 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:26 +04,28330 LOG: duration: 2216.204 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:26 +04,28368 LOG: duration: 2215.204 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:28 +04,28330 LOG: duration: 1400.950 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:28 +04,28368 LOG: duration: 1401.075 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:30 +04,28330 LOG: duration: 2217.839 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:30 +04,28368 LOG: duration: 2220.511 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:32 +04,28330 LOG: duration: 2216.525 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:33 +04,28368 LOG: duration: 2224.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:35 +04,28330 LOG: duration: 2218.686 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:35 +04,28368 LOG: duration: 2216.243 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:37 +04,28330 LOG: duration: 2229.405 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:38 +04,28368 LOG: duration: 2229.143 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:40 +04,28330 LOG: duration: 2232.356 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:40 +04,28368 LOG: duration: 2228.927 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:42 +04,28330 LOG: duration: 2229.474 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:43 +04,28368 LOG: duration: 2230.014 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:45 +04,28330 LOG: duration: 2197.896 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:45 +04,28368 LOG: duration: 2200.836 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:47 +04,28330 LOG: duration: 2223.721 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:48 +04,28368 LOG: duration: 2223.035 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:50 +04,28330 LOG: duration: 2206.988 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:50 +04,28368 LOG: duration: 2209.112 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:52 +04,28330 LOG: duration: 2217.903 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:52 +04,28368 LOG: duration: 2209.300 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:53 +04,28330 LOG: duration: 1033.676 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:54 +04,28368 LOG: duration: 1036.278 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:56 +04,28330 LOG: duration: 2238.632 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:56 +04,28368 LOG: duration: 2237.818 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:58 +04,28330 LOG: duration: 2228.997 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:21:58 +04,28368 LOG: duration: 2239.633 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:01 +04,28330 LOG: duration: 2211.656 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:01 +04,28368 LOG: duration: 2213.972 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:03 +04,28330 LOG: duration: 2233.528 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:03 +04,28368 LOG: duration: 2230.183 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:06 +04,28330 LOG: duration: 2230.264 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:06 +04,28368 LOG: duration: 2228.796 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:08 +04,28330 LOG: duration: 2207.064 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:08 +04,28368 LOG: duration: 2203.293 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:10 +04,28330 LOG: duration: 2190.238 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:11 +04,28368 LOG: duration: 2193.931 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:13 +04,28330 LOG: duration: 2229.411 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:13 +04,28368 LOG: duration: 2216.071 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:15 +04,28330 LOG: duration: 2226.082 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:16 +04,28368 LOG: duration: 2223.933 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:18 +04,28330 LOG: duration: 2224.111 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:18 +04,28368 LOG: duration: 2222.049 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:20 +04,28330 LOG: duration: 2221.031 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:21 +04,28368 LOG: duration: 2221.209 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:23 +04,28330 LOG: duration: 2225.053 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:23 +04,28368 LOG: duration: 2224.241 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:25 +04,28330 LOG: duration: 2223.845 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:26 +04,28368 LOG: duration: 2222.394 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:28 +04,28330 LOG: duration: 2225.997 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:28 +04,28368 LOG: duration: 2217.984 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:29 +04,28330 LOG: duration: 801.751 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:29 +04,28368 LOG: duration: 800.334 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:31 +04,28330 LOG: duration: 2236.803 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:31 +04,28368 LOG: duration: 2237.383 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:32 +04,28330 LOG: duration: 1254.779 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:32 +04,28368 LOG: duration: 1255.759 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:35 +04,28330 LOG: duration: 2721.726 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:35 +04,28368 LOG: duration: 2739.370 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:36 +04,28330 LOG: duration: 956.089 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:36 +04,28368 LOG: duration: 956.847 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:38 +04,28330 LOG: duration: 2215.300 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:38 +04,28368 LOG: duration: 2225.647 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:41 +04,28330 LOG: duration: 2205.279 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:41 +04,28368 LOG: duration: 2204.022 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:43 +04,28330 LOG: duration: 2217.059 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:43 +04,28368 LOG: duration: 2218.919 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:46 +04,28330 LOG: duration: 2213.205 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:22:46 +04,28368 LOG: duration: 2203.744 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:23:12 +04,28028 LOG: duration: 1721.213 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_175206.log:2024-01-17 18:23:15 +04,28430 LOG: duration: 4865.016 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_175206.log:2024-01-17 18:23:26 +04,27408 LOG: duration: 769.906 ms postgresql-2024-01-17_175206.log:2024-01-17 18:29:49 +04,27943 LOG: duration: 702.000 ms postgresql-2024-01-17_175206.log:2024-01-17 18:29:50 +04,28654 LOG: duration: 2021.878 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:29:50 +04,27943 LOG: duration: 669.293 ms postgresql-2024-01-17_175206.log:2024-01-17 18:29:51 +04,28654 LOG: duration: 763.132 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:29:53 +04,28654 LOG: duration: 2070.947 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:02 +04,28654 LOG: duration: 8311.652 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:08 +04,28654 LOG: duration: 5609.403 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:11 +04,28654 LOG: duration: 1946.179 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:12 +04,28654 LOG: duration: 1401.701 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:14 +04,28654 LOG: duration: 1941.305 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:16 +04,28654 LOG: duration: 1947.921 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:19 +04,28654 LOG: duration: 1954.520 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:21 +04,28654 LOG: duration: 1944.902 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:23 +04,28654 LOG: duration: 1943.351 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:25 +04,28654 LOG: duration: 2034.471 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:27 +04,28707 LOG: duration: 3174.638 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:30:24','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:28 +04,28654 LOG: duration: 2111.989 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:30 +04,28654 LOG: duration: 1957.666 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:32 +04,28654 LOG: duration: 1947.474 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:34 +04,28654 LOG: duration: 1941.814 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:35 +04,28654 LOG: duration: 1035.626 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:37 +04,28654 LOG: duration: 1986.182 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:40 +04,28654 LOG: duration: 1962.751 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:42 +04,28654 LOG: duration: 1942.519 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:44 +04,28654 LOG: duration: 1943.869 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:46 +04,28654 LOG: duration: 1944.104 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:48 +04,28654 LOG: duration: 1946.145 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:51 +04,28654 LOG: duration: 1941.419 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:53 +04,28654 LOG: duration: 1945.342 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:55 +04,28654 LOG: duration: 1941.704 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:57 +04,28654 LOG: duration: 1938.840 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:30:59 +04,28654 LOG: duration: 1964.861 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:02 +04,28654 LOG: duration: 1957.966 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:04 +04,28654 LOG: duration: 1940.960 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:06 +04,28654 LOG: duration: 1942.005 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:07 +04,28654 LOG: duration: 802.716 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:09 +04,28654 LOG: duration: 1999.153 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:10 +04,28654 LOG: duration: 1253.603 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:11 +04,28707 LOG: duration: 3131.196 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:31:08','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:13 +04,28654 LOG: duration: 2608.114 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:14 +04,28654 LOG: duration: 956.735 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:16 +04,28654 LOG: duration: 1948.261 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:18 +04,28654 LOG: duration: 1947.126 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:20 +04,28654 LOG: duration: 1953.608 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:31:22 +04,28654 LOG: duration: 1938.003 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:34:59 +04,28864 LOG: duration: 2281.201 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:34:59 +04,28870 LOG: duration: 2274.774 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:00 +04,28864 LOG: duration: 774.507 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:00 +04,28870 LOG: duration: 772.121 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:02 +04,28864 LOG: duration: 2381.425 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:02 +04,28870 LOG: duration: 2379.044 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:12 +04,28864 LOG: duration: 8466.175 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:12 +04,28870 LOG: duration: 8488.099 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:17 +04,28864 LOG: duration: 5848.397 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:18 +04,28870 LOG: duration: 5856.378 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:21 +04,28864 LOG: duration: 2265.730 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:21 +04,28870 LOG: duration: 2264.705 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:22 +04,28864 LOG: duration: 1405.046 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:22 +04,28870 LOG: duration: 1406.926 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:25 +04,28864 LOG: duration: 2329.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:25 +04,28870 LOG: duration: 2320.380 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:27 +04,28864 LOG: duration: 2329.123 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:27 +04,28870 LOG: duration: 2329.836 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:30 +04,28864 LOG: duration: 2323.111 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:30 +04,28870 LOG: duration: 2322.620 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:32 +04,28739 LOG: duration: 16615.319 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) AND cds.documentNo = '1002572' group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced postgresql-2024-01-17_175206.log:2024-01-17 18:35:32 +04,28864 LOG: duration: 2294.249 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:33 +04,28870 LOG: duration: 2293.531 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:35 +04,28864 LOG: duration: 2292.540 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:35 +04,28870 LOG: duration: 2291.760 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:37 +04,28864 LOG: duration: 2306.111 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:38 +04,28870 LOG: duration: 2305.290 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:40 +04,28864 LOG: duration: 2293.019 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:40 +04,28870 LOG: duration: 2289.966 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:43 +04,28864 LOG: duration: 2314.076 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:43 +04,28870 LOG: duration: 2313.403 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:45 +04,28864 LOG: duration: 2300.664 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:45 +04,28870 LOG: duration: 2300.681 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:48 +04,28864 LOG: duration: 2290.675 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:48 +04,28870 LOG: duration: 2290.711 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:49 +04,28864 LOG: duration: 1039.882 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:49 +04,28870 LOG: duration: 1034.448 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:51 +04,28864 LOG: duration: 2356.931 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:51 +04,28870 LOG: duration: 2349.744 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:54 +04,28864 LOG: duration: 2340.458 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:54 +04,28870 LOG: duration: 2339.943 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:56 +04,28864 LOG: duration: 2278.003 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:57 +04,28870 LOG: duration: 2277.822 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:59 +04,28864 LOG: duration: 2312.336 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:35:59 +04,28870 LOG: duration: 2312.175 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:02 +04,28864 LOG: duration: 2314.577 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:02 +04,28870 LOG: duration: 2314.171 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:04 +04,28864 LOG: duration: 2318.941 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:04 +04,28870 LOG: duration: 2318.636 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:07 +04,28864 LOG: duration: 2311.557 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:07 +04,28870 LOG: duration: 2316.713 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:09 +04,28864 LOG: duration: 2313.955 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:09 +04,28870 LOG: duration: 2313.396 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:12 +04,28864 LOG: duration: 2314.635 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:12 +04,28870 LOG: duration: 2313.975 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:14 +04,28864 LOG: duration: 2315.165 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:14 +04,28870 LOG: duration: 2314.739 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:17 +04,28864 LOG: duration: 2321.018 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:17 +04,28870 LOG: duration: 2320.805 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:19 +04,28864 LOG: duration: 2315.570 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:20 +04,28870 LOG: duration: 2315.025 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:22 +04,28864 LOG: duration: 2315.080 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:22 +04,28870 LOG: duration: 2314.456 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:25 +04,28864 LOG: duration: 2318.311 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:25 +04,28870 LOG: duration: 2317.761 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:25 +04,28864 LOG: duration: 803.914 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:26 +04,28870 LOG: duration: 799.738 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:28 +04,28864 LOG: duration: 2348.827 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:28 +04,28870 LOG: duration: 2348.308 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:29 +04,28864 LOG: duration: 1253.042 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:29 +04,28870 LOG: duration: 1252.720 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:32 +04,28864 LOG: duration: 2721.221 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:32 +04,28870 LOG: duration: 2732.347 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:33 +04,28864 LOG: duration: 954.814 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:33 +04,28870 LOG: duration: 954.559 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:35 +04,28864 LOG: duration: 2308.461 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:35 +04,28870 LOG: duration: 2308.708 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:38 +04,28864 LOG: duration: 2323.277 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:38 +04,28870 LOG: duration: 2322.800 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:40 +04,28864 LOG: duration: 2314.117 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:41 +04,28870 LOG: duration: 2314.854 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:43 +04,28864 LOG: duration: 2304.821 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:43 +04,28870 LOG: duration: 2306.422 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_175206.log:2024-01-17 18:36:46 +04,28739 LOG: duration: 3101.053 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:36:43','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:37:54 +04,28800 LOG: duration: 16200.576 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (0,1000000,1000002,1000001) AND cds.documentNo = '1002572' group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced postgresql-2024-01-17_175206.log:2024-01-17 18:38:28 +04,28740 LOG: duration: 3106.404 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:38:25','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_175206.log:2024-01-17 18:38:39 +04,28740 LOG: duration: 3050.498 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:38:36','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:40:57 +04,28993 LOG: duration: 3108.068 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:40:54','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:10 +04,28993 LOG: duration: 3054.644 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) AND o.c_pos_id = 1000001 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:41:07','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:32 +04,29097 LOG: duration: 2232.773 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:33 +04,29133 LOG: duration: 2190.737 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:33 +04,29097 LOG: duration: 766.423 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:34 +04,29133 LOG: duration: 776.890 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:36 +04,29097 LOG: duration: 2235.940 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:36 +04,29133 LOG: duration: 2238.069 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:45 +04,29097 LOG: duration: 8659.970 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:46 +04,29133 LOG: duration: 8631.399 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:51 +04,29097 LOG: duration: 5790.688 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:51 +04,29133 LOG: duration: 5832.510 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:54 +04,29097 LOG: duration: 2258.214 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:55 +04,29133 LOG: duration: 2260.675 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:56 +04,29097 LOG: duration: 1408.815 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:56 +04,29133 LOG: duration: 1402.519 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:58 +04,29097 LOG: duration: 2226.362 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:41:59 +04,29133 LOG: duration: 2246.428 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:01 +04,29097 LOG: duration: 2276.298 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:01 +04,29133 LOG: duration: 2286.013 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:03 +04,29097 LOG: duration: 2274.525 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:04 +04,29133 LOG: duration: 2281.628 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:06 +04,29097 LOG: duration: 2276.760 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:06 +04,29133 LOG: duration: 2281.474 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:08 +04,29097 LOG: duration: 2278.029 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:09 +04,29133 LOG: duration: 2266.460 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:11 +04,29097 LOG: duration: 2288.343 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:11 +04,29133 LOG: duration: 2290.601 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:13 +04,29097 LOG: duration: 2258.211 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:14 +04,29133 LOG: duration: 2251.858 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:16 +04,29097 LOG: duration: 2269.544 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:16 +04,29133 LOG: duration: 2274.274 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:18 +04,29097 LOG: duration: 2285.944 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:19 +04,29133 LOG: duration: 2285.659 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:21 +04,29097 LOG: duration: 2284.517 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:21 +04,29133 LOG: duration: 2253.948 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:22 +04,29097 LOG: duration: 1034.587 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:22 +04,29133 LOG: duration: 1041.368 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:24 +04,29097 LOG: duration: 2282.464 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:25 +04,29133 LOG: duration: 2299.894 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:27 +04,29097 LOG: duration: 2268.277 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:27 +04,29133 LOG: duration: 2285.251 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:29 +04,29097 LOG: duration: 2255.651 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:30 +04,29133 LOG: duration: 2256.281 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:32 +04,29097 LOG: duration: 2280.090 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:32 +04,29133 LOG: duration: 2274.619 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:35 +04,29097 LOG: duration: 2285.891 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:35 +04,29133 LOG: duration: 2290.078 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:37 +04,29097 LOG: duration: 2286.436 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:37 +04,29133 LOG: duration: 2283.716 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:40 +04,29097 LOG: duration: 2278.789 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:40 +04,29133 LOG: duration: 2281.583 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:41 +04,29147 LOG: duration: 714.057 ms postgresql-2024-01-17_183920.log:2024-01-17 18:42:42 +04,29097 LOG: duration: 2282.174 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:43 +04,29133 LOG: duration: 2290.261 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:45 +04,29097 LOG: duration: 2268.603 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:45 +04,29133 LOG: duration: 2272.409 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:47 +04,29097 LOG: duration: 2279.379 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:48 +04,29133 LOG: duration: 2266.208 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:50 +04,29097 LOG: duration: 2287.860 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:50 +04,29133 LOG: duration: 2289.716 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:52 +04,29097 LOG: duration: 2288.774 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:53 +04,29133 LOG: duration: 2286.950 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:55 +04,29097 LOG: duration: 2284.736 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:55 +04,29133 LOG: duration: 2284.210 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:57 +04,29097 LOG: duration: 2285.789 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:58 +04,29133 LOG: duration: 2254.749 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:58 +04,29097 LOG: duration: 799.753 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:42:59 +04,29133 LOG: duration: 796.813 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:00 +04,29097 LOG: duration: 2282.136 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:01 +04,29133 LOG: duration: 2281.911 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:02 +04,29097 LOG: duration: 1257.340 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:02 +04,29133 LOG: duration: 1258.956 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:05 +04,29097 LOG: duration: 2765.989 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:05 +04,29133 LOG: duration: 2781.023 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:06 +04,29097 LOG: duration: 954.900 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:06 +04,29133 LOG: duration: 955.429 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:08 +04,29097 LOG: duration: 2250.150 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:08 +04,29133 LOG: duration: 2278.182 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:10 +04,29097 LOG: duration: 2285.625 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:11 +04,29133 LOG: duration: 2282.730 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:13 +04,29097 LOG: duration: 2276.899 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:13 +04,29133 LOG: duration: 2280.326 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:15 +04,29097 LOG: duration: 2278.102 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:16 +04,29133 LOG: duration: 2250.484 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:43:16 +04,29147 LOG: duration: 666.660 ms postgresql-2024-01-17_183920.log:2024-01-17 18:48:24 +04,29430 LOG: duration: 2225.222 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:24 +04,29465 LOG: duration: 2222.372 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010047 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:25 +04,29430 LOG: duration: 772.749 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:25 +04,29465 LOG: duration: 760.804 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:27 +04,29430 LOG: duration: 2364.720 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:28 +04,29465 LOG: duration: 2359.116 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000001 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:36 +04,29430 LOG: duration: 8450.152 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:37 +04,29465 LOG: duration: 8492.354 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:37 +04,29401 LOG: duration: 1012.486 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='S' AND o.c_pos_id = 1010011 and o.datepromised between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:48:36','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted, o.datepromised, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:41 +04,29479 LOG: duration: 1823.184 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_183920.log:2024-01-17 18:48:42 +04,29430 LOG: duration: 5934.072 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:43 +04,29465 LOG: duration: 5860.828 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000000 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:44 +04,29007 LOG: duration: 4674.316 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_183920.log:2024-01-17 18:48:46 +04,29430 LOG: duration: 2243.270 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:46 +04,29465 LOG: duration: 2240.954 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000006 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:47 +04,29430 LOG: duration: 1402.494 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:48 +04,29465 LOG: duration: 1408.697 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:49 +04,29401 LOG: duration: 1020.350 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000002) and cdl.orderdeliverystatus='P' AND o.c_pos_id = 1010011 and cds.m_shipper_id = 1010009 and o.DateOrdered between TO_TIMESTAMP('2023-04-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 23:59:59','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:49 +04,29430 LOG: duration: 2207.347 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:50 +04,29465 LOG: duration: 2271.241 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000003 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:52 +04,29430 LOG: duration: 2266.385 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:53 +04,29465 LOG: duration: 2281.780 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010028 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:54 +04,29430 LOG: duration: 2268.985 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:55 +04,29465 LOG: duration: 2281.290 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010029 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:57 +04,29430 LOG: duration: 2267.303 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:58 +04,29465 LOG: duration: 2266.653 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010030 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:48:59 +04,29430 LOG: duration: 2279.684 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:00 +04,29465 LOG: duration: 2264.234 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010010 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:02 +04,29430 LOG: duration: 2282.885 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:03 +04,29465 LOG: duration: 2276.445 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010011 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:05 +04,29430 LOG: duration: 2270.738 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:05 +04,29465 LOG: duration: 2273.258 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010009 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:07 +04,29430 LOG: duration: 2267.451 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:08 +04,29465 LOG: duration: 2262.320 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010040 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:10 +04,29430 LOG: duration: 2267.095 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:10 +04,29465 LOG: duration: 2269.423 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010025 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:12 +04,29430 LOG: duration: 2255.677 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:13 +04,29465 LOG: duration: 2210.249 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010038 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:13 +04,29430 LOG: duration: 1032.641 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:14 +04,29465 LOG: duration: 1034.723 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:14 +04,29008 LOG: duration: 35122.313 ms execute : select name as "Customer",cbp.value as ID,to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,999,999,999,999') as "Open Amount" postgresql-2024-01-17_183920.log:2024-01-17 18:49:15 +04,29430 LOG: duration: 2246.969 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:16 +04,29465 LOG: duration: 2287.147 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010008 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:18 +04,29430 LOG: duration: 2261.975 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:19 +04,29465 LOG: duration: 2278.974 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010041 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:21 +04,29430 LOG: duration: 2269.105 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:21 +04,29465 LOG: duration: 2271.773 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010046 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:23 +04,29430 LOG: duration: 2247.890 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:24 +04,29465 LOG: duration: 2247.113 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010019 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:26 +04,29430 LOG: duration: 2255.637 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:26 +04,29465 LOG: duration: 2249.247 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010021 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:28 +04,29430 LOG: duration: 2259.031 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:29 +04,29465 LOG: duration: 2271.501 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010024 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:31 +04,29430 LOG: duration: 2255.681 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:31 +04,29465 LOG: duration: 2270.819 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010026 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:33 +04,29430 LOG: duration: 2258.889 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:34 +04,29465 LOG: duration: 2267.721 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010027 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:36 +04,29430 LOG: duration: 2271.708 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:36 +04,29465 LOG: duration: 2259.344 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010032 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:38 +04,29430 LOG: duration: 2276.254 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:39 +04,29465 LOG: duration: 2269.276 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010031 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:41 +04,29430 LOG: duration: 2277.962 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:41 +04,29465 LOG: duration: 2276.829 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010033 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:43 +04,29430 LOG: duration: 2270.429 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:44 +04,29465 LOG: duration: 2271.286 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010034 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:46 +04,29430 LOG: duration: 2272.386 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:46 +04,29465 LOG: duration: 2271.269 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010020 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:48 +04,29430 LOG: duration: 2269.487 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:49 +04,29465 LOG: duration: 2213.357 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010035 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:49 +04,29430 LOG: duration: 801.154 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:50 +04,29465 LOG: duration: 801.403 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:51 +04,29430 LOG: duration: 2214.398 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:52 +04,29465 LOG: duration: 2213.601 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000002 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:53 +04,29430 LOG: duration: 1257.648 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:53 +04,29465 LOG: duration: 1256.872 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:55 +04,29430 LOG: duration: 2682.806 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:56 +04,29465 LOG: duration: 2662.301 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1000004 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:56 +04,29430 LOG: duration: 954.410 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:57 +04,29465 LOG: duration: 954.548 ms execute : SELECT t.m_product_id,sum(movementqty),t.m_locator_id, t.m_attributesetinstance_id ,sum(cwmovementqty) cwqty from M_Transaction t JOIN m_locator l ON t.m_locator_id = l.m_locator_id WHERE l.m_warehouse_id = $1 AND t.ad_client_id = 1000000 group by t.m_product_id, t.m_locator_id, t.m_attributesetinstance_id order by t.m_product_id,t.m_locator_id,t.m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:59 +04,29430 LOG: duration: 2218.697 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:49:59 +04,29465 LOG: duration: 2264.658 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010036 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:01 +04,29430 LOG: duration: 2264.924 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:02 +04,29465 LOG: duration: 2264.646 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010042 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:04 +04,29430 LOG: duration: 2258.898 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:04 +04,29465 LOG: duration: 2250.035 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010022 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:06 +04,29430 LOG: duration: 2277.153 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:07 +04,29505 LOG: duration: 3157.007 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:50:03','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:07 +04,29465 LOG: duration: 2248.420 ms execute : select m_product_id, sum(reserved), sum(ordered),m_attributesetinstance_id from (select ol.m_product_id,ol.m_attributesetinstance_id,CASE ISSOTRX WHEN 'Y' then qtyreserved ELSE 0 END as reserved, CASE ISSOTRX WHEN 'N' then qtyreserved ELSE 0 END as ordered from c_orderline ol join c_order o on o.c_order_id=ol.c_order_id where ol.m_warehouse_id=1010023 and ol.ad_client_id = 1000000 and o.isactive='Y' and o.docstatus in ('CO','CL','IP')) ss group by m_product_id,m_attributesetinstance_id postgresql-2024-01-17_183920.log:2024-01-17 18:50:19 +04,29505 LOG: duration: 3333.199 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and cdl.orderdeliverystatus='P' AND o.c_pos_id = 1000001 and cds.m_shipper_id = 1010009 and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:50:15','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:58:14 +04,29700 LOG: duration: 3112.527 ms execute : SELECT distinct o.c_order_id, o.c_bpartner_id, coalesce(inv.grandTotal,o.grandTotal) as grandTotal, coalesce(o.dateordered,o.created) orderDate, o.DocumentNo,bp.name, o.c_pos_id, o.datepromised, o.isdelivered,o.ordertype, inv.documentno ,COALESCE(o.amounttendered ,0) amtTend,ol.ispicklistprinted,coalesce(min.m_inout_id,0) m_inout_id,coalesce(min.documentno,'') documentno, inv.c_invoice_id, o.ad_org_id, ol.m_warehouse_id, wr.name,sum(ol.qtyOrdered), coalesce(o.poreference,inv.poreference), sum(ol.qtyordered-ol.qtydelivered),o.weight,o.volume,c.sequence_no,coalesce(min.poreference,'') as refernceNo,sum(ol.qtyentered),sr.name,cds.documentno as scheduleno,cds.c_deliveryschedule_id as scheduleid , coalesce(o.Created,inv.created) as dateCreated, o.deliveryviarule, loc.address1, loc.address2, loc.city, loc.postal,case when sum(ol.qtyordered-ol.qtydelivered) > 0 and cdl.c_order_id is null then 'O' when cdl.c_order_id is not null then cdl.orderdeliverystatus else 'C' end as orderstatus,bp.name2,inv.dateinvoiced FROM C_order o join c_bpartner bp on bp.c_bpartner_id = o. c_bpartner_id join c_orderline ol on (o.c_order_id = ol.c_order_id AND ol.c_charge_id IS NULL) join m_product p on p.m_product_id = ol.m_product_id and p.isbaseproduct = 'N' LEFT JOIN LATERAL (select mil.m_inout_id,m_inoutline_id,c_orderline_id,c_invoice_id,c_order_id,documentno,poreference,min.docstatus,min.movementdate from m_inoutline mil join m_inout min on min.m_inout_id = mil.m_inout_id and min.docstatus not in ('VO','RE') and ol.c_orderline_id = mil.c_orderline_id ) as min on ol.c_orderline_id = min.c_orderline_id left join lateral (select inv.c_invoice_id,inv.c_order_id,invl.c_orderline_id,inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced from c_invoice inv join c_invoiceline invl on (invl.c_invoice_id = inv.c_invoice_id and inv.docstatus in ('CO','CL') and invl.qtyinvoiced > 0 and inv.ad_client_id=1000000) where invl.c_orderline_id=ol.c_orderline_id ) as inv on (case when (min.m_inout_id > 0 and min.c_invoice_id > 0) then min.c_invoice_id = inv.c_invoice_id when (min.m_inout_id > 0 and min.c_invoice_id is null) then inv.c_order_id = min.c_order_id else inv.c_orderline_id=ol.c_orderline_id end) left join m_warehouse wr on wr.m_warehouse_id = ol.m_warehouse_id left join c_route_location c on o.c_bpartner_location_id=c.c_bpartner_location_id left join c_bpartner_location bpl on o.c_bpartner_location_id=bpl.c_bpartner_location_id left join c_salesregion sr on bpl.c_salesregion_id = sr.c_salesRegion_id left join c_deliveryScheduleLine cdl on (cdl.c_order_id = o.c_order_id and coalesce(cdl.c_invoice_id,0) = coalesce(inv.c_invoice_id,0)) left join c_deliverySchedule cds on cds.c_deliverySchedule_id = cdl.c_deliverySchedule_id left join c_bpartner_location bl on bl.c_bpartner_location_id = o.dropship_location_id left join c_location loc on loc.c_location_id = bl.c_location_id LEFT JOIN C_Doctype doc ON doc.c_doctype_id = o.c_doctypetarget_id where o.ad_client_id = 1000000 and o.orderType in ('POS Order') and o.isActive = 'Y' AND o.docstatus in ('CO','CL') AND o.C_Charge_ID IS NULL AND o.ad_org_id in (1000000) and o.isdelivered = 'N' and (ol.qtyordered - ol.qtydelivered > 0) and (cdl.c_order_id is null) and o.DateOrdered between TO_TIMESTAMP('2023-08-01 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP('2024-01-17 18:58:11','YYYY-MM-DD HH24:MI:SS') group by o.c_order_id, bp.name,bp.name2,amtTend, ol.ispicklistprinted, min.m_inout_id, inv.c_invoice_id,ol.m_warehouse_id, wr.name,c.sequence_no ,sr.name,scheduleno,scheduleid, loc.address1, loc.address2, loc.city, loc.postal,cdl.c_order_id,cdl.orderdeliverystatus,min.documentno,min.poreference, inv.grandtotal,inv.documentno,inv.poreference,inv.created,inv.dateinvoiced order by isdelivered, ol.ispicklistprinted ,orderDate, o.c_order_id postgresql-2024-01-17_183920.log:2024-01-17 18:59:53 +04,29147 LOG: duration: 665.989 ms postgresql-2024-01-17_183920.log:2024-01-17 19:01:37 +04,29147 LOG: duration: 667.196 ms postgresql-2024-01-17_183920.log:2024-01-17 19:20:31 +04,29147 LOG: duration: 668.202 ms postgresql-2024-01-17_183920.log:2024-01-17 19:20:46 +04,29147 LOG: duration: 760.638 ms postgresql-2024-01-17_183920.log:2024-01-17 19:20:47 +04,29147 LOG: duration: 761.898 ms postgresql-2024-01-17_183920.log:2024-01-17 19:28:36 +04,27408 LOG: duration: 758.210 ms postgresql-2024-01-17_183920.log:2024-01-17 19:28:57 +04,27408 LOG: duration: 758.081 ms postgresql-2024-01-17_193010.log:2024-01-17 19:32:53 +04,29890 LOG: duration: 1680.525 ms execute : select to_char(round(sum(invoiceopen(c_invoice_id,0)),0),'999,99,99,999') from c_invoice where issotrx='Y' and ispaid = 'N' and ad_client_id = 1000000 postgresql-2024-01-17_193010.log:2024-01-17 19:32:56 +04,30898 LOG: duration: 4739.591 ms execute : select to_char(round(coalesce(sum(invoiceopen(c_invoice_id,0)),0),0),'999,99,99,999') postgresql-2024-01-17_193010.log:2024-01-17 19:35:09 +04,29147 LOG: duration: 761.566 ms postgresql-2024-01-17_193010.log:2024-01-17 19:39:08 +04,29147 LOG: duration: 768.021 ms postgresql-2024-01-17_193010.log:2024-01-17 19:39:15 +04,29147 LOG: duration: 763.057 ms