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

Fiscalisation : ajout d'un mécanisme de règles pour appliquer la TVA lors de l'import #1428

Closed
Tracked by #1339
agallou opened this issue Jan 18, 2024 · 1 comment
Assignees

Comments

@agallou
Copy link
Member

agallou commented Jan 18, 2024

Ajouter l'item de menu "Configuration" de la partie trésorerie de l'admin, ajouter un onglet "Règles"

Proposition de nouvelle table "compta_rules" :

  • id : int AUTOINC
  • label : VARCHAR(255)
  • condition :
  • vat : chaine nullable pouvant être 0, 5_5, 10, 20.
  • category_id : FK vers la compta_categorie (pourra être ajoutée plus tard)
  • event_id : FK NULLABLE vers compta_evenement
  • attachment_required : int nullable

Mettre en place le CRUD pour gérer ces règles.

Ensuite lors de l'import de fichier :

if (!is_array($enregistrement)) {

Lire ces règles et si la description correspond à la condition, calculer le montant HT et le mettre dans le bon champ de montant hors texte. Ne faire cet ajout que si l'entrée est nouvelle.

Partir du montant TTC qui est importé, et si on a une valeur dans VAT utiliser ce taux de TVA pour calculer le montant HT, et selon la valeur mettre le montant HT dans le bon champ c'est à dire :

  • montant_ht_soumis_tva_20
  • montant_ht_soumis_tva_10
  • montant_ht_soumis_tva_5_5
  • montant_ht_soumis_tva_0

La priorité est surtout sur l'application des règles pour la TVA mais plus tard on pourra voir pour gérer les catégorie/événement/fichier requis (et passer les règles en dur en base).

@agallou agallou converted this from a draft issue Jan 18, 2024
@stakovicz stakovicz self-assigned this Jan 18, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 20, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 20, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 21, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 21, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 22, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 22, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Jan 22, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Feb 4, 2024
agallou added a commit that referenced this issue Feb 25, 2024
dans le cadre de l'issue #1428 on ajoute un cas de test sur l'import
de fichier.
stakovicz added a commit to stakovicz/web that referenced this issue Mar 3, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Mar 3, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Mar 3, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Mar 3, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Mar 3, 2024
stakovicz added a commit to stakovicz/web that referenced this issue Mar 3, 2024
agallou added a commit that referenced this issue Mar 16, 2024
@agallou
Copy link
Member Author

agallou commented Mar 30, 2024

L'issue a été traitée dans cette PR : #1430

@agallou agallou closed this as completed Mar 30, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Backlog global Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants