From 8adb569891027880a0780e87bdcc74613e3a52ce Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 20 Jan 2021 13:47:29 +0100 Subject: [PATCH] fix payment schedule total --- app/services/payment_schedule_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/payment_schedule_service.rb b/app/services/payment_schedule_service.rb index dfe3e30e6..bbb97ba89 100644 --- a/app/services/payment_schedule_service.rb +++ b/app/services/payment_schedule_service.rb @@ -45,6 +45,7 @@ class PaymentScheduleService details: details ) end + ps.total = items.map(&:amount).reduce(:+) { payment_schedule: ps, items: items } end