@@ -12,8 +12,10 @@ export type CommercialTerms = {
|
||||
|
||||
export function QuotationCommercialTerms({
|
||||
terms,
|
||||
currency = 'MZN',
|
||||
}: {
|
||||
terms?: CommercialTerms | null;
|
||||
currency?: string;
|
||||
}) {
|
||||
if (!terms) return null;
|
||||
return (
|
||||
@@ -25,13 +27,13 @@ export function QuotationCommercialTerms({
|
||||
{terms.lines.map((line) => (
|
||||
<p key={line.requisition_item_id}>
|
||||
Linha #{line.requisition_item_id}: preço inicial{' '}
|
||||
{money(line.gross_unit_minor)} · desconto{' '}
|
||||
{money(line.gross_unit_minor, currency)} · desconto{' '}
|
||||
{line.discount_type === 'none'
|
||||
? 'sem desconto'
|
||||
: line.discount_type === 'percent'
|
||||
? `${line.discount_value}%`
|
||||
: `${line.discount_value} MZN/unidade`}{' '}
|
||||
· preço líquido {money(line.net_unit_minor)}
|
||||
: `${line.discount_value} ${currency}/unidade`}{' '}
|
||||
· preço líquido {money(line.net_unit_minor, currency)}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user