<template>
<fragment>
<tr>
<td>
<p v-if="title">
{{ title
}}<span
><sup v-for="id in price.footnotes" :key="id"> {{ id }})</sup></span
>
</p>
</td>
<td class="text--right">
<p v-if="price">
<fragment v-if="isDecimal">
{{ price[clientPriceType] | formatPrice }}
</fragment>
<fragment v-else>
{{ Math.ceil(price[clientPriceType]) }}
</fragment>
{{ price.currency }}
</p>
</td>
</tr>
</fragment>
</template>
<script>
import formatPrice from '../filters/formatPrice';
export default {
props: {
price: {
type: Object,
default: () => ({ value: 0, currency: '', footnotes: [] })
},
title: {
type: String,
default: ''
},
isDecimal: {
type: Boolean,
default: false
},
clientPriceType: {
type: String,
default: 'brutto'
}
},
filters: {
formatPrice
}
};
</script>