mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-19 05:07:57 +02:00
Ensure BL amount is always present in reconciliation but optional for delivery validation
Update ReconciliationModal to include and display the BL amount. Modify ValidateDeliveryModal to make the BL amount field optional in its schema and remove it from the payload sent to the API. Replit-Commit-Author: Agent Replit-Commit-Session-Id: db1bcb73-80c1-4bff-8236-4ced2c07f75f Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
1 parent
73a3d36ce8
commit
cc13f32b1b
2 files changed
+17
-29
No files matched your search
@@ -29,6 +29,7 @@ export default function ReconciliationModal({
|
||||
|
||||
const [formData, setFormData] = useState({
|
||||
blNumber: "",
|
||||
blAmount: "",
|
||||
invoiceReference: "",
|
||||
invoiceAmount: "",
|
||||
reconciled: false,
|
||||
@@ -39,6 +40,7 @@ export default function ReconciliationModal({
|
||||
if (delivery) {
|
||||
setFormData({
|
||||
blNumber: delivery.blNumber || "",
|
||||
blAmount: delivery.blAmount || "",
|
||||
invoiceReference: delivery.invoiceReference || "",
|
||||
invoiceAmount: delivery.invoiceAmount || "",
|
||||
reconciled: delivery.reconciled || false,
|
||||
@@ -78,6 +80,7 @@ export default function ReconciliationModal({
|
||||
|
||||
updateDeliveryMutation.mutate({
|
||||
blNumber: formData.blNumber.trim() || null,
|
||||
blAmount: formData.blAmount ? formData.blAmount.toString() : null,
|
||||
invoiceReference: formData.invoiceReference.trim() || null,
|
||||
invoiceAmount: formData.invoiceAmount ? formData.invoiceAmount.toString() : null,
|
||||
});
|
||||
@@ -152,6 +155,17 @@ export default function ReconciliationModal({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="blAmount">Montant BL (€)</Label>
|
||||
<Input
|
||||
id="blAmount"
|
||||
type="number"
|
||||
step="0.01"
|
||||
value={formData.blAmount}
|
||||
onChange={(e) => setFormData(prev => ({ ...prev, blAmount: e.target.value }))}
|
||||
placeholder="0.00"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Données Facture */}
|
||||
|
||||
Reference in new issue
Block a user