refactor(FE-435,436): Select Nominal Biaya by approval step

This commit is contained in:
rstubryan
2025-12-30 20:19:05 +07:00
parent 6185fafb57
commit 13c1a82142
2 changed files with 14 additions and 2 deletions
@@ -448,7 +448,14 @@ const ExpenseRequestContent = ({
<tr>
<th>Nominal Biaya</th>
<th>:</th>
<td>{formatCurrency(initialValues?.grand_total ?? 0)}</td>
<td>
{formatCurrency(
initialValues?.latest_approval.step_number === 4 ||
initialValues?.latest_approval.step_number === 5
? (initialValues?.total_realisasi ?? 0)
: (initialValues?.total_pengajuan ?? 0)
)}
</td>
</tr>
<tr>
<th>Status Pencairan</th>
@@ -235,7 +235,12 @@ const ExpensePDF = ({ expense }: ExpensePDFProps) => {
{ label: 'Nama Pengaju', value: expense?.created_user.name },
{
label: 'Nominal Biaya',
value: formatCurrency(expense?.grand_total ?? 0),
value: formatCurrency(
expense?.latest_approval.step_number === 4 ||
expense?.latest_approval.step_number === 5
? (expense?.total_realisasi ?? 0)
: (expense?.total_pengajuan ?? 0)
),
},
{
label: 'Nominal Pengajuan',