Step 1: Enter the amount paid on the invoice
The amount paid is stored in the "PaidFC" property in the ReceiptInvoiceDTO class. This is gross and stored in the foreign currency of the receipt.
The c-entron "Payment Receipt" module is used as an example.
| Total amount | Is the invoice amount gross? |
|---|---|
| Discount amount | Gross invoice amount minus any cash discount, if applicable under the payment terms. |
| Amount already paid | In c-entron, the amount paid is stored in a property called PaidFC. This represents the total "paid" amount of the invoice. |
| When a credit note is created, the credit note amount is also entered in PaidFC. PaidFC in gross / foreign currency | |
| Outstanding amount | The remaining amount of the invoice in gross. |
| Amount paid | The amount to be paid, which should be entered in the c-entron input mask. The "Clear amount" function enters the "Open amount" in the "Amount paid" field. |
Web service method call to enter the paid amount in the invoice
var request = new UpdateReceiptIsPaidRequest
{
ReceiptKind = CentronObjectKindNumeric.InvoiceClass,
ReceiptI3D = 123,
IsPaid = false,
PaidFC = 5000,
ConcurrencyControlGuid = "b9f30717-4dc7-479e-a616-9a4845bf6c0e",
ModuleOrAction = "Payment received",
};
return this.\_connection.CallWebServiceMethodWithSingleResultAsync(f => f.UpdateReceiptIsPaid(this.\_connection.GetRequest(request)));
| ReceiptKind | Document type -> CentronObjectKindNumeric.InvoiceClass |
|---|---|
| ReceiptI3D | I3D of the document |
| IsPaid | Boolean value indicating whether the invoice has been paid or not. This controls the "status" value of the invoice. |
| IsPaid = True sets the status of the invoice to 2 (invoice is paid). | |
| IsPaid = False sets the status of the invoice to 1 (invoice is open). | |
| IsPaid = NULL Nothing is changed in the status. For partial payments, set this to False because the invoice should remain "open." Only when the invoice is considered "closed" should the value be set to True. | |
| PaidFC | The total amount paid for the invoice. PaidFC = [PaidFC of the invoice] + [Amount paid] |
| ConcurrencyControlGuid | Use the value from the loaded invoice via GetReceiptByI3D or receipt search. Whenever a new version of the RE is saved, the GUID is also renewed. Security feature to prevent overwriting invoice updates made by other users. |
| ModuleOrAction | Text is used for a log entry on the invoice if the "amount paid" has changed. The payment receipt module transfers "payment received" as the value here, for example. |
Step 2: Create an entry when payment is received
The entry in incoming payments is optional. For c-entron, only the invoice status and the paid amount of the invoice (PaidFC) are relevant.
var dto = new IncomingPaymentDTO
{
Amount = 5000,
Number = 14501,
CreatedAt = DateTime.Now,
InvoiceAmount = 50000,
PaymentDate = this.PaymentDate,
Comment = this.Comment,
ResidualAmount = 45000,
AccountStatementDate = this.AccountStatementDate,
AccountStatementNumber = this.AccountStatementNumber,
EmployeeI3D = 1,
InvoiceHeaderI3D = 123,
IsClosed = this.CloseReceipt,
BankAccount = 'IBAN'
};
await ClassContainer.Instance.WithInstance(async (IPaymentsLogic logic) => await logic.SaveIncomingPayment(dto)).ThrowIfError();
| Amount | The [amount paid]. The value entered in the [Amount paid] field in the payment receipt screen. |
|---|---|
| Number | Invoice number. |
| CreatedAt | Timestamp indicating when the data record was created. |
| InvoiceAmount | Includes the gross amount of the invoice. |
| PaymentDate | Date on which the payment was made. |
| Comment | Comment on the booking. |
| ResidualAmount | Remaining balance of the invoice. Gross amount - amount paid |
| Account Statement Date | Date of the bank statement. |
| Account Statement Number | Bank statement number. |
| EmployeeI3D | ID of the employee who entered the data record. |
| InvoiceHeaderI3D | Invoice ID. |
| IsClosed | Indicates whether the invoice was closed with this incoming payment posting or not. |
| BankAccount | IBAN on the bank statement. |