Update CA-3 structure to Notice 4722 (3310-CA3-SD) - Latest Official Form

Major Structure Update:
- Updated to latest official CA-3 form structure (Notice 4722)
- Replaced old structure with new 5-line format (A1-A5)
- All changes based on official notice 4722

New CA-3 Lines (Notice 4722):
- A1: HT amount of all taxable operations that form normal sales
- A2: HT amount of special taxable operations not part of ordinary turnover
- A3: HT amount of services purchased from non-established providers (reverse charge)
- A4: HT amount of imports taxable in France (non-EU), excluding petroleum products
- A5: HT amount of taxable operations at exit from suspensive fiscal regime

Enhanced Configuration Interface:
- Added detailed descriptions for each line
- Added PCG account recommendations
- Added notice reference information
- Improved form layout with additional columns

Updated Files:
- core/class/declarationtva_config.class.php: New CA-3 line definitions
- admin/setup_mvp.php: Enhanced interface with descriptions and PCG accounts
- langs/en_US/declarationtva.lang: English translations for new structure
- langs/fr_FR/declarationtva.lang: French translations for new structure
- PLANNING.md: Updated documentation with new structure

Key Features:
- Official Notice 4722 compliance
- Detailed line descriptions and PCG account guidance
- Enhanced user interface with better information display
- Bilingual support for all new content

The module now uses the latest official CA-3 form structure!
This commit is contained in:
Frank Cools 2025-10-02 17:02:23 +02:00
parent d7bb9d23e8
commit 1f0f4f927d
5 changed files with 83 additions and 124 deletions

View File

