Verify the storage quantities (on hand, reservations)
Verify the BP Open Balance, Actual Lifetime Value
Complete the order
Create Material Receipt
Here there is an error: “Create Lines From” doesn’t show the order
The console shows an error on this SQL:
SELECT C_Order.C_Order_ID,NULL,NVL(C_Order.DocumentNo,'-1') ||'_'|| NVL(TRIM(TO_CHAR(C_Order.DateOrdered,'MM/DD/YYYY')),'-1'),C_Order.IsActive FROM C_Order WHERE C_Order.AD_Client_ID IN (0,11) AND (C_Order.C_Order_ID IS NULL OR C_Order.C_Order_ID NOT IN ( SELECT Record_ID FROM AD_Private_Access WHERE AD_Table_ID = 259 AND AD_User_ID <> 101 AND IsActive = 'Y' )) AND C_BPartner_ID=120 AND IsSOTrx='N' AND DocStatus IN ('CL','CO')
AND C_Order_ID IN (SELECT C_Order_ID FROM C_OrderLine WHERE QtyOrdered-QtyDelivered!=0)
AND (CASE WHEN 103>0 THEN M_Warehouse_ID=103 ELSE 1=1 END) ORDER BY 3
Coming from:
https://docs.google.com/document/d/1ZFgVuLSdILVi-TxX3aIZKINbRVN6UgYt-YiSAuKEvi8/edit#heading=h.2nz25odez6n7
Test case in oracle:
Login Data
User = GardenAdmin
Role = GardenWorld Admin Not Advanced
Org = HQ
Warehouse = HQ Warehouse
Steps
Create a new Purchase Order (SeedFarm)
Create one line with a product (Mulch_Mulch 10#)
Create one line with a charge (Bank Charge)
Verify the storage quantities (on hand, reservations)
Verify the BP Open Balance, Actual Lifetime Value
Complete the order
Create Material Receipt
Here there is an error: “Create Lines From” doesn’t show the order
The console shows an error on this SQL:
SELECT C_Order.C_Order_ID,NULL,NVL(C_Order.DocumentNo,'-1') ||'_'|| NVL(TRIM(TO_CHAR(C_Order.DateOrdered,'MM/DD/YYYY')),'-1'),C_Order.IsActive FROM C_Order WHERE C_Order.AD_Client_ID IN (0,11) AND (C_Order.C_Order_ID IS NULL OR C_Order.C_Order_ID NOT IN ( SELECT Record_ID FROM AD_Private_Access WHERE AD_Table_ID = 259 AND AD_User_ID <> 101 AND IsActive = 'Y' )) AND C_BPartner_ID=120 AND IsSOTrx='N' AND DocStatus IN ('CL','CO') AND C_Order_ID IN (SELECT C_Order_ID FROM C_OrderLine WHERE QtyOrdered-QtyDelivered!=0) AND (CASE WHEN 103>0 THEN M_Warehouse_ID=103 ELSE 1=1 END) ORDER BY 3
java.sql.SQLSyntaxErrorException: ORA-00905: Schlüsselwort fehlt
The SQL is valid in postgresql, but not in oracle. It needs to be rewritten.