General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Thank you Naomi.
Please see two inserts during one pass of the scan:
SELECT vBackgroundSubjectBilling_fk
SCAN FOR UPPER(ALLTRIM(vBackgroundSubjectBilling_fk.BSB_Status)) == "REQUEST FOR BILL"
*
* insert record into the export table file
*
lcBSB_Reason = LEFT(lcBSB_Reason, 50)
INSERT INTO (ADDBS(this.icWorkingDirectory) + "BillFile.dbf") (coid, clnum, pcdate, intotbill, deid, indesc, inglnum1, ;
inglamt1, inglnum2, inglamt2, Inmeth, stid, xfer, lgname, adddte, addtime, xxo_id, xxo_prefix, xxo_ref) ;
VALUES (lnCoid, lnCLNum, vBackgroundSubjectBilling_fk.BSB_IncurDate, vBackgroundSubjectBilling_fk.BSB_Cost, SPACE(0), ;
lcBSB_Reason , 0, 0, 0, 0, "BSO", SPACE(0), .F., oUser.GetUserInfo("USR_LANID"), DATE(), TIME(), ;
vBackgroundSubject_de.BSO_ID, "BSO", SPACE(0))
this.inBillFileSum = this.inBillFileSum + vBackgroundSubjectBilling_fk.BSB_Cost
this.inBillFileRowTotal = this.inBillFileRowTotal + 1
*
* insert a credit record into the export table file
*
INSERT INTO BillFile (coid, clnum, pcdate, intotbill, deid, indesc, inglnum1, ;
inglamt1, inglnum2, inglamt2, Inmeth, stid, xfer, lgname, adddte, addtime, xxo_id, xxo_prefix, xxo_ref) ;
VALUES (lnCoid, lnCLNum, vBackgroundSubjectBilling_fk.BSB_IncurDate, -vBackgroundSubjectBilling_fk.BSB_Cost, SPACE(0), ;
lcBSB_ReasonCredit , 0, 0, 0, 0, "BSO", SPACE(0), .F., oUser.GetUserInfo("USR_LANID"), DATE(), TIME(), ;
vBackgroundSubject_de.BSO_ID, "BSO", SPACE(0))
this.inBillFileSum = this.inBillFileSum - vBackgroundSubjectBilling_fk.BSB_Cost
this.inBillFileRowTotal = this.inBillFileRowTotal + 1
*
* advance BSB_Status to billed
*
llSuccess = this.oBiz.SetBillingStatus("Billed")
ENDSCAN
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only