home *** CD-ROM | disk | FTP | other *** search
- * * * * * * * PAYRECAP.PRG * * * * * * * *
- ******************************************
- PARAMETERS EOY,EOM,EOQ,Old
- IF EOM ='Y'
- *
- REPLACE Marker WITH 'M'
- *
- * If it's the end of the quarter, we total the amounts for the
- * previous three months to a new record and mark it with a 'Q'.
- *
- IF EOQ = 'Y'
- Number = STR(RECNO(),5)
- TOTAL ON Marker TO Quarter FOR RECNO() >= (VAL(Number)-2)
- APPEND FROM Quarter
- ERASE Quarter.dbf
- *
- IF Old = 3
- REPLACE Check_Date WITH '1ST'
- ELSE
- IF Old = 6
- REPLACE Check_Date WITH '2ND'
- ELSE
- IF Old = 9
- REPLACE Check_Date WITH '3RD'
- ELSE
- IF Old = 12
- REPLACE Check_Date WITH '4TH'
- ENDIF
- ENDIF
- ENDIF
- ENDIF
- *
- REPLACE Marker WITH 'Q'
- *
- * If it's the end of the year, we total all the quarterly amounts to
- * a new record and mark it with a 'Y'.
- IF EOY = 'Y'
- TOTAL ON Marker TO Annual FOR Marker = 'Q'
- APPEND FROM Annual
- REPLACE Marker WITH 'Y', Check_Date WITH 'END'
- ERASE Annual.dbf
- ENDIF
- ENDIF
- *
- * If it's the end of a month but not the end of the year, we add a new
- * blank record for next month's payroll records.
- IF EOY <> 'Y'
- Period = YEAR(TDate) + MONTH(TDate) + 1
- Period2 = STR(Period,4)
- APPEND BLANK
- REPLACE Check_Date WITH Period2
- ENDIF
- ENDIF
- RETURN
- *