fix(FE): fixing total text color debt supplier

This commit is contained in:
randy-ar
2026-02-03 14:12:08 +07:00
parent c102a4043c
commit 40411b0417
@@ -473,7 +473,9 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
footer: () => {
const value = supplier?.total.total_price;
return (
<div className={`text-right ${value || 0 < 0 ? 'text-red-500' : ''}`}>
<div
className={`text-right ${value && value < 0 ? 'text-red-500' : ''}`}
>
{formatCurrency(value || 0)}
</div>
);
@@ -495,7 +497,9 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
footer: () => {
const value = supplier?.total.payment_price;
return (
<div className={`text-right ${value || 0 < 0 ? 'text-red-500' : ''}`}>
<div
className={`text-right ${value && value < 0 ? 'text-red-500' : ''}`}
>
{formatCurrency(value || 0)}
</div>
);
@@ -517,7 +521,9 @@ const DebtSupplierTab = ({ tabId }: DebtSupplierTabProps) => {
footer: () => {
const value = supplier?.total.debt_price;
return (
<div className={`text-right ${value || 0 < 0 ? 'text-red-500' : ''}`}>
<div
className={`text-right ${value && value < 0 ? 'text-red-500' : ''}`}
>
{formatCurrency(value || 0)}
</div>
);