mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-13 19:36:46 +00:00
- Use specified currency values
- Closes #10537
(cherry picked from commit 4edbe9bab1)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ef35591110
commit
fe1cc56e94
@@ -47,6 +47,8 @@ interface PricingOverviewEntry {
|
|||||||
min_value: number | null | undefined;
|
min_value: number | null | undefined;
|
||||||
max_value: number | null | undefined;
|
max_value: number | null | undefined;
|
||||||
visible?: boolean;
|
visible?: boolean;
|
||||||
|
min_currency?: string | null | undefined;
|
||||||
|
max_currency?: string | null | undefined;
|
||||||
currency?: string | null | undefined;
|
currency?: string | null | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +163,8 @@ export default function PricingOverviewPanel({
|
|||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
return formatCurrency(record?.min_value, {
|
return formatCurrency(record?.min_value, {
|
||||||
currency: record.currency ?? pricing?.currency
|
currency:
|
||||||
|
record.min_currency ?? record.currency ?? pricing?.currency
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -174,7 +177,8 @@ export default function PricingOverviewPanel({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return formatCurrency(record?.max_value, {
|
return formatCurrency(record?.max_value, {
|
||||||
currency: record.currency ?? pricing?.currency
|
currency:
|
||||||
|
record.max_currency ?? record.currency ?? pricing?.currency
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,6 +193,9 @@ export default function PricingOverviewPanel({
|
|||||||
icon: <IconExclamationCircle />,
|
icon: <IconExclamationCircle />,
|
||||||
min_value: Number.parseFloat(pricing?.override_min),
|
min_value: Number.parseFloat(pricing?.override_min),
|
||||||
max_value: Number.parseFloat(pricing?.override_max),
|
max_value: Number.parseFloat(pricing?.override_max),
|
||||||
|
min_currency: pricing?.override_min_currency ?? pricing?.currency,
|
||||||
|
max_currency: pricing?.override_max_currency ?? pricing?.currency,
|
||||||
|
currency: pricing?.currency,
|
||||||
valid: pricing?.override_min != null && pricing?.override_max != null
|
valid: pricing?.override_min != null && pricing?.override_max != null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user