clsImportPayment Class |
Please make sure, that SAP Business One DI-API in 32 or 64 bit is installed according to the usage of this interface. The logon user in MARIProject has to have a corresponding user linked to the selected company database.
Use MPInterface.bImportERPPayment(clsImportPayment, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportPayment type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportPayment | Initializes a new instance of the clsImportPayment class |
| Name | Description | |
|---|---|---|
| CancelPayment | This will create directly a cancelation Journal Entry for the payment | |
| CardCode |
business partner reference for the payment. ORCD.CardCode
| |
| CashAccount | Account OACT.AcctCode for the payment (Bank, Cash, or 9999..) | |
| ChangeBusinessPartner | This will exchange the business partner code for the cancelation journal entry | |
| JournalEntryNewBP | Field for the new business partner to be exchanged in the cancelation journal entry | |
| PaymentDate | Day of payment | |
| PaymentDirection | 1:Outgoing 2: Incomming | |
| PaymentLineID | Internal Counter for the MDB Database | |
| PaymentType | 0:Customer 1:Account 2: Supplier | |
| PaymentValue | Amount in document currency paid | |
| PrjCode |
ORCT.PrjCode
| |
| RefDocEntry | DocEnty of the linked document | |
| RefDocObjType | Type of the linked document 13:OINV, 18=OPOH | |
| Reference1 | Reference. When null then from document | |
| Reference2 | Reference. When null then from document | |
| TaxDate | When null, then the payment date | |
| TransAccount | Account ORCT.TrsfrAcct for the payment (Bank, Cash, or 9999..) | |
| TransferRef |
public bool CreatePayment(string sCardCode, int lInvoiceDocEntry, decimal cPaymentAmount, DateTime dtPayment) { clsImportPayment NewPayment = new clsImportPayment(); NewPayment.CompanyID = 1; NewPayment.PaymentDirection = clsImportPayment.ePaymentDirection.Incomming; NewPayment.PaymentType = clsImportPayment.ePaymentType.Customer; NewPayment.PaymentDate = dtPayment; NewPayment.PaymentValue = cPaymentAmount; NewPayment.CashAccount = "1000"; NewPayment.CardCode = sCardCode; NewPayment.RefDocObjType = (int)clsImportERPDocument.eERPDocTypes.AR_Invoice; NewPayment.RefDocEntry = lInvoiceDocEntry; NewPayment.Reference1 = "Ref to doc num"; if (oMPInterface.bImportERPPayment(NewPayment, clsImportBase.eImportMode.ValidateAndImport)) { return true; } else { LogFail(oMPInterface.oErrors.PrintErrors()); return false; } }