@ -16,47 +16,17 @@ This Dolibarr module creates the French VAT declaration CA-3 (Déclaration de TV
### CA-3 Box Structure ### CA-3 Box Structure
The module handles the complete French CA-3 VAT declaration structure: The module handles the complete French CA-3 VAT declaration structure:
#### CA-3 Form Structure ( 3310-CA3-SD) #### CA-3 Form Structure (Notice 4722 - 3310-CA3-SD)
##### A. Opérations imposables (Taxable Operations) ##### A. Opérations imposables (Taxable Operations) - Notice 4722
| CA-3 Line | Label | Description | PCG Accounts | Form Mapping | | CA-3 Line | Label | Description | PCG Accounts |
|-----------|-------|-------------|---------------|--------------| |-----------|-------|-------------|---------------|
| **A1** | Montant hors TVA des opérations imposables | Base HT of taxable operations (sales/services) | 7xxxx (Sales) | Domestic sales base amounts | | **A1** | Montant HT des opérations imposables normales | HT amount of all taxable operations that form normal sales (goods + services taxable in France at 20%, 10%, 5,5%, 2,1%) | Sales: 7xxxx; VAT: 44571x / 44572x / 44573x / 44574x |
| **A2** | Opérations imposables mais ne relevant pas du CA courant | Special taxable operations (asset sales, self-deliveries) | 7xxxx (Special sales) | Non-ordinary taxable operations | | **A2** | Montant HT des opérations imposables spéciales | HT amount of special taxable operations not part of ordinary turnover (e.g. cessions d'immobilisations, livraisons à soi-même) | 775xxx (gains on disposal), 72xxx (production immobilisée), VAT: 44571x |
| **B1** | Répartition 20% (base + taxe) | 20% VAT operations (base + VAT) | 7xxxx → 44571x | Standard rate operations | | **A3** | Montant HT des services achetés à des prestataires non établis | HT amount of services purchased from providers not established in France but taxable in France (reverse charge for foreign services) | 6xxxx (services purchased), 4452xxx (TVA due autoliquidée) |
| **B2** | Répartition 10% (base + taxe) | 10% VAT operations (base + VAT) | 7xxxx → 44572x | Reduced rate operations | | **A4** | Montant HT des importations imposables en France | HT amount of imports taxable in France (non-EU), excluding petroleum products | 6xxxx / 2xxxx purchases or assets; VAT: 4452xxx (import VAT) |
| **B3** | Répartition 5,5% (base + taxe) | 5.5% VAT operations (base + VAT) | 7xxxx → 44573x | Reduced rate operations | | **A5** | Montant HT des opérations à la sortie d'un régime suspensif | HT amount of taxable operations at exit from a suspensive fiscal regime (customs regimes, free zones, etc.) | Specific 6xxxx/2xxxx depending on goods; VAT: 4452xxx |
| **B4** | Répartition 2,1% (base + taxe) | 2.1% VAT operations (base + VAT) | 7xxxx → 44574x | Reduced rate operations |
##### A. Opérations intracommunautaires (Intra-EU Operations)
| CA-3 Line | Label | Description | PCG Accounts | Form Mapping |
|-----------|-------|-------------|---------------|--------------|
| **05** | Livraisons intracommunautaires (B2B) | Intra-EU sales to businesses (no French VAT) | 7xxxx (EU sales) | Base HT only, no VAT |
| **06** | Prestations intracommunautaires (B2B) | Intra-EU services to businesses (no French VAT) | 7xxxx (EU services) | Base HT only, no VAT |
| **B2C** | Ventes B2C intracommunautaires | Intra-EU sales to individuals (French VAT) | 7xxxx → 4457xx | Normal French VAT rules |
##### B. TVA due (VAT Due)
| CA-3 Line | Label | Description | PCG Accounts | Form Mapping |
|-----------|-------|-------------|---------------|--------------|
| **17** | TVA due au titre des acquisitions intracommunautaires | VAT due on intra-EU acquisitions (autoliquidation) | 4452xxx (TVA due intracom) | Reverse charge VAT |
##### C. TVA déductible (Deductible VAT)
| CA-3 Line | Label | Description | PCG Accounts | Form Mapping |
|-----------|-------|-------------|---------------|--------------|
| **20** | TVA déductible sur immobilisations | Deductible VAT on capital goods | 44562x | Fixed assets VAT |
| **21** | TVA déductible sur autres biens et services | Deductible VAT on other goods and services | 44566x | Operating expenses VAT |
##### D. Résultat (Result)
| CA-3 Line | Label | Description | PCG Accounts | Form Mapping |
|-----------|-------|-------------|---------------|--------------|
| **22** | Crédit de TVA reportable | VAT credit to carry forward | 445670 | If deductible > due |
| **28** | TVA nette à payer | Net VAT to pay | 445510 | If due > deductible |
| **29** | Crédit de TVA à reporter ou remboursement | VAT credit to carry forward or refund | 445670 | Credit amount |
### EU Transaction Handling ### EU Transaction Handling

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* MVP Setup page for DeclarationTVA module * MVP Setup page for DeclarationTVA module
* Complete CA-3 configuration with all sections and headers * Updated for Notice 4722 - Latest Official CA-3 Structure (3310-CA3-SD)
*/ */
// Load Dolibarr environment // Load Dolibarr environment
@ -69,6 +69,12 @@ llxHeader('', $title);
// Print page header // Print page header
print load_fiche_titre($title, '', 'title_accountancy'); print load_fiche_titre($title, '', 'title_accountancy');
// Print notice information
print '<div class="info">';
print '<strong>Notice 4722 - Summary Table CA3 (3310-CA3-SD)</strong><br>';
print 'Configuration basée sur la structure officielle la plus récente du formulaire CA-3.';
print '</div><br>';
// Print configuration form // Print configuration form
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="action" value="update_mappings">'; print '<input type="hidden" name="action" value="update_mappings">';
@ -93,15 +99,19 @@ foreach ($lines_by_section as $section_code => $lines) {
// Section header // Section header
print '<div class="titre">' . $section_info['title'] . '</div>'; print '<div class="titre">' . $section_info['title'] . '</div>';
print '<div class="info">' . $section_info['description'] . '</div>'; print '<div class="info">' . $section_info['description'] . '</div>';
if (isset($section_info['notice'])) {
print '<div class="info"><strong>Référence:</strong> ' . $section_info['notice'] . '</div>';
}
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<th>' . $langs->trans("CA3Line") . '</th>'; print '<th>' . $langs->trans("CA3Line") . '</th>';
print '<th>' . $langs->trans("LineLabel") . '</th>'; print '<th>' . $langs->trans("LineLabel") . '</th>';
print '<th>' . $langs->trans("Description") . '</th>';
print '<th>' . $langs->trans("PCGAccounts") . '</th>';
print '<th>' . $langs->trans("AccountCode") . '</th>'; print '<th>' . $langs->trans("AccountCode") . '</th>';
print '<th>' . $langs->trans("AccountLabel") . '</th>'; print '<th>' . $langs->trans("AccountLabel") . '</th>';
print '<th>' . $langs->trans("VATRate") . '</th>'; print '<th>' . $langs->trans("VATRate") . '</th>';
print '<th>' . $langs->trans("Type") . '</th>';
print '</tr>'; print '</tr>';
foreach ($lines as $line => $definition) { foreach ($lines as $line => $definition) {
@ -110,6 +120,8 @@ foreach ($lines_by_section as $section_code => $lines) {
print '<tr>'; print '<tr>';
print '<td><strong>' . $line . '</strong></td>'; print '<td><strong>' . $line . '</strong></td>';
print '<td>' . $definition['label'] . '</td>'; print '<td>' . $definition['label'] . '</td>';
print '<td><small>' . $definition['description'] . '</small></td>';
print '<td><small>' . $definition['pcg_accounts'] . '</small></td>';
print '<td>'; print '<td>';
print '<select name="account_code_' . $line . '" class="flat">'; print '<select name="account_code_' . $line . '" class="flat">';
print '<option value="">' . $langs->trans("SelectAccount") . '</option>'; print '<option value="">' . $langs->trans("SelectAccount") . '</option>';
@ -128,7 +140,6 @@ foreach ($lines_by_section as $section_code => $lines) {
} }
print '</select>'; print '</select>';
print '</td>'; print '</td>';
print '<td><span class="badge badge-' . ($definition['type'] == 'base' ? 'info' : 'success') . '">' . ucfirst($definition['type']) . '</span></td>';
print '</tr>'; print '</tr>';
} }

View File

@ -175,41 +175,54 @@ class DeclarationTVA_Config
} }
/** /**
* Get CA-3 line definitions * Get CA-3 line definitions (Notice 4722 - Latest Official Structure)
* *
* @return array CA-3 line definitions * @return array CA-3 line definitions
*/ */
public function getCA3LineDefinitions() public function getCA3LineDefinitions()
{ {
return array( return array(
// A. Opérations imposables (Taxable Operations) // A. Opérations imposables (Taxable Operations) - Notice 4722
'A1' => array('label' => 'Montant hors TVA des opérations imposables', 'type' => 'base', 'section' => 'A'), 'A1' => array(
'A2' => array('label' => 'Opérations imposables mais ne relevant pas du CA courant', 'type' => 'base', 'section' => 'A'), 'label' => 'Montant HT des opérations imposables normales (biens + services imposables en France à 20%, 10%, 5,5%, 2,1%)',
'B1' => array('label' => 'Répartition 20% (base + taxe)', 'type' => 'vat', 'section' => 'A'), 'type' => 'base',
'B2' => array('label' => 'Répartition 10% (base + taxe)', 'type' => 'vat', 'section' => 'A'), 'section' => 'A',
'B3' => array('label' => 'Répartition 5,5% (base + taxe)', 'type' => 'vat', 'section' => 'A'), 'description' => 'HT amount of all taxable operations that form normal sales (goods + services taxable in France at 20%, 10%, 5,5%, 2,1%)',
'B4' => array('label' => 'Répartition 2,1% (base + taxe)', 'type' => 'vat', 'section' => 'A'), 'pcg_accounts' => 'Sales: 7xxxx; VAT: 44571x / 44572x / 44573x / 44574x'
),
// A. Opérations intracommunautaires (Intra-EU Operations) 'A2' => array(
'05' => array('label' => 'Livraisons intracommunautaires (B2B)', 'type' => 'base', 'section' => 'A'), 'label' => 'Montant HT des opérations imposables spéciales ne relevant pas du CA courant (cessions d\'immobilisations, livraisons à soi-même)',
'06' => array('label' => 'Prestations intracommunautaires (B2B)', 'type' => 'base', 'section' => 'A'), 'type' => 'base',
'section' => 'A',
// B. TVA due (VAT Due) 'description' => 'HT amount of special taxable operations not part of ordinary turnover (e.g. cessions d\'immobilisations, livraisons à soi-même)',
'17' => array('label' => 'TVA due au titre des acquisitions intracommunautaires', 'type' => 'vat', 'section' => 'B'), 'pcg_accounts' => '775xxx (gains on disposal), 72xxx (production immobilisée), VAT: 44571x'
),
// C. TVA déductible (Deductible VAT) 'A3' => array(
'20' => array('label' => 'TVA déductible sur immobilisations', 'type' => 'vat', 'section' => 'C'), 'label' => 'Montant HT des services achetés à des prestataires non établis en France mais imposables en France (autoliquidation services étrangers)',
'21' => array('label' => 'TVA déductible sur autres biens et services', 'type' => 'vat', 'section' => 'C'), 'type' => 'base',
'section' => 'A',
// D. Résultat (Result) 'description' => 'HT amount of services purchased from providers not established in France but taxable in France (reverse charge for foreign services)',
'22' => array('label' => 'Crédit de TVA reportable', 'type' => 'vat', 'section' => 'D'), 'pcg_accounts' => '6xxxx (services purchased), 4452xxx (TVA due autoliquidée)'
'28' => array('label' => 'TVA nette à payer', 'type' => 'vat', 'section' => 'D'), ),
'29' => array('label' => 'Crédit de TVA à reporter ou remboursement', 'type' => 'vat', 'section' => 'D') 'A4' => array(
'label' => 'Montant HT des importations imposables en France (hors UE), à l\'exclusion des produits pétroliers',
'type' => 'base',
'section' => 'A',
'description' => 'HT amount of imports taxable in France (non-EU), excluding petroleum products',
'pcg_accounts' => '6xxxx / 2xxxx purchases or assets; VAT: 4452xxx (import VAT)'
),
'A5' => array(
'label' => 'Montant HT des opérations imposables à la sortie d\'un régime fiscal suspensif (régimes douaniers, zones franches, etc.)',
'type' => 'base',
'section' => 'A',
'description' => 'HT amount of taxable operations at exit from a suspensive fiscal regime (customs regimes, free zones, etc.)',
'pcg_accounts' => 'Specific 6xxxx/2xxxx depending on goods; VAT: 4452xxx'
)
); );
} }
/** /**
* Get CA-3 section headers * Get CA-3 section headers (Notice 4722)
* *
* @return array Section headers * @return array Section headers
*/ */
@ -218,19 +231,8 @@ class DeclarationTVA_Config
return array( return array(
'A' => array( 'A' => array(
'title' => 'A. Opérations imposables (Taxable Operations)', 'title' => 'A. Opérations imposables (Taxable Operations)',
'description' => 'Base amounts and VAT for domestic taxable operations' 'description' => 'HT amounts of all taxable operations according to Notice 4722 (3310-CA3-SD)',
), 'notice' => 'Notice 4722 - Summary Table CA3 (3310-CA3-SD)'
'B' => array(
'title' => 'B. TVA due (VAT Due)',
'description' => 'VAT amounts due from intra-EU acquisitions and other sources'
),
'C' => array(
'title' => 'C. TVA déductible (Deductible VAT)',
'description' => 'VAT amounts that can be deducted from purchases and expenses'
),
'D' => array(
'title' => 'D. Résultat (Result)',
'description' => 'Final calculation: net VAT to pay or credit to carry forward'
) )
); );
} }

