MACINVOICE – Invoice Conversion/Interface

System
Matching (MA)
Prefix
MAI
Primary key
COMPANY, VENDOR, EDI-NBR, INVOICE, SUFFIX
Fields
99
Updated by
3 programs
Referenced by
0 programs

MACINVOICE is the Invoice Conversion/Interface table in Lawson Matching (prefix MAI). It is indexed by COMPANY, VENDOR, EDI-NBR, INVOICE, SUFFIX (MAISET1); alternate indexes: MAISET2 and MAISET4. It is related 1:M to MACINVERR. It is updated by MA54.1, MA54.2 and MA540. The table has 99 fields, 3 indexes and 1 documented relation.

About MACINVOICE

No description in the Lawson data dictionary.

Fields (99)

Column = COBOL field name without the MAI- prefix, hyphens → underscores. Derived fields are computed by the application and are not stored. PK = primary key (present in every index); SETn = leading/alternate key of that index.

Field / columnTypeDescription & valuesUpdated by
#MAI-RUN-GROUP SET2 SET4
RUN_GROUP
Alpha 15Run group is used to group records so that data for multiple companies can be processed. NOTE Either the run group or the company is required.MA54.1, MA540
#MAI-COMPANY PK
COMPANY
Numeric 4Required. The company number.MA54.1, MA540
#MAI-VENDOR PK
VENDOR
Alpha 9 (Right Justified)The vendor's identification code. NOTE Either the vendor ID or the EDI number is required.MA54.1, MA540
#MAI-EDI-NBR PK
EDI_NBR
Alpha 15The electronic data interchange (EDI) number assigned to the vendor. Used to retrieve the vendor ID. NOTE Either the EDI number or the vendor ID is required.MA54.1, MA540
#MAI-INVOICE PK
INVOICE
Alpha 22Required. Used to identify the invoice.MA54.1, MA540
#MAI-SUFFIX PK
SUFFIX
Numeric 3This is the suffix for the invoice. Zeroes will be entered.MA54.1, MA540
#MAI-BATCH-NUM
BATCH_NUM
Numeric 6This identifies the batch the entered invoices, debit memos, and credit memos are a part of.MA54.1, MA540
#MAI-VOUCHER-NBR
VOUCHER_NBR
Alpha 10The voucher number assigned to the invoice. Used only if the company has Yes selected in the Invoice Registration Option field.MA54.1, MA540
#MAI-AUTH-CODE
AUTH_CODE
Alpha 3A user-defined code representing a person or department responsible for approving a registered invoice.MA54.1, MA540
#MAI-PROC-LEVEL
PROC_LEVEL
Alpha 5The process level represents a reporting level below company. If left blank, the AP default process level will default. If there is no AP default process level defined, this field is required.MA54.1, MA540
#MAI-INVOICE-TYPE
INVOICE_TYPE
Alpha 1Identifies the type of invoice. Valid values are: " " = Invoice
  • D Debit Memo
  • C Credit Memo
