IMD 1.16: 29/05/2007 19:03:48 FOGCPM.088 --FOGCPM088ACCOUNTSCMDACCNTREEDOCc ACCOUNT DOC !"ACCOUNT DOC)#$%&'(-07-00 86 ACNTCOM DOC)*+,-./012345678ACNTCOM DOC9:;<=>?@ABCDEFGHACNTCOM DOC0IJKLMN-CPM088 DOCACNTFILEDOC>OPQRSTUVACNTINSTDOCHWXYZ[\]^_ACNTSTRUDOC'`abcdACNTUSESDOCefghACTRENDXCMDijkBILLED FRMlBILLINGSDBFmCHECKFILDBFnCHECKSTUCMDopCONSTANTMEMqrsCOSTBASEDBFtuCOSTBILLCMDvwxyCOSTMENUCMD2z{|}~COSTTIMECMD!COSTUPDACMDDATETESTCMDDEPMENU CMD DEPOSITSCMDDEPOSITSDBFDEPPRINTCMDDEPTRANSCMDFINDBILLCMD,GETDATE CMDHOLD81 DBFHOLD84 DBFINSERTS DBFINVMENU CMD"INVOICESCMD+INVOICESDBF This is the disk name.  ***************** ACCOUNTS COMMAND FILE ***************** * THIS IS THE CONTROL MODULE FOR ALL THE PROCEDURES USED IN THE ACCOUNTING * FUNCTIONS. (MENU DRIVEN). The operator is given a choice of major * functions. The menu selection here calls up menus of sub-functions * to as many levels as necessary. A package of utility functions is * also provided as part of the overall system for file maintenance, etc. ****************************************************** SELECT PRIMARY CLEAR SET TALK OFF SET EJECT OFF * SET MARGIN TO 38 FOR CENTER FEED IN A SHEETFEED PRINTER SET MARGIN TO 8 SET RAW ON ***************************************************************** * This group of commands is hardware-dependent, may be eliminated * down to the next row of asterisks. SET PRINT ON * Sets (8-1)=7 lines/inch and 89 lines/page, Diablo 1650/sheet feeder * ?? CHR(27)+CHR(30)+CHR(8) * ?? CHR(27)+CHR(12)+CHR(89) SET PRINT OFF * End printer setup commands. ************************************************************* STORE T TO Accounting DO WHILE Accounting ERASE ? ? ? '1> ENTER BILLS & TIME SHEETS 6> REPORTS & PRINTOUTS' ? ' Job cost & billing summaries' ? '2> PAY BILLS AND SALARIES Find & Edit bills by name' ? ' Review/print databases' ? '3> DEPOSITS & CHECKBOOK Quarterly Sales Tax' ? ? '4> MEDIA INSERTION ORDERS' ? ? '5> CLIENT BILLINGS & INVOICES' ? ? ? ' Pick a number (Q to QUIT)' WAIT TO Action IF !(ACTION) = 'Q' * I have chose to omit this sequence at this time, it does work. * * This sequence homes the cursor and erases the screen on the IBM 3101 * STORE chr(27) + chr(76) + chr(27) + chr(89) + chr(0) TO q * This sequence homes the cursor and erases the screen on * the Heath/Zenith H-89 * STORE CHR(27) + CHR(72) + CHR(27) + CHR(89) + CHR(0) TO q * QUIT TO '&q' ERASE QUIT ELSE IF Action = '1' DO CostMenu ELSE IF Action = '2' DO PayMenu ELSE IF Action = '3' DO DepMenu ELSE IF Action = '4' DO IOMenu ELSE IF Action = '5' DO InvMenu ELSE IF Action = '6' DO ReportMe ELSE IF Action = '7' ERASE @ 5,10 SAY ' HELP file not ready yet.' ? ' to continue.' WAIT ENDIF 7 ENDIF 6 ENDIF 5 ENDIF 4 ENDIF 3 ENDIF 2 ENDIF 1 ENDIF Q STORE T TO Accounting ENDDO Accounting e screen on * the Heath/Zenith H-89 * STORE CHR(27) + CHR(72) + CHR(27) + CHR(89) + CHR(0) TO q * QUIT TREE STRUCTURE PROGRAM LAYOUT _______________ A:ACCOUNTS.CMD MAIN MENU Cntrl Pgm for entire Accounting package. ------------------ USES no .DBF files __________________ ! ! ! ------------------------------------------------------------------------ ! ! ! ! ! ! A:COSTMENU.CMD A:PAYMENU.CMD A:DEPMENU.CMD A:IOMENU.CMD A:INVMENU.CMD A:REPORTME.CMD Company MENU MENU MENU MENU MENU Expenses: "Dispersements" Deposits Advertising Invoices Reports Preps checks for Menu for Handles Works with Provides Supplies printing & selecting advertising Billings & detailed & posting deposits or & placing Invoices choices that Payroll handles Payroll to preform of ads to to keep relate to housekeeping magazine track of reports that on the publishers amts billed the user checkbook to a client may wish to & sumarizes see &/or totals printout. billed on any given  invoice. ------------- ----------- ----------- ---------- ----------- ------------ USES USES USES USES USES USES B:PostFile.DBF B:PostFile.DBF no .DBF B:Inserts.DBF B:&Database.DBF B:PostFile.DBF files B:&Database.DBF ------------- ------------ ---------- ---------- ----------- ------------ A:USETAX A:PAYBILLS A:DEPOSITS A:IOPOST A:INVOICES A:JOBCOSTS Nontaxable Finds bills to Records $ Gets info Accept Summary of items bought be paid,gets nx comming in & for inpu fo client job for resale check #, writes Handles insertion invoicet costs & check in the payments orders client office costs check file, received  maintains for invoices checkbook balance. USES USES USES USES USES USES B:PostFile B:CostBase B:Deposits B:Inserts B:Billings B:CostBase B:Invoices B:CheckFil A:GetDep A:GetInser B:Invoices B:Billings A:GetBill A:GetCosts CALLS A:Scratch A:DEPTRANS A:Temp Matche deposits  from GetDep against Invoices USES B:Invoices *** *** *** *** *** *** A:COSTBILLS A:PAYEMPS A:IOREVIEW A:PRINTOUT A:FINDBILL Bills from Handles normal Displays Finds Bills Suppliers payroll insertion processing &  orders for exceptions client &/or Magazine USES USES USES USES B:PostFile B:Personne B:Inserts B:CostBase A:GetBill CALLS A:PAYROLL Generates payroll check stubs showing deductions  Handles FIT,FICA, SDI,SIT on a mnthly,quarterly, & annual basis ** *** ** *** *** A:COSTTIME A:REVIEW Time sheets Lists entries & billing in any .DBF amts for ea. file Supplier  USES USES B:PostFile B:&Database A:GetTime A:Temp *** *** A:PRINTOUT A:SALESTAX Lists rec's summarizes in a file invoice file over a given period(taxable  & nontaxables) USES USES None B:Invoices A:Temp A:Temp2 A:Other *** *** A:COSTUPDATE A:JOBSINDX Appends rec's Indexes the from the PostFile CostBase on to the Costbase Job:Nmbr to file. B:JOBS.NDX USES USES B:CostBase B:CostBase B:PostFile ----------------------------------------------------------------  A:DATETEST A:NAMETEST A:TIMECALC Verifies Checks for &/or Verifies & billing & adds Suppliers calcs billings check dates Names for employees time. No USE files USE USE B:Supplier B:Personne ----------------------------------------------------------------- A:GETDATE A:PAYFIND A:CHECKSTU A:PAYROLL Confirms Looks for Lists check Generates payroll that date unpaid #'s, amt & check stubs showing deductions is correct. bills. balance when Handles FIT,FICA,SDI,SIT on a Salaries&Bills mnthly,quarterly,annual basis are paid No USE files No USE files USES USES B:CheckFil B:&Header (B:Hold81) A:Scratch B:Personne B:CheckFil B:CostBase No XQT'd No XQT'd No XQT'd XQTS these .CMD files .CMD files .CMD files .CMD files A:GETDATE (No USE & .CMD files) A:CHECKSTU (USES B:CheckFil & A:Scratch No XQT'd .CMD files ---------------------------------------------- A:GETDATE A:DEPPRINT A:DEPTRANS List vali Matche deposit deposit froGetDe against Invoices No USE files No USE files  USES B:Invoices No XQT'd .CMD's No XQT'd .CMD's No XQT'd .CMD's -------------------------------------------- ****************************************************************  A:GETDATE (No USE & .CMD files) A:CHECKSTU (USES B:CheckFil & A:Scratch No XQT'd .CMD files ---------------------------------------------- A:GETDATE A:DEPPRINT A:DEPTRANS List vali Matche deposit deposit froGetDe against Invoices No USE files No USE files .CW 8 *************************** DBASE II ACCOUNTING PACKAGE ***************** * FROM ASHTON TATE'S MANUAL * AS TYPED IN AND DEBUGGED * CRAIG MOORE * * ACCOUNT.DOC FILE * ************************************************************************* THŠ FOLLOWINǠ PROGRAM COMPRIS A ACCOUNTIN SYSTE WRITTEΠ B٠ CUSTOMER USING ALMOST ALL OF THE dBASE II COMMANDS. Thi syste i fairl elementar fro a accountant viewpoint bu includes some programming techniques that might be found useful. Beside illustratin individua commands i show ho t se u menus ho t fin data ho t merg files differen way o settin u th input t th system an numbe o interestin solution t som o th problem involve i keepin cas journal doin payrolls an managin database s tha informatio i availabl an dat integrit i not compromised. Th program ar self-documented wit comment sprinkle liberall throughout. To famaliarize the user with this accounting pkg., a TREE STRUCTURE program layout is included below. ------------------------------------------------------------------- HOW TO SETUP AND RUN THIS ACCOUNTING SYSTEM. A. Which programs go on which disk. Only the B:FL.DBF go on drive B,everything else goes on A including the dBaseII com files. **** WRONG, my error.... CONSTANT.MEM & FL.NDX's also go on B: B. Initialize INDEX files. Billings,Invoices,Inserts,&Supplier must be initialized before running this accounting pkg.... ie USE B:Billings INDEX ON Inv:Nmbr TO B:Billings OR RUN A>DBASE ACTRENDX ACTRENDX.CMD SETS UP THESE INDEX FILES. C. How to RUN IT NOTE THESE QUIRKS 1 USŠ198 UNTI CHANG IT With pgms setup on the right drives 2. ^W OR TO EXIT APPENDS A>DBASE enter today's date 3. Client must have 3 "letters" .DO ACCOUNTS when doing time sheets. everything else is menu driven. 4. Job #'s start at 101 for OR SUPPLIERS & 1 thru 99 A>DBASE ACCOUNTS for inhouse use. 5. After your 1st time to move thcontent oPOSTFILE into COSTBASE goto rpt menu and RUN the RE-INDEX COSTBASE option,..or else! TREE STRUCTURE PROGRAM LAYOUT _______________ A:ACCOUNTS.CMD MAIN MENU Cntrl Pgm for entire Accounting package. ------------------ USES no .DBF files __________________ ! ! ! ---------------------------------------------------------------------- ! ! ! ! ! ! A:COSTMENU.CMD A:PAYMENU.CMD A:DEPMENU.CMD A:IOMENU.CMD A:INVMENU.CMD A:REPORTME.CMD Company MENU MENU MENU MENU MENU Expenses Dispursements Deposits Advertising Invoices  Reports ------------- ----------- ----------- ---------- ----------- ------------ USES USES USES USES USES USES B:PostFile.DBF B:PostFile.DBF no .DBF B:Inserts.DBF B:&Database.DBF B:PostFile.DBF files B:&Database.DBF ------------- ------------ ---------- ---------- ----------- ------------ A:USETAX A:PAYBILLS A:DEPOSITS A:IOPOST A:INVOICES A:JOBCOSTS A:COSTBILLS A:PAYEMPS A:IOREVIEW A:PRINTOUT A:FINDBILL A:COSTTIME A:REVIEW A:PRINTOUT A:SALESTAX  A:COSTUPDATE A:JOBSINDX .pa COSTMENU.CMD Company Expenses Supplies & Payroll ------------------- USES B:PostFile ------------------- XQTS these .CMD files ------------------ ! -------------------------------------------------------- ! ! ! ! ! A:USETAX A:COSTBILL A:COSTTIME A:PRINTOUT A:COSTUPDA Nontaxable Bills from Time sheets Lists rec's Appends rec's items bought Suppliers & billing in a file from the PostFile for resale amts for ea.  to the Costbase Supplier file. USES USES USES USES USES B:PostFile B:PostFile B:PostFile None B:CostBase B:Invoices A:GetBill A:GetTime B:PostFile A:GetBill XQTS these XQTS these XQTS these XQTS these XQTS these .CMD files .CMD files .CMD files .CMD files .CMD files A:DATETEST A:DATETEST A:DATETEST None A:DATETEST A:NAMETEST A:NAMETEST A:NAMETEST A:NAMETEST A:TIMECALC A:TIMECALC ----------------------------------------------------- A:DATETEST A:NAMETEST A:TIMECALC Verifies Checks for &/or Verifies & billing & adds Suppliers calcs billings check dates Names for employees time. No USE files USE USE B:Supplier B:Personne No XQT'd No XQT'd No XQT'd .CMD files .CMD files .CMD files .pa PAYMENU.CMD "Dispersements" preps checks for printing & posting Handles Payroll USES B:PostFile XQTS these .CMD files A:PAYBILLS A:PAYEMPS Finds bills to Handles normal payroll be paid,gets nx processing & exceptions. check #, writes a check in the check file, maintains checkbook balance. USES USES B:CostBase B:Personne B:CheckFil XQTS these XQTS these .CMD files .CMD files A:GETDATE  A:PAYROLL A:PAYFIND A:NAMETEST A:CHECKSTU ----------------------------------------------------------------- A:GETDATE A:PAYFIND A:CHECKSTU A:PAYROLL Confirms Looks for Lists check Generates payroll that date unpaid #'s, amt & check stubs showing deductions is correct. bills. balance when Handles FIT,FICA,SDI,SIT on a Salaries&Bills mnthly,quarterly,annual basis are paid No USE files No USE files USES USES B:CheckFil B:&Header (B:Hold81) A:Scratch B:Personne B:CheckFil B:CostBase No XQT'd No XQT'd No XQT'd XQTS these .CMD files .CMD files .CMD files .CMD files  A:GETDATE (No USE & .CMD files) A:CHECKSTU (USES B:CheckFil & A:Scratch No XQT'd .CMD files DEPMENU.CMD Menu for selecting deposits or to perform housekeeping on the checkbook USES B:Deposits XQTS .CMD FILE B:DEPOSITS Records $ comming in Handles payments received for invoices. USES B:Deposits A:GetDep XQTS these .CMD files ---------------------------------------------- ! ! ! A:GETDATE A:DEPPRINT A:DEPTRANS List vali Matche deposit deposit froGetDe against Invoices No USE files No USE files USES B:Invoices No XQT'd .CMD's No XQT'd .CMD's No XQT'd .CMD's .pa IOMENU.CMD Handles advertising & placing of ads to magazine publishers USES B:Inserts XQTS these .CMD files ! ---------------------------- ----------- ! ! A:IOPOST A:IOREVIEW Gets info Displays insertion for insertion orders for client orders &/or Magazine USES USES B:Inserts B:Inserts A:GetInser XQTS these No XQT'd .CMD files .CMD files A:GETDATE A:PRINTOUT -------------------------------------------- INVMENU.CMD Works with Billings & Invoices to keep track of amts billed to a client & sumarizes totals billed on any given invoice. USES B:&Database XQTS these .CMD files ----------------------- !  ! A:PRINTOUT A:INVOICES Accept inpu fo <-- Ca b expanded into N USE'Ġ file invoice t clienta Account Receivable USES system (see prog. doc) No XQT'd .CMD files B:Billings B:Invoices A:GetCosts A:Scratch A:Temp XQTS these .CMD files A:GETDATE A:PRINTOUT REPORTME.CMD Provides detailed choices that relate to reports that the user may wish to see &/or printout. USES B:PostFile B:&Database  XQTS these .CMD files ------------------------------------------------------------- ! ! ! ! ! A:JOBCOSTS A:FINDBILL A:REVIEW A:SALESTAX A:JOBSINDX Summary of Finds Bills Lists entries summarizes Indexes the client job in any .DBF invoice file CostBase on costs & file over a given Job:Nmbr to office costs period(taxable& B:JOBS.NDX nontaxables) USES USES USES USES USES B:CostBase B:CostBase B:&Database B:Invoices B:CostBase B:Billings A:Temp A:Temp A:Temp2 A:Other XQTS No XQT'd .CMDs XQTS these No XQT'd .CMD's No XQT'd .CMDs  A:GETDATE A:REVHDR (No USE or .CMD's) prints headings for diff dBase listings A:REVHDR (No USE or .CMD's) sets margins for diff rpts .PA D. A word about imbedded CHR() commands Printer Calls CHR(27)+CHR(30)+CHR(8) sets 7 lines/inch -------- ESC + RS + BS On a Diablo 1650 CHR(27)+CHR(12)+CHR(89set8 lines/pag -------- ESC + FF + Y form feed CRT SCREEN Calls --------------------------------- CHR(27)+CHR(76)+CHR(27)+CHR(89)+CHR(0) ESC L + ESC Y + NUL Home the erase the "dummy"?  cursor screen CHR(12) .... FORM FEED CHR(7) .... RING THE BELL CHR(27)+CHR(74) ... ERASE TO END OF PAGE ESC J ******** Osborne users will have the change as necessary use A>FIND B:*.* CHR TO LOCATE ALL THE CHR() CMMDS E. What do you mean that you ONLY have 90k per disk! TRY PUTTING PostFile & some of the commonly used .DBF's on the A: drive with the dBaseII software, and putting the Menu's and their assoc pgms on separate disks to be use in B: drive. yo wil hav t replac A:' wit B:' an vic vers i thi pkg and will have to add some resets for disk changes .PA THESE PGMS COMPRISE THIS ENTIRE ACCOUNTING PKG *** NOTE that you have to setup the FL.NDX files *** ACCO UNT .DOC 6k ACCOUNTS.CMD 4k BILLED .FRM 1k BILLINGS.DBF 1k CHECKFIL.DBF 1k CHECKSTU.CMD 2k CONSTANT.MEM 3k COSTBASE.DBF 1k COSTBILL.CMD 5k COSTMENU.CMD 7k COSTTIME.CMD 5k COSTUPDA.CMD 2k DATETEST.CMD 2k DEPMENU .CMD 2k DEPOSITS.CMD 4k DEPOSITS.DBF 1k DEPPRINT.CMD 1k DEPTRANS.CMD 2k FINDBILL.CMD 6k GETDATE .CMD 1k HOLD81 .DBF 1k INSERTS .DBF 1k INVMENU .CMD 5k INVOICES.CMD 6k INVOICES.DBF 1k IOMENU .CMD 3k IOPOST .CMD 4k IOREVIEW.CMD 2k JOBCOSTS.CMD 7k JOBCOSTS.FRM 1k JOBSINDX.CMD 2k MEDIA .FRM 1k NAMETEST.CMD 2k PAYBILLS.CMD 9k PAYEMPS .CMD 3k PAYFIND .CMD 4k PAYMENU .CMD 2k PAYROLL .CMD 13k PERSONNE.DBF 1k POSTFILE.DBF 1k PRINTOUT.CMD 2k REPORTME.CMD 3k REVHDR .CMD 2k REVIEW .CMD 11k REVMRGN .CMD 1k SALESTAX.CMD 6k SUPPLIER.DBF 1k TIMECALC.CMD 4k USETAX .CMD 5k DRIVE B, USER 0 Contains 161k in 49 files with 80k free --> Also included are ACCOUNT.SUB,ACTRENDX.SUB DATABASE FILES: B:COSTBASE.DBF Indexed on NAME to B:$SUPP.NDX B:POSTFILE.DBF B:BILLINGS.DBF Indexed on INV:NMBR to B:BILLINGS.NDX B:INVOICES.DBF Indexed on INV:NMBR to B:INVOICES.NDX B:DEPOSITS.DBF B:CHECKFIL.DBF B:INSERTS.DBF Indexed on IO:NMBR to B:INSERTS.NDX B:HOLD81.DBF B:PERSONNE.DBF B:SUPPLIER.DBF Indexed on SUPPLIER to B:SUPPLIER.NDX TEMPORARY FILES CREATED, THEN DELETED ON THE A: Drive. GetBills.DBF, GetCosts.DBF, GetDep.DBF, GetInserts.DBF GetTime.DBF, Other.DBF, Scratch.DBF, Temp.DBF, Temp2.DBF STANDARD REPORT FORMS: MEDIA.FRM keeps track of ads placed in magazines JOBCOSTS.FRM BILLED.FRM SYSTEM CONSTANTS: B:CONSTANT.MEM  System constants are kept in this file. The ar calle out used an update wher appropriat fro withi numbe o program withi thi accountin system Constant ar kep i singl fil s tha whe an o the chang (ne ta rates ne year etc.) the nee onl b change i on locatio t updat th entir system. NEXTCHECK (C) 3565 Keeps checkbook current in MBALANCE (N) 23921.18 PAYBILLS, PAYROLL, and DEPOSITS .CMD files THISYEAR (N) 81 Used by GETDATE, DATECHECK, MINYEAR (N) 79 and PAYROLL files. NEXT:IO (C) 2885 Next insertion order number (IOPOST.CMD). NEXT:INV (C) 10623 Next invoice number (INVOICES.CMD). FICACUT (N) 0.0665 This entire grouping is used FICAEND (N) 29700.00 in the PAYROLL file. EASY to MAXFICA (N) 1975.05 update this every year since SDICUT (N) 0.006 values are not sprinkled SDIEND (N) 14900.00 throughout the programs. MAXSDI (N) 89.40 UIEND (N) 6000 COMPLETED (C) PREVDATE (C) 810814 MAXEMPL (N) 14 Highest employee number. Also used in POSTTIME and TIMECALC programs. COMMAND FILES: ACCOUNTS.CMD COSTMENU.CMD USETAX .CMD COSTBILS.CMD COSTTIME.CMD COSTUPDA.CMD PAYMENU .CMD PAYBILLS.CMD PAYFIND .CMD PAYEMPS .CMD PAYROLL .CMD DEPMENU .CMD DEPOSITS.CMD DEPRINT .CMD DEPTRANS.CMD COMMAND FILES CONT. ... IOMENU .CMD IOPOST .CMD IOREVIEW.CMD INVMENU .CMD INVOICES.CMD REPORTME.CMD JOBCOSTS.CMD JOBSINDX.CMD FINDBILL.CMD REVIEW .CMD REVHDR .CMD REVMRGN .CMD SALESTAX.CMD TIMECALC.CMD PRINTOUT.CMD GETDATE .CMD DATETEST.CMD NAMETEST.CMD CHECKSTU.CMD **************************************************************** FUTURE ADDITION OF INDEX OF HOW DBASE COMMANDS ARE US ED IN THIS PKG  COSTTIME.CMD COSTUPDA.CMD PAYMENU .CMD PAYBILLS.CMD PAYFIND .CMD PAYEMPS .CMD PAYROLL .CMD DEPMENU .CMD DEPOSITS.CMD DEPRINT .CMD DEPTRANS.CMD COMMAND FILES CONT. ... IOMENU .CMD IOPOST .CMD IOREVIEW.CMD INVMENU .CMD INVOICES.CMD REPORTME.CMD JOBCOSTS.CMD JOBSINDX.CMD FINDBILL.CMD REVIEW .CMD REVHDR .CMD REVMRGN .CMD SALESTAX.CMD TIMECALC.CMD PRINTOUT.CMD GETDATE .CMD DATETEST.CMD NAMETEST.CMD CHECKSTU.CMD **************************************************************** FUTURE ADDITION OF INDEX OF HOW DBASE COMMANDS ARE US 2 *************************** DBASE II ACCOUNTING PACKAGE ***************** 3 * FROM ASHTON TATE'S MANUAL 4 * AS TYPED IN AND DEBUGGED 5 * CRAIG MOORE 6 * 7 * * 8 ************************************************************************* PROGRAM COMMENT STATEMENTS ----> FILE ACCOUNTS.CMD 1 ***************** ACCOUNTS COMMAND FILE ***************** 2 * THIS IS THE CONTROL MODULE FOR ALL THE PROCEDURES USED IN THE ACCOUNTING 3 * FUNCTIONS. (MENU DRIVEN). The operator is given a choice of major 4 * functions. The menu selection here calls up menus of sub-functions 5 * to as many levels as necessary. A package of utility functions is 6 * also provided as part of the overall system for file maintenance, etc. 7 ****************************************************** 8 ----> FILE ACTRENDX.CMD 1 ************ REINDEXES .DBF FILES ON B: DRIVE *************** 2 * DBASEII ACCOUNTING PKG * 3 ****************************************************************** 4 ----> FILE BILLED .FRM ----> FILE CHECKSTU.CMD 1 ************ CHECKSTUB COMMAND FILE *************** 2 * Prints out check numbers, amounts, and balances from the CheckFile when 3 * SALARIES and BILLS are paid. When more than one bill is paid by a 4 * single check, the program totals all the bills against that check if they 5 * are entered in consecutive order (which they are, in the two command files). 6 * Records are marked for deletion, but can be reviewed and retreived. 7 ************************************************************************** 8 ----> FILE COSTBILL.CMD 1 ************ COSTBILLS COMMAND FILE ************** 2 * This file accepts inputs for supplier bills. 3 * 4 * A temporary file called GetBills (also used in USETAX.CMD) is used for data 5 * entry because the operator can decide to quit on an incomplete entry, which 6 * is marked for deletion. 7 * When the data is APPENDed to the PostFile, these entries are eliminated (the 8 * APPEND command does not transfer records marked for deletion). An entry must 9 * include (the name of a supplier the amount of the bill). If these 10 * are not both supplied, the entry is flagged for correction or deletion. 11 *************************************************************************** 12 90 * Checks names against a list of suppliers to catch spelling and 91 * abbreviation inconsistencies. ----> FILE COSTMENU.CMD 1 * ********** COSTMENU.CMD COMMAND FILE *************** 2 * This is one level down from the ACCOUNTS.CMD control module. 3 * Selections are refinements that relate to costs for client-related 4 * jobs or agency overhead. 5 * The main database is called COSTBASE.DBF and is kept on disk B. 6 * Costs are not entered directly into the COSTBASE, however, because this 7 * leads to data contamination and all sorts of problems fixing the errors. 8 * Instead, supplier bills and agency time sheets are posted into an interim 9 * file called POSTFILE.DBF. In here, they can be reviewed and edited as 10 * necessary. 11 * When all the cost entries are confirmed as being correct, they are 12 * transferred to the COSTBASE by using the "update proceedure", 13 * (selection 6 below). 14 ****************************************************************************** 15 ----> FILE COSTTIME.CMD 1 ************** COSTTIME COMMAND FILE ****************** 2 * Accepts time sheet entries for employees, by using a temporary 3 * file called GetTime.DBF for data entry (fashioned along the same line as 4 * GetBills). 5 * GetTime is used because  the operator can decide to quit on an incomplete 6 * entry. In this case, the entry is marked for deletion, and when the data is 7 * APPENDed to the PostFile, these entries are eliminated (the APPEND command 8 * does not transfer records marked for deletion). 9 * After all entries are made, they are checked for the 10 * correct range of employee numbers and to see that hours have been 11 * entered. Using GetTime, we can check the entries without 12 * having to go through the entire PostFile. 13 * After verifying that the dates are in the right format and 14 * checking the names against our SUPPLIERS file, the billing amounts 15 * are computed. 16 * The records are then transferred to the CostFile (POSTFILE) and the 17 * temporary file GetTime is then deleted. 18 ************************************************************************* 19 50 * The following sequence of IF statements, flags all entry errors, then 51 * gives the operator the choice of fixing them or ending the proceedure. 52 88 * If the operator decides to quit on an incomplete entry, it is 89 * marked for deletion so that it is not transferred to the PostFile. 115 * The test for the date needs the name of the date field to be tested. 119 * Checks names against a list of suppliers to catch spelling and 120 * abbreviation inconsistencies. 123 * Verifies match between employee name and number, then computes the amount 124 * to be billed for the employee's time based on his salary. ----> FILE COSTUPDA.CMD 1 ****************** COSTUPDATE COMMAND FILE ******************** 2 * Records from the COSTFILE (POSTFILE) are added to the COSTBASE. 3 * This step is so critical to data integrity that we: use a password 4 * to prevent accidential access; verify dates; check the names of suppliers; 5 * and compute time charges if necessary. Notice that these are done by 6 * simply calling the utility command files. 7 * The PostFile has all its records marked for deletion after they 8 * have been posted (can still be recovered). 9 ************************************************************************ 10 49 * Save the number of the last record in Costbase ----> FILE DATETEST.CMD 1 ********** DATETEST COMMAND FILE *********** 2 * This file verifies the Bill:Date and Check:Date to see that they are 3 * in the right format. If incorrect, the operator may edit them. 4 ******************************************************************** 5 9 * The variable DATE brings in the NAME of the date field to be checked 10 * from the command files where this is used. 24 * The macro symbol is use to get the contents of the date field 25 * being checked without creating a new variable. 45 * Delay to allow date being checked to be read (quickly) ----> FILE DEPMENU .CMD 1 * ************ DEPMENU.CMD COMMAND FILE ********** 2 * Select deposits or perform housekeeping on the checkbook. 3 ********************************************************* 4 ----> FILE DEPOSITS.CMD 1 * ********** DEPOSITS COMMAND FILE ************* 2 * This file records any money coming in , in a file called Deposits. If the 3 * money is in payment of an invoice, the amount and date of payment are 4 * entered against that invoice in the Invoice file. 5 * The checkbook balance is kept current for each entry. 6 * At the end of the secession, deposits are printed out individually, then 7 * the total of the deposits plus the new checkbook balance are printed. 8 **************************************************************************** 9 42 * Next loop is used when there has been an error in the entry 43 * (defined as no client or no rate). The operator is shown the 44 * previous entries and can make any changes required. 115 * The next portion of this program uses the Primary and Secondary work 116 * areas to record payments received against agency invoices in the record 117 * for that invoice in the Invoices file. Both work areas are necessary so 118 * that we can compare each record in the GetDep file against all of the 119 * records in the Invoices file. ----> FILE DEPPRINT.CMD 1 * **************** DEPPRINT COMMAND FILE **************** 2 * Prints valid deposits in the GetDep file as part of th Deposits file. 3 ************************************************************************ 4 ----> FILE DEPTRANS.CMD 1 * ************ DEPTRANS COMMAND FILE ************** 2 * Applies deposits from the GetDep file against the matching invoices in the 3 * Invoices file as payments are received against them. 4 *********************************************************************** 5 52 * We do not skip to the next record if the record was edited. This 53 * allows us to run the edi ted record through the process again. ----> FILE FINDBILL.CMD 1 * ****************** FINDBILLS COMMAND FILE ***************** 2 * This procedure finds specific bills that we are looking for, then allows 3 * us to edit them. 4 * The bill can be specified by bill number and/or amount. If you decide 5 * not to pay a bill that was found specifying more than one item, you will be 6 * presented the rest of the entries for the supplier based on name only. 7 ************************************************************************** 8 15 * "Entering" controls a closed loop that allows the operator to change 16 * the entry if he or shee spots an error. 34 * OneByOne is used so that we look at the entire listing for a name once. 35 * If we could have started in the middle of the list and the bill is not 36 * the one we want, we go up to the first listing then go through all the 37 * entries for the name, one by one. Used in the last loop in this file. 52 * Now look for a match on the first 10 characters of the name. This finds 53 * the first entry for that supplier, then looks for bill number or amount 54 * if we specified them. If not specified, it skips through all entries 55 * for the name. 56 74 * Found at least one entry with a matching name. 79 * If we have more than the name, we first check for the bill number. 89 * If we're on a new name or the end of the file, Looking is TRUE 90 * because we have not found the supplier we were looking for. 91 * Otherwise, we have a matching bill number to confirm. 98 * If no bill number, look for the amount. 107 * If we're on a new name or the end of the file, Looking is TRUE 108 * Otherwise, we have an unpaid bill to confirm. 135 * If the first record is not the one we want, we skip through the 136 * rest of the entries for the name. We first go on from where we 137 * were in the listing (if we had more than one name), then go back 138 * to the first entry and look at those we had skipped. If we had 139 * only the name, OneByOne = 1 and we go through the list only once. ----> FILE GETDATE .CMD 1 *********** GETDATE COMMAND FILE ************** 2 * Confirms that the date is entered as YYMMDD by checking to see that 3 * the entries for each item are in the correct range. The year is 4 * checked against a constant stored in the B:Constant.MEM file. 5 ********************************************************************** 6 ----> FILE INVMENU .CMD 1 * ************* INVMENU COMMAND FILE ****************** 2 * Functions are selected by the menu. This procedure works with two data 3 * files, BILLINGS and INVOICES. BILLINGS keeps track of the amount 4 * billed to a client by individual job number, while INVOICES is a 5 * summary of the total billed on any given invoice. This latter file can 6 * be used to set up an accounts receivable system, as it has fields for 7 * storing how much has been received in payment against an invoice and 8 * when that amount was received (filled in by the Deposits.CMD file). 9 ************************************************************************** 10 ----> FILE INVOICES.CMD 1 * ************* INVOICES COMMAND FILE ***************** 2 * This file accepts inputs for invoices to clients. Individual projects 3 * and items are stored in the billings data file. Any number of items 4 * may be entered using a single invoice number. Invoice numbers are 5 * automatically generated by the computer and stored in the Constant.MEM 6 * file. 7 * After all the job billings have been entered, they are summarized by 8 * invoice number and the data is stored in the invoices file. 9 * A printout of items billed and invoice totals is provided. 10 ************************************************************************** 11 113 * Costs entered are totaled by invoice number to Scratch because several 114 * job costs can be entered against each invoice number. Amounts are adjusted 115 * for one client who always pays promptly and takes a 2% discount. Each 116 * invoice is totalled. Temp has only summary data needed for a printout. 117 134 * "Output" is needed in the Printout Command file 139 * One of our clients always pays promptly and takes a 2% discount. 140 * We do this after the original entries were printed out: 154 ----> FILE IOMENU .CMD 1 * ********** IOMENU COMMAND FILE ************ 2 * Selects the appropriate action to be taken with insertion orders 3 * (instructions from our ad agency to magazine publishers). 4 ********************************************************************* 5 ----> FILE IOPOST .CMD 1 * *********** IOPOST COMMAND FILE ***************** 2 * Gets information for insertion orders (instruction to magazine 3 * publishers from our ad agency). Works much like Postbills and 4 * Posttime. 5 ********************************************************************* 6 24 * Next loop is used when there has been an error in the entry 25 * (defined as no client or no rate). 117 *"Number" determines the starting record number for the printout. 118 124 * "Output" and "Condition" needed in the Printout Command file ----> FILE IOREVIEW.CMD 1 * *************** IOREVIEW COMMAND FILE ************ 2 * Provides insertion insertion order displays and printout. 3 * The operator can select all the insertions for the client. 4 * or can select only those for a particular magazine. 5 *************************************************************** 7 ----> FILE JOBCOSTS.CMD 1 * *********** JOBCOSTS COMMAND FILE ***************** 2 * Provides summaries of costs by client and job number. This can 3 * also be used to summarize all office categories, since they fall 4 * into these fields. 5 * REPORTS ARE BY JOB NUMBER. Client code is used only in the heading. 6 * The report is actually prepared based on the job number, so accuracy is 7 * critical. 8 * This file works with a partially indexed costbase, so "Unindexed" is 9 * used to keep track of how many records are not in the index. If this gets 10 * beyond a specific number, the operator is prompted to reindex the Costbase. 11 ************************************************************************** 12 ----> FILE JOBCOSTS.FRM ----> FILE JOBSINDX.CMD 1 * ************* JOBSINDX COMMAND FILE **************************** 2 * Indexes the costbase on job numbers to B:Jobs.NDX. 3 * The method of indexing here allows us to use the index to help 4 * find job numbers for the Job Costs command files, but allows us to 5 * do so without having to index the costbase every time we add a bill. 6 * The strategy is: before we index the Costbase on job numbers, 7 * we first store the number of the last record in a record with a job 8 * number of zero. When the file is indexed, this record is at the top 9 * of the indexed file ($Jobs) so that we can find it whenever we want to. 10 ************************************************************************** 11 15 * HAVE TO ADD A PATCH HERE TO MAKE THIS RUN ----> FILE MEDIA .FRM ----> FILE NAMETEST.CMD 1 ************* NAMETEST COMMAND FILE ************** 2 * Checks names in the file in USE against the Suppliers file and gives 3 * the operator the options of editing, adding them to the Suppliers file 4 * or ignoring them. If a name is edited, it is presented again. 5 ********************************************************************** 6 ----> FILE PAYBILLS.CMD 1 *********** PAYBILLS COMMAND FILE ********* 2 * Before this proceedure can be accessed, the check number and balance must 3 * be verified in the PAYMENU command file. 4 * This is one of the longer files, but the individual portions of it are 5 * not too complicated. Repetitive proceedures in the main loop (controlled 6 * by the variable "Finished") could have been put in separate command files 7 * to make this file easier to understand and maintain, but this way it 8 * minimizes disk accesses and increases speed. 9 * This file finds bills to be paid in the CostBase, generates the next 10 * check number, writes a check in the CheckFil, and maintains the checkbook 11 * balance. 12 * The next check number and checkbook balance are recalled from a file 13 * called Constant.MEM. The final values for both of these are stored in the 14 * same file after all the bills have been paid. 15 * The date is entered once at the start of the procedure, then 16 * is automatically inserted into each entry. The date is checked to 17 * see that it is in the YYMMDD format, and that the values are within 18 * possible limits (month from 1 to 12, day from 1 to 31, year=ThisYear). 19 * Entries must include at least the name of the party being paid. 20 * Balances are automatically computed and shown to the operator. 21 * Check numbers are automatically assigned by the computer. 22 * If several entries are made against a single check number (the 23 * operator has this option), these are added and shown as a single 24 * item in the printout. 25 ************************************************************************* 26 33 * Initialize. "New" is used to determine whether the program should generate 34 * a new check number or use the old one (where several bills to a single 35 * supplier are being paid). "Finished" is the control variable that determines 36 * whether we should run through the procedure again, or are done paying bills. 87 * "Start" is brought in from PayFind.CMD. If we started at the first 88 * entry for a name (had only the name), Start=0. If we had more than 89 * the name, Start contains the record number we started on. Since this 90 * could be in the middle of the listing, we use "Counter" so that we can 91 * come back to the top of the listing for the name once. 149 * If Confirm <> 'P', we rejected the first unpaid bill that was 150 * shown. Rather than going back to the beginning, the loop 151 * below SKIPs to the next INDEXed name until we find an unpaid 152 * bill, or go beyond the records for the name we are paying. 153 * The same applies if we want to pay another bill to the 154 * same supplier (New='S'). Since we are in the file on the name 155 * we want we SKIP to the next record until we find an unpaid 156 * bill or run out of records for that name. 157 * If we had only the name and started with the first unpaid 158 * bill we stop now since we have looked at all the unpaid bills 159 * for that supplier. 160 * If we could have entered the list of records for the 161 * supplier in the middle (more than the name provided), we look 162 * at the unpaid bills between where we are and the end of the 163 * list, then go up to the first entry for that name and check 164 * all of the unpaid bills that we had previously skipped past. 165 * This is controlled by Counter. 166 * After the second FIND in the command file (below), we 167 * stop looking when the record number we are on is greater than 168 * or equal to the number of the record we start on (Start). 169 175 * We enter this loop when we reach the end of the records with 176 * names that match the one we are looking for. If we started 177 * with the first unpaid bill, the record number is greater than 178 * Start (because Start=0) and Counter=1 (because we set it to 179 * that value). The second IF below is True and we terminate the 180 * search. 181 * If Start>0, Counter=0 the first time we run out of 182 * records with a matching name, so the program daes the ELSE 183 * commands below. 184 * Start is still >0 and Count is now 1, so the last term in 185 * the first IF applies. On this second pass when we get to a 186 * record number >=Start, we drop into the loop and do the IF to 187 * terminate the search because we have now looked at all the 188 * unpaid bills for the name we entered. ----> FILE PAYEMPS .CMD 1 *************** PAYEMPS.CMD COMMAND FILE *************************** 2 * Does normal payroll processing or exceptions. 3 ******************************************************************** 4 ----> FILE PAYFIND .CMD 1 *************** PAYFIND COMMAND FILE ************* 2 * This file is called by the PAYBILLS command file after we have found at least 3 * one cost entry for the supplier that we are looking for. 4 * This file now looks for either the first unpaid bill for the supplier 5 * (if only the name was specified) or looks for a complete match (if more than 6 * the name was specified. 7 * If an unpaid bill meeting the criteria is found, Looking is 8 * set to False. Otherwise it remains True. 9 * If only the name was used, at this point we are at the first 10 * unpaid bill for the supplier name. 11 * If more than the name was specified for the search, we could be anywhere 12 * in the indexed list of records for this supplier. If we do not want to pay 13 * this particular bill, or we want to pay more bills for this supplier, we use 14 * a short cut in the PAYBILLS command file so that we do not have to start at 15 * the first record for the name every time. To do this, we store the record 16 * number that we start at to a variable called Start if we have more than the 17 * name to look for. Otherwise, Start =0 18 ****************************************************************************** 19 22 * If we have more than the name, we first check for the bill number. 23 * If this is not found or if the bill has already been paid, 24 * the confirming procedure is skipped (Looking set TRUE). 25 * In this case, we may have entered the list of supplier bills in the 26 * middle of the indexed list. In a later procedure, we may need to go 27 * back to the top and look at the names we skipped. To do this, if we 28 * find a record here, we store its number to "Start". 29 39 * If we're on a new name of the end of the file, looking is TRUE 40 * because we have not found the supplierr we were looking for. 41 * Otherwise, we have a matcing bill number to confirm. 56 * If no bill number, look for the amount and an unpaid bill. 57 * If not found, skip the confirmation procedure. 65 * If we're on a new name or the end of the file, Looking is TRUE 66 * Otherwise, we have an unpaid bill to confirm. 74 * If we found a matching record, store its number to Start 80 * If we have only the name, find the next unpaid bill 89 * If we're on a new name or the end of the file, Looking is TRUE 90 * because we did not find the supplier we were looking for. 91 * Otherwise, we have an unpaid bill to confirm. ----> FILE PAYMENU .CMD 1 ************ PAYMENU COMMAND FILE ************* 2 * This is a sub-module of the Accounts.CMD file and provides choices 3 * as to which checks are to be prepared for posting and printing. 4 * Paying salaries has another menu level to allow partial payments 5 * to selected employees (e.g., leave of absence, when an employee does not 6 * work a full two week stretch, etc.) 7 * The checkbook balance and next check number must be confirmed before 8 * either of these proceedures can be preformed. 9 *********************************************************************** 10 ----> FILE PAYROLL .CMD 1 * *************** PAYROLL COMMAND FILE ******************************** 2 * This command file generates payroll check stubs showing all deductions; gets 3 * the next check number and writes a check in the CheckFile, showing the new 4 * balance; and stores the salaries and deductions in a database called Hold81. 5 * This file is used to store monthly, quarterly and annual FIT, FICA, SDI 6 * and SIT deductions. The deductions are not picked up from tax tables because 7 * there are so few employees. Instead, they are obtained from the individual 8 * employee records in the Personnel database. 9 * Constants.MEM keeps track of the FICA and SDI percentages and their 10 * maximums, as well as the constant for ThisYear. Changes can be thus 11 * made in a single spot and will be correct in all the programs in the 12 * accounting system. 13 * The file is quite long, but breaks down into simpler modules: 14 * I: Get the date and End of Month, Quarter and Year flags. 15 * II: Compute all deductions and net pay for an individual employee, then 16 * place this in the employee record in Personne.DBF 17 * III: Operator verifies deductions and payroll stub is printed. 18 * IV: Paycheck is written to the Checkfil and all amounts are placed into 19 * the Hold81 summary file. 20 * V: When all individuals have been paid, the Hold81 summary file is 21 * updated if it is the end of the month, quarter or year. 22 * VI: Print out the summary file and data so that the physical checkbook 23 * can be updated (computer does not print our checks). 24 * VII: Delete transient constants, save others back to Constant.MEM for 25 * system use. 26 **************************************************************************** 27 28 ********************************************************** 29 ************* I: Get date and pay period flags ********* 30 83 * 2nd chance at date and flags 87 * Computer now does a date and flag check 115 *************************************************************************** 116 *********** II: Calculate deductions and net pay for each individual ****** 117 * Compute deductions. Deductions for FICA, FIT, SDI and SIT are kept in the 118 * individual employee's Personnel record, rather than getting them from tax 119 * tables, because there are so few employees. (You have to decide what should 120 * and should not be computerized.) The "YTDxxx" are the year-to-date 121 * totals for these items. Limits and percentages for FICA and SDI are obtained 122 * from a file called Constant.MEM. These are the variables FICACut, FICAMax, 123 * FICAEnd, SDICut, SDIMax, and SDIEnd. 128 REPLACE ALL FICA WITH (Pay:Rate*FICACUT+0.005); 129 SDI WITH (Pay:Rate*SDICUT+0.005) 130 134 IF Paid .OR. * 139 *** Save the employee record in case the procedure is ended *** 143 *** Deductions for partial salary based on number of days worked *** 144 *** Ratio is computed in PayMenu.CMD 150 * Deductions and totals are computed then stored in the employee 151 * record FedTemp, Statemp and EmpTemp are used to carry forward 152 * values for salaries subject to FICA, SDI and state unemployment 153 * insurance to Hold81, the summary file. 154 181 * In California,the employer pays an Unemployment Insurance 182 * contribution on employee salary up to the amount of UIEnd.There is 183 * nothing deducted form the employee salary for this, so we keep track 184 * only of the employer obligation as UISal. 185 202 *********************************************************************** 203 ***************** III: Print employee stub ******************** 221 * Pagefeed after every six employee stubs 232 ******************************************************************** 233 ******** IV: Record paycheck in Checkfil and Hold81 **************** 234 235 * Now a check is "written" in the CheckFil. 250 * We keep an aggretate record of payroll and deductions. The amounts 251 * for each employee are added to the amounts already in the last 252 * record in the file represented by "Header". (This was set up at the 253 * start of the "GetWhen" loop earlier, and has the name "B:Hold81" or 254 * "B:Hold82" or whatever "ThisYear" is.) 255 * This last record is either a blank (if this is the first 256 * payroll of the month), or has data from previous salary payments 257 * made during the current month. At the end of the month, quarter and 258 * year, totals and a new blank record (except at the end of the year) 259 * are added. This is done in the next loop. 260  263 * If this is a new year, there are no records in the file so we add a 264 * blank record. Otherwise, we go to the last record in the file. 278 *** Reset the employee record if he was paid for part time. *** 279 *** The Bak file is not deleted here, as each copy command *** 280 *** above wipes out the previous contents. *** 290 ********************************************************************* 291 ******* V: Personnel records are reset and Holdxx is updated ******** 300 * If it's the end of the quarter, we total the amounts for the 301 * previous three months to a new record and mark it with a 'Q'. 326 * If it's the end of the year, we total all the quarterly amounts to 327 * a new record and mark it with a 'Y'. 336 * If it's the end of a month but not the end of the year, we add a new 337 * blank record for next month's payroll records. 343 ************************************************************************* 344 ******** VI: Print payroll summary, transfer checks to costbase ********* 385 *********************************************************************** 386 ****** VII: Dump transient variables, save necessary ones ************ ----> FILE PRINTOUT.CMD 1 ***************** PRINTOUT COMMAND FILE **************** 2 * This file is used by several other command files. It prints out a 3 * listing of the records in a file without the record number. The 4 * output is spaced every 10 records and the printer is positioned back 5 * at the left margin after the printout. 6 * The calling command file determined where the printout starts by 7 * specifying a value for the variable "Number". 8 * This does not show the record numbers. To do so, use the 9 * Review.CMD file. 10 ********************************************************************** 11 28 * Spaces one line every 10 records, then waits. Turns the printer 29 * off so that "WAIT" does not print. 39 * The next 2 lines reposition the printer at the 40 * left margin. ----> FILE REPORTME.CMD 1 * *************** REPORTMENU COMMAND FILE ************ 2 * This command file is a sub-module of the ACCOUNTS.CMD control 3 * module. It provides detailed choices that relate to reports 4 * that the user might choose to see or print from the cost 5 * database. The functions are set up as sub-sub-procedures 6 * under the control of this module. 7 ****************************************************************** 8 ----> FILE REVHDR .CMD 1 * **************** REVHDR COMMAND FILE ******************* 2 * Used by Review.CMD to print headings for different database listings. 3 ************************************************************************* 4 ----> FILE REVIEW .CMD 1 **************** REVIEW.CMD FILE *********************** 2 * this is used to list entries in any .DBF file. The database muse be named in 3 * the command file calling the procedure. Records may be listed conditionally. 4 * with or without the record numbers. 5 * Records are listed in groups of 10 with a line space between each group. 6 * Processing can be continuous, or can stop after every group of 10. 7 * The listing can start on a specified record number. 8 * The files can be re-listed as many times as desired. 9 * Printing is optional. The "CHR(X)" commands are for a Diablo 1650 10 * printer. 11 ************************************************************************** 12 178 * DO Headings 274 * Inserts a space every ten records, then waits. The printer 275 * is turned off so that "WAIT" does not print out on the hardcopy. 286 * The following routine prints 50 entries to a page, 287 * then moves to the next page and prints a heading 288 ----> FILE REVMRGN .CMD 1 * *********************** REVMRGN COMMAND FILE ******************** 2 * Used by Review.CMD to set margins for different database listings. 3 ************************************************************************* 4 ----> FILE SALESTAX.CMD 1 ************************** SALES TAX COMMAND FILE ********************* 2 * This file summarizes the invoice file for a specified period. 3 * It shows the invoices and the type of billing (taxable or 4 * service) along with the totals for the two types and the total 5 * sales tax liability for the period. 6 * It also includes materials and equipment subject to a use tax 7 * that has not been paid. These are entered in the invoices database 8 * when they come in as well as in the Postfile. 9 ************************************************************************* 10 66 * Inserts a space every ten records, then waits. The printer 67 * is turned off so that "WAIT" does not print on the hardcopy. 69 * The following routine prints 50 entries to a page, 70 * then moves to the next page and prints a heading. 78 * Compensates for an offset caused by the 7 lines/inch printing 109 110 * Print totals of all the invoices 119 * Formfeed if not enough room to print the following list = CHR(12) 126 * The following segment is not the final, but the state auditor is in right now 127 * and I've got to get the info out to him, and to the state for this month. 128 * The final version will include all lines in the form, to allow for changes 129 * in the way we do our business. Obviously, this is also the palce to 130 * print the form if ypu want to do that. Since the form is used only once 131 * every three months, we won't automate it entirely. ----> FILE TIMECALC.CMD 1 ************** TIMECALC COMMAND FILE ****************** 2 * Verifies that employee name and number match, then 3 * calculates billing charges for employee time. 4 ************************************************************* 5 51 * Formula optimistically assumes 65 billable hours out 52 * of 75 hours possible in two weeks. Eff. mult.=3.23 ----> FILE USETAX .CMD 1 * ******** USETAX COMMAND FILE ********** 2 * This file accepts inputs for supplier bills when the agency has bought 3 * an item without paying a use tax on it. 4 * The item or items are added to the INVIOCES file (not Billings), 5 * then are used by the SalesTax program so that the Quarterly Sales Tax 6 * report can be prepared by the computer. 7 * 8 * A temporary file called GETBILLS is used for data entry, because the operator 9 * can decide to quit on an incomplete entry, which is marked for deletion. 10 * When the data is APPENDed to the POSTFILE, these entries are eliminated (the 11 * APPEND command does not transfer records marked for deletion). An entry must 12 * include at least the name of a supplier and the amountof the bill. If these 13 * are not BOTH supplied, the entry is flagged for correction or deletion. 14 ******************************************************************************* 15 16 81 COUNT FOR .NOT. * TO Any 93 * Checks names against a list of suppliers to catch spelling and 94 * abbreviation inconsistencies. 103 * The following loop transfers the bills just entered into the INVOICES 104 * file. The amount of the bill is entered in the "Taxable" column. The 105 * job number is entered into the Invoice Number column. Since invoices 106 * have 5 digits, while job numbers are under 1000, we use this to separate 107 * the two types of entries later in the SALESTAX.CMD file..IF < 1000 THEN.. 108 * PRIMARY and SECONDARY work areas are used to step through the GETBILLS 109 * file one entry at a time.  * DISP FILES ON A DATABASE FILES # RCDS LAST UPDATE BILLINGS DBF 00000 09/18/82 CHECKFIL DBF 00000 09/18/82 COSTBASE DBF 00000 09/18/82 DEPOSITS DBF 00000 09/18/82 HOLD81 DBF 00000 09/18/82 INSERTS DBF 00000 09/18/82 INVOICES DBF 00000 09/18/82 PERSONNE DBF 00000 09/18/82 POSTFILE DBF 00000 09/18/82 SUPPLIER DBF 00000 09/18/82 * USE BILLINGS * DISP STRU STRUCTURE FOR FILE: A:BILLINGS.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 INV:NMBR C 006 002 CLIENT C 003 003 JOB:NMBR N 003 004 - C 001 005 INV:DATE C 006 006 TAXABLE N 009 002 007 SALES:TAX N 009 002 008 TAXFREE N 009 002 009 - C 001 010 PO:NMBR C 008 011 DESCRIP C 027 012 MORE L 001 ** TOTAL ** 00084 * USE CHECKFILE * DISP STRU STRUCTURE FOR FILE: A:CHECKFIL.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 CHECK:DATE C 007 002 CHECK:NMBR C 005 003 AMOUNT N 009 002 004 - C 001 005 BILL:NMBR C 007 006 NAME C 020 007 EMP:NMBR N 003 008 - C 001 009 CLIENT C 003 010 JOB:NMBR N 003 011 DESCRIP C 020 012 BALANCE N 009 002 ** TOTAL ** 00089 * USE COSTBASE * DISP STRU STRUCTURE FOR FILE: A:COSTBASE.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 CHECK:DATE C 007 002 CHECK:NMBR C 005 003 CLIENT C 003 004 JOB:NMBR N 003 005 AMOUNT N 009 002 006 - C 001 007 NAME C 020 008 - C 001 009 DESCRIP C 020 010 - C 001 011 BILL:DATE C 007 012 BILL:NMBR C 007 013 HOURS N 006 002 014 EMP:NMBR N 003 ** TOTAL ** 00094 * USE DEPOSITS * DISP STRU STRUCTURE FOR FILE: A:DEPOSITS.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 DEP:DATE C 007 002 PAYER C 020 003 - C 001 004 PAY:NMBR C 007 005 DEPOSIT N 009 002 006 -  C 001 007 INV:NMBR C 006 008 COMMENTS C 021 ** TOTAL ** 00073 * USE HOLD81 * DISP STRU STRUCTURE FOR FILE: A:HOLD81 .DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 CHECK:DATE C 004 002 - C 001 003 MARKER C 001 004 PAYROLL N 009 002 005 FICA N 008 002 006 FICASAL N 009 002 007 FIT N 009 002 008 SDI N 007 002 009 SDISAL N 009 002 010 SIT N 009 002 011 UISAL N 009 002 ** TOTAL ** 00076 * USE INSERTS * DISP STRU STRUCTURE FOR FILE: A:INSERTS .DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 IO:NMBR C 005 002 MAGAZINE C 014 003 - C 001 004 ISSUE C 006 005 - C 001 006 CLIENT C 003 007 JOB:NMBR N 003 008 - C 001 009 AD C 015 010 SPACE C 013 011 GROSS:COST N 009 002 012 NET:COST N 009 002 013 - C 001 014 TIMES C 003 015 IO:DATE C 006 ** TOTAL ** 00091 * USE INVOICES * DISP STRU STRUCTURE FOR FILE: A:INVOICES.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 INV:NMBR C 006 002 CLIENT C 004 003 INV:DATE C 007 004 TAXABLE N 009 002 005 SALES:TAX N 009 002 006 TAXFREE N 009 002 007 - C 001 008 AMOUNT N 009 002 009 AMT:RCD N 009 002 010 - C 001 011 DATE:RCD C 007 ** TOTAL ** 00072 * USE PERSONNE * DISP STRU STRUCTURE FOR FILE: A:PERSONNE.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 EMP:NMBR N 003 002 NAME C 020 003 ADDRESS C 024 004 CITY:STATE C 020 005 ZIP C 005 006 PH:NMBR C 013 007 SS:NMBR C 009 008 M:S:H C 001 009 DEDUCTS N 002 010 PAY:RATE N 007 002 011 FICA N 008 002 012 YTDFICA N 008 002 013 FIT N 009 002 014 YTDFIT  N 009 002 015 SDI N 007 002 016 YTDSDI N 007 002 017 SIT N 009 002 018 YTDSIT N 009 002 019 NET:PAY N 009 002 020 QTDSAL N 009 002 021 YTDSAL N 009 002 022 PAID L 001 023 START:DATE C 006 024 RATIO N 005 003 ** TOTAL ** 00210 * USE POSTFILE * DISP STRU STRUCTURE FOR FILE: A:POSTFILE.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 CHECK:DATE C 007 002 CHECK:NMBR C 005 003 CLIENT C 003 004 JOB:NMBR N 003 005 - C 001 006 NAME C 020 007 - C 001 008 DESCRIP C 020 009 AMOUNT N 009 002 010 - C 001 011 BILL:DATE C 007 012 BILL:NMBR C 007 013 HOURS N 006 002 014 EMP:NMBR N 003 ** TOTAL ** 00094 * USE SUPPLIER * DISP STRU STRUCTURE FOR FILE: A:SUPPLIER.DBF NUMBER OF RECORDS: 00000 DATE OF LAST UPDATE: 09/18/82 PRIMARY USE DATABASE FLD NAME TYPE WIDTH DEC 001 SUPPLIER C 030 002 ADDRESS C 024 003 CITY C 016 004 STATE C 002 005 ZIP C 005 006 PHONE:NMBR C 008 007 AREA:CODE C 003 ** TOTAL ** 00089  003 004 JOB:NMBR N 003 005 - C 001 006 NAME C 020 007 - C 001 008 DESCRIP C 020 009 AMOUNT N 009 00 *************************** DBASE II ACCOUNTING PACKAGE ***************** * FROM ASHTON TATE'S MANUAL * * DEBUGGED FOR VERSION 2.3B * * * * by: CRAIG MOORE * * * * ACCOUNT.DOC FILE * ************************************************************************* THŠ FOLLOWINǠ PROGRAM COMPRIS A ACCOUNTIN SYSTE WRITTEΠ B٠ CUSTOMER USING ALMOST ALL OF THE dBASE II COMMANDS. Thi syste i fairl elementar fro a accountant viewpoint bu includes some programming techniques that might be found useful. Beside illustratin individua commands i show ho t se u menus ho t fin data ho t merg files differen way o settin u th input t th system an numbe o interestin solution t som o th problem involve i keepin cas journal doin payrolls an managin database s tha informatio i availabl an dat integrit i not compromised. Th program ar self-documented wit comment sprinkle liberall throughout. To help the user get started with this accounting pkg. run instructions, data & program structure layouts are included below. ------------------------------------------------------------------- HOW TO SETUP AND RUN THIS ACCOUNTING SYSTEM. A. Which programs go on which disk. Only the B:FL.DBF go on drive B,everything else goes on A including the dBaseII com files. **** WRONG, my error.... CONSTANT.MEM & FL.NDX's also go on B: B. Initialize INDEX files. Billings,Invoices,Inserts,&Supplier must be initialized before running this accounting pkg.... ie USE B:Billings INDEX ON Inv:Nmbr TO B:Billings OR RUN A>DBASE ACTRENDX ACTRENDX.CMD SETS UP THESE INDEX FILES. C. How to RUN IT NOTE THESE QUIRKS 1 USŠ198 UNTI CHANG IT With pgms setup on the right drives 2. ^W OR TO EXIT APPENDS A>DBASE enter today's date 3. Client must have 3 "letters" .DO ACCOUNTS when doing time sheets. everything else is menu driven. 4. Job #'s start at 101 for OR SUPPLIERS & 1 thru 99 A>DBASE ACCOUNTS for inhouse use. 5. After your 1st time to move  thcontent oPOSTFILE into COSTBASE goto rpt menu and RUN the RE-INDEX COSTBASE option,..or else! D. A word about imbedded CHR() commands Printer Calls CHR(27)+CHR(30)+CHR(8) sets 7 lines/inch -------- ESC + RS + BS On a Diablo 1650 CHR(27)+CHR(12)+CHR(89set8 lines/pag -------- ESC + FF + Y form feed CRT SCREEN Calls --------------------------------- CHR(27)+CHR(76)+CHR(27)+CHR(89)+CHR(0) ESC L + ESC Y + NUL Home the erase the "dummy"?  cursor screen CHR(12) .... FORM FEED CHR(7) .... RING THE BELL CHR(27)+CHR(74) ... ERASE TO END OF PAGE ESC J ******* Osborne users will have to change these as necessary use A>FIND B:*.* CHR TO LOCATE ALL THE CHR() CMMDS E. What do you mean that you ONLY have 90k per disk! TRY PUTTING PostFile & some of the commonly used .DBF's on the A: drive with the dBaseII software, and putting the Menu's and their assoc pgms on separate disks to be use in B: drive. yo wil hav t replac A:' wit B:' an vic vers i thi pkg and will have to add some resets for disk changes SYSTEM CONSTANTS: B:CONSTANT.MEM System constants are kept in this file. The ar calle out used an update wher appropriat fro withi numbe o program withi thi accountin system Constant ar kep i singl fil s tha whe an o the chang (ne ta rates ne year etc.) the nee onl b change i on locatio t updat th entir system. NEXTCHECK (C) 3565 Keeps checkbook current in MBALANCE (N) 23921.18 PAYBILLS, PAYROLL, and DEPOSITS .CMD files THISYEAR (N) 81 Used by GETDATE, DATECHECK, MINYEAR (N) 79 and PAYROLL files. NEXT:IO (C) 2885 Next insertion order number  (IOPOST.CMD). NEXT:INV (C) 10623 Next invoice number (INVOICES.CMD). FICACUT (N) 0.0665 This entire grouping is used FICAEND (N) 29700.00 in the PAYROLL file. EASY to MAXFICA (N) 1975.05 update this every year since SDICUT (N) 0.006 values are not sprinkled SDIEND (N) 14900.00 throughout the programs. MAXSDI (N) 89.40 UIEND (N) 6000 COMPLETED (C) PREVDATE (C) 810814 MAXEMPL (N) 14 Highest employee number. Also used in POSTTIME and TIMECALC programs. **************************************************************** PROGRAM CATEGORIES STANDARD REPORT FORMS: MEDIA.FRM keeps track of ads placed in magazines JOBCOSTS.FRM BILLED.FRM REPORT GENERATORS: IOREVIEW.CMD xqts report forms REPORTME.CMD DATA ENTRY ROUTINES: these generally have same type of data entry input USETAX.CMD COSTBILLS.CMD COSTTIME.CMD DATA EDITING ROUTINES: COSTMENU.CMD IOMENU.CMD INVMENU.CMD PAYBILLS.CMD IOPOST.CMD POSTTIME.CMD INVOICES.CMD DATA SEARCH ROUTINES: FINDBILL.CMD Note record positioning scheme in this & in PAYBILLS.CMD JOBCOSTS.CMD REVIEW.CMD "FIND" CMMDS USED IN IOMENU.CMD line 38 FINDBILL.CMD  line 63 INVMENU.CMD line 53 JOBCOSTS.CMD line 87 NAMETEST.CMD line 22 PAYBILLS.CMD line 75 DATA PRINTING/DISPLAYING ROUTINES: INVMENU.CMD data review/print mode of selected/all rec's REPORTME.CMD general select & review of a database COSTMENU.CMD PRINTOUT.CMD --> Also included are ACCOUNT.SUB,ACTRENDX.SUB to list & reindex all files ----------------------------------- TEMPORARY FILES CREATED, THEN DELETED ON THE A: Drive. GetBills.DBF, GetCosts.DBF, GetDep.DBF, GetInserts.DBF GetTime.DBF, Other.DBF, Scratch.DBF, Temp.DBF, Temp2.DBF  No XQT'd No XQT'd XQTS these .CMD files .CMD files .CMD files .CMD files  DBASE II ACCOUNTING PACKAGE DATABASES & RELATED FIELDS !+----------+----------+-----------+-----------+-----------+------------+----------+----------+---------+-------------+ ! ! ! $jobs.ndx! ! ! ! ! ! ! ! ! ! ! !(JOB:NMBR)! ! ! ! ! ! ! ! ! ! ! POSTFILE ! COSTBASE ! CHECKFILE ! INSERTS ! BILLINGS ! INVOICES ! DEPOSITS ! PERSONNE ! HOLD81 ! SUPPLIER ! ! ! ! $supp.ndx! !inserts.ndx!billing.ndx!invoices.ndx! ! !&Database!supplier.ndx ! ! ! ! (NAME) ! ! (IO:NMBR) ! (INV:NMBR)! (INV:NMBR) ! ! ! ! (SUPPLIER) ! ! ! ! ! ! ! ! ! ! !  ! ! !+----------+----------+-----------+-----------+-----------+------------+----------+----------+---------+-------------+ (RELATIONAL FIELDS) CLIENT CLIENT CLIENT CLIENT CLIENT CLIENT JOB:NMBR JOB:NMBR JOB:NMBR JOB:NMBR JOB:NMBR DESCRIP DESCRIP DESCRIP DESCRIP INV:NMBR INV:NMBR INV:NMBR  AMOUNT AMOUNT AMOUNT AMOUNT NAME NAME NAME NAME EMP:NMBR EMP:NMBR EMP:NMBR EMP:NMBR CHECK:DATE CHECK:DATE CHECK:DATE CHECK:NMBR CHECK:NMBR CHECK:NMBR BILL:NMBR BILL:NMBR BILL:NMBR BILL:DATE BILL:DATE HOURS HOURS INV:DATE INV:DATE TAXABLE TAXABLE SALES:TAX SALES:TAX TAXFREE TAXFREE FICA FICA FIT FIT SDI SDI SIT SIT ----------------------------------------------------------------------------------------------------------------------- (NON RELATIONAL FIELDS) BALANCE IO:NMBR PO:NMBR AMT:RCD DEP:DATE ADDRESS MARKER SUPPLIER IO:DATE MORE DATE:RCD PAYER CITY:STATE PAYROLL ADDRESS MAGAZINE PAY:NMBR ZIP FICASAL CITY ISSUE DEPOSIT PH:NMBR SDISAL STATE  AD COMMENTS SS:NMBR UISAL ZIP SPACE M:S:H PHONE:NMBR GROSS:COST DEDUCTS AREA:CODE NET:COST PAY:RATE TIMES YTDFICA YTDSDI ! POSTFILE ! COSTBASE ! CHECKFILE ! INSERTS ! BILLINGS ! INVOICES ! DEPOSITS ! PERSONNE ! HOLD81 ! SUPPLIER ! L CITY ISSUE DEPOSIT PH:NMBR SDISAL STATE ----> FILE ACCOUNTS.CMD ----> FILE ACTRENDX.CMD 7 USE B:COSTBASE 12 USE B:BILLINGS 17 USE B:INVOICES 22 USE B:INSERTS 27 USE B:SUPPLIER ----> FILE BILLED .FRM ----> FILE CHECKSTU.CMD 13 USE B:CheckFil 17 USE Scratch 22 USE B:CheckFil 37 USE Scratch 59 USE B:CheckFil ----> FILE COSTBILL.CMD 4 * A temporary file called GetBills (also used in USETAX.CMD) is used for data 5 * entry because the operator can decide to quit on an incomplete entry, which 15 USE B:PostFile 18 USE GetBills 82 USE 97 USE B:PostFile 101 USE ----> FILE COSTMENU.CMD 64 USE B:PostFile 97 USE B:PostFile 136 USE B:PostFile ----> FILE COSTTIME.CMD 5 * GetTime is used because the operator can decide to quit on an incomplete 23 USE B:PostFile 26 USE GetTime 111 USE 130 USE B:PostFile ----> FILE COSTUPDA.CMD 33 USE B:PostFile 50 USE B:CostBase 54  USE B:CostBase INDEX B:$Supp 57 USE B:PostFile ----> FILE DATETEST.CMD ----> FILE DEPMENU .CMD ----> FILE DEPOSITS.CMD 31 USE B:Deposits 34 USE GetDep 110 USE 115 * The next portion of this program uses the Primary and Secondary work 121 USE B:Deposits ----> FILE DEPPRINT.CMD ----> FILE DEPTRANS.CMD 21 USE B:Invoices INDEX B:Invoices ----> FILE FINDBILL.CMD 10 USE B:CostBase INDEX B:$Supp ----> FILE GETDATE .CMD ----> FILE INVMENU .CMD 36 USE B:&Database 52 USE B:&Database INDEX B:&Database 87 USE B:&Database ----> FILE INVOICES.CMD 16 USE B:Billings 19 USE GetCosts 113 * Costs entered are totaled by invoice number to Scratch because several 118 USE B:Invoices 121 USE GetCosts 145 USE B:Billings INDEX B:Billings 148 USE Scratch 155 USE Temp 168 USE B:Invoices INDEX B:Invoices 172 USE ----> FILE IOMENU .CMD 22 USE B:Inserts 37  USE B:Inserts INDEX B:Inserts ----> FILE IOPOST .CMD 11 USE B:Inserts 13 USE GetInser 111 USE 132 USE B:Inserts Index B:Inserts ----> FILE IOREVIEW.CMD 9 USE B:Inserts ----> FILE JOBCOSTS.CMD 76 USE B:CostBase INDEX B:$Jobs 121 USE B:CostBase 165 USE B:Billings ----> FILE JOBCOSTS.FRM ----> FILE JOBSINDX.CMD 12 USE B:CostBase ----> FILE MEDIA .FRM ----> FILE NAMETEST.CMD 21 USE B:Supplier INDEX B:Supplier ----> FILE PAYBILLS.CMD 31 USE B:CostBase INDEX B:$Supp 125 USE B:CheckFil 231 USE B:CheckFil ----> FILE PAYEMPS .CMD 30 USE B:Personne 75 USE B:Personne ----> FILE PAYFIND .CMD ----> FILE PAYMENU .CMD 35 USE B:PostFile ----> FILE PAYROLL .CMD 99 USE &Header 127 USE B:Personne 237 USE B:CheckFil 261 USE &Header 262 295 USE &Header 345 USE B:CheckFil 352 USE &Header 379 USE B:CostBase INDEX B:$Supp 391 USE ----> FILE PRINTOUT.CMD ----> FILE REPORTME.CMD 24 USE B:PostFile 50 USE B:&Database ----> FILE REVHDR .CMD ----> FILE REVIEW .CMD 86 USE Temp 98 USE B:&Database 330 USE ----> FILE REVMRGN .CMD ----> FILE SALESTAX.CMD 11 USE B:Invoices 17 39 USE Temp 41 USE Temp2 98 USE Other 156 USE ----> FILE TIMECALC.CMD 45 USE B:Personne ----> FILE USETAX .CMD 8 * A temporary file called GETBILLS is used for data entry, because the operator 20 USE B:PostFile 23 USE GetBills 100 USE B:PostFile 108 * PRIMARY and SECONDARY work areas are used to step through the GETBILLS 110 USE GetBills 112 USE B:Invoices 127 USE  USE B:PostFile ----> FILE PAYROLL .CMD 99 USE &Header 127 USE B:Personne 237 USE B:CheckFil 261 USE &Header 262 295 USE &Header 345 USE B:CheckFil 352 USE &Header 379 USE B:CostBase INDEX B:$Supp 391 USE -- ************ REINDEXES .DBF FILES ON B: DRIVE *************** * DBASEII ACCOUNTING PKG * ****************************************************************** ERASE @ 10,10 SAY 'B:COSTBASE.DBF... Indexing on NAME to B:$SUPP.NDX' USE B:COSTBASE INDEX ON NAME TO B:$SUPP @ 10,10 SAY 'B:COSTBASE.DBF... Indexing on JOB:MNBR to B:$JOBS.NDX' GO BOTTOM STORE STR(#,5) TO Temp GO TOP IF Job:Nmbr = 0 REPLACE Name WITH Temp ELSE GO TOP INSERT BEFORE BLANK REPLACE Job:Nmbr WITH 0 REPLACE Name WITH Temp ENDIF INDEX ON Job:Nmbr TO B:$Jobs RELEASE Temp ERASE @ 10,10 SAY 'B:BILLINGS.DBF... Indexing on INV:NMBR to B:BILLINGS.NDX' USE B:BILLINGS INDEX ON INV:NMBR TO B:BILLINGS ERASE @ 10,10 SAY 'B:INVOICES.DBF... Indexing on INV:NMBR to B:INVOICES.NDX' USE B:INVOICES INDEX ON INV:NMBR TO B:INVOICES ERASE @ 10,10 SAY 'B:INSERTS.DBF... Indexing on IO:NMBR to B:INSERTS' USE B:INSERTS INDEX ON IO:NMBR TO B:INSERTS ERASE @ 10,10 SAY 'B:SUPPLIER.DBF... Indexing on SUPPLIER to B:SUPPLIER.NDX' USE B:SUPPLIER INDEX ON SUPPLIER TO B:SUPPLIER ERASE RETURN  ************ REINDEXES .DBF FILES ON B: DRIVE *************** * DBASEII ACCOUNTING PKG * ****************************************************************** ERASE @ 10,10 SAY 'B:COSTBASE.DBF... Indexing on NAME to B:$SUPP.NDX' USE B:COSTBASE INDEX ON NAME TO B:$SUPP @ 10,10 SAY 'B:COSTBASE.DBF... Indexing on JOB:MNBR to B:$JOBS.NDX' GO BOTTOM STORE STR(#,5) TO Temp GO TOP IF Job:Nmbr = 0 REPLACE Name WITH Temp ELSE GO TOP INSERT BEFORE B N N Y N 8,INV:DATE DATE 8,INV:NMBR INVOICE 17,DESCRIP DESCRIPTION 10,TAXABLE TAXABLE Y 10,SALES:TAX SALES TAX Y 10,TAXFREE TAX-FREE Y EC mGROSS:COSTN mNET:COSTN m-C!mTIMESC"mIO:DATEC%m TINV:NMBRClCLIENTClJOB:NMBRNl-ClINV:DATEClTAXABLEN lSALES:TAXN lTAXFREEN l-ClPO:NMBRCmDESCRIPCmMOREL#m 10001 CL1101 840201 10000.00 600.00 200.00 10011 COMPUTER PURCHASE 10001 CL1103 840201 3000.00 180.00 3000.00 10011 LABOR 10004 CL1102 840201 3000.00 180.00 0.00 10075 NEW PRINTER  RYCHECK:DATEClCHECK:NMBRClAMOUNTN l-ClBILL:NMBRClNAMEClEMP:NMBRNm-CmCLIENTCmJOB:NMBRN mDESCRIPC mBALANCEN m  ************ CHECKSTUB COMMAND FILE *************** * Prints out check numbers, amounts, and balances from the CheckFile when * SALARIES and BILLS are paid. When more than one bill is paid by a * single check, the program totals all the bills against that check if they * are entered in consecutive order (which they are, in the two command files). * Records are marked for deletion, but can be reviewed and retreived. ************************************************************************** ERASE @ 5,10 SAY '*** DO NOT INTERRUPT ***' @ 6,10 SAY ' JUST GETTING ORGANIZED' USE B:CheckFil TOTAL ON Check:Nmbr TO Scratch FOR .NOT. * COUNT FOR .NOT. * TO Entries USE Scratch UPDATE FROM B:CheckFil ON Check:Nmbr REPLACE Balance COUNT FOR .NOT. * TO Checks IF Entries > Checks USE B:CheckFil ERASE @ 4,0 SAY ' ' SET PRINT ON ? ' THESE INDIVIDUAL BILLS WERE PAID:' ? ? ' Date Check Name Amount #' ? LIST '  '+Check:Date, Check:Nmbr, Name, Amount, Bill:Nmbr OFF; FOR .NOT. * ? ? ? ENDIF USE Scratch STORE 'Y' TO Doing DO WHILE !(Doing) = 'Y' ERASE SET PRINT ON ? ' MAKE THE FOLLOWING ENTRIES IN THE CHECK BOOK:' ? ? ' Date Check Name Amount Balance' ? LIST ' '+Check:Date, Check:nmbr, Name, Amount, Balance OFF ? ? ? SET PRINT OFF ? 'Do you want to print it again (Y or N)?' WAIT TO Doing ENDDO SET PRINT ON ? CHR(12) SET PRINT OFF USE B:CheckFil DELETE All DELETE FILE Scratch RELEASE Doing, Checks, Entries RETURN NOT. * TO Checks IF Entries > Checks USE B:CheckFil ERASE @ 4,0 SAY ' ' SET PRINT ON ? ' THESE INDIVIDUAL BILLS WERE PAID:' ? ? ' Date Check Name Amount #' ? LIST ' NEXTCHECKmdMBALANCE dTHISYEAR dMINYEAR dNEXT:IOdNEXT:INV#dFICACUT *dFICAEND 1dMAXFICA 8dSDICUT ?dSDIEND FdMAXSDI MdUIEND TdCOMPLETED[dPREVDATE^dMAXEMPL fd D%AAy 10110001>fPD)pCu=`DA@C` 831230A 1001N N Y N 8,INV:DATE DATE 8,INV:NMBR INVOICE 17,DESCRIP DESCRIPTION 10,TAXABLE TAXABLE Y 10,SALES:TAX SALES TAX Y 10,TAXFREE TAX-FREE Y EC mGROSS:COSTN mNET:COSTN m-C!mTIMESC"mIO:DATEC%m  ^CHECK:DATEClCHECK:NMBRClCLIENTClJOB:NMBRNlAMOUNTN l-ClNAMECl-CmDESCRIPCm-CmBILL:DATECmBILL:NMBRCmHOURSN%mEMP:NMBRN+m 0 12 OFC 1 25.00 PAPER INC USE TAX ENTRY 840101 3590 0.00 0 OFC 1 25.00 PAPER INC USE TAX ENTRY 840601 4355 0.00 0 OFC 1 25.00 PAPER INC USE TAX ENTRY 841001 7750 0.00 0 OFC 1 35.00 RIBBONS INC USE TAX ENTRY 840201 1950 0.00 0 OFC 2 40.00 DSKS INC USE TAX ENTRY 840101 350 0.00 0 OFC 2 40.00 DSKS INC USE TAX ENTRY 840501 570 0.00 0 OFC 2 40.00 DSKS INC USE TAX ENTRY 841101 1005 0.00 0 CL1101 5000.00 COMPUTERS INC NEW COMPUTER 840301 1234 0.00 0 CL1102 2250.00 PRINTERS INC NEW PRINTER 840901 7770 0.00 0 840131 ---- CL1103 0.00 GARFIELD 840131 120.00 1 CL1103 7000.00 SOFTWARE INC PROGRAM PURCHASE 840401 233 0.00 0 ************ COSTBILLS COMMAND FILE ************** * This file accepts inputs for supplier bills. * * A temporary file called GetBills (also used in USETAX.CMD) is used for data * entry because the operator can decide to quit on an incomplete entry, which * is marked for deletion. * When the data is APPENDed to the PostFile, these entries are eliminated (the * APPEND command does not transfer records marked for deletion). An entry must * include (the name of a supplier the amount of the bill). If these * are not both supplied, the entry is flagged for correction or deletion. *************************************************************************** ERASE @ 5,20 SAY 'SUPPLIER BILLS' USE B:PostFile COPY STRUCTURE TO GetBills USE GetBills STORE 'Y' TO Bills DO WHILE !(BILLS) <> 'F' APPEND BLANK STORE STR(#,5) TO Number STORE T TO Entering DO WHILE Entering ERASE @ 1,0 SAY ' RECORD NUMBER: ' - Number @ 3,0 SAY ' CLIENT' GET Client @ 4,0 SAY ' JOB NUMBER' GET Job:Nmbr @ 5,0 SAY ' AMOUNT' GET Amount @ 6,0 SAY ' BILL NUMBER' GET Bill:Nmbr @ 7,0 SAY ' BILL DATE' GET Bill:Date @ 8,0 SAY ' SUPPLIER NAME' GET Name @ 9,0 SAY ' DESCRIPTION' GET Descrip READ REPLACE Client WITH !(Client), Name WITH !(Name), Descrip; WITH !(Descrip), Bill:Nmbr WITH !(Bill:Nmbr) @ 3,17 SAY Client @ 8,17 SAY Name @ 9,17 SAY Descrip STORE ' ' TO Getting IF $(Client,1,1) = ' ' .OR. $(Client,2,1) = ' ' .OR. $(Client,3,1) = ' '; .OR. Job:Nmbr <=0 @ 12,0 ? ' CLIENT or JOB NUMBER wrong.' ? ' F if FINISHED,' ACCEPT ' to change.' TO Getting ELSE IF Amount = 0 .OR. Name <= ' ' ? ? ? ' AMOUNT or NAME missing.' ? ? ' F if FINISHED,' ACCEPT ' to change.' TO Getting ELSE @ 12,5 SAY ' C to CHANGE,' @ 13,5 SAY ' F if FINISHED,' ACCEPT ' to continue.' TO Bills IF !(BILLS) = 'C' STORE T TO Entering ELSE STORE F TO Entering ENDIF ENDIF amount or name ENDIF client or job number IF !(Getting) = 'F' DELETE RECORD &Number STORE F TO Entering STORE 'F' TO Bills ENDIF ENDDO Entering ENDDO Bills COUNT FOR .NOT. * TO Any IF Any = 0 ? 'No entries to add to the Cost Base.' ? ' to the menu.' USE WAIT ELSE RESTORE FROM B:Constant STORE 'Bill:Date' TO Date DO DateTest * Checks names against a list of suppliers to catch spelling and * abbreviation inconsistencies. DO NameTest ERASE @ 3,25 SAY ' *** DO NOT INTERRUPT ***' @ 5,25 SAY ' UPDATING THE POSTING FILE' USE B:PostFile APPEND FROM GetBills ENDIF USE DELETE FILE GetBills RELEASE All RETURN  ACCEPT ' to continue.' TO Bills IF !(BILLS) = 'C' STORE T TO Entering ELSE STORE F TO Entering ENDIF ENDIF amount or name ENDIF client or job number IF !(Getting) = 'F' DELETE RECORD &Number STORE F TO Entering STORE 'F' TO Bills ENDIF ENDDO Entering ENDDO Bills COUNT FOR .NOT. * TO Any IF Any = 0 ? 'No entries to add to the Cost Base.' ? ' to the menu.' USE WAIT ELSE RESTORE FROM B:Constant STORE 'Bill:Date' TO Date DO DateTest * Checks names against a list of suppliers to catch spelling and * abbreviation inconsistencies. DO NameTest ERASE @ 3,25 SAY ' *** DO NOT INTERRUPT ***' @ 5,25 SAY ' UPDATING THE POSTING FILE' USE B:PostFile APPEND F* ********** COSTMENU.CMD COMMAND FILE *************** * This is one level down from the ACCOUNTS.CMD control module. * Selections are refinements that relate to costs for client-related * jobs or agency overhead. * The main database is called COSTBASE.DBF and is kept on disk B. * Costs are not entered directly into the COSTBASE, however, because this * leads to data contamination and all sorts of problems fixing the errors. * Instead, supplier bills and agency time sheets are posted into an interim * file called POSTFILE.DBF. In here, they can be reviewed and edited as * necessary. * When all the cost entries are confirmed as being correct, they are * transferred to the COSTBASE by using the "update proceedure", * (selection 6 below). ****************************************************************************** STORE T TO Posting DO WHILE Posting ERASE @ 2,20 SAY ' 1> UNTAXED ITEMS USED BY AGENCY' @ 4,20 SAY ' 2> ENTER SUPPLIER BILLS' @ 6,20 SAY ' 3> ENTER EMPLOYEE TIME SHEETS' @ 8,20 SAY ' 4> EDIT THE POSTFILE' @ 10,20 SAY ' 5> REVIEW/PRINT THE POSTFILE' @ 12,20 SAY ' 6> UPDATE THE COSTBASE' @ 14,20 SAY ' 7> WIPE OUT DELETED RECORDS IN POSTFILE' @ 16,20 SAY ' ' WAIT TO Action ERASE IF Action = '1' ERASE @ 4,10 SAY 'This program accepts bills for items that the agency bought' ? ' without paying sales tax, but will use internally, rather' ? ' than for a job that will be billed to a client. This would' ? ' include equipment bought out of state and locally bought' ? ' materials NOT used in client jobs and NOT taxed.' ? " Use job #'S 1 - 99 for these bills." ? ' DO NOT ENTER ANY OTHER BILLS!' ? ? 'Do you want to continue (Y or N)?' WAIT TO GoAhead IF !(GoAhead) = 'Y' DO UseTax  ELSE RELEASE ALL ENDIF ELSE IF Action = '2' ERASE @ 4,10 SAY ' CHECK ALL BILLS BEFORE ENTERING THEM.' ? ' If any of the bills are for items used by the agency' ? ' but sales tax was not paid, select OPTION 1 from the' ? ' entry menu. ' ? " Use job #'s greater than 100 for these bills." ? ' to continue.' ? WAIT DO CostBills ELSE IF Action = '3' DO CostTime ELSE IF Action = '4' STORE "Y" TO Changing DO WHILE !(Changing)='Y' USE B:PostFile IF EOF ? 'There are no entries in the POSTING file.' ? ' to continue.' WAIT STORE "N" TO Changing ELSE GO BOTTOM ERASE @ 3,10 SAY 'EDITING BILLS ENTERED.' @ 5,10 SAY 'There are '+STR(#,5)+' file entries.' @ 6,10 SAY 'Which entry do you want to EDIT?' ACCEPT TO Number IF VAL(Number) <= 0 .OR. VAL(Number) > # ? ? ? 'Out of range: do you want to continue (Y or N)?' WAIT TO Changing ELSE Edit &Number REPLACE Name WITH !(Name), Descrip WITH !(Descrip),; Client WITH !(Client), Bill:Nmbr WITH !(Bill:Nmbr) ? ? 'Do you want to edit any other entries (Y or N)?' WAIT TO Changing ENDIF ENDIF ENDDO Changing RELEASE All ELSE  IF Action = '5' STORE 'Y' TO Reviewing DO WHILE !(Reviewing) = 'Y' USE B:PostFile COUNT FOR .NOT. * TO Any IF Any = 0 ? 'No unposted entries in the POSTING file.' ? ' to continue.' WAIT STORE "N" TO Reviewing ELSE ERASE ? 'THERE ARE '+STR(Any,5)+' unposted entries.' ? 'Do you want to print them, too (Y or N)?' WAIT TO Output IF !(Output) = 'Y' SET PRINT ON ENDIF ? ' JOB NAME DESCRIP'; +'TION AMOUNT DATE NUMBER' ? STORE 'OFF' TO Condition  STORE '0' TO Number DO PRINTOUT ? "That's all the unposted entries." ? 'Want to see them again (Y or N)?' ? '(To see deleted records, choose "Edit".)' WAIT TO Reviewing ENDIF ENDDO Reviewing RELEASE ALL ELSE IF Action = '6' DO CostUpda ELSE IF Action = '7' ? 'This destroys all DELETED records in the POSTFILE.' ? 'Do you want to do this (Y or N)?' WAIT TO Wipeout IF !(Wipeout) = 'Y' USE B:PostFile PACK ENDIF RELEASE ALL ELSE RELEASE ALL RETURN  ENDIF 7 ENDIF 6 ENDIF 5 ENDIF 4 ENDIF 3 ENDIF 2 ENDIF 1 STORE T TO Posting ENDDO Posting .)' WAIT TO Reviewing ENDIF ENDDO Reviewing RELEASE ALL ELSE IF Action = '6' DO CostUpda ELSE IF Action = '7' ? 'This destroys all DELETED records in the POSTFILE.' ? 'Do you want to do this (Y or N)?' WAIT TO Wipeout IF !(Wipeout) = 'Y' USE B:PostFile PACK ENDIF RELEASE ALL ELSE RELEASE ALL RETURN  ************** COSTTIME COMMAND FILE ****************** * Accepts time sheet entries for employees, by using a temporary * file called GetTime.DBF for data entry (fashioned along the same line as * GetBills). * GetTime is used because the operator can decide to quit on an incomplete * entry. In this case, the entry is marked for deletion, and when the data is * APPENDed to the PostFile, these entries are eliminated (the APPEND command * does not transfer records marked for deletion). * After all entries are made, they are checked for the * correct range of employee numbers and to see that hours have been * entered. Using GetTime, we can check the entries without * having to go through the entire PostFile. * After verifying that the dates are in the right format and * checking the names against our SUPPLIERS file, the billing amounts * are computed. * The records are then transferred to the CostFile (POSTFILE) and the * temporary file GetTime is then deleted. ************************************************************************* @ 0,25 SAY ' TIME SHEETS ' RESTORE FROM B:Constant USE B:PostFile COPY STRUCTURE TO GetTime USE GetTime STORE 'Y' TO Time DO WHILE !(Time) <> 'F' APPEND BLANK STORE STR(#,5) TO Number STORE T TO Entering DO WHILE Entering ERASE STORE F TO Entering @ 1,0 SAY ' RECORD NUMBER: ' - Number @ 3,0 SAY ' DATE WORKED' GET Bill:Date @ 4,0 SAY ' CLIENT' GET Client @ 5,0 SAY ' JOB NUMBER' GET Job:Nmbr @ 6,0 SAY ' HOURS WORKED' GET Hours @ 7,0 SAY ' EMPLOYEE NUMBER' GET Emp:Nmbr @ 8,0 SAY ' EMPLOYEE NAME' GET Name READ REPLACE Check:Nmbr WITH '----', Check:Date WITH Bill:Date,; Client WITH !(Client), Name WITH !(Name) @ 4,17 SAY Client @ 8,17 SAY Name * The following sequence of IF statements, flags all entry errors, then * gives the operator the choice of fixing them or ending the proceedure. ? IF $(Client,1,1) =' '.OR. $(Client,2,1) =' ' .OR. $(Client,3,1) =' ' ? ' CLIENT must have three letters.' STORE T TO Entering ENDIF IF Job:Nmbr < 100 ? ' JOB # is not for a client.' ? ' Is this right (Y or N)?' WAIT TO Ask If !(Ask) <> 'Y' STORE T TO Entering ENDIF ENDIF IF .NOT. (Hours > 0) ? ' HOURS must be entered. ' STORE T TO Entering ENDIF IF .NOT.(Emp:Nmbr>0 .AND. Emp:Nmbr<=MaxEmpl) ? ' EMPLOYEE # out of range. ' STORE T TO Entering ENDIF IF $(Name,1,1) = ' ' ? ' NAME must not start with a blank.' STORE T TO Entering ENDIF IF Entering ? ? ? ' F if FINISHED,' ACCEPT ' to change' TO Time * If the operator decides to quit on an incomplete entry, it is * marked for deletion so that it is not transferred to the PostFile. IF !(Time) = 'F' DELETE RECORD &Number STORE F TO Entering ENDIF ELSE ? ? ' C to change,' ? ' F if FINISHED,' ACCEPT ' to continue' TO Time IF !(Time) = 'C' STORE T TO Entering ENDIF ENDIF ENDDO Entering ENDDO Time COUNT FOR .NOT. * TO Any IF Any = 0 ERASE @ 3,0 SAY ' No entries to add to the CostFile. ' ? ' to the menu. ' USE WAIT ELSE * The test for the date needs the name of the date field to be tested. STORE 'Bill:Date' TO Date DO DateTest * Checks names against a list of suppliers to catch spelling and * abbreviation inconsistencies. DO NameTest * Verifies match between employee name and number, then computes the amount * to be billed for the employee's time based on his salary. DO TimeCalc ERASE @ 3,25 SAY " *** DO NOT INTERRUPT ***" @ 5,25 SAY " UPDATING THE POSTING FILE" USE B:PostFile APPEND FROM GetTime ENDIF DELETE FILE GetTime RELEASE ALL RETURN  C to change,' ? ' F if FINISHED,' ACCEPT ' to continue' TO Time IF !(Time) = 'C' STORE T TO Entering ENDIF ENDIF ENDDO Entering ENDDO Time COUNT FOR .NOT. * TO Any IF Any = 0 ERASE @ 3,0 SAY ' No entries to add to the CostFile. ' ? ' to the menu. ' USE WAIT ELSE * The test for the date needs the name of the date field to be tested. STORE 'Bill:Date' TO Date DO DateTest * Checks names against a list of suppliers to catch spelling and * abbreviation inconsistencies. DO NameTest * Verifies match between employee name and number, then computes the amount * to be billed for the employee's time based on his salary. DO TimeCalc ERASE @ 3,25 SAY " *** DO NOT INTERRUPT ***" @ 5,25 SAY " UPDATING THE POSTING FILE" USE B:PostFile APPEND FROM GetTime E ****************** COSTUPDATE COMMAND FILE ******************** * Records from the COSTFILE (POSTFILE) are added to the COSTBASE. * This step is so critical to data integrity that we: use a password * to prevent accidential access; verify dates; check the names of suppliers; * and compute time charges if necessary. Notice that these are done by * simply calling the utility command files. * The PostFile has all its records marked for deletion after they * have been posted (can still be recovered). ************************************************************************ SET TALK OFF @ 4,12 SAY '************************************************************' @ 6,12 SAY 'MAKE CERTAIN EVERYTHING IN THE POSTFILE IS CORRECT' @ 8,12 SAY ' BEFORE ENTERING THE CODE TO CONTINUE' @ 10,12 SAY '************************************************************' SET CONSOLE OFF ACCEPT TO Lock SET CONSOLE ON IF !(Lock) <> 'H' @ 12,12 SAY ' UNAUTHORIZED ACCESS ATTEMPTED.' @ 14,12 SAY 'YOU HAVE 6 SECONDS BEFORE THE EXPLOSION. CODE = H' STORE 1 TO X DO WHILE X < 150 STORE X + 1 TO X ENDDO RELEASE Lock RETURN ELSE ERASE @ 5,20 SAY 'Checking bills in the POSTING file:' USE B:PostFile COUNT FOR .NOT. * TO None IF None = 0 @ 6,20 SAY 'No new entries in the POSTING file.' @ 7,20 SAY ' to continue.' WAIT ELSE GO TOP RESTORE FROM B:Constant STORE 'Bill:Date' TO Date DO DateTest DO NameTest DO TimeCalc ERASE @ 5,20 SAY ' ***** DO NOT INTERRUPT *******' @ 6,20 SAY ' Posting COSTS to the Costbase.' * Save the number of the last record in Costbase USE B:CostBase GO BOTTOM STORE # TO LastReco USE B:CostBase INDEX B:$Supp APPEND FROM B:Postfile INDEX ON NAME TO B:$SUPP USE B:PostFile DELETE ALL ENDIF ENDIF RELEASE ALL RETURN  ********** DATETEST COMMAND FILE *********** * This file verifies the Bill:Date and Check:Date to see that they are * in the right format. If incorrect, the operator may edit them. ******************************************************************** ERASE GO TOP * The variable DATE brings in the NAME of the date field to be checked * from the command files where this is used. DO WHILE .NOT. EOF @ 6,30 SAY 'VERIFYING '+Date+' ' IF * SKIP ELSE IF &Date <> ' ' STORE STR(#,5) TO Found STORE T TO NoDate DO WHILE NoDate @ 8,30 SAY ' RECORD '+Found @ 9,30 SAY ' '+$(&Date,1,2)+'/'+$(&Date,3,2)+'/'+$(&Date,5,2) ? CHR(7) * The macro symbol is use to get the contents of the date field * being checked without creating a new variable. IF VAL($(&Date,1,2)) > ThisYear .OR. VAL($(&Date,1,2)) < MinYear; .OR. VAL($(&Date,3,2)) < 1 .OR. VAL($(&Date,3,2)) > 12; .OR. VAL($(&Date,5,2)) < 1 .OR. VAL($(&Date,5,2)) > 31 ? ? ? ' DATE ERROR: Must be YYMMDD ' ACCEPT 'Enter new Date' TO Temp REPLACE &Date WITH Temp ERASE ELSE STORE F TO NoDate SKIP ENDIF ENDDO NoDate RELEASE Temp, NoDate ELSE SKIP ENDIF date is not blank * Delay to allow date being checked to be read (quickly) STORE 0 TO X DO WHILE X < 5 STORE (X + 1) TO X ENDDO ENDIF deleted or posted ENDDO RELEASE All RETURN  symbol is use to get the contents of the date field * being checked without creating a new variable. IF VAL($(&Date,1,2)) > ThisYear .OR. VAL($(&Date,1,2)) < MinYear; .OR. VAL($(&Date,3,2)) < 1 .OR. VAL($(&Date* ************ DEPMENU.CMD COMMAND FILE ********** * Select deposits or perform housekeeping on the checkbook. ********************************************************* STORE T TO Incoming DO WHILE Incoming ERASE @ 5,20 SAY ' 1> ENTER MONEY COMING IN ' @ 7,20 SAY ' 2> CHANGE OUR CHECK NUMBER ' @ 9,20 SAY ' 3> CHANGE CHECKBOOK BALANCE ' ? ? ? ' ' WAIT TO Action IF Action = '1' DO Deposits ELSE IF Action = '2' RESTORE FROM B:Constant ERASE @ 5,0 SAY 'This is the next check number' GET NextCheck @ 6,0 SAY 'To leave it unchanged, use the .' @ 7,0 SAY 'To change it, just type in the new number.' READ SAVE TO B:Constant RELEASE All ELSE IF Action = '3' RESTORE FROM B:Constant STORE 'Y' TO Change DO WHILE !(Change) = 'Y' ERASE @ 5,0 SAY ' The current balance is:' GET MBalance ? 'To leave it unchanged, use the .' ? 'To change it, just type in the new value.' READ ? ? ? ' Want to change your mind (Y or N)?' WAIT TO Change ENDDO RELEASE Change SAVE TO B:Constant RELEASE All ELSE RELEASE All RETURN ENDIF 3 ENDIF 2 ENDIF 1 ERASE STORE T TO Incoming ENDDO Incoming tion = '2' RESTORE FROM B:Constant ERASE @ 5,0 SAY 'This is the next check number' GET NextCheck @ 6,0 SAY 'To leave it unchanged, use the .' @ 7,0 SAY 'To change it, just type in the new number.' READ SAVE TO B:Constant RELEASE All ELSE IF Action = '3' RESTORE FROM B:Constant STORE 'Y' TO Change DO WHILE !(Change) = 'Y' ERASE @ 5,0 SAY ' The current balance is:' GET MBal* ********** DEPOSITS COMMAND FILE ************* * This file records any money coming in , in a file called Deposits. If the * money is in payment of an invoice, the amount and date of payment are * entered against that invoice in the Invoice file. * The checkbook balance is kept current for each entry. * At the end of the secession, deposits are printed out individually, then * the total of the deposits plus the new checkbook balance are printed. **************************************************************************** RESTORE FROM B:Constant ERASE @ 5,20 SAY ' ENTERING INCOME' @ 7, 5 SAY 'The STARTING BALANCE is '+STR(MBalance,9,2) ? ? ' If this does not match the checkbook,' ? ' to the main menu to change.' ? ? ' C to CONTINUE.' ? WAIT TO Continue IF !(Continue) <> 'C' RELEASE ALL RETURN ENDIF RELEASE Continue DO GetDate SELECT PRIMARY USE B:Deposits COPY STRUCTURE TO GetDep USE GetDep STORE 'Y' TO Depositing DO WHILE !(Depositing) <> 'F' APPEND BLANK STORE STR(#,5) TO Number REPLACE Dep:Date WITH Date ERASE * Next loop is used when there has been an error in the entry * (defined as no client or no rate). The operator is shown the * previous entries and can make any changes required. STORE 'T' TO Incorrect DO WHILE !(Incorrect) <> 'F' @ 3, 0 SAY ' If a check covers more than one agency invoice,' @ 4, 0 SAY ' enter each invoice and amount separately.' ? @ 6,0 SAY ' RECORD NUMBER: '-Number @ 7,0 SAY ' HOW MUCH' GET Deposit @ 8,0 SAY 'OUR INVOICE NO' GET Inv:Nmbr @ 9,0 SAY ' CHECK FROM' GET Payer @ 10,0 SAY 'THEIR CHECK NO' GET Pay:Nmbr @ 11,0 SAY ' Comments' GET Comments ? CHR(7) READ REPLACE Payer WITH !(Payer), Comments WITH !(Comments) @ 9,15 SAY Payer @ 11,15 SAY Comments IF Payer <> ' ' .AND. Deposit > 0 @ 17,5 SAY ' C to CHANGE,' @ 18,5 SAY ' to continue.' ? ? CHR(7) WAIT TO Depositing IF !(Depositing) = 'C' STORE 'T' TO Incorrect ERASE ELSE STORE (MBalance + Deposit) TO MBalance @ 17, 5 SAY ' F if FINISHED,' ? ? ' ' ? CHR(7) WAIT TO Depositing STORE 'F' TO Incorrect ENDIF ELSE @ 15,5 SAY 'CHECK WRITER or AMOUNT missing.' ? ? ' F if FINISHED,' ? ' to correct the record.' ? CHR(7) WAIT TO Depositing ERASE IF !(Depositing)= 'F' DELETE RECORD &Number STORE 'F' TO Incorrect ELSE ERASE STORE 'T' TO Incorrect ENDIF ENDIF ENDDO Incorrect ENDDO Depositing RELEASE Change, Date, NoDate, Depositing, Number, Update, New, Incorrect SAVE TO B:Constant COUNT FOR .NOT. * TO Any ERASE IF Any = 0 ? 'No deposits to add to the file.' ? 'Press any key to continue.' ? CHR(7) USE WAIT ELSE DO DepPrint * The next portion of this program uses the Primary and Secondary work * areas to record payments received against agency invoices in the record * for that invoice in the Invoices file. Both work areas are necessary so * that we can compare each record in the GetDep file against all of the * records in the Invoices file. DO DepTrans USE B:Deposits APPEND FROM GetDep ENDIF there are deposits to add to the file DELETE FILE GetDep RELEASE ALL RETURN  STORE 'F' TO Incorrect ELSE ERASE STORE 'T' TO Incorrect ENDIF ENDIF ENDDO Incorrect ENDDO Depositing RELEASE Change, Date, NoDate, Depositing, Number, Update, New, Incorrect SAVE TO B:Const RIDEP:DATEClPAYERCl-ClPAY:NMBRClDEPOSITN l-ClINV:NMBRClCOMMENTSCm  * **************** DEPPRINT COMMAND FILE **************** * Prints valid deposits in the GetDep file as part of th Deposits file. ************************************************************************ @ 5,10 SAY 'To print the deposits you just entered,' @ 6,10 SAY 'press .' ? CHR(7) WAIT SET PRINT ON ? ' DATE PAID BY AMOUNT INV # COMMENTS:' ? GO TOP STORE 0 TO Count DO WHILE .NOT. EOF DISPLAY OFF Dep:Date, Payer, Deposit, Inv:Nmbr, Comments FOR .NOT. * SKIP STORE Count +1 TO Count IF Count= 10 STORE 0 TO Count WAIT ENDIF ENDDO SUM Deposit TO Temp ? ? ' The total deposit is ' + STR(Temp,9,2) ? ? ' The final balance is ' + STR(MBalance,9,2) ? SET PRINT OFF RELEASE Count,Temp RETURN * ************ DEPTRANS COMMAND FILE ************** * Applies deposits from the GetDep file against the matching invoices in the * Invoices file as payments are received against them. *********************************************************************** GO TOP ERASE DO WHILE .NOT. EOF STORE STR(#,5) TO Number @ 6,20 SAY 'RECORD NUMBER '+Number ? CHR(7) + CHR(27) + CHR(74) * ring bell,erase to end of page(ESC J = CHR(27)+CHR(74)) IF Inv:Nmbr=' ' .OR. * SKIP ELSE @ 7,20 SAY 'INVOICE NUMBER ' +Inv:Nmbr STORE Inv:Nmbr TO Key SELECT SECONDARY USE B:Invoices INDEX B:Invoices FIND &Key STORE T TO Again STORE 'T' TO Decision IF # = 0 DO WHILE Again @ 9,15 SAY 'THIS INVOICE NUMBER IS NOT IN THE INVOICE FILE. ' @ 11,15 SAY ' E to EDIT it. ' @ 12,15 SAY ' C to CONTINUE. ' ?  ? CHR(7) WAIT TO Decision IF !(Decision) = 'E' SELECT PRIMARY EDIT &Number SELECT SECONDARY STORE F TO Again ELSE IF !(Decision) = 'C' STORE F TO Again ELSE STORE T TO Again ENDIF C ENDIF E ENDDO ELSE REPLACE Amt:Rcd WITH (Amt:Rcd + Deposit), Date:Rcd WITH Dep:Date ENDIF 0 SELECT PRIMARY * We do not skip to the next record if the record was edited. This * allows us to run the edited record through the process again. IF !(Decision) <> 'E' SKIP ENDIF ENDIF no invoice number or record deleted ENDDO the transfer  ' @ 12,15 SAY ' C to CONTINUE. ' ? * ****************** FINDBILLS COMMAND FILE ***************** * This procedure finds specific bills that we are looking for, then allows * us to edit them. * The bill can be specified by bill number and/or amount. If you decide * not to pay a bill that was found specifying more than one item, you will be * presented the rest of the entries for the supplier based on name only. ************************************************************************** SELECT PRIMARY US B:CostBas INDE B:$Supp STORE 'N' TO Finished DO WHILE !(Finished) <> 'F' * "Entering" controls a closed loop that allows the operator to change * the entry if he or shee spots an error. STORE "C" TO Entering DO WHILE !(Entering) = 'C' ERASE @ 4,0 ACCEPT ' NAME OF SUPPLIER ' TO MName ACCEPT 'THEIR BILL NUMBER ' TO MBill:Nmbr ACCEPT ' ENTER AMOUNT ' TO Temp STORE !(MName) TO MName STORE !(MBill:Nmbr) TO MBill:Nmbr STORE VAL(Temp) TO MAmount  STORE MAmount*1.00 TO MAmount @ 6,19 SAY MName @ 7,19 SAY MBill:Nmbr @ 8,19 SAY MAmount @ 11, 0 SAY ' C to CHANGE,' ? ' to continue.' * OneByOne is used so that we look at the entire listing for a name once. * If we could have started in the middle of the list and the bill is not * the one we want, we go up to the first listing then go through all the * entries for the name, one by one. Used in the last loop in this file. IF Bill:Nmbr > ' ' .OR Amount <> 0 STORE 0 TO OneByOne ELSE STORE 1 TO OneByOne ENDIF WAIT TO Entering ENDDO Entering STORE T TO Looking @ 11, 0 SAY "I'M LOOKING, I'M LOOKING!!" @ 12, 0 @ 13, 0 * Now look for a match on the first 10 characters of the name. This finds * the first entry for that supplier, then looks for bill number or amount * if we specified them. If not specified, it skips through all entrie!s * for the name. IF LEN(MName) > 10 STORE $(MName,1,10) TO Key ELSE STORE MName TO Key ENDIF FIND &Key @ 11, 0 IF # = 0 ? ? " GEE, I CAN'T FIND THE NAME. Please check the spelling." ? " Or maybe it hasn't been posted to the COSTBASE yet." ? ' to continue.' WAIT ERASE ELSE * Found at least one entry with a matching name. STORE T TO Looking IF MBill:Nmbr = ' ' .AND. MAmount = 0 STORE F TO Looking ELSE * If we have more than the name, we first check for the bill number. IF MBill:Nmbr > ' ' DO WHILE Name=Key .AND. .NOT. EOF .AND. Looking IF Bill:Nmbr <> MBill:Nmbr SKIP ELSE STORE F TO Looking ENDIF ENDDO * If we're on a new name or the end of the file, Looking is TRUE * because we have not found the supplier we were looking for. * Otherwise, we have a matching bill number to confirm. IF Looking ? ' This BILL NUMBER is not in the costbase.' ? ' to continue.' WAIT ENDIF ELSE * If no bill number, look for the amount. DO WHILE Name=Key .AND. .NOT. EOF .AND. Looking IF Amount <> MAmount SKIP ELSE STORE F TO Looking ENDIF ENDDO * If we're on a new name or the end of the file, Looking is TRUE * Otherwise, we have an unpaid bill to confirm. IF Looking ? ' No bill for this amount and this supplier.' ? ' to continue.' WAIT ENDIF ENDIF we have the bill number ENDIF we have "only" the name ENDIF there is an unpaid bill for the supplier STORE 'N' TO Changing DO WHILE !(Changing) <> 'Y' .AND. .NOT. Looking @ 12,0 DISPLAY ? CHR(7) ? ' E to EDIT this record,' ? ' Q to QUIT this supplier,' ACCEPT ' to continue.' TO Changing ? IF !(Changing) = 'Q' STORE T TO Looking ELSE IF !(Changing) = 'E' STORE STR(#,5) TO Found EDIT &Number ERASE ELSE * If the first record is not the one we want, we skip through the * rest of the entries for the name. We first go on from where we * were in the listing (if we had more than one name), then go back * to the first entry and look at those we had skipped. If we had * only the name, OneByOne = 1 and we go through the list only once. SKIP IF EOF .OR. Name <> Key IF OneByOne = 0 FIND &Key STORE 1 TO OneByOne ELSE  @ 11, 0 SAY CHR(27) + CHR(74) ? "We've gone through all the entries for " +MName+'.' ? ' to continue.' STORE T TO Looking WAIT ENDIF ENDIF we've gone through the list ENDIF is it the right record ENDIF ENDDO Changing the record ? ? ' F if FINISHED finding bills,' ? ' to cnotinue.' ? CHR(7) WAIT TO Finished ENDDO Finished gh the * rest of the entries for the name. We first go on from where we * were in the listing (if we had more than one name), then go back * to the first entry and look at those we had skipped. If we had * only the name, OneByOne = 1 and we go through the list only once. SKIP IF EOF .OR. Name <> Key IF OneByOne = 0 FIND &Key STORE 1 TO OneByOne ELSE  *********** GETDATE COMMAND FILE ************** * Confirms that the date is entered as YYMMDD by checking to see that * the entries for each item are in the correct range. The year is * checked against a constant stored in the B:Constant.MEM file. ********************************************************************** STORE 'T' TO NoDate DO WHILE !(NoDate) <> 'F' ERASE STORE 'YYMMDD' TO Date @ 5,10 SAY "Enter TODAY'S date" GET Date ? CHR(7) READ IF VAL($(Date,1,2)) <> ThisYear; .OR. VAL($(Date,3,2)) < 1 .OR. VAL($(Date,3,2)) > 12; .OR. VAL($(Date,5,2)) < 1 .OR. VAL($(Date,5,2)) > 31 @ 10,25 SAY 'DATE ERROR' STORE 0 TO X DO WHILE X < 50 STORE X + 1 TO X ENDDO ELSE ? @ 10,0 SAY ' C to CHANGE the date,' ? ' to continue.' WAIT TO Change IF !(Change) <> 'C' STORE 'F' TO NoDate ENDIF ENDIF ENDDO NoDate RELEASE NoDate, Change, X RETURN " RLCHECK:DATECl-ClMARKERClPAYROLLN lFICANlFICASALN lFITN lSDINlSDISALN mSITN mUISALN m  RLCHECK:DATECl-ClMARKERClPAYROLLN lFICANlFICASALN lFITN lSDINlSDISALN mSITN mUISALN m  R[IO:NMBRClMAGAZINECl-ClISSUECl-ClCLIENTClJOB:NMBRNl-ClADClSPACEC mGROSS:COSTN mNET:COSTN m-C!mTIMESC"mIO:DATEC%m * ************* INVMENU COMMAND FILE ****************** * Functions are selected by the menu. This procedure works with two data * files, BILLINGS and INVOICES. BILLINGS keeps track of the amount * billed to a client by individual job number, while INVOICES is a * summary of the total billed on any given invoice. This latter file can * be used to set up an accounts receivable system, as it has fields for * storing how much has been received in payment against an invoice and * when that amount was received (filled in by the Deposits.CMD file). ************************************************************************** ERASE STORE T TO Invoicing DO WHILE Invoicing @ 5,20 SAY ' 1> BILL CLIENTS BY JOB' @ 7,20 SAY ' 2> EDIT INVOICES and BILLINGS' @ 9,20 SAY ' 3> REVIEW/PRINT INVOICES and BILLINGS' @ 12,20 SAY ' ' WAIT TO Action IF Action = '1' DO Invoices ELSE IF Action = '2' STORE 'Y' TO Changing DO WHILE !(Changing) = 'Y' ERASE ? ' J to edit individual job billings.' ? ' to edit the summary invoices.' WAIT TO Which IF !(Which) = 'J' STORE 'Billings' TO Database ELSE STORE 'Invoices' TO Database ENDIF USE B:&Database STORE Inv:Nmbr TO First GO BOTTOM STORE Inv:Nmbr TO Last ERASE @ 3,10 SAY 'EDITING '+!(Database) @ 3,35 SAY First+'thru '+Last @ 5,10 SAY '^W to SAVE, ^Q to CANCEL changes you make.' @ 6,10 SAY '^R for PREVIOUS, ^C for NEXT record.' @ 8,10 SAY 'Which INVOICE NUMBER do you want to EDIT?' IF !(Which) = 'J' @ 9,10 SAY 'This takes you to the FIRST ENTRY for that number.' @ 10,10 SAY 'Use ^C to look at the rest of them.' ENDIF ACCEPT TO Invoice # USE B:&Database INDEX B:&Database FIND &Invoice IF # = 0 ? ? ? 'That invoice number is not in the file.' ? 'Do you want to continue (Y or N)?' WAIT TO Changing ELSE STORE STR(#,5) TO Number EDIT &Number REPLACE Sales:Tax WITH 0.06*Taxable REPLACE Client WITH !(Client) IF !(Which) = 'J' REPLACE Descrip WITH !(Descrip),PO:Nmbr WITH !(PO:Nmbr) ENDIF ? ? 'Do you want to edit any other invoices (Y or N)?' WAIT TO Changing ENDIF ENDDO Changing RELEASE All ELSE IF Action = '3' ERASE @ 4, 0 SAY ' ' ? ' J to see individual job billings,' ? ' to see the summary invoices.' WAIT TO Which IF !(Which) = 'j' STORE 'Billings' TO Database ELSE STORE 'Invoices' TO Database ENDIF USE B:&Database STORE 'Y' TO Reviewing DO WHILE !(Reviewing)='Y' GO BOTTOM STORE STR(#,5) TO Last ERASE @ 5,10 SAY 'The '+!(Database)+' file has '-Last-' entries.' @ 7,10 SAY ' to see the entire file, or' @ 8,10 SAY 'enter the record number to start on.' ACCEPT TO Number ? 'Do you want to print the file now (Y or N)?' WAIT TO Output IF !(Output) = 'Y' SET PRINT ON ENDIF STORE CHR(0) TO Condition DO Printout ? SET PRINT OFF ? 'Do you want to see it again (Y or N)?' WAIT TO Reviewing ERASE ENDDO Reviewing  RELEASE All ELSE RELEASE All RETURN ENDIF 3 ENDIF 2 ENDIF 1 ERASE STORE T TO Invoicing ENDDO Invoicing  GO BOTTOM STORE STR(#,5) TO Last ERASE @ 5,10 SAY 'The '+!(Database)+' file has '-Last-' entries.' @ 7,10 SAY ' to see the entire file, or' @ 8,10 SAY 'enter the record number to start on.' ACCEPT TO Number ? 'Do you want to print the file now (Y or N)?' WAIT TO Output IF !(Output) = 'Y' SET PRINT ON ENDIF STORE CHR(0) TO Condition DO Printout ? SET PRINT OFF ? 'Do you want to see it again (Y or N)?' WAIT TO Reviewing ERASE ENDDO Reviewing * ************* INVOICES COMMAND FILE ***************** * This file accepts inputs for invoices to clients. Individual projects * and items are stored in the billings data file. Any number of items * may be entered using a single invoice number. Invoice numbers are * automatically generated by the computer and stored in the Constant.MEM * file. * After all the job billings have been entered, they are summarized by * invoice number and the data is stored in the invoices file. * A printout of items billed and invoice totals is provided. ************************************************************************** RESTORE FROM B:Constant DO GetDate USE B:Billings COPY STRUCTURE TO GetCosts USE GetCosts STORE ' ' TO Billing DO WHILE !(Billing) <> 'F' APPEND BLANK STORE STR(#,5) TO Number REPLACE Inv:Date WITH Date, Inv:Nmbr WITH Next:Inv ERASE STORE 'T' TO Entering DO WHILE !(Entering) <> 'F' ERASE @ 3, 0 SAY 'INVOICE NUMBER ' +Next:Inv @ 3,30 SAY ' DATE '+Inv:Date @ 5, 0 SAY ' RECORD NUMBER: '-Number IF !(Billing) = 'S' @ 7, 0 SAY ' CLIENT:'+MClient REPLACE Client WITH MClient ELSE @ 7, 0 SAY ' CLIENT ' GET Client ENDIF @ 8,0 SAY ' JOB NUMBER ' GET Job:Nmbr @ 9,0 SAY 'TAXABLE AMOUNT ' GET Taxable @ 10,0 SAY 'TAXFREE AMOUNT ' GET TaxFree @ 11,0 SAY ' P.O. NUMBER ' GET PO:Nmbr @ 12,0 SAY ' DESCIPTION ' GET Descrip READ STORE !(Client) TO MClient REPLACE Client WITH MClient,Descrip WITH !(Descrip),; PO:Nmbr WITH !(PO:Nmbr) @ 7,16 SAY Client @ 11,16 SAY PO:Nmbr @ 12,16 SAY Descrip IF Taxable > 0 REPLACE Sales:Tax WITH 0.06*Taxable @ 13,0 SAY ' SALES TAX'GET Sales:Tax ENDIF IF Job:Nmbr < 100 @ 16,0 SAY ' JOB not 3 digits.' ENDIF IF MClient <> ' ' .AND. (Taxable > $0 .OR. TaxFree > 0) @ 17,0 SAY ' C to CHANGE this entry.' ? ' to continue.' WAIT TO New IF !(New) = 'C' STORE 'T' TO Entering ELSE @ 16, 0 SAY ' F if FINISHED, ' @ 17, 0 SAY ' S for SAME invoice number,' @ 18, 0 SAY ' for NEXT invoice number.' @ 19, 0 SAY ' ' ACCEPT TO New IF !(New) <> 'S' STORE STR(VAL(Next:Inv)+3,5) TO Next:Inv ENDIF STORE 'F' TO Entering ENDIF STORE New TO Billing ELSE @ 17,0 SAY ' CLIENT or AMOUNT missing.' ? ? ' F if FINISHED,' ? ' to correct the record.' WAIT TO Billing IF !(BILLING) = 'F' DELETE RECORD &Number STORE 'F' TO Entering ELSE STORE 'T' TO Entering ENDIF ENDIF ENDDO Entering ENDDO Billing RELEASE Billing, Entering, MClient, Task, Number, Date, New SAVE TO B:Constant PACK GO TOP ERASE IF EOF ? 'No invoices to add to the file.' ? 'Press any key to continue.' WAIT ELSE @ 5,20 SAY '**** DO NOT INTERRUPT ****' @ 7,20 SAY 'UPDATING BILLINGS AND INVOICES' * Costs entered are totaled by invoice number to Scratch because several * job costs can be entered against each invoice number. Amounts are adjusted * for one client who always pays promptly and takes a 2% discount. Each * invoice is totalled. Temp has only summary data needed for a printout. USE B:Invoices COPY STRUCTURE TO Scratch USE GetCosts ERASE @ 5,10 SAY 'When ready to print the billings you just added,' @ 6,10 SAY 'press ' TOTAL ON Inv:Nmbr TO Scratch FIELDS Taxable, Sales:Tax, TaxFree WAIT TO Number SET PRINT ON ? 'ENTRIES BY JOB NUMBER:' ? ? 'INV # JOB DATE TAXABLE TAX TAXFREE P.O.# DESCRIPTION' ? * "Output" is needed in the Printout Command file STORE 'Y' TO Output STORE 'OFF' TO Condition DO Printout * One of our clients always pays promptly and takes a 2% discount. * We do this after the original entries were printed out: REPLACE Taxable WITH 0.980*Taxable, Taxfree WITH 0.980*Taxfree, Sales:Tax; WITH 0.980*Sales:Tax FOR Client = 'SPI' ? ? 'Updating the BILLINGS database now.' USE B:Billings INDEX B:Billings APPEND FROM GetCosts USE Scratch REPLACE All Amount WITH (Taxable + Sales:Tax + TaxFree) COPY TO Temp FIELDS Inv:Date, Inv:Nmbr, Taxable, Sales:Tax,; TaxFree, Amount REPLACE Taxable WITH 0.980*Taxable, Taxfree WITH 0.980*Taxfree, Sales:Tax; WITH 0.980*Sales:Tax, Amount WITH 0.980*Amount FOR Client = 'SPI' USE Temp STORE 'Y' TO Output SET PRINT ON ? ? ? 'TOTALS BY INVOICE NUMBER:' ? ? 'DATE  INV# TAXABLE TAX TAXFREE TOTAL' ? DO Printout ? ? 'Updating the INVOICES database now.' USE B:Invoices INDEX B:Invoices APPEND FROM Scratch ENDIF USE DELETE FILE Scratch DELETE FILE Temp DELETE FILE GetCosts RELEASE All RETURN :Tax; WITH 0.980*Sales:Tax FOR Client = 'SPI' ? ? 'Updating the BILLINGS database now.' USE B:Billings INDEX B:Billings APPEND FROM GetCosts USE Scratch REPLACE All Amount WITH (Taxable + Sales:Tax + TaxFree) COPY TO Temp FIELDS Inv:Date, Inv:Nmbr, Taxable, Sales:Tax,; TaxFree, Amount REPLACE Taxable WITH 0.980*Taxable, Taxfree WITH 0.980*Taxfree, Sales:Tax; WITH 0.980*Sales:Tax, Amount WITH 0.980*Amount FOR Client = 'SPI' USE Temp STORE 'Y' TO Output SET PRINT ON ? ? ? 'TOTALS BY INVOICE NUMBER:' ? ? 'DATE  HINV:NMBRClCLIENTClINV:DATEClTAXABLEN lSALES:TAXN lTAXFREEN l-ClAMOUNTN lAMT:RCDN m-CmDATE:RCDCm 1 840101 0.00 USE TAX 1 840601 0.00 USE TAX 1 841001 0.00 USE TAX 1 840201 0.00 USE TAX 2 840101 0.00 USE TAX 2 840501 0.00 USE TAX 2 841101 0.00 USE TA%X 10001 CL1 840201 13000.00 780.00 3200.00 16980.00 0.00 10004 CL1 840201 3000.00 180.00 0.00 3180.00 0.00  0.00 0Y 40.00 840101 350 OFC 2 DSKS INC USE TAX ENTRY 40.00 840501 570 OFC 2 DSKS INC USE TAX ENTRY 40.00 841101 1005 O Posting DO WHILE Posting ERASE @ 2,20 SAY ' 1> UNTAXED ITEMS USED BY AGENCY' @ 4,20 SAY ' 2> ENTE 1 840101 0.00 USE TAX 1 840601 0.00 USE TAX 1 841001 0.00 USE TAX 1 840201 0.00 USE TAX 2 840101 0.00 USE TAX 2 840501 0.00 USE TAX 2 841101 0.00 USE TA This is the release date of the disk. CHECKSTUCMD oCONSTANTMEM q COSTBASEDBF tCOSTBILLCMD v COSTMENUCMD zCOSTTIMECMD COSTUPDACMD DATETESTCMD DEPMENU CMD DEPOSITSCMD DEPOSITSDBF DEPPRINTCMD DEPTRANSCMD FINDBILLCMD BILLED .FRM E6 D2 512 4 BILLINGS.DBF E8 B6 1024 8 CHECKFIL.DBF 40 23 1024 8 CHECKSTU.CMD FD 38 1792 14 CONSTANT.MEM A4 CE 3072 24 COSTBASE.DBF 68 2A 2048 16 COSTBILL.CMD 5B 76 3200 25 COSTMENU.CMD A8 EF 6400 50 COSTTIME.CMD 66 AE 4224 33 COSTUPDA.CMD EE D0 2048 16 DATETEST.CMD 12 0B 1792 14 DEPMENU .CMD 31 7F 1536 12 DEPOSITS Fog Library Disk FOG-CPM.088 Copyright (1986) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. Disk 1 of 2. Accounting program from the dBASE II manual. Filename Description -07-00 .86 This is the release date of the disk. -CPM088 .DOC This is the description of the disk contents. ACCOUNTS.CMD CBA7 3K [Accounting 1 of 57] dBASE II accounting program from the Ashton-Tate dBASE manual An excellent way to see most of the commands in use. Includes payroll, accounts payable, accounts receivable, invoicing, and much more. ACCNTREE.DOC D280 13K [Accounting 2 of 57] Tree structure diagram of the program files. ACCOUNT .DOC 9821 22K [Accounting 3 of 57] Overview of the accounting system. ACNTCOM .DOC 9293 38K [Accounting 4 of 57] Explains the functions of all command files. ACNTFILE.DOC CB13 8K [Accounting 5 of 57] Lists structure of all data files. ACNTINST.DOC D2AA 9K [Accounting 6 of 57] Explains how to set up and run the accounting system. ACNTSTRU.DOC 6D89 5K [Accounting 7 of 57] Explains how the files relate to each other. ACNTUSES.DOC 8766 4K [Accounting 8 of 57] Explains which files are used by which .CMD files. ACTRENDX.CMD 882B 3K [Accounting 9 of 57] BILLED .FRM E6D2 1K [Accounting 10 of 57] BILLINGS.DBF E8B6 1K [Accounting 11 of 57] CHECKFIL.DBF 4023 1K [Accounting 12 of 57] CHECKSTU.CMD FD38 2K [Accounting 13 of 57] CONSTANT.MEM A4CE 3K [Accounting 14 of 57] COSTBASE.DBF 682A 2K [Accounting 15 of 57] COSTBILL.CMD 5B76 4K [Accounting 16 of 57] COSTMENU.CMD A8EF 7K [Accounting 17 of 57] COSTTIME.CMD 66AE 5K [Accounting 18 of 57] COSTUPDA.CMD EED0 2K [Accounting 19 of 57] DATETEST.CMD 120B 2K [Accounting 20 of 57] DEPMENU .CMD 317F 2K [Accounting 21 of 57] DEPOSITS.CMD 7142 4K [Accounting 22 of 57] DEPOSITS.DBF D&E65 1K [Accounting 23 of 57] DEPPRINT.CMD ADEF 1K [Accounting 24 of 57] DEPTRANS.CMD 4074 2K [Accounting 25 of 57] FINDBILL.CMD A3D8 6K [Accounting 26 of 57] GETDATE .CMD E5F2 1K [Accounting 27 of 57] HOLD81 .DBF E467 1K [Accounting 28 of 57] HOLD84 .DBF 67B7 1K [Accounting 29 of 57] INSERTS .DBF 690F 1K [Accounting 30 of 57] INVMENU .CMD 7AE4 5K [Accounting 31 of 57] INVOICES.CMD 9956 6K [Accounting 32 of 57] INVOICES.DBF E55B 2K [Accounting 33 of 57] 2K [Accounting 25 of 57] FINDBILL.CMD A3D8 6K [Accounting 26 of 57] GETDATE .CMD E5F2 1K [Accounting 27 of 57] HOLD81 .DBF E467 1K [Accounting 28 of 57] HOLD84 .DBF 67B7 1K [Accounting 29 of 57] INSERTS .DBF 690F 1K [Accounting 30 of 57] INVMENU .CMD 7AE4 5K [Accounting 31 of '