by COBS Tech Support » Wed Apr 12, 2006 12:02 pm
Here is a script that copies the customer address to the delivery address. Add this to the bottom of the Screen Script inside the Screen Builder, when the customer screen is open.
If Mode = 3
If IsEmpty(SCRRead("CUSDNAME") + SCRRead("CUSDADD") + SCRRead("CUSDADD2") + SCRRead("CUSDSUB"))
SCRWrite("CUSDNAME", SCRRead("CUSNAME"))
SCRWrite("CUSDADD", SCRRead("CUSADDR"))
SCRWrite("CUSDADD2", SCRRead("CUSADDR2"))
SCRWrite("CUSDSUB", SCRRead("CUSSUB"))
SCRWrite("CUSDPOST", SCRRead("CUSPOST"))
SCRWrite("CUSDSTATE", SCRRead("CUSSTATE"))
Endif
Endif
The above script checks to see if the delivery name + delivery address + 1st and 2nd address lines + the delivery suburb are blank.
If all these fields are blank, the customer address is copied into the delivery address. Otherwise it's left untouched. Obviously this can be changed to suite the requirements of the business.