*...THIS IS COMMAND FILE "KANCELS" MODIFIED 12/17/83
ERAS
USE &OFF
STOR GOOD+PREP TO TEMP
?' This checkbook was last balanced using the',CDATE,'statement'
ACCEPT " ENTER the MONTH and YEAR for today's statement" TO TEMPA
STOR TEMPA TO &TEMP
SAVE TO MEMVAR
?' '
?' *******************************************************************'
?' * Press 0 after the last cancelled check to balance the checkbook *'
?' *******************************************************************'
?' '
STOR 0 TO MAXA
DO WHIL T
INPUT '     Enter cancelled Check No   ' to C:CAN
IF C:CAN=0
ERAS
USE &BLAST
STOR LCN+1 TO LCN
COPY FIELD NUMBER,PAYEE,A,B,CAN TO B:PARTIAL FOR #<LCN
USE B:PARTIAL
COPY TO OS:CKS FOR .NOT. CAN
USE OS:CKS
?' The following checks are outstanding prior to check number', LC+1
?' **********************************************************'
DISP OFF ALL
SUM A TO OUTSTAND FOR .NOT. CAN
?' TOTAL OUTSTANDING CHECKS = $', OUTSTAND
?
?'NOW ENTER ANY OUTSTANDING DEPOSITS.....IF NONE, ENTER 0'
?'(PRECEED WITH A MINUS SIGN THOSE IN BANKSTATEMENT AND NOT IN BANKBOOK)'
STOR T TO ACTIVE
STOR 1 TO COUNT
STOR 0 TO T:OUT
?
DO WHIL ACTIVE
STOR STR(COUNT,3) TO I
INPU '   ENTER OUTSTANDING DEPOSIT &I'  TO D:OUT
IF D:OUT=0
STOR F TO ACTIVE
ELSE
STOR D:OUT+T:OUT TO T:OUT
STOR COUNT + 1 TO COUNT
ENDIF
ENDDO
? COUNT-1, ' OUTSTANDING DEPOSITS  TOTAL = $', T:OUT
?
INPU "   ENTER ENDING BALANCE FROM BANK STATEMENT " TO BEGIN
STOR BEGIN + T:OUT - OUTSTAND TO NEW
USE B:PARTIAL
GOTO BOTTOM
STOR B TO BOOK
?' **********************************************************'
?' BOOK DIFFERENCE = $', NEW-BOOK, 'AT CHECK #', LC
?' **********************************************************'
WAIT
RETU
ENDIF
STOR STR(C:CAN,4) TO SC:CAN
FIND '&SC:CAN'
STOR # TO LCN
STOR C:CAN TO LC
REPL CAN WITH T
STOR LC-MAXA TO TEMP
IF TEMP>0
STOR LC TO MAXA
STOR # TO MAXB
ENDDO
ELSE
STOR MAXA TO LC
STOR MAXB TO LCN
ENDIF
ENDDO












BPAYEE,A,CAN TO B:PARTIAL FOR  # < LCN
USE B:PARTIAL
  COPYND NOT IN BANKBOOK)'
STORE T TO ACTIVES.....IF NONPRECEED WITH A MINUS SIGN THOSE IN BANKSTATEMENT AND NOT IN BANKBOOK)'
STOR T TO ACTIVE
STOR 1 TO COUNT
STOR 0 TO T:OUT
?
DO WHIL ACTIVE
STOR STR(COUNT,3) TO I
INPU '   ENTER OUTSTANDING DEPOSIT &I'  TO D:OUT
IF D:OUT=0
STOR F TO ACTIVE
ELSE
STOR D:OUT+T:OUT TO T:OUT
STOR COUNT + 1 TO COUNT
ENDIF
ENDDO
? COUNT-1, ' OUTSTANDING DEPOSITS  TOTAL = $', T:OUT
?
INPU "   ENTER ENDING BALANCE FROM BANK STATEMENT " TO BEGIN
STOR BEGIN + T:OUT - OUTSTAND TO NEW
USE B:PARTIAL
GOTO BOTTOM
STOR B