FIN0103 Create Payment Transactions (Single Execution)
Basic Information
Module | Finance.Payments |
---|---|
Code | FIN0103 |
Parent Document | Payment Slip |
Sub-document | Payment Transaction |
Full Name | Create Payment Transactions (Single Execution) |
Status | ACTIVE |
Deterministic | YES |
Supports Transitional Documents | NO |
Replaces | CreatePaymentTransaction CreateIncomePaymentTransaction CreateOutcomePaymentTransaction |
Orphan Rows | None |
Split Function | PaymentSlipAmount |
Introduced In Version | 2019.1 |
Date of Suspension | - |
Business Logic
This Generation Procedure is used to create Payment Transactions of the current Payment Slip. For each Payment Slip Amount of the Payment Slip should be created one Payment Transaction. Currently, for the Generation there are two available settings (set in "PaymentSlipPaymentTransactionsTemplate" of the line of the particular Route):
- "Create Income Payments" - this setting specifies whether or not payments for Payment Slip Amounts with direction Expense will be created;
- "Create Expense Payments" - this setting specifies whether or not payments for Payment Slip Amounts with direction Expense will be created;
Current Generation Procedure possesses the functionality to copy Custom Property Values from the Payment Slip Amount to the created Payment Transaction. Copying happens to Custom Properties, which are set in Payment Transaction Document Definition if the Custom Property of Payment Transaction has the same hereditary root as the Custom Property of Payment Slip Amount (for more information about hereditary root, see topic Inheriting and Copying Custom Properties).
Fulfillments
Name | PaymentSlipAmoutToPaymentTransaction |
---|---|
Parent Entity | PaymentSlipAmout |
Child Entity | PaymentTransaction |
Parent / Child Relationship | PaymentTransaction.ParentSlipAmountId = PaymentSlipAmout |
Metrics
No metrics are used for the current generation procedure. It will not create new sub-document if there is at least one non-voided execution for the current Payment Slip no matter if the Payment Transaction's Total Amount is different than Payment Slip Amount's Total Amount.
The Payment Transaction’s header is created based on the Payment Slip’s header or on the Payment Slip Amount as follows:
PaymentTransaction.PaymentSlip = PaymentSlip
PaymentTransaction.PaymentType = PaymentSlip.PaymentType
PaymentTransaction.PaymentAccount = PaymentSlip.PaymentAccount
PaymentTransaction.PaymentSlipNo = PaymentSlip.PaymentSlipNo
PaymentTransaction.TotalAmountCurrency = PaymentSlip.DocumentCurrency
PaymentTransaction.ParentPaymentSlipAmount = PaymentSlipAmount
PaymentTransaction.DocumentDate = PaymentSlipAmount.PaymentDate
PaymentTransaction.Party = PaymentSlipAmount.Party
PaymentTransaction.Direction = PaymentSlipAmount.Direction
PaymentTransaction.TotalAmount = IFF (PaymentSlipAmount.TotalAmount != Null, PaymentSlipAmount.TotalAmount, SUM(PaymentSlipLine.Amount[PaymentSlipLine.PaymentSlipAmount = PaymentSlipAmount])
PaymentTransaction.PaymentReason = PaymentSlipAmount.PaymentReason
PaymentTransaction.RequiresAllocation = IFF (PaymentSlipAmount.PaymentReason == PartySystemPaymentReasonId, True, False)
PaymentTransaction.ТоParty = PaymentSlipAmount.Party
Note
The attributes which are not specified here are filled in as described in Standard Document Attributes
The lines of the new document are created based on the Payment Slip Lines. If there are Payment Slip Lines for current Payment Slip Amount, for each line, one Payment Transaction Line will be created as follows:
PaymentTransactionLine.PaymentOrder = PaymentSlipLine.PaymentOrder
PaymentTransactionLine.CoveredOrderAmount = PaymentSlipLine.CoveredOrderAmount
PaymentTransactionLine.Amount = PaymentSlipLine.Amount
PaymentTransactionLine.AllowOverpayment = true