Cotisation diffuseur URSSAF (1,1%) : nouveau champ, TTC calculé en cascade
Architecture métier corrigée : la SAS devise HT, ajoute (quand
applicable -- pas systématique) 1,1% de cotisation diffuseur URSSAF
pour l'usage de freelances, puis applique la TVA sur ce montant
augmenté -- pas sur le HT brut. La répartition entre comptes reste
basée sur le HT seul, inchangée.
- field_cotisation_active (case à cocher, "Entrée client" uniquement,
cochée par défaut sur une nouvelle ligne -- optionnelle puisque tous
les devis ne l'incluent pas historiquement).
- field_cotisation_urssaf ("1,1%", montant calculé HT × 1,011, jamais
éditable).
- Montant TTC = round(cotisation × (1 + TVA/100), 2) quand la
cotisation s'applique, round(HT × (1 + TVA/100), 2) sinon --
inchangé pour tous les types hors "Entrée client".
Migration (update hooks 8006/8007) : toutes les lignes "Entrée client"
de field_tva rétro-calculées par figli_compta_ledger_update_8005()
étaient fausses dès que la cotisation s'appliquait (taux mixte HT->TTC,
pas le vrai taux de TVA) -- corrigées avec la même prudence que la
migration précédente : 2021 laissée de côté (pratique non confirmée
sur cette année), et par ligne, un taux déjà "propre" (0/2,1/5,5/10/20
%) signifie qu'aucune cotisation n'a été appliquée (laissé tel quel) ;
sinon le nouveau taux recalculé n'est retenu que s'il retombe lui-même
sur un taux officiel, sinon la ligne reste inchangée plutôt que de
deviner. Montant TTC historique jamais réécrit, comme pour toute
migration de ce module. Résultat : 154 lignes corrigées (cotisation
active), 90 déjà correctes (cotisation inactive), 40 ambiguës laissées
telles quelles, 43 lignes 2021 ignorées.
Formulaire réorganisé en grille à 4 colonnes (HT | 1,1% | TVA | TTC),
case à cocher masquée hors "Entrée client" via #states réel (fiable
ici, contrairement au select TVA -- watch sur field_type_ligne, un
vrai champ, pas un élément ajouté à la main). Colonne "1,1%" ajoutée
au grand livre entre HT et TVA.
This commit is contained in:
@@ -4,6 +4,8 @@ status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.field.node.ligne_comptable.field_client
|
||||
- field.field.node.ligne_comptable.field_cotisation_active
|
||||
- field.field.node.ligne_comptable.field_cotisation_urssaf
|
||||
- field.field.node.ligne_comptable.field_date_ligne
|
||||
- field.field.node.ligne_comptable.field_entree_liee
|
||||
- field.field.node.ligne_comptable.field_flag
|
||||
@@ -40,6 +42,20 @@ content:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_cotisation_active:
|
||||
type: boolean_checkbox
|
||||
weight: 4
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
field_cotisation_urssaf:
|
||||
type: number
|
||||
weight: 6
|
||||
region: content
|
||||
settings:
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_date_ligne:
|
||||
type: datetime_default
|
||||
weight: 0
|
||||
@@ -58,7 +74,7 @@ content:
|
||||
third_party_settings: { }
|
||||
field_flag:
|
||||
type: entity_reference_autocomplete_tags
|
||||
weight: 11
|
||||
weight: 12
|
||||
region: content
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
@@ -75,14 +91,14 @@ content:
|
||||
third_party_settings: { }
|
||||
field_montant_ttc:
|
||||
type: number
|
||||
weight: 7
|
||||
weight: 8
|
||||
region: content
|
||||
settings:
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
field_notes:
|
||||
type: string_textarea
|
||||
weight: 10
|
||||
weight: 11
|
||||
region: content
|
||||
settings:
|
||||
rows: 5
|
||||
@@ -98,7 +114,7 @@ content:
|
||||
third_party_settings: { }
|
||||
field_repartition:
|
||||
type: paragraphs
|
||||
weight: 9
|
||||
weight: 10
|
||||
region: content
|
||||
settings:
|
||||
title: Répartition
|
||||
@@ -116,7 +132,7 @@ content:
|
||||
third_party_settings: { }
|
||||
field_tva:
|
||||
type: number
|
||||
weight: 8
|
||||
weight: 9
|
||||
region: content
|
||||
settings:
|
||||
placeholder: ''
|
||||
|
||||
@@ -4,6 +4,8 @@ status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.field.node.ligne_comptable.field_client
|
||||
- field.field.node.ligne_comptable.field_cotisation_active
|
||||
- field.field.node.ligne_comptable.field_cotisation_urssaf
|
||||
- field.field.node.ligne_comptable.field_date_ligne
|
||||
- field.field.node.ligne_comptable.field_entree_liee
|
||||
- field.field.node.ligne_comptable.field_flag
|
||||
@@ -33,6 +35,27 @@ content:
|
||||
third_party_settings: { }
|
||||
weight: 2
|
||||
region: content
|
||||
field_cotisation_active:
|
||||
type: boolean
|
||||
label: above
|
||||
settings:
|
||||
format: default
|
||||
format_custom_false: ''
|
||||
format_custom_true: ''
|
||||
third_party_settings: { }
|
||||
weight: 4
|
||||
region: content
|
||||
field_cotisation_urssaf:
|
||||
type: number_decimal
|
||||
label: above
|
||||
settings:
|
||||
thousand_separator: ''
|
||||
decimal_separator: .
|
||||
scale: 2
|
||||
prefix_suffix: true
|
||||
third_party_settings: { }
|
||||
weight: 6
|
||||
region: content
|
||||
field_date_ligne:
|
||||
type: datetime_default
|
||||
label: above
|
||||
@@ -56,7 +79,7 @@ content:
|
||||
settings:
|
||||
link: true
|
||||
third_party_settings: { }
|
||||
weight: 11
|
||||
weight: 12
|
||||
region: content
|
||||
field_montant_ht:
|
||||
type: number_decimal
|
||||
@@ -78,14 +101,14 @@ content:
|
||||
scale: 2
|
||||
prefix_suffix: true
|
||||
third_party_settings: { }
|
||||
weight: 7
|
||||
weight: 8
|
||||
region: content
|
||||
field_notes:
|
||||
type: basic_string
|
||||
label: above
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
weight: 10
|
||||
weight: 11
|
||||
region: content
|
||||
field_numero_facture:
|
||||
type: string
|
||||
@@ -103,7 +126,7 @@ content:
|
||||
view_mode: default
|
||||
link: ''
|
||||
third_party_settings: { }
|
||||
weight: 9
|
||||
weight: 10
|
||||
region: content
|
||||
field_tva:
|
||||
type: number_decimal
|
||||
@@ -114,7 +137,7 @@ content:
|
||||
scale: 2
|
||||
prefix_suffix: true
|
||||
third_party_settings: { }
|
||||
weight: 8
|
||||
weight: 9
|
||||
region: content
|
||||
field_type_ligne:
|
||||
type: list_default
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
uuid: 3defc3d6-42b6-4340-a7cf-fecadb919934
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_cotisation_active
|
||||
- node.type.ligne_comptable
|
||||
id: node.ligne_comptable.field_cotisation_active
|
||||
field_name: field_cotisation_active
|
||||
entity_type: node
|
||||
bundle: ligne_comptable
|
||||
label: 'Cotisation diffuseur URSSAF (1,1%)'
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
default_value:
|
||||
-
|
||||
value: 1
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
on_label: 'On'
|
||||
off_label: 'Off'
|
||||
field_type: boolean
|
||||
@@ -0,0 +1,23 @@
|
||||
uuid: 309c0b94-be32-42a3-b990-cb04858afb8d
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_cotisation_urssaf
|
||||
- node.type.ligne_comptable
|
||||
id: node.ligne_comptable.field_cotisation_urssaf
|
||||
field_name: field_cotisation_urssaf
|
||||
entity_type: node
|
||||
bundle: ligne_comptable
|
||||
label: '1,1%'
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
default_value: { }
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
min: null
|
||||
max: null
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
field_type: decimal
|
||||
@@ -0,0 +1,18 @@
|
||||
uuid: 28c4ae5a-011c-4f31-bca5-36874c6c182b
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
id: node.field_cotisation_active
|
||||
field_name: field_cotisation_active
|
||||
entity_type: node
|
||||
type: boolean
|
||||
settings: { }
|
||||
module: core
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: true
|
||||
indexes: { }
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
||||
@@ -0,0 +1,20 @@
|
||||
uuid: 486554c0-7686-4c52-ab33-eb09b5573be5
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- node
|
||||
id: node.field_cotisation_urssaf
|
||||
field_name: field_cotisation_urssaf
|
||||
entity_type: node
|
||||
type: decimal
|
||||
settings:
|
||||
precision: 12
|
||||
scale: 2
|
||||
module: core
|
||||
locked: false
|
||||
cardinality: 1
|
||||
translatable: true
|
||||
indexes: { }
|
||||
persist_with_no_fields: false
|
||||
custom_storage: false
|
||||
Reference in New Issue
Block a user