home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DBASEACC.ARC
/
COSTMENU.PRG
< prev
next >
Wrap
Text File
|
1979-12-31
|
4KB
|
153 lines
****************** COSTMENU 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 thie leads
* to ddata 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 procedure (selection 5).
SET INTE OFF
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 ' <Return>'
WAIT TO Action
ERASE
IF Action = '1'
ERASE
@ 4,10 SAY 'This program accepts bills for items that the agency'
? ' 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.'
?
? ' 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 THE 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. <Return> to continue.'
?
WAIT
DO CostBill
ELSE
IF Action = '3'
DO CostTime
ELSE
IF Action = '4'
STORE "Y" TO Changing
DO WHILE !(Changing)='Y'
USE PostFile
IF EOF
? 'There are no entries in the POSTING file.'
? '<Return> 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 Postfile
COUNT FOR .NOT. * TO Any
IF Any = 0
? 'No unposted entries in the POSTING file.'
? '<Return> 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 records in the PostFile.'
? 'Do you want to do this (Y or N)?'
WAIT TO WipeOut
IF !(WipeOut) = 'Y'
USE 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