Always show allocation formula section for labor/admin detail modal
This commit is contained in:
@@ -6840,9 +6840,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: "grid", gap: 18, marginTop: 18 }}>
|
<div style={{ display: "grid", gap: 18, marginTop: 18 }}>
|
||||||
{((lifecycleAccountDetailModal.account_code || "").startsWith("SHARED_") ||
|
{((lifecycleAccountDetailModal.bucket_label || "") === "인건비" || (lifecycleAccountDetailModal.bucket_label || "") === "관리비") && (
|
||||||
Number(lifecycleAccountDetailModal.allocation_source_amount || 0) > 0 ||
|
|
||||||
Number(lifecycleAccountDetailModal.detail?.allocation_source_amount || 0) > 0) && (
|
|
||||||
<section className="mini-card">
|
<section className="mini-card">
|
||||||
<div style={{ fontSize: 16, fontWeight: 700 }}>배부 계산식</div>
|
<div style={{ fontSize: 16, fontWeight: 700 }}>배부 계산식</div>
|
||||||
<div className="subtle" style={{ marginTop: 6 }}>
|
<div className="subtle" style={{ marginTop: 6 }}>
|
||||||
@@ -6866,6 +6864,9 @@
|
|||||||
allocated_amount: lifecycleAccountDetailModal.allocation_result_amount ?? 0,
|
allocated_amount: lifecycleAccountDetailModal.allocation_result_amount ?? 0,
|
||||||
}];
|
}];
|
||||||
const list = rows.length ? rows : fallback;
|
const list = rows.length ? rows : fallback;
|
||||||
|
if (!list.length || (list.length === 1 && Number(list[0].source_amount || 0) === 0 && Number(list[0].allocated_amount || 0) === 0)) {
|
||||||
|
return <div key="alloc-empty">해당 계정의 배부 원천 금액이 없어 계산식이 없습니다.</div>;
|
||||||
|
}
|
||||||
return list.map((row, idx) => {
|
return list.map((row, idx) => {
|
||||||
const sourceAmount = Number(row.source_amount || 0);
|
const sourceAmount = Number(row.source_amount || 0);
|
||||||
const allocatedAmount = Number(row.allocated_amount || 0);
|
const allocatedAmount = Number(row.allocated_amount || 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user