Refetch payment after transaction edit to show updated amount.

Coerce edited amount to a number and reload invoice data after save.
This commit is contained in:
2026-08-16 22:36:12 +03:30
parent 133fb124b7
commit 047344e2ed
+3 -3
View File
@@ -357,7 +357,7 @@ const handleUpdateTransaction = async () => {
isSubmittingEdit.value = true;
try {
const payload = {
amount: editForm.amount,
amount: Number(editForm.amount),
status: editForm.status,
dueDate,
notes: editForm.notes
@@ -368,8 +368,8 @@ const handleUpdateTransaction = async () => {
payload.date = toGregorianIso(editForm.date);
}
const res = await paymentApi.updateTransaction(editingTransactionId.value, payload);
payment.value = res.data || res;
await paymentApi.updateTransaction(editingTransactionId.value, payload);
await fetchPayment();
showSuccess('تراکنش با موفقیت به‌روزرسانی شد');
showEditModal.value = false;
} catch (err) {