Contains the header-level invoice information from the specified invoice.
Syntax
typedef struct tagCMA_INVOICEHEADER {
LONG lInvoiceCount;
CHAR szOrganizationID[51];
CHAR szInvoiceNumber[51];
LONG lInvoiceKey;
DWORD dwCurrencyCode;
LONG lShipToArrayIndex;
LONG lBillToArrayIndex;
BOOL fSaleInvoice;
CHAR szSalespersonID[51];
CHAR szPurchaseOrderNumber[51];
CHAR szInvoiceType[51];
SYSTEMTIME stOrderDate;
SYSTEMTIME stInvoiceDate;
SYSTEMTIME stGLPostingDate;
SYSTEMTIME stShipDate;
SYSTEMTIME stDueDate;
CHAR szPaymentType[51];
CHAR szSalesTerms[51];
CMACY cyFreight;
CMACY cyDiscount;
CMACY cyVATFederal;
CMACY cyVATProvincal;
CMACY cyVATCity;
CMACY cySalesTax;
CMACY cyTotalAmount;
BOOL fVoid;
SYSTEMTIME stDateModified;
} CMA_INVOICEHEADER;
lInvoiceCount This represents the number of invoices to be presented to the filter. SBCM uses this value to generate the progress display for the user during the import process. This needs to be populated in the first call to CMA_LoadInvoiceHeader in order to properly display progress to the user.
szOrganizationID The organization ID for the invoice that matches the organization ID passed in for the specified customer. For more information, see the CMA_LoadOrganization topic. This member is required (must not be NULL).
szInvoiceNumber A null-terminated string that contains the invoice number (for display purposes only). Most of the time, this number will be exactly the same as the lInvoiceKey number. However, for systems that allow multiple invoice numbers to be the same and that handle uniqueness through a "behind-the-scenes" key, the invoice number will go here.
lInvoiceKey A unique ID for the invoice. This ID will be joined with the information in the CMA_INVOICEHEADER and CMA_INVOICEDETAIL structures. This member is required (must not be NULL).
dwCurrencyCode A value that identifies the currency code of the data being passed to the filter. This can be any of the defined values in Aacommon.h (see list of values at the end of this document). This member is required when the fDualCurrency member of the CMA_CTRLINFO structure is True (must not be NULL).
lShipToArrayIndex The index of the ship-to address for this invoice. This will be joined with the Address table to provide the address. The member assumes the nCommunicationPoint member of the CMA_STREETADDRESS structure is set to COMMUNICATIONPOINT_ADDRESS, the nCommunicationPointType member is set to COMMUNICATIONPOINTTYPE_ADDRESS, and the nCommunicationPointUsage member is set to COMMUNICATIONPOINTUSAGE_SHIPTO.
If the ship-to address for this invoice is not in the array of addresses passed in through the CMA_LoadOrganizationStreetAddress function, use the CMA_LoadInvoiceStreetAddress function to load this ship-to address.
lBillToArrayIndex The index of the bill to address for this invoice. This will be joined with the Address table to provide the address. This member assumes the nCommunicationPoint member of the CMA_STREETADDRESS structure is set to COMMUNICATIONPOINT_ADDRESS, the nCommunicationPointType member is set to COMMUNICATIONPOINTTYPE_ADDRESS, and the nCommunicationPointUsage member is set to COMMUNICATIONPOINTUSAGE_BILLTO.
If the bill-to address for this invoice is not in the array of addresses passed in through the CMA_LoadOrganizationStreetAddress function, use the CMA_LoadInvoiceStreetAddress function to load this bill-to address.
fSaleInvoice An invoice flag. A value of True indicates the invoice is a sales invoice; otherwise, it is a payable or vendor invoice. This member is required (must not be NULL).
szSalespersonID The name or ID of the salesperson for this invoice.
szPurchaseOrderNumber A null-terminated string that contains the purchase order number for the invoice. If there are multiple purchase orders combined to create this invoice, use the first purchase order assigned to this invoice.
szInvoiceType A null-terminated string that contains the invoice-type ID; for example, "IN" for invoice, "CM" for credit memo, and so on. The invoice-type ID is defined by the originating system.
stOrderDate The date on which the invoiced goods were ordered.
stInvoiceDate The date of the invoice.
stGLPostingDate The date on which the invoice was posted to the general ledger.
stShipDate The date on which the invoiced goods were shipped.
stDueDate The due date for the invoice. Leave this blank if there are multiple due dates.
szPaymentType A null-terminated string that contains the type of expected payment for the invoice.
szSalesTerms A null-terminated string that contains the sales terms for the invoice (for example, 2%10/n30). If there are more than one sales term per invoice, use the first sales term assigned to this invoice.
cyFreight The amount of freight or transport costs for the entire invoice.
cyDiscount The payment discount (if any) for timeliness for the entire invoice.
cyVATFederal The VAT/GST federal tax for the entire invoice.
cyVATProvincal The VAT/GST provincial tax for the entire invoice.
cyVATCity The VAT/GST city tax for the entire invoice.
cySalesTax The sales tax for the entire invoice.
cyTotalAmount The total monetary amount for the entire invoice before freight and taxes are added and after any discount.
fVoid A "void" flag. A return value of True indicates that this invoice is void or cancelled.
stDateModified The last date on which this record was modified in the source system. This member is required (must not be NULL).
See Also
CMA_CTRLINFO, CMA_INVOICEDETAIL, CMA_INVOICEHEADER, CMA_LoadOrganization, CMA_STREETADDRESS, Currency Identifiers