home *** CD-ROM | disk | FTP | other *** search
- * Invupdat.prg
- CLEAR
- @ 5,20 SAY '**** DO NOT INTERRUPT ****'
- @ 6,20 SAY 'UPDATING BILLINGS AND INVOICES'
- *
- * Costs entered are totalled by invoice number to Scratch because several
- * job costs can be entered against each invoice number. Amounts are
- * totalled and appended onto the Invoices file.
- *
- * Copy INVGET to BILLINGS
- SELECT 1
- GO TOP
- DO WHILE .NOT. EOF()
- IF .NOT. DELETED()
- SELECT 9
- APPEND BLANK
- REPLACE Inv_Nmbr WITH A->Inv_Nmbr,Inv_Date WITH A->Inv_Date,Client WITH;
- A->Client,Taxable WITH A->Taxable,Job_Nmbr WITH A->Job_Nmbr,;
- Sales_Tax WITH A->Sales_Tax,Taxfree WITH A->Taxfree
- REPLACE PO_Nmbr WITH A->PO_Nmbr,Descrip WITH A->Descrip,More WITH A->More;
- Extratax WITH A->Extratax
- SELECT 1
- ENDIF
- SKIP
- ENDDO
- ?
- ? '* Updated billings'
- *
- SELECT 8
- COPY STRUCTURE TO Scratch
- ?? ' * set up the scratch file'
- *
- SELECT 1
- INDEX ON Inv_Nmbr TO Invget
- TOTAL ON Inv_Nmbr TO Scratch FOR .NOT. DELETED() ;
- FIELDS Taxable, Sales_Tax, TaxFree
- ZAP
- *
- ?? ' * computed totals'
- *
- SELECT 8
- APPEND FROM Scratch
- REPLACE ALL Amount WITH Taxable + Sales_Tax + TaxFree
- ? ' * updated invoices'
- *
- SELECT 1
- REPLACE All Posted WITH .T.
- ?? ' * Marked new billings as posted'
- **
- ERASE Scratch.dbf