fix: Payment made filling the form full amount field

This commit is contained in:
Ahmed Bouhuolia
2024-09-04 17:34:12 +02:00
parent 16f5cb713d
commit 3fcb6fefde
6 changed files with 82 additions and 125 deletions

View File

@@ -71,7 +71,6 @@ export const defaultRequestPayment = {
*/
export const transformToEditForm = (paymentReceive, paymentReceiveEntries) => ({
...transformToForm(paymentReceive, defaultPaymentReceive),
full_amount: safeSumBy(paymentReceiveEntries, 'payment_amount'),
entries: [
...paymentReceiveEntries.map((paymentReceiveEntry) => ({
...transformToForm(paymentReceiveEntry, defaultPaymentReceiveEntry),