MA54.1, MA540
#MAI-INV-CURRENCY
INV_CURRENCY
Alpha 5The currency of the invoice. Must be a valid record in the Currency Code file. If left blank, the vendor currency defaults.MA54.1, MA540
#MAI-INVOICE-DTE
INVOICE_DTE
Numeric 8 (yyyymmdd)Required. The date assigned to the invoice. Used when updating the vendor's purchase balance.MA54.1, MA540
#MAI-DISTRIB-DATE
DISTRIB_DATE
Numeric 8 (yyyymmdd)This field displays the system date when this was created.MA54.1, MA540
#MAI-PURCH-FR-LOC
PURCH_FR_LOC
Alpha 4The vendor's purchase from location.MA54.1, MA540
#MAI-PO-CODE
PO_CODE
Alpha 4Purchase order number code. Used to keep purchase orders unique. Can be used for reporting purposes.MA54.1, MA540
#MAI-PO-NUMBER
PO_NUMBER
Alpha 14 (Right Justified)This field contains the number representing the purchase order. This field is required if the PO Required flag is set to "Yes" on the assigned invoice handling code.MA54.1, MA540
#MAI-PO-RELEASE
PO_RELEASE
Numeric 4Used to identify a purchase order release (created from a Blanket or Standing order).MA54.1, MA540
#MAI-DESCRIPTION
DESCRIPTION
Alpha 30 (Lower Case)This field displays the description.MA54.1, MA540
#MAI-TRAN-INV-AMT
TRAN_INV_AMT
Signed 18.2The amount of the invoice in the currency of the invoice.MA54.1, MA540
#MAI-TRAN-ALOW-AMT
TRAN_ALOW_AMT
Signed 18.2The amount of the invoice available for discount in the currency of the invoice. If left blank, the Invoice Amount defaults.MA54.1, MA540
#MAI-TRAN-TXBL-AMT
TRAN_TXBL_AMT
Signed 18.2The taxable amount of the invoice in the currency of the invoice.MA54.1, MA540
#MAI-TRAN-TAX-AMT
TRAN_TAX_AMT
Signed 18.2—MA54.1, MA540
#MAI-TRAN-DISC-AMT
TRAN_DISC_AMT
Signed 18.2The discount amount of the invoice in the currency of the invoice. If left blank, the terms code assigned to the invoice, alternate location (type P or B), or vendor, if assigned, will be used to calculate the discount amount.MA54.1, MA540
#MAI-ORIG-CNV-RATE
ORIG_CNV_RATE
Signed 14.7—MA54.1, MA540
#MAI-DISCOUNT-RT
DISCOUNT_RT
Percent 5.3 (Percent)The rate used to calculate the discount amount of the invoice. If left blank, the terms code assigned to the invoice, alternate location (type P or B), vendor, or vendor class, if assigned, will be used to calculate due date and discount information.MA54.1, MA540
#MAI-DISC-DATE
DISC_DATE
Numeric 8 (yyyymmdd)The discount date assigned to the invoice. Used by Cash Requirements (AP150) to determine whether a discount will be taken on the invoice. If left blank, the terms code assigned to the invoice, alternate location (type P or B), or vendor, if assigned, will be used to calculate due date and discount information.MA54.1, MA540
#MAI-DUE-DATE
DUE_DATE
Numeric 8 (yyyymmdd)The transaction due date.MA54.1, MA540
#MAI-REMIT-TO-CODE
REMIT_TO_CODE
Alpha 4A user-defined code that represents a vendor's remittance address.MA54.1, MA540
#MAI-RETAIL-AMT
RETAIL_AMT
Signed 18.2The retail amount of the invoice.MA54.1, MA540
#MAI-RCPT-INV-DATE
RCPT_INV_DATE
Numeric 8 (yyyymmdd)The date the invoice was received.MA54.1, MA540
#MAI-REASON-CODE
REASON_CODE
Alpha 4This field contains the reason code, which indicates the cause for credit memos.MA54.1, MA540
#MAI-MATCH-REF-NBR
MATCH_REF_NBR
Alpha 22Matching reference number.MA54.1, MA540
#MAI-HANDLING-CODE
HANDLING_CODE
Alpha 4Invoice handling code. The invoice handling code contains processing rules for invoice matching.MA54.1, MA540
#MAI-OPERATOR
OPERATOR
Alpha 10This field is used to store the login id of the person who entered the record.MA54.1, MA540
#MAI-TERM-CODE
TERM_CODE
Alpha 5A user-defined code representing a method of determining invoice due and discount dates.MA54.1, MA540
#MAI-TAX-CODE
TAX_CODE
Alpha 10This field contains a code representing specific tax information. This must be valid Tax Code.MA54.1, MA540
#MAI-TAX-CODE-CNTL
TAX_CODE_CNTL
Alpha 1This control field defines the tax code usage in invoicing and approving taxes. For PO Invoices, if set to O (Override) all lines approved for payment will use the tax code defined for the whole invoice. If set to I (Ignore) no PO lines approved for payment will be taxed.
  • 1 Override
  • 2 Ignore
  • 3 Calculate
  • 4 Override Product and AOC
  • 5 Ignore product and AOC
  • 6 Ignore tax tol ovr goods tax
  • 7 Ignore tax tol ovr goods/aoc t
MA54.1, MA540
#MAI-LOCATION
LOCATION
Alpha 5This field contains a valid stocking location within the company inventory system. NOTE Required if pool option for vendor/company = 3.MA54.1, MA540
#MAI-RECORD-ERROR SET2
RECORD_ERROR
Alpha 1Indicates if an error was found during interface or conversion, and if the error has been corrected. Valid values are:
  • Y Error found
  • N No error found or error corrected
MA54.1, MA540
#MAI-CBPRINT-FL
CBPRINT_FL
Alpha 1Print chargebacks flag. Indicates whether to generate chargebacks.
  • N No
  • Y Yes
