IO-912 Reformat payment modal
This commit is contained in:
@@ -18,7 +18,7 @@ export default function PaymentFormTotalPayments({ jobid }) {
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
if (!data) return <div>Select a job</div>;
|
||||
if (!data) return <></>;
|
||||
const totalPayments = data.jobs_by_pk.payments.reduce((acc, val) => {
|
||||
return acc.add(Dinero({ amount: (val.amount || 0) * 100 }));
|
||||
}, Dinero());
|
||||
|
||||
Reference in New Issue
Block a user