Skip to content
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

Draft
wants to merge 3 commits into
base: 19.0
Choose a base branch
from

Conversation

aspangaro
Copy link
Member

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

@@ -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';
Copy link
Member

@eldy eldy Aug 16, 2024

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 ?

Copy link
Member Author

@aspangaro aspangaro Aug 17, 2024

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.

Copy link
Member

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.

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants