Hi Ray,
This solved my problem and with a little tweeking with the money rounding was able to get the same results as my Q&A program.
My next problems concerns copying from one database to another. In Q&A, if the customer was making a new charged purchase, a Layaway, a new account would be created in the Lay.dtf during the invoice print process. I have tried using the XResultset commands, but it has not worked in Sesame. I have made an external database for the accounts and an internal form within the same database; neither seemed to work.
I also use this setup to add items to our inventory when I am doing stock transfers.
The way I got it to work is to have Blank records that will be changed to new accounts by using the XPost command. These records actually contain the word "Blank" in one of their fields.
The commands I use is below:
]IF vTERMS = "Layaway" AND @ADD AND GUIDE = "" THEN {xpost(@FN,vBlank,"CUSTOMERANDACCOUNTS!PHONE10",vInvoice,"PHONE10","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",FNAME,"FNAME0","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",LNAME,"LNAME0","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",STREET,"STREET0","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",CITY,"CITY1","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",POSTAL CODE,"POSTAL CODE0","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",DATE10,"DATE0","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",TERMS0,"CATEGORY","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",ANEWBAL,"BALANCE","") xpost(@FN,vINVOICE,"CUSTOMERANDACCOUNTS!PHONE10",PHONE1,"PHONE10","") GUIDE = @XLU(@FN,INVOICE,"CUSTOMERANDACCOUNTS!PHONE10","BALANCE") FormCommit("")}
I included an copy of what the customerandaccounts form looks like.
|