home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
FINANCE
/
SFWD.ZIP
/
OE.CLA
< prev
next >
Wrap
Text File
|
1992-11-10
|
31KB
|
954 lines
!#OM# This module changed by the Overlay Manager on 11/10/92 at 21:44:15
!#OM# Map Statement Changed To Use New Map
!#OM#
OE PROGRAM
! GLOBAL MODEL FROM OE.MDL - V2107
!INCLUDE('C:\CLARION\MASTEROE\OE.OMM'),LIST !#OM# New Map File
!INCLUDE('STD_KEYS.CLA')
!INCLUDE('CTL_KEYS.CLA')
!INCLUDE('ALT_KEYS.CLA')
!INCLUDE('SHF_KEYS.CLA')
REJECT_KEY EQUATE(CTRL_ESC)
ACCEPT_KEY EQUATE(F10_KEY)
TRUE EQUATE(1)
FALSE EQUATE(0)
OMIT('#OM# OMIT Terminator #OM#')
MAP
PROC(G_OPENFILES)
PROC(G_OPENFILES2)
PROC(IDLER)
PROC(DISPBMSG)
PROC(STEPCHECK)
MODULE('OE01')
PROC(STARTSCREEN) !introduction form
.
MODULE('OE02')
PROC(MAIN_MENU) !Order Entry Main Menu
.
MODULE('OE03')
PROC(CUST_MAINT) !Customer List
.
MODULE('OE04')
PROC(SREP_MAINT) !Sales Rep Maintenance
.
MODULE('OE05')
PROC(UPD_SREP) !UPDATE REPRESENTATIVE
.
MODULE('OE06')
PROC(FINDSREP) !Find Sales Rep
.
MODULE('OE07')
PROC(FINDSTAX) !Find Sales Tax Code
.
MODULE('OE08')
PROC(STAX_MAINT) !Sales Tax Maintenance
.
MODULE('OE09')
PROC(UPD_STAX) !UPDATE SALES TAX
.
MODULE('OE10')
PROC(REMIND_MAINT) !STATEMENT REMINDER MAINTENANCE
.
MODULE('OE11')
PROC(COMP_MAINT) !COMPANY SETUP
.
MODULE('OE12')
PROC(CAT_MAINT) !Sales Catalog Maintenance
.
MODULE('OE13')
PROC(UPD_SCAT) !UPDATE SALES CATALOG
.
MODULE('OE14')
PROC(CUSBAL_EDIT) !UPDATE CUSTOMER BALANCES
.
MODULE('OE15')
PROC(QOI_MAINT) !Quotation/Order/Invoice Maint
.
MODULE('OE16')
PROC(UPD_QOI) !Edit a detail transaction
.
MODULE('OE17')
PROC(FINDCITEM) !Find Catalog Item
.
MODULE('OE18')
PROC(FINDCUSTOMER) !Find Customer
.
MODULE('OE19')
PROC(PRINTER_DOT) !set printer codes-epson,ibm
.
MODULE('OE20')
PROC(PRINTER_JET) !set printer codes-laser jet
.
MODULE('OE21')
PROC(PAY_MAINT) !PAYMENT MAINTENANCE
.
MODULE('OE22')
PROC(UPD_PAY) !Customer Payment Form
.
MODULE('OE23')
PROC(FINDUNPAID) !FIND UNPAID INVOICE
.
MODULE('OE24')
PROC(FINDCUSTNADD) !Find Customer
.
MODULE('OE25')
PROC(INQ_ORDINV) !VIEW CUSTOMER INVOICES
.
MODULE('OE26')
PROC(VIEWINVDET) !VIEW INVOICE DETAIL
.
MODULE('OE27')
PROC(INQ_PAYMENT) !View Customer Payments
.
MODULE('OE28')
PROC(RPT_SALESCUS) !PRINT SALES BY CUSTOMER
.
MODULE('OE29')
PROC(PRT_SALESCUS) !PRINT SALES BY CUSTOMER
.
MODULE('OE30')
PROC(INVPAY_MAINT) !INVOICE PAYMENT MAINTENANCE
.
MODULE('OE31')
PROC(QO_TO_INV) !QUOTE TO INVOICE
.
MODULE('OE32')
PROC(QOI_DELETE) !REMOVE OLD TRANSACTIONS
.
MODULE('OE33')
PROC(RPT_PAYMENT) !PRINT PAYMENT REPORT
.
MODULE('OE34')
PROC(PRT_PAYMENT) !PRINT PAYMENT REPORT
.
MODULE('OE35')
PROC(RPT_SALESTAX) !PRINT SALES TAX REPORT
.
MODULE('OE36')
PROC(FINDSTAXNADD) !Find Sales Tax Code
.
MODULE('OE37')
PROC(PRT_STAXREP) !PRINT SALES TAX REPORT
.
MODULE('OE38')
PROC(RPT_COMMISSN) !PRINT COMMISION REPORT
.
MODULE('OE39')
PROC(FINDSREPNADD) !Find Sales Rep
.
MODULE('OE40')
PROC(PRT_COMMREP) !PRINT SALESMAN COMMISION REP
.
MODULE('OE41')
PROC(RPT_CUSTLIST) !PRINT CUSTOMER LIST
.
MODULE('OE42')
PROC(PRT_CUSTLIST) !PRINT CUSTOMER LIST
.
MODULE('OE43')
PROC(RPT_CUSTLABL) !PRINT CUSTOMER LABELS
.
MODULE('OE44')
PROC(PRT_CUSTLABL) !PRINT CUSTOMER LABELS
.
MODULE('OE45')
PROC(RPT_STATEMNT) !PRINT CUSTOMER STATEMENTS
.
MODULE('OE46')
PROC(RPT_AGING) !PRINT AGING REPORT
.
MODULE('OE47')
PROC(PRT_AGING) !Print Aging Report
.
MODULE('OE48')
PROC(RPT_CATALOG) !Print Sales Catalog List
.
MODULE('OE49')
PROC(PRT_CATALOG) !Print Sales Catalog
.
MODULE('OE50')
PROC(RPT_STAXCODE) !Print Sales Tax Code List
.
MODULE('OE51')
PROC(PRT_STAXCODE) !Sales Tax Code List
.
MODULE('OE52')
PROC(RPT_REPLIST) !Print Sales Rep File
.
MODULE('OE53')
PROC(PRT_REPLIST) !Print Sales Representative Lis
.
MODULE('OE54')
PROC(APPLY_FINANC) !POST GLHOLD FILE TO G/L
.
MODULE('OE55')
PROC(DO_APPFINCHG) !Apply Finance Charges
.
MODULE('OE56')
PROC(QOI_DO_DEL) !Remove Old Transactions
.
MODULE('OE57')
PROC(CUSTYEAREND) !Update Customer Balances
.
MODULE('OE58')
PROC(DO_CUSTYREND) !Customer Year End Processing
.
MODULE('OE59')
PROC(ARMAINTMENU) !A/R Maint Menu - ****
.
MODULE('OE60')
PROC(IVMAINTMENU) !Inventory Maint Menu - *****
.
MODULE('OE61')
PROC(ARREPMENU) !AR Report Menu - *****
.
MODULE('OE62')
PROC(IVREPMENU) !IV Report Menu - *****
.
MODULE('OE63')
PROC(IV_ITEMMAINT) !Inventory Item Maintenance
.
MODULE('OE64')
PROC(UPD_ITEM) !UPDATE IV ITEM
.
MODULE('OE65')
PROC(IV_DISCMAINT) !Inventory Discount Maintenance
.
MODULE('OE66')
PROC(UPD_DISC) !UPDATE DISCOUNT
.
MODULE('OE67')
PROC(RPT_IVLIST) !Print Inventory Listing
.
MODULE('OE68')
PROC(RPT_IVREORD) !Print Inventory Reorder Report
.
MODULE('OE69')
PROC(PRT_IVLIST) !Inventory Listing
.
MODULE('OE70')
PROC(PRT_IVREORD) !Inventory Reorder Report
.
MODULE('OE71')
PROC(INQ_INVENT) !Inventory View
.
MODULE('OE72')
PROC(INVENT_RECV) !Receive Inventory
.
MODULE('OE73')
PROC(FINDIVITEM) !Find Inventory Item
.
MODULE('OE74')
PROC(UPD_RINVEN) !Update Inventory
.
MODULE('OE75')
PROC(TBL_1099) !TABLE OF 1099 TYPES-DON'T USE
.
MODULE('OE76')
PROC(FORM_1099) !edit the table of 1099 types
.
MODULE('OE77')
PROC(TABLE_1099) !lookup for form 1099 type
.
MODULE('OE78')
PROC(TBL_VEND) !VENDOR TABLE
.
MODULE('OE79')
PROC(FORM_VEN_YTD) !FORM-YTD INFO FOR VENDORS
.
MODULE('OE80')
PROC(VEND_TABLE) !VENDOR LOOKUP TABLE
.
MODULE('OE81')
PROC(RPT_IVREORDV) !Print Inv Reorder Report-vends
.
MODULE('OE82')
PROC(PRT_IVREORDV) !Inventory Reorder Report
.
MODULE('OE83')
PROC(NUM_FORM) !QOI numbering
.
MODULE('OE84')
PROC(UPD_CUSTOMER) !UPDATE CUSTOMER
.
MODULE('OE85')
PROC(RPT_CUSTCRD) !PRINT CUSTOMER CARDS
.
MODULE('OE86')
PROC(PRT_CUSTCRD) !PRINT CUSTOMER CARDS
.
MODULE('OE87')
PROC(QOI_FM_MAINT) !QOI Form Maintenance
.
MODULE('OE88')
PROC(RPT_SALESINV) !PRINT SALES REPORT
.
MODULE('OE89')
PROC(PRT_SALESINV) !PRINT SALES REPORT
.
MODULE('OE90')
PROC(EOD_FORM) !End of Day Processing for Q
.
MODULE('OE91')
PROC(CATEGORY_TBL) !Find Category Code
.
MODULE('OE92')
PROC(UPD_CATEGORY) !UPDATE CATEGORY
.
MODULE('OE93')
PROC(QOI_PRINT) !PRINT QOI
.
MODULE('OE94')
PROC(RUN_QUICKEN)
.
MODULE('OE95')
PROC(MESSAGE)
.
MODULE('OE96')
PROC(VENDYEAREND) !Update Vender Balances
.
MODULE('OE97')
PROC(DO_VENDYREND) !Customer Year End Processing
.
MODULE('OE98')
PROC(SERIALIZE)
.
MODULE('OE99')
PROC(REGISTER) !PRINT CUSTOMER STATEMENTS
.
MODULE('OE_MKINV')
PROC(MAKEINV) !Turn Quote/Order into Invoice
.
MODULE('OE_STMNT')
PROC(PRT_STATEMNT)
.
MODULE('OE_VEND')
PROC(FORM_VEND) !FORM FOR VENDOR INFORMATION
.
MODULE('AKACOPYR'),BINARY
FUNC(AKACOPYRIGHT),STRING !Create copyright symbol
PROC(AKACOPYWRONG) !Sets copyright chars to normal
.
MODULE('OE_HISTY')
PROC(HIST_HOTKEY)
.
MODULE('PRT_INV')
PROC(PRT_QOI) !Print Quote, Order, Invoice
.
MODULE('DOCCVT')
PROC(DOC_CVT) !Allow reports no blank lines
.
MODULE('PRN2CON')
PROC(PRN2CON)
.
MODULE('DEPOSIT')
PROC(PRT_DEPOSIT) !Print Deposit for Quicken
.
MODULE('INVENTRY')
PROC(Q_INVENTORY) !Print AP for Quicken
.
MODULE('COMMISN')
PROC(Q_COMMISSION) !Print Quicken Commission
.
MODULE('SALESTAX')
PROC(Q_SALESTAX) !Print Quicken Sales Tax
.
MODULE('CLRKCD'),BINARY
PROC(CLRKCD)
.
.
#OM# OMIT Terminator #OM#
EJECT('FILE LAYOUTS')
OE_CTRL FILE,PRE(CTL),RECLAIM
OWNER('TURBO'),ENCRYPT
RECORD RECORD
CO_NAME STRING(50) !YOUR COMPANY NAME
CO_STREET1 STRING(50) !STREET ADDRESS LINE 1
CO_STREET2 STRING(50) !STREET ADDRESS LINE 2
CO_CSZ STRING(50) !COMPANY - CITY STATE ZIP
TELE_1 STRING(20) !YOUR TELEPHONE # FOR STATEMENT
TELE_2 STRING(20) !YOUR #2 TELE FOR STATMENT-fax?
PASSWORD STRING(8) !AR PASSWORD - 8 CHRS OR LESS
NEXT_INUM LONG !next invoice number
NEXT_QNUM LONG !next quote number
NEXT_ONUM LONG !next order number
POST_TO_Q STRING(1) !Post to Quicken File
COSTMETHOD STRING(1) !Inventory Cost Method
FINANCE_RATE DECIMAL(4,4) !RATE FOR FINANCE CALCULATIONS
FINANCE_DAYS LONG !DEFAULT FINANCE DAYS FOR ENTRY
Q_PATH STRING(30) !Default location of Quicken
Q_PATH_DEP STRING(30) !Path for Deposit File
Q_PATH_AP STRING(30) !Path of Accounts Payable File
Q_PATH_TAX STRING(30) !Path of Sales Tax File
Q_PATH_COMM STRING(30) !Path to Commission File
MESS_01_1 STRING(60) !STATEMENT MESSAGE - CURRENT
MESS_01_2 STRING(60)
MESS_31_1 STRING(60) !STATEMENT MESSAGE - 31-60
MESS_31_2 STRING(60)
MESS_61_1 STRING(60) !STATEMENT MESSAGE 61-90
MESS_61_2 STRING(60)
MESS_91_1 STRING(60) !STATEMENT MESSAGE 91-120
MESS_91_2 STRING(60)
MESS_121_1 STRING(60)
MESS_121_2 STRING(60)
MESS_ALL_1 STRING(60) !STATEMENT MESSAGE FOR ALL STAT
MESS_ALL_2 STRING(60)
PRT_SMALL GROUP !Control Codes for Compressed
PS1 BYTE
PS2 BYTE
PS3 BYTE
PS4 BYTE
PS5 BYTE
.
PRT_BIG GROUP !Control Codes for Normal Print
PB1 BYTE
PB2 BYTE
PB3 BYTE
PB4 BYTE
PB5 BYTE
.
DEMO STRING(1) !Demo Flag
. .
OE_SREP FILE,PRE(REP),CREATE,RECLAIM
CODEKEY KEY(REP:CODE),NOCASE,OPT
NAMEKEY KEY(REP:NAME),NOCASE,OPT
RECORD RECORD
CODE STRING(5) !Sales Rep Code
NAME STRING(20) !Sales Rep Name
CATEGORY STRING(30) !Quicken Category
. .
OE_STAX FILE,PRE(TAX),CREATE,RECLAIM
CODEKEY KEY(TAX:CODE),NOCASE,OPT
RECORD RECORD
CODE STRING(5) !Sales Tax Code
NAME STRING(20) !Sales Tax Name/Region
RATE DECIMAL(5,3) !Sales Tax Rate
CATEGORY STRING(30) !Quicken Category
. .
OE_SCAT FILE,PRE(CAT),CREATE,RECLAIM
CODEKEY KEY(CAT:CODE),NOCASE,OPT
VEND1KEY KEY(CAT:VEND_NUM_PRI,CAT:CODE),DUP,NOCASE
VEND2KEY KEY(CAT:VEND_NUM_SEC,CAT:CODE),DUP,NOCASE
RECORD RECORD
CODE STRING(10) !Item Code
DESC STRING(29) !Item Description
PRICE DECIMAL(9,2) !Sales Price
UNIT STRING(2) !Item Unit
CCODE STRING(1) !CommissionCode (C/I/N)
CRATE DECIMAL(5,2) !Commission Rate (Code=I)
TAXYN STRING(1) !Taxable Item? Y/N
VEND_NUM_PRI STRING(10) !VENDOR NUMBER - PRIMARY VEND
VEND_COD_PRI STRING(14) !PRIMARY VENDOR REORDER/CAT NUM
VEND_NUM_SEC STRING(10) !SECONDARY VENDOR NUMBER
VEND_COD_SEC STRING(14) !SECONDARY VENDOR REORDER/CAT #
. .
OE_INVCE FILE,PRE(INV),CREATE,RECLAIM
TYPENUMKEY KEY(INV:TYPE,INV:NUMBER),NOCASE,OPT
CUSTKEY KEY(INV:TYPE,INV:CUSTNUM,INV:TRANDATE,INV:NUMBER),NOCASE,OPT
SREPKEY KEY(INV:TYPE,INV:SALESREP,INV:TRANDATE,INV:NUMBER),NOCASE,OPT
TAXKEY KEY(INV:TYPE,INV:TAXCODE,INV:TRANDATE,INV:NUMBER),NOCASE,OPT
COMMKEY KEY(INV:TYPE,INV:SALESREP,INV:LASTPAYDATE,INV:NUMBER),NOCASE,OPT
SALESRPTKEY1 KEY(INV:NUMBER),DUP,NOCASE,OPT
SALESRPTKEY2 KEY(INV:CUSTNUM),DUP,NOCASE,OPT
PRINTST_KEY KEY(INV:PRINTSTATUS),DUP,NOCASE,OPT
RECORD RECORD
NUMBER LONG !Invoice Number
TYPE STRING(1) !Type:(Q)uote/(O)rder/(I)nvoice
PRINTSTATUS STRING(1) !Printed? (*)-Yes
TRANDATE LONG !Transaction Date
SHIPDATE LONG !Ship Date
DUEDATE LONG !Due Date
ORDREF STRING(10) !Our Order/Invoice Reference
CUSTNUM LONG !Customer Number (Internal)
TERMSMSG STRING(10) !Customer Terms (Message)
SHIPBY STRING(10)
FOBPOINT STRING(10)
CUSTPO STRING(10) !Customer Purchase Order Ref
SALESREP STRING(5) !Sales Rep for this Invoice
COMMRATE DECIMAL(5,2) !Default Commission
COMMTOTAL DECIMAL(8,2) !Total Commission for Invoice
TAXCODE STRING(5) !Sales Tax Code
TAXRATE DECIMAL(5,3)
SALETOTAL DECIMAL(9,2) !Total Sales - Transaction
CREDTOTAL DECIMAL(9,2) !Total Credits / Transaction
TAXABLESALES DECIMAL(9,2) !Taxable amount of subtotal
SUBTOTAL DECIMAL(9,2) !Invoice Subtotal
TAXTOTAL DECIMAL(9,2) !Sales Tax Total
FREIGHTTOTAL DECIMAL(9,2) !Freight Charges
FINANCETOTAL DECIMAL(9,2) !Finance Charges Total
TOTAL DECIMAL(9,2) !Invoice Total
PAID DECIMAL(9,2) !Amount Paid on Invoice
BALANCE DECIMAL(9,2) !Balance Due on Invoice
LASTPAYDATE LONG !Last Payment Date
RETURNED STRING(1)
AMT_RETRND DECIMAL(9,2)
REASON1 STRING(20)
BAD_CHECK STRING(1)
AMT_BAD_CHK DECIMAL(9,2)
REASON2 STRING(20)
. .
OE_DTAIL FILE,PRE(DET),CREATE,RECLAIM
TYPENUMLNKEY KEY(DET:TYPE,DET:INVNUM,DET:LINE),NOCASE,OPT
SALESRPTKEY4 KEY(DET:INVNUM),DUP,NOCASE,OPT
RECORD RECORD
TYPE STRING(1) !Detail Type - QOI
INVNUM LONG !Invoice Number
LINE DECIMAL(4,1) !DETAIL LINE
TRANCODE STRING(1) !TRANSACTION CODE
ITEMCODE STRING(10)
DESC STRING(29) !Item/Transaction Desc.
ORDQTY DECIMAL(6,2) !Order Quantity
SHPQTY DECIMAL(6,2) !Shipped Quantity
BOQTY DECIMAL(6,2) !Back Order Quantity
UNIT STRING(2) !Unit Code
LPRICE DECIMAL(9,2) !Full Price per Unit
PERCNTDISC DECIMAL(5,2) !Percentage Discount
SPRICE DECIMAL(9,2) !Sell Price per Unit
CRATE DECIMAL(5,2) !Commission Rate This Item
TAXYN STRING(1) !Taxable Detail Line
. .
OE_PYMT FILE,PRE(PAY),CREATE,RECLAIM
INVKEY KEY(PAY:ITYPE,PAY:INVNUM,PAY:LINE),NOCASE,OPT
CUSTKEY KEY(PAY:CUSTNUM,PAY:DATE,PAY:ITYPE,PAY:INVNUM,PAY:LINE),NOCASE,OPT
DATEKEY KEY(PAY:DATE,PAY:ITYPE,PAY:INVNUM,PAY:LINE),NOCASE,OPT
RECORD RECORD
ITYPE STRING(1) !Invoice Type
INVNUM LONG !Invoice Number
LINE BYTE !Line Number
CUSTNUM LONG !Customer Number (Internal)
TYPE STRING(1) !Type (R)eg (D)ep (A)ppDep
DATE LONG !Date of Payment
AMOUNT DECIMAL(9,2) !Amount of Payment
COMMENT STRING(25) !Comment Line
CATEGORY STRING(30) !Quicken Category
. .
IV_ITEM FILE,PRE(ITE),CREATE,RECLAIM
CODEKEY KEY(ITE:CODE),NOCASE,OPT
VEND1KEY KEY(ITE:VEND_NUM_PRI,ITE:CODE),DUP,NOCASE
VEND2KEY KEY(ITE:VEND_NUM_SEC,ITE:CODE),DUP,NOCASE
RECORD RECORD
CODE STRING(10) !Inventory Code
DESC STRING(29) !Inventory Item Description
DEPARTMENT STRING(5) !Item Department Code
QOH LONG !Quantity On Hand
QTYORD LONG !Quantity Ordered (Reserved)
MINSTOCK LONG !Minimum Stock before reorder
DESSTOCK LONG !Desired Stock Level
AVGCOST DECIMAL(9,2) !Average Cost
TOTALVALUE DECIMAL(9,2) !Inventory Total Cost Value
LISTPRICE DECIMAL(9,2) !Selling List Price
UNIT STRING(2) !Unit Code
CATEGORY STRING(30) !Quicken Cost of Sales Account
CCODE STRING(1) !Commission Code (CIN)
CRATE DECIMAL(5,2) !Commission Rate (Code=I)
TAXYN STRING(1) !Charge Sales Tax
VEND_NUM_PRI STRING(10) !Vendor ID - Primary
VEND_COD_PRI STRING(14) !Vendor Part Code - Primary
VEND_NUM_SEC STRING(10) !Vendor ID - Secondary
VEND_COD_SEC STRING(14) !Vendor Part Code - Secondary
. .
IV_ICOST FILE,PRE(COS),CREATE,RECLAIM
CODELNKEY KEY(COS:CODE,COS:LINE),NOCASE,OPT
CODEDATEKEY KEY(COS:CODE,COS:DATE,COS:LINE),NOCASE,OPT
DATEKEY KEY(COS:DATE,COS:CODE,COS:LINE),NOCASE,OPT
VENDOR_KEY KEY(COS:PRIM_VENDOR),DUP,NOCASE,OPT
RECORD RECORD
CODE STRING(10) !Item Code
LINE LONG !Code Line
DATE LONG !Receive Date
QTY LONG !Purchase Quantity
QOH LONG !Quantity On Hand
COST DECIMAL(9,2) !Purchase Cost Per Unit
PRIM_VENDOR STRING(10)
. .
IV_DISC FILE,PRE(DIS),CREATE,RECLAIM
QTYKEY KEY(DIS:SQTY),NOCASE,OPT
RECORD RECORD
SQTY LONG !Start Quantity for Bracket
EQTY LONG !End Quantity for Bracket
DISCOUNT DECIMAL(5,2) !Discount Percentage
. .
VEND FILE,PRE(VEN),CREATE,RECLAIM
OWNER('$BRIX'),ENCRYPT
NAME_X KEY(VEN:VEND_NAME),DUP,NOCASE
CITY_X KEY(VEN:VEND_CITY),DUP,NOCASE
ZIP_X KEY(VEN:VEND_ZIP),DUP,NOCASE
VEND_NUM_X KEY(VEN:VEND_NUM),NOCASE,OPT
RECORD RECORD
VEND_NAME STRING(30)
VEND_ADDR_1 STRING(30)
VEND_ADDR_2 STRING(30)
VEND_CITY STRING(15)
VEND_STATE STRING(2)
VEND_ZIP STRING(10)
VEND_COUNTRY STRING(10)
VEND_DATA_1 STRING(30)
VEND_DATA_2 STRING(30)
VEND_TELE_1 STRING(15)
REMIT_TELE STRING(15)
REMIT_NAME STRING(30) !remittance name
REMIT_ADDR_1 STRING(30)
REMIT_ADDR_2 STRING(30)
REMIT_CITY STRING(15)
REMIT_STATE STRING(2)
REMIT_ZIP STRING(10)
REMITCOUNTRY STRING(10)
REMIT_DATA_1 STRING(30) !FUTURE USE
REMIT_DATA_2 STRING(30) !FUTURE USE
CHECK_NAME STRING(1) !NAME FOR CHECKS
VEND_NUM STRING(10)
FED_TAX_NUM STRING(15) !VENDOR FEDERAL TAX ID FOR 1099
OUR_ACCT STRING(15) !OUR ACCOUNT NUMBER WITH VENDOR
CURRENT_BAL DECIMAL(11,2)
VEND_AMT_1 DECIMAL(11,2) !for your use
VEND_AMT_2 DECIMAL(11,2) !for your use
VEND_AMT_3 DECIMAL(11,2) !for your use
VEND_AMT_4 DECIMAL(11,2) !for your use
VEND_AMT_5 DECIMAL(11,2) !FUTURE USE
VEND_AMT_6 DECIMAL(11,2) !FUTURE USE
PURCH_1099 DECIMAL(11,2) !PURCHASES/PAID - 1099 YTD
PERCENT_1099 DECIMAL(4,4) !future use - 1099 WITHHOLDING
WH_1099 DECIMAL(11,2) !AMOUNT WITHHELD FOR 1099
FUT_1099_1 STRING(1) !FUTURE USE 1099
FUT_1099_2 DECIMAL(11,2) !FUTURE USE
FUT_1099_3 DECIMAL(11,2) !FUTURE USE
TYPE_1099 STRING(1) !1099 CATEGORY, MISC, DIV, ETC
YTD_PURCH DECIMAL(11,2)
LAST_YR_PURC DECIMAL(11,2)
CREDIT_LIMIT DECIMAL(11,2)
DUE_IN_DAYS LONG !TERMS IN DAYS
DISC_DAYS LONG
TAX_RATE DECIMAL(5,4)
DISCOUNT_YN STRING(1)
DISC_RATE DECIMAL(5,4)
TERMS STRING(15)
SALESMAN STRING(6)
CONTACT STRING(20)
CONTACT_TELE STRING(20) !CONTACT TELEPHONE
LETTER_TO STRING(25)
. .
AP_1099 FILE,PRE(AP1),CREATE,RECLAIM,PROTECT
OWNER('$BRIX'),ENCRYPT
TYPE_X KEY(AP1:TYPE),NOCASE,OPT
RECORD RECORD
TYPE STRING(1) !NUMBER CORRESPONDING TO FORM
TYPE_DESCR STRING(35) !DESCRIPTION OF 1099 TYPE
. .
AP_TRAN FILE,PRE(APT),CREATE,RECLAIM
OWNER('$BRIX'),ENCRYPT
I_NUM_X KEY(APT:INVOICE_NUM,APT:I_TRN_CODE),DUP,NOCASE,OPT
I_TRN_DATE_X KEY(APT:I_TRN_DATE),DUP,NOCASE,OPT
I_TRN_DUE_X KEY(APT:I_TRN_DUE),DUP,NOCASE
VEND_NUM_X KEY(APT:VEND_NUM),DUP,NOCASE,OPT
I_TRN_NUM_X KEY(APT:I_TRN_NUM),NOCASE,OPT
RPT_X KEY(APT:VEND_NUM,APT:INVOICE_NUM,APT:I_TRN_CODE,APT:I_TRN_POSTED),DUP,NOCASE
POSTED_X KEY(APT:I_TRN_POSTED),DUP,NOCASE
RECORD RECORD
INVOICE_NUM STRING(15) !INVOICE NUMBER
ON_HOLD STRING(1) !HOLD PMT DURING CALCULATIONS
VEND_NUM STRING(10) !VENDOR NUMBER
I_TRN_TYPE STRING(1) !TRANSACTION TYPE
I_TRN_CODE STRING(1) !TRANSACTION CODE
I_TRN_AMOUNT DECIMAL(11,2)
I_TRN_NETAMT DECIMAL(11,2) !NET AMOUNT OF THE INVOICE DUE
I_TRN_DATE LONG !TRANSACTION DATE
I_TRN_DUE LONG !DUE DATE FOR INVOICE
I_TRN_DISC LONG !DISCOUNT DATE
I_TRN_DESCR STRING(25) !DESCRIPTION
I_TRN_SLSMAN STRING(10) !VEND SALESMAN
I_TRN_AUTH DECIMAL(11,2) !AUTHORIZED AMOUNT
I_TRN_NUM LONG !TRANSACTION NUMBER
I_TRN_POSTED STRING(1) !TRANSACTION POSTED?
. .
AP_CKS FILE,PRE(APC),CREATE,RECLAIM
OWNER('$BRIX'),ENCRYPT
CK_NUM_X KEY(APC:CHECK_NUMBER),DUP,NOCASE,OPT
RECORD RECORD
VEND_NUM STRING(10) !CK VENDOR NUMBER
INVOICE_NUM STRING(15) !INVOICE NUMBER
CHECK_NUMBER STRING(15) !CHECK NUMBER
RETURNED STRING(1) !RETURNED FROM BANK-FUTURE USE
POSTED STRING(1) !CHECK POSTED-FUTURE USE
CHECK_NUM LONG !THE ACTUAL CHECK NUMBER - LONG
PAYEE STRING(50) !CHECK PAYEE (VENDOR OR REMIT)
I_TRN_DATE LONG !DATE OF CHECK
I_TRN_DESC STRING(25) !INVOICE DESCRIPTION
I_TRN_NETAMT DECIMAL(11,2) !AMOUNT TO POST TO AP INVOICES
I_TRN_DISAMT DECIMAL(11,2) !DISCOUNT AMOUNT FOR THIS INV
I_TRN_CODE STRING(1) !TRANSACTION CODE 1,2,3
. .
OE_CUST FILE,PRE(CUS),CREATE,RECLAIM
NAMEKEY KEY(CUS:BILL_ZIP,CUS:TICKLER_TO,CUS:BILL_NAME),DUP,NOCASE
CNUMKEY KEY(CUS:CUST_NUM),NOCASE,OPT
NUMKEY KEY(CUS:NUMBER),NOCASE,OPT
NAMEKEY2 KEY(CUS:BILL_NAME),DUP,NOCASE
RECORD RECORD
NUMBER LONG !Internal Customer Number
CUST_NUM STRING(10) !CUSTOMER NUMBER
BILL_NAME STRING(30) !CUSTOMER NAME
BILL_ADDR_1 STRING(30) !BILLING ADDRESS LINE 1
BILL_ADDR_2 STRING(30) !BILLING ADDRESS LINE 2
BILL_CITY STRING(15) !BILLING CITY
BILL_STATE STRING(2) !BILLING STATE
BILL_ZIP STRING(@P#####PB) !BILLING ZIP CODE
BILL_COUNTRY STRING(10) !BILLING COUNTRY
TELEPHONE_1 STRING(15) !CUSTOMER TELEPHONE 1 -PRIMARY
TELEPHONE_2 STRING(15) !CUSTOMER PHONE 2 - FAX, ETC.
SHIP_ADDR_1 STRING(30) !SHIPPING ADDRESS LINE 1
SHIP_ADDR_2 STRING(30) !SHIPPING ADDRESS LINE 2
SHIP_ADDR_3 STRING(30) !SHIPPING LINE THREE
SHIP_ADDR_4 STRING(30) !SHIPPING ADDRESS FOUR
CURRENT_BAL DECIMAL(11,2) !CURRENT CUSTOMER BALANCE -TOT
YTD_SALES DECIMAL(11,2) !SALES THIS YEAR
LAST_YR_SALE DECIMAL(11,2) !SALES FOR PRIOR YEAR
LAST_I_DATE LONG !LAST INVOICE DATE
LAST_PMTDATE LONG !LAST PAYMENT DATE
LAST_PMT_AMT DECIMAL(11,2) !LAST PAYMENT AMOUNT
LAST_INV_NUM LONG !Last Invoice Number
CREDIT_LIMIT DECIMAL(11,2) !CUTOMER CREDIT LIMIT
CREDIT_RTNG STRING(1) !Flag for Bad Checks or Retrns
DUE_IN_DAYS LONG !NUMBER OF DAYS INVOICES DUE
FINANCE_DAYS LONG !APPLY FINANCE AFTER n DAYS
SEND_REMIND STRING(1) !PRINT REMINDER ON STATEMENTS
TAX_CODE_DEF STRING(5) !TAX CODE AR REF IF ANY
FINANCE_YN STRING(1) !CHARGE CUST FINANCE CHG YES/NO
FINANCE_RATE DECIMAL(5,4) !PERCENTAGE OF FINANCE CHG
SEND_STAT STRING(1) !SEND STATEMENTS TO CUSTOMER
TERMS STRING(10) !TEXT-CUST TERMS-NOT FOR CALC
SALESMAN STRING(5) !CUSTOMER SALESMAN
COMMRATE DECIMAL(5,2) !SALESREP COMMISSION RATE
CONTACT STRING(20) !CUSTOMER CONTACT FOR AR
TICKLER_TO STRING(10) !SEND SALES TICKLER MESSAGES TO
ADDR_SAME STRING(1) !Address Same as Shipping Addr
. .
CATEGORY FILE,PRE(CAG),CREATE,RECLAIM
CATEGORY_KEY KEY(CAG:CATEGORY),NOCASE,OPT
RECORD RECORD
CATEGORY STRING(30) !Category Name
. .
EJECT('GLOBAL MEMORY VARIABLES')
ACTION SHORT !0 = NO ACTION
!1 = ADD RECORD
!2 = CHANGE RECORD
!3 = DELETE RECORD
!4 = LOOKUP FIELD
!5 = AUTONUMKEY ADD
CHAIN_MENU BYTE(0) !BX CHAIN TO ACCT MENU
GROUP,PRE(MEM)
MESSAGE STRING(30) !Global Message Area
PAGE SHORT !Report Page Number
LINE SHORT !Report Line Number
DEVICE STRING(30) !Report Device Name
TODAY LONG !Today's Logon Date
PASSWORD STRING(8) !Password Entry Field
SDATE LONG !Starting Date
EDATE LONG !Ending Date
SNUM LONG !Start Tran Number
ENUM LONG !Ending Tran Number
SCODE STRING(10) !Scratch Code @S5
FLAG1 BYTE !Special Use Flag Variable
KEY_FLAG BYTE !hold variable for keypress
ANSWER1 STRING(1) !Scratch Answer Field
ANSWER2 STRING(1) !Scratch Answer Field
SAVEDATE LONG !Scratch Variable
CUSTNUM_ALPH STRING(10) !Customer Number Scratch
CUSTNUM_NUM LONG !Customer Number - Long
AMT1 DECIMAL(9,2) !Scratch Variable for $$
AMT2 DECIMAL(9,2) !Scratch Variable
AMT3 DECIMAL(9,2) !Scratch Variable
AMT4 DECIMAL(9,2) !Scratch Variable
AMT5 DECIMAL(9,2) !Scratch Variable
FILENAME STRING(50)
.
EXITSCRN SCREEN WINDOW(11,50),AT(8,16),HUE(0,7)
ROW(4,18) PAINT(1,17),HUE(16,4)
ROW(1,1) STRING('╔═{48}╗'),HUE(4,7)
ROW(2,1) REPEAT(9);STRING('║<0{48}>║'),HUE(4,7) .
ROW(11,1) STRING('╚═{48}╝'),HUE(4,7)
ROW(4,18) STRING(' Request to Exit '),HUE(30,4)
ROW(7,8) STRING('Press')
COL(14) STRING(' ESCAPE '),HUE(14,4)
COL(23) STRING('again to confirm exit.')
ROW(9,10) STRING('Any other key to restart program.')
.
EJECT('CODE SECTION')
CODE
SETHUE(7,0) !SET WHITE ON BLACK
BLANK ! AND BLANK
HELP('OE.HLP') !OPEN THE HELP FILE
G_OPENFILES !OPEN OR CREATE FILES
SETHUE() ! THE SCREEN
DOAGAIN
STARTSCREEN !introduction form
IF KEYCODE()=CTRL_ESC THEN RETURN.
IDLE()
OPEN(EXITSCRN)
ASK
CLOSE(EXITSCRN)
IF KEYCODE()<>ESC_KEY THEN GOTO DOAGAIN.
IF CHAIN_MENU = TRUE ! CHAIN TO ACCT MENU IF TRUE
CHAIN('ACCTMENU') ! CALL THE MENU
.
RETURN !EXIT TO DOS
IDLER PROCEDURE
CODE
NORMAL
SHOW(25,1,TODAY(),@D1)
SHOW(25,10,CLOCK(),@T3)
! I# = INSTATE()
! IF I#<>0
! SHOW(25,67,'Ins',@S3)
! ELSE
! SHOW(25,67,' ',@S3)
! .
PEEK(0417h,I#)
IF BAND(I#,01000000b)
SHOW(25,70,'Cap',@S3)
ELSE
SHOW(25,70,' ',@S3)
.
PEEK(0417h,I#)
IF BAND(I#,00100000b)
SHOW(25,73,'Num',@S3)
ELSE
SHOW(25,73,' ',@S3)
.
SHOW(25,77,FORMAT(MEMORY(1)/1000,@N4))
SETHUE()
RETURN
DISPBMSG PROCEDURE(BMSG)
BMSG STRING(48)
CODE
SHOW(25,18,CENTER(BMSG,48))
RETURN
STEPCHECK PROCEDURE(FIELDVALUE,STEPSIZE)
STEPSIZE DECIMAL(8,2)
FIELDVALUE EXTERNAL
CODE
IF OMITTED(2) !IF STEPSIZE IS OMITTED
STEPSIZE=1 !SET TO 1
END
CASE KEYCODE()
OF GPLUS_KEY
FIELDVALUE += STEPSIZE !IF GREY PLUS KEY
DISPLAY(?) !DISPLAY NEW VALUE
SELECT(?) !STAY IN FIELD
OF GMINUS_KEY !IF GREY MINUS KEY
FIELDVALUE -= STEPSIZE
DISPLAY(?)
SELECT(?)
OF GAST_KEY !IF GREY ASTERICK KEY
FIELDVALUE = TODAY() !SET TO TODAY'S DATE
DISPLAY(?)
SELECT(?)
END !END CASE KEYCODE()
RETURN
G_OPENFILES PROCEDURE !OPEN FILES & CHECK FOR ERROR
CODE
RECOVER(120) !HOLDS TIMEOUT IN 120 SECONDS
G_OPENFILES2(OE_CTRL) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_SREP) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_STAX) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_SCAT) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_INVCE) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_DTAIL) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_PYMT) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(IV_ITEM) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(IV_ICOST) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(IV_DISC) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(VEND) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(AP_1099) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(AP_TRAN) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(AP_CKS) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(OE_CUST) !GO OPEN THE FILE
!END OPENFILE
G_OPENFILES2(CATEGORY) !GO OPEN THE FILE
!END OPENFILE
RECOVER() !DISARM RECOVER
BLANK !BLANK THE SCREEN
!─ Begin new model procedure ─────────────────────────────────────────
G_OPENFILES2 PROCEDURE(DataFile)
DataFile EXTERNAL,FILE
FileName STRING(64)
CODE
FileName = NAME(DataFile) !STORE NAME OF FILE PASSED
SHOW(25,1,CENTER('Sharing file: ' & CLIP(FileName),80))
SHARE(DataFile) !OPEN THE FILE IN SHARED MODE
IF ERRORCODE() !OPEN RETURNED AN ERROR
CASE ERRORCODE() ! CHECK FOR SPECIFIC ERROR
OF 46 ! KEYS NEED TO BE REQUILT
SETHUE(0,7) ! BLACK ON WHITE
SHOW(25,1,CENTER('Rebuilding keys for ' & CLIP(FileName),80))
OPEN(DataFile) ! TRY TO GET EXCLUSIVE ACCESS
IF ERRORCODE() = 55 ! IF OPEN FAILS
SHOW(25,1,CENTER('Exclusive access required to' |
& 'rebuild keys for ' & CLIP(FileName),80))
ASK ! WAIT FOR A KEYSTROKE
RETURN ! AND EXIT
ELSE ! OTHERWISE
BUILD(DataFile) ! CALL THE BUILD PROCEDURE
CLOSE(DataFile) ! CLOSE UNSHARED FILE
SHARE(DataFile) ! OPEN FILE SHARED
SETHUE(7,0) ! WHITE ON BLACK
BLANK(25,1,1,80) ! BLANK THE MESSAGE
END ! IF ! END IF
OF 2 !IF NOT FOUND,
CREATE(DataFile) ! THEN CREATE
CLOSE(DataFile) ! CLOSE IT SO IT CAN
SHARE(DataFile) ! BE OPENED SHARED
ELSE ! ANY OTHER ERROR
LOOP ! STOP EXECUTION
STOP('Cannot share ' & CLIP(FileName) & ' - Error:' & ERROR())
END ! Loop
END ! Case
END ! If
!─ End new model procedure ───────────────────────────────────────────