mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-15 05:32:21 +00:00
Fix "override pricing" display (#10545)
- Use specified currency values - Closes #10537
This commit is contained in:
@@ -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