Gestion de produits pour les devis#2216
Open
Mopolo wants to merge 2 commits intoafup:masterfrom
Open
Conversation
015c751 to
6c86380
Compare
stakovicz
reviewed
May 10, 2026
Comment on lines
+57
to
+59
| '5.5%' => 5.5, | ||
| '10%' => 10.0, | ||
| '20%' => 20.0, |
Contributor
There was a problem hiding this comment.
suggestion : Peut être travailler avec un Enum ou des constantes ou utiliser des taux qui existe déjà, non ?
Contributor
Author
There was a problem hiding this comment.
Hm je n'y avais pas pensé.
Je regarde et si ça fait trop de diff dans cette PR j'en ferais une autre pour ça pour le reste du code.
| #[ORM\Column(nullable: true)] | ||
| public ?int $quantite = null; | ||
|
|
||
| #[ORM\Column(nullable: false)] |
Contributor
There was a problem hiding this comment.
Suggested change
| #[ORM\Column(nullable: false)] | |
| #ORM\Column(type: 'decimal', precision: 10, scale: 2) |
Float c'est le mal pour les prix 😬
Contributor
Author
There was a problem hiding this comment.
Ah ça je suis bien d'accord. Faudrait faire un chantier de refacto en int un jour.
Contributor
Author
There was a problem hiding this comment.
Ah mais ça stocke en string du coup.
C'est plus compliqué que je pensais donc je regarde ça dans la semaine.
6c86380 to
48da038
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cette PR ajoute une gestion basique de produits pour simplifier la création des devis.
C'est une vielle demande du pôle sponsors qui a été enfin rendue possible grâce à la refonte des devis dans la PR #2016 par @vgreb :)
CRUD de produits
Création d'une ligne à partir d'un produit
Du coup maintenant quand on créé un devis, il n'y a plus de ligne par défaut (pour éviter à chaque fois de devoir supprimer la vide pour en ajouter une à partir d'un produit).
Sélection
À la sélection d'un produit, les infos sont simplement copiées dans les champs en js (il n'y a pas de lien en base). Comme ça pas besoin de maintenir une longue liste de produits, il suffit de changer l'année et les prix selon les besoins.
(Cette PR remplace la #1903)