Skip to content

Add the payment mode popup to Achats, Salaires and Paiements - #8

Merged
khafifithebork merged 1 commit into
dem-bijan:mainfrom
khafifithebork:featur/checkbox
Aug 9, 2026
Merged

khafifithebork merged 1 commit into
dem-bijan:mainfrom
khafifithebork:featur/checkbox

Conversation

@khafifithebork

Copy link
Copy Markdown
Collaborator

Settling a document now asks how, instead of assuming the caisse. ModePaiementDialog is one shared modal — "Choisir le mode de paiement", radio options Virement / Chèque / Effet / Caisse with a one-line hint each, and Confirmer / Annuler — used by all three views so the choice reads identically wherever it is made.

Nothing is pre-selected, so Confirmer stays disabled until the user picks deliberately: Caisse is no longer the option that happens by accident. It is still offered, and its hint says plainly that it debits the chantier's caisse. Escape and a backdrop click cancel; the selection resets each time the dialog opens so a previous choice never leaks into the next document.

Per view:

Salaires the inline "Via : [Virement] [Caisse]" strip becomes a single
Payer button opening the popup. Paid rows show the mode as a
badge with a Modifier action.
Achats Valider le paiement opens the popup rather than a bare
confirm, and a new Paiement column shows the stored mode,
editable once the order is PAYE.
Paiements Payer opens the popup instead of firing immediately.

Correcting the mode of an already-settled document goes through the shared endpoint, and the server's avertissement is surfaced — the caisse is not adjusted by a correction, so the user is told when a manual entry is owed.

ModePaiementBadge renders the legacy CAISSE value on older records in a distinct colour, so historical cash settlements stay legible.

Settling a document now asks how, instead of assuming the caisse.
ModePaiementDialog is one shared modal — "Choisir le mode de paiement",
radio options Virement / Chèque / Effet / Caisse with a one-line hint
each, and Confirmer / Annuler — used by all three views so the choice
reads identically wherever it is made.

Nothing is pre-selected, so Confirmer stays disabled until the user picks
deliberately: Caisse is no longer the option that happens by accident. It
is still offered, and its hint says plainly that it debits the chantier's
caisse. Escape and a backdrop click cancel; the selection resets each time
the dialog opens so a previous choice never leaks into the next document.

Per view:

  Salaires   the inline "Via : [Virement] [Caisse]" strip becomes a single
             Payer button opening the popup. Paid rows show the mode as a
             badge with a Modifier action.
  Achats     Valider le paiement opens the popup rather than a bare
             confirm, and a new Paiement column shows the stored mode,
             editable once the order is PAYE.
  Paiements  Payer opens the popup instead of firing immediately.

Correcting the mode of an already-settled document goes through the shared
endpoint, and the server's avertissement is surfaced — the caisse is not
adjusted by a correction, so the user is told when a manual entry is owed.

ModePaiementBadge renders the legacy CAISSE value on older records in a
distinct colour, so historical cash settlements stay legible.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

@khafifithebork is attempting to deploy a commit to the Mohamed najib's projects Team on Vercel.

A member of the Team first needs to authorize it.

@khafifithebork
khafifithebork merged commit ea57180 into dem-bijan:main Aug 9, 2026
4 of 5 checks passed
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.

1 participant