MA54.1, MA540
#MAI-INVC-REF-TYPE
INVC_REF_TYPE
Alpha 2Indicates the type of number the vendor is providing to reference the invoice.MA54.1
#MAI-INV-USR-FLD-01
INV_USR_FLD_01
Alpha 20Invoice user-defined field number 1.MA54.1, MA540
#MAI-INV-USR-FLD-02
INV_USR_FLD_02
Alpha 20Invoice user-defined field number 2.MA54.1, MA540
#MAI-INV-USR-FLD-03
INV_USR_FLD_03
Alpha 20Invoice user-defined field number 3.MA54.1, MA540
#MAI-INV-USR-FLD-04
INV_USR_FLD_04
Alpha 20Invoice user-defined field number 4.MA54.1, MA540
#MAI-INV-USR-FLD-05
INV_USR_FLD_05
Alpha 20Invoice user-defined field number 5.MA54.1, MA540
#MAI-RETURN-NUMBER
RETURN_NUMBER
Numeric 10This is the number assigned to the return for purposes of referencing the return internally and with the customer or vendor.MA54.1, MA540
#MAI-JRNL-BOOK-NBR
JRNL_BOOK_NBR
Alpha 12The journal book assigned to the transaction.MA54.1
#MAI-SEGMENT-BLOCK
SEGMENT_BLOCK
Alpha 103This field identifies the user analysis values included in the transaction. You can either type up to four values or use Define (F6) to open the User Analysis Entry subform. Use this subform to select the user analysis values you want to include in the transaction. If you choose to type values, use commas to separate them. For example: value1,value2,value3,value4 There are three conditions that affect how you can select user analysis values. See the User Analysis Entry form help or the Strategic Ledger procedures manual for additional information.MA54.1, MA540
#MAI-NOTC
NOTC
Alpha 2The Nature of Transaction code. Must be a valid code defined in IN07.1 (NOTC Maintenance).MA54.1, MA540
#MAI-STAT-PROC
STAT_PROC
Alpha 6The statistical procedure code applied to the data. The code must be defined in IN06.1. (Statistical Procedure Maintenance).MA54.1, MA540
#MAI-SHIP-VIA
SHIP_VIA
Alpha 12 (Lower Case)—MA54.1, MA540
#MAI-UNLOADING-PORT
UNLOADING_PORT
Alpha 5The prot where the goods are unloaded if required. Must be defined in IN04.1 (Port Maintenance)MA54.1, MA540
#MAI-INTRASTAT-NBR
INTRASTAT_NBR
Numeric 12The number assigned by the Intrastat system to a transaction that involves Intrastat reporting after it has been added.—
#MAI-DROPSHIP-FL
DROPSHIP_FL
Alpha 1This flag indicates whether goods being shipped by the vendor directly to a non standard location need to have the receiving process performed.MA54.1, MA540
#MAI-FOB-CODE
FOB_CODE
Alpha 3The user defined Free On Board Code.MA54.1, MA540
#MAI-PAY-IMM-FLAG
PAY_IMM_FLAG
Alpha 1—MA54.1, MA540
#MAI-DIVERSE-CODE
DIVERSE_CODE
Alpha 5Diversity Code for Account Payable VendorsMA54.1, MA540
#MAI-MTCH-PREPAY-FL
MTCH_PREPAY_FL
Alpha 1Flag that notes if the invoice will be prepaid. This is for match invoices.MA54.1
#MAI-MTCH-PREPAY-MT
MTCH_PREPAY_MT
Numeric 1Flag denotes the method of match prepayment.
  • 0 NO
  • 1 prepay from Invoice
  • 2 Eligible for Prepayment
MA54.1
#MAI-PREPAY-DATE
PREPAY_DATE
Numeric 8 (yyyymmdd)——
#MAI-PRPY-DISC-CODE
PRPY_DISC_CODE
Alpha 10——
#MAI-PRPY-REF-NBR
PRPY_REF_NBR
Alpha 22——
#MAI-PRPY-RTL-AMT
PRPY_RTL_AMT
Signed 18.2——
#MAI-PRPY-AMT
PRPY_AMT
Signed 18.2——
#MAI-PRPY-AOC-AMT
PRPY_AOC_AMT
Signed 18.2——
#MAI-PRPY-TAX-AMT
PRPY_TAX_AMT
Signed 18.2——
#MAI-PRPY-SERV-AMT
PRPY_SERV_AMT
Signed 18.2——
#MAI-FLEX-FLAG
FLEX_FLAG
Alpha 1Notes terms has been overridenMA54.1
#MAI-RULE-GROUP
RULE_GROUP
Alpha 10—MA54.1, MA540
#MAI-CONTRACT-GROUP
CONTRACT_GROUP
Alpha 4—MA54.1, MA540
#MAI-CM-CONTRACT
CM_CONTRACT
Numeric 15—MA54.1, MA540
#MAI-REBATE-TYPE
REBATE_TYPE
Alpha 25—MA54.1, MA540
#MAI-REBATE-DUE-DTE
REBATE_DUE_DTE
Numeric 8 (yyyymmdd)—MA54.1, MA540
#MAI-REF-INV-NBR
REF_INV_NBR
Alpha 22—MA54.1
#MAI-TAX-TYPE
TAX_TYPE
Alpha 1—
  • I Invoiced
  • A Accrued
