IO-3534 Adjust value prop to content for antd prop change to fix color display.

This commit is contained in:
Patrick Fic
2026-02-02 09:33:37 -08:00
parent 849d967b56
commit 28a41f7637
5 changed files with 15 additions and 7 deletions

View File

@@ -373,9 +373,16 @@ export function BillFormComponent({
"local_tax_rate"
]);
let totals;
if (!!values.total && !!values.billlines && values.billlines.length > 0)
if (!!values.total && !!values.billlines && values.billlines.length > 0) {
totals = CalculateBillTotal(values);
if (totals)
}
if (totals) {
console.log(
"Discrep",
totals.discrepancy.getAmount(),
totals.discrepancy.getAmount() === 0 ? "green" : "red"
);
return (
// TODO: Align is not correct
// eslint-disable-next-line react/no-unknown-property
@@ -414,7 +421,7 @@ export function BillFormComponent({
<Statistic
title={t("bills.labels.discrepancy")}
styles={{
value: {
content: {
color: totals.discrepancy.getAmount() === 0 ? "green" : "red"
}
}}
@@ -427,6 +434,7 @@ export function BillFormComponent({
) : null}
</div>
);
}
return null;
}}
</Form.Item>