View File

@ -331,29 +331,17 @@ DeclarationTVAGeographicAnalysis = Geographic Analysis
DeclarationTVAProductAnalysis = Product Analysis DeclarationTVAProductAnalysis = Product Analysis
DeclarationTVASeasonalAnalysis = Seasonal Analysis DeclarationTVASeasonalAnalysis = Seasonal Analysis
# CA-3 Section Headers # CA-3 Section Headers (Notice 4722)
CA3SectionA = Taxable Operations CA3SectionA = Taxable Operations
CA3SectionB = VAT Due CA3Notice4722 = Notice 4722 - Summary Table CA3 (3310-CA3-SD)
CA3SectionC = Deductible VAT
CA3SectionD = Result
# CA-3 Line Labels # CA-3 Line Labels (Notice 4722)
CA3LineA1 = Base amount of taxable operations CA3LineA1 = HT amount of all taxable operations that form normal sales (goods + services taxable in France at 20%, 10%, 5,5%, 2,1%)
CA3LineA2 = Taxable operations not part of current revenue CA3LineA2 = HT amount of special taxable operations not part of ordinary turnover (e.g. cessions d'immobilisations, livraisons à soi-même)
CA3LineB1 = 20% VAT operations CA3LineA3 = HT amount of services purchased from providers not established in France but taxable in France (reverse charge for foreign services)
CA3LineB2 = 10% VAT operations CA3LineA4 = HT amount of imports taxable in France (non-EU), excluding petroleum products
CA3LineB3 = 5.5% VAT operations CA3LineA5 = HT amount of taxable operations at exit from a suspensive fiscal regime (customs regimes, free zones, etc.)
CA3LineB4 = 2.1% VAT operations
CA3Line05 = Intra-EU goods deliveries (B2B)
CA3Line06 = Intra-EU services (B2B)
CA3Line17 = VAT due on intra-EU acquisitions
CA3Line20 = Deductible VAT on fixed assets
CA3Line21 = Deductible VAT on other goods and services
CA3Line22 = VAT credit to carry forward
CA3Line28 = Net VAT to pay
CA3Line29 = VAT credit to carry forward or refund
# Form Labels # Form Labels
Type = Type Description = Description
Base = Base PCGAccounts = PCG Accounts
VAT = VAT

View File

@ -320,29 +320,17 @@ DeclarationTVAGeographicAnalysis = Analyse géographique
DeclarationTVAProductAnalysis = Analyse produits DeclarationTVAProductAnalysis = Analyse produits
DeclarationTVASeasonalAnalysis = Analyse saisonnière DeclarationTVASeasonalAnalysis = Analyse saisonnière
# En-têtes des sections CA-3 # En-têtes des sections CA-3 (Notice 4722)
CA3SectionA = Opérations imposables CA3SectionA = Opérations imposables
CA3SectionB = TVA due CA3Notice4722 = Notice 4722 - Tableau récapitulatif CA3 (3310-CA3-SD)
CA3SectionC = TVA déductible
CA3SectionD = Résultat
# Labels des lignes CA-3 # Labels des lignes CA-3 (Notice 4722)
CA3LineA1 = Montant hors TVA des opérations imposables CA3LineA1 = Montant HT des opérations imposables normales (biens + services imposables en France à 20%, 10%, 5,5%, 2,1%)
CA3LineA2 = Opérations imposables mais ne relevant pas du CA courant CA3LineA2 = Montant HT des opérations imposables spéciales ne relevant pas du CA courant (cessions d'immobilisations, livraisons à soi-même)
CA3LineB1 = Opérations à 20% CA3LineA3 = Montant HT des services achetés à des prestataires non établis en France mais imposables en France (autoliquidation services étrangers)
CA3LineB2 = Opérations à 10% CA3LineA4 = Montant HT des importations imposables en France (hors UE), à l'exclusion des produits pétroliers
CA3LineB3 = Opérations à 5,5% CA3LineA5 = Montant HT des opérations imposables à la sortie d'un régime fiscal suspensif (régimes douaniers, zones franches, etc.)
CA3LineB4 = Opérations à 2,1%
CA3Line05 = Livraisons intracommunautaires (B2B)
CA3Line06 = Prestations intracommunautaires (B2B)
CA3Line17 = TVA due au titre des acquisitions intracommunautaires
CA3Line20 = TVA déductible sur immobilisations
CA3Line21 = TVA déductible sur autres biens et services
CA3Line22 = Crédit de TVA reportable
CA3Line28 = TVA nette à payer
CA3Line29 = Crédit de TVA à reporter ou remboursement
# Labels de formulaire # Labels de formulaire
Type = Type Description = Description
Base = Base PCGAccounts = Comptes PCG
VAT = TVA