-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX Accountancy - Blocking on annual closing #30653
base: 19.0
Are you sure you want to change the base?
Conversation
@@ -2707,7 +2715,7 @@ public function closeFiscalPeriod($fiscal_period_id, $new_fiscal_period_id, $sep | |||
$sql .= ' AND aa.pcg_type IN (' . $this->db->sanitize(implode(',', $pcg_type_filter), 1) . ')'; | |||
$sql .= " AND DATE(t.doc_date) >= '" . $this->db->idate($fiscal_period->date_start) . "'"; | |||
$sql .= " AND DATE(t.doc_date) <= '" . $this->db->idate($fiscal_period->date_end) . "'"; | |||
$sql .= ' GROUP BY t.numero_compte, t.label_compte, aa.pcg_type'; | |||
$sql .= ' GROUP BY t.numero_compte, aa.pcg_type'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imagine you have in database
1 line: account = 12345, label = 'A label for the transaction", amount 10
1 line: account = 12345, label = 'A different transaction', amount 15
What do we want after creating the "A nouveau" lines ?
Just 1 line with amount 25 and label = 'A nouveau for closure abc' ?
Can you confirm ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that this is exactly what we're aiming for. It's the a-nouveaux principle.
The a-nouveaux entry is similar to a trial balance in reality.
In France, this consists of summarizing all class 1 to 5 accounts (CAPIT to FINAN) in a single account.
And the annual result class 7 - 6 (INCOME - EXPENSE) goes to account 120 or 129.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So PR seems good to me.
Fix related to this forum post : https://www.dolibarr.fr/forum/t/cloture-exercice-et-a-nouveau/47070
If an account is used with an other label, the closure is impossible.
Need feedback