—
#MAI-FOR-ECON-CODE
FOR_ECON_CODE
Alpha 10—MA54.1
#MAI-DISCOUNT-RT1
DISCOUNT_RT1
Percent 5.3 (Percent)——
#MAI-DISCOUNT-RT2
DISCOUNT_RT2
Percent 5.3 (Percent)—MA54.1, MA540
#MAI-DISCOUNT-RT3
DISCOUNT_RT3
Percent 5.3 (Percent)—MA54.1, MA540
#MAI-BASE-DISC-AMT1
BASE_DISC_AMT1
Signed 18.2——
#MAI-BASE-DISC-AMT2
BASE_DISC_AMT2
Signed 18.2——
#MAI-BASE-DISC-AMT3
BASE_DISC_AMT3
Signed 18.2——
#MAI-TRAN-DISC-AMT1
TRAN_DISC_AMT1
Signed 18.2——
#MAI-TRAN-DISC-AMT2
TRAN_DISC_AMT2
Signed 18.2—MA54.1, MA540
#MAI-TRAN-DISC-AMT3
TRAN_DISC_AMT3
Signed 18.2—MA54.1, MA540
#MAI-DISC-DATE1
DISC_DATE1
Numeric 8 (yyyymmdd)——
#MAI-DISC-DATE2
DISC_DATE2
Numeric 8 (yyyymmdd)—MA54.1, MA540
#MAI-DISC-DATE3
DISC_DATE3
Numeric 8 (yyyymmdd)—MA54.1, MA540
#MAI-FREIGHT-TOT
FREIGHT_TOT
Signed 18.2——
#MAI-INSURANCE-TOT
INSURANCE_TOT
Signed 18.2——
#MAI-CSTMS-TOT
CSTMS_TOT
Signed 18.2——
#MAI-OTHER-AOC-TOT
OTHER_AOC_TOT
Signed 18.2——
#MAI-GLBL-DOC-TYPE
GLBL_DOC_TYPE
Alpha 10—MA54.1, MA540
#MAI-REF-TYPE
REF_TYPE
Alpha 1—MA54.1, MA540
#MAI-CUSTOMER-ID
CUSTOMER_ID
Alpha 27—MA54.1, MA540
#MAI-PMT-CAT-CODE
PMT_CAT_CODE
Alpha 6—MA54.1, MA540
#MAI-NO-PAY-CONCERN
NO_PAY_CONCERN
Alpha 60——

Indexes (3)

Keys are listed in index order; ↓ marks a descending key. Every documented Lawson index is unique unless flagged Duplicates; Subset indexes carry a Where condition.

IndexKeysFlagsConditionUsed in
MAISET1
  1. COMPANY
  2. VENDOR
  3. EDI-NBR
  4. INVOICE
  5. SUFFIX
PrimaryMA54.1, MA54.2, MA54.3, MA54.8, MA540
MAISET2
  1. RUN-GROUP
  2. RECORD-ERROR
  3. COMPANY
  4. VENDOR
  5. EDI-NBR
  6. INVOICE
  7. SUFFIX
KeyChangeMA54.1, MA540
MAISET4
  1. RUN-GROUP
  2. COMPANY
  3. VENDOR
  4. EDI-NBR
  5. INVOICE
  6. SUFFIX
KeyChangeMA540

Relations

Relationship map — 1:1 lookups/parents on the left, 1:M children on the right (up to 14 each)
MACINVERRMACINVOICE

One to many (1) — child tables

RelationTableRulesConditionField map
MacinverrMACINVERR
MAI-COMPANY→MCI-COMPANY
MAI-VENDOR→MCI-VENDOR
MAI-EDI-NBR→MCI-EDI-NBR
MAI-INVOICE→MCI-INVOICE
MAI-SUFFIX→MCI-SUFFIX
—→MCI-DIST-SEQ
—→MCI-RECORD-TYPE
—→MCI-SEQ-NBR

Programs

Updated by (3)