Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
accounting
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
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
DAR
accounting
Merge requests
!41
imp: I-8144 autoClose account reconcile entries
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
imp: I-8144 autoClose account reconcile entries
imp-I-8144-autoClose-reconcile-entries
into
1.x
Overview
0
Commits
1
Pipelines
1
Changes
4
Merged
simon
requested to merge
imp-I-8144-autoClose-reconcile-entries
into
1.x
6 months ago
Overview
0
Commits
1
Pipelines
1
Changes
4
Expand
0
0
Merge request reports
Compare
1.x
1.x (base)
and
latest version
latest version
1ddc2686
1 commit,
6 months ago
4 files
+
29
−
2
Expand all files
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
Search (e.g. *.vue) (Ctrl+P)
src/Entity/AccountingAccount.php
+
14
−
0
Options
@@ -562,4 +562,18 @@ class AccountingAccount extends ContentEntityBase implements AccountingAccountIn
return
$fields
;
}
/**
* {@inheritdoc}
*/
public
function
transitionClose
()
{
if
(
$this
->
getCurrentBalance
()
<>
0
)
{
return
;
}
\Drupal
::
service
(
'accounting.book_entry'
)
->
reconcileEntryLines
(
$this
->
getUnreconciledLines
());
$this
->
setState
(
'closed'
);
$this
->
save
();
}
}