home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol129 / db2sig / m.lbr / COMPLETE.SIG < prev    next >
Encoding:
Text File  |  1985-02-10  |  2.5 KB  |  78 lines

  1. * COMPLETE.SIG 08/18/83
  2. STORE CHR(PEEK(063)) TO DR
  3. SET INDEX TO &dr.:orders
  4. ERASE
  5. * get a starting  point
  6. STORE DATE() TO stdat
  7. @ 10,00 SAY 'Shipments completed after what date are to be listed'
  8. @ 10,57 GET stdat PICTURE '99/99/99'
  9. READ
  10. STORE $(stdat,7,2)+$(stdat,1,2)+$(stdat,4,2) TO stdate
  11. GOTO TOP
  12. STORE 0 TO pageno
  13. STORE t TO more
  14. STORE 0 TO TOTAL
  15. STORE 0 TO CAT
  16. STORE 0 TO AMOUNT
  17. SET MARGIN TO 0
  18. DO WHILE more
  19.     STORE pageno + 1 TO pageno
  20.     STORE 7 TO lineno
  21.     ERASE
  22.     EJECT
  23.     ? ' '
  24.     ? '======================SIG/M SHIPPING REPORT ========================'
  25.     ? ' '
  26.     ? '           ' + date() + '                       PAGE: ' + str(pageno,3)
  27.     ? ' '
  28.     ? '      ORDERS COMPLETED AFTER ' + stdat
  29.     ? ' '
  30.     ? '    NO     LAST NAME            SHIPPED    BACKORDER SHIPPED CAT AMOUNT'
  31.     ? ' '
  32.     DO WHILE lineno <55
  33.         STORE $(shipped,7,2)+$(shipped,1,2)+$(shipped,4,2) TO stdate1
  34.         STORE $(bo:ship,7,2)+$(bo:ship,1,2)+$(bo:ship,4,2) TO stdate2
  35.         STORE $(bo2:ship,7,2)+$(bo2:ship,1,2)+$(bo2:ship,4,2) TO stdate3
  36.         IF stdate2 >=stdate1
  37.             STORE stdate2 TO stdate4
  38.         ELSE
  39.             store stdate1 TO stdate4
  40.         ENDIF
  41.         IF stdate3 >=stdate4
  42.             STORE stdate3 TO stdate5
  43.         ELSE
  44.             STORE stdate4 TO stdate5
  45.         ENDIF
  46.         IF stdate5 >= stdate  .AND.  COMP = 'Y'
  47.             STORE total + 1 TO TOTAL
  48.             STORE amount + amt TO amount
  49.             ? order + '  '+ lname +' ' + shipped +'     ' + bo:ship + bo2:ship +' '+ catalog + ' ' + STR(amt,7,2)
  50.             IF catalog = "N"
  51.                 STORE cat + 1 TO cat
  52.             ENDIF catalog
  53.             STORE lineno + 1 to lineno
  54.             SKIP
  55.             IF EOF
  56.                 STORE 60 TO lineno
  57.                 STORE f TO more
  58.             ENDIF EOF
  59.         ELSE
  60.             SKIP
  61.             IF EOF
  62.                 store 60 to lineno
  63.                 store f TO more
  64.             ENDIF EOF
  65.         ENDIF STDATE
  66.     ENDDO while lineno > 55
  67. ENDDO more
  68. ? '--------------------------------------------------------------------------'
  69. ? ' '
  70. ? '      TOTALS:         NUMBER OF SHIPMENTS: ' + STR(total,4,0)
  71. ? '                      DOLLAR AMOUNT OF ORDERS COMPLETED: ' + STR(amount,8,2)
  72. ? '                      NUMBER OF SHIPMENTS INCLUDING CATALOG: ' + STR(total-cat,4,0)
  73. EJECT
  74. SET PRINT OFF
  75. RELEASE ALL
  76. STORE t TO more
  77. STORE t TO first
  78.