Repository navigation
Add the payment mode popup to Achats, Salaires and Paiements - #8
Merged
Merged
Conversation
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>
|
@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. |
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.
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.