I have a very simple interaction with our delivery database and our invoice databases from 2020 onward. When a delivery is complete, the invoice number is entered into the delivery database and the customer's name is brought up. When all the invoice numbers are entered, a mass update is done to post the date and status to the invoice databases.
Here is the Mass Update:
IF POSTED0 = "" THEN {XPOST("DATA\I-NGV2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , DELIVERY DATE , "DELIVERY DATE","") POSTED0 = "YES" XPOST("DATA\I-NGV2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , POSTED0 , "CMP","") XPOST("DATA\I-2020V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , DELIVERY DATE , "DELIVERY DATE","") POSTED0 = "YES" XPOST("DATA\I-2020V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , POSTED0 , "CMP","")
XPOST("DATA\I-2022V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , DELIVERY DATE , "DELIVERY DATE","") POSTED0 = "YES" XPOST("DATA\I-2022V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , POSTED0 , "CMP","") XPOST("DATA\I-2023V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , DELIVERY DATE , "DELIVERY DATE","") POSTED0 = "YES" XPOST("DATA\I-2023V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , POSTED0 , "CMP","")
XPOST("DATA\I-2021V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , DELIVERY DATE , "DELIVERY DATE","") POSTED0 = "YES" XPOST("DATA\I-2021V2.DB",INVOICE NUMBER0, "CUSTOMER!INVOICE" , POSTED0 , "CMP","") }
The problem is that it doesn't work for every invoice. We found the issue with invoice 95085 in 2023. I retrieved that 1 record in the delivery database and just left the 2023 command lines in the Mass Update. It still did not work.
Any ideas?
|