Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Developer Documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brienne
Developer Documentation
Commits
8e731d87
Commit
8e731d87
authored
5 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
Further clafition of financial items
parent
0729c703
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/financial/financialentities.md
+25
-8
25 additions, 8 deletions
docs/financial/financialentities.md
with
25 additions
and
8 deletions
docs/financial/financialentities.md
+
25
−
8
View file @
8e731d87
...
...
@@ -62,20 +62,37 @@ Negative payments (or refunds) will have the bank or processor account on the **
Financial items exist to track how much has been paid against the various line items within an order / contribution.
In an accounting system this might be called credit-matching.
Each line item will have one or more financial items denoting payments made against it. On creation of the order there
will be a financial item for each line item and an additional item for every fee amount. Where the preferred flow is used
this item will have a status of 'Unpaid'.
Each line item will have one financial item denoting payments made against it or a transaction transferring the money to
accounts receivable. On creation of the order there
will be a financial item for each line item and an additional item for every fee amount.
!!! The created financial item should have a status of 'Unpaid' but it seems that may not always be the case and it may be
partially paid instead - further auditing needed as this seems to be linked to use of an old method to create partial payments.
Financial item statuses are potentially used for reporting but are not used in any functional calculations.
!!! note
For historical reasons this may not always be true but
[
it's the goal
](
https://github.com/civicrm/civicrm-dev-docs/issues/712
)
.
For historical reasons this may not always be true but
[
it's the goal
](
https://github.com/civicrm/civicrm-dev-docs/issues/712
)
. Financial items
may not always be present in practice for Pending contributions.
When a payment is made it might either pay off the line items,
or a
specific line item, in
full. In that case the line item
status
is updated
t
o Paid
and a
n
`EntityFinancialTrxn`
record is created
in the
`civicrm_entity_financial_trxn`
table linking
the
line item to the payment and
specifying the amount paid.
When a payment is made it might either pay off
all
the line items,
some of each of the line items,
specific line item
s
, in
part or in full.
Where a line item is now fully paid the status of the related financial item
is updated o Paid
. A
n
`EntityFinancialTrxn`
record is created
in
the
`civicrm_entity_financial_trxn`
table linking the payment to any line items it pays towards,
specifying the amount paid
on that payment
.
If the line item is paid in part then the
status is not updated
and the
`EntityFinancialTrxn`
record specifies the portion
If the line item is paid in part then the
financial item status should be 'Partly Paid'
and the
`EntityFinancialTrxn`
record specifies the portion
of the line item that has been paid by that payment.
For example if we have the scenario that an Order (Contribution) with 2 line items (values $100 & $200) is created then we will get
-
the order
-
1 financial trxn record transferring the cost to accounts payable
-
2 financial items (one for each line item for the full amount)
-
2 financial entity transaction records linking the financial items to the accounts receivable transaction
If we later get a payment for $100 we will see the following changes
-
1 financial trxn record with is_payment. From account is accounts receivable, to account is the payment asset account (e.g Bank account)
-
2 financial entity transaction records linking the financial items payment to the payment transaction.
If the line items change then the items financial items have to be updated. Generally the rule is to alter the zero out the
old line item, reverse the financial items and then create a new line item with new financial items. However, this is not
always possible as there are some scenarios where the schema does not permit this. The has led to
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment