Skip to content

Gestion de produits pour les devis#2216

Open
Mopolo wants to merge 2 commits intoafup:masterfrom
Mopolo:gestion-de-produits
Open

Gestion de produits pour les devis#2216
Mopolo wants to merge 2 commits intoafup:masterfrom
Mopolo:gestion-de-produits

Conversation

@Mopolo
Copy link
Copy Markdown
Contributor

@Mopolo Mopolo commented May 10, 2026

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

image

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).

image

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.

image

(Cette PR remplace la #1903)

@Mopolo Mopolo self-assigned this May 10, 2026
@Mopolo Mopolo force-pushed the gestion-de-produits branch 2 times, most recently from 015c751 to 6c86380 Compare May 10, 2026 11:11
@Mopolo Mopolo marked this pull request as ready for review May 10, 2026 11:22
@Mopolo Mopolo requested review from agallou and stakovicz as code owners May 10, 2026 11:22
@Mopolo Mopolo requested a review from vgreb May 10, 2026 11:22
Comment thread db/migrations/20260508153741_create_compta_produit_table.php
Comment thread sources/AppBundle/Accounting/Form/ProduitType.php
Comment thread sources/AppBundle/Accounting/Form/ProduitType.php
Comment on lines +57 to +59
'5.5%' => 5.5,
'10%' => 10.0,
'20%' => 20.0,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion : Peut être travailler avec un Enum ou des constantes ou utiliser des taux qui existe déjà, non ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread templates/admin/accounting/quotation/_javascript.html.twig
Comment thread templates/admin/accounting/quotation/form.html.twig Outdated
#[ORM\Column(nullable: true)]
public ?int $quantite = null;

#[ORM\Column(nullable: false)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[ORM\Column(nullable: false)]
#ORM\Column(type: 'decimal', precision: 10, scale: 2)

Float c'est le mal pour les prix 😬

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ça je suis bien d'accord. Faudrait faire un chantier de refacto en int un jour.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah mais ça stocke en string du coup.

C'est plus compliqué que je pensais donc je regarde ça dans la semaine.

Comment thread templates/admin/accounting/produit/list.html.twig Outdated
Comment thread templates/admin/accounting/produit/list.html.twig Outdated
@Mopolo Mopolo force-pushed the gestion-de-produits branch from 6c86380 to 48da038 Compare May 10, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants