|
@@ -17,14 +17,30 @@
|
|
|
default: () => {
|
|
|
return {}
|
|
|
}
|
|
|
+ },
|
|
|
+ symbol: {
|
|
|
+ type: String,
|
|
|
+ default: '$',
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ separator: {
|
|
|
+ type: String,
|
|
|
+ default: '.'
|
|
|
+ },
|
|
|
+ decimals: {
|
|
|
+ type: Number,
|
|
|
+ default: 0
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getSymbol() {
|
|
|
+ return this.symbol
|
|
|
+ },
|
|
|
getPrice() {
|
|
|
- return accounting.formatMoney(this.item.list_price, '₲', 0, '.', ',')
|
|
|
+ return accounting.formatMoney(this.item.list_price, this.symbol, 0, this.separator, ',')
|
|
|
},
|
|
|
getSubtotal() {
|
|
|
- return accounting.formatMoney(this.item.list_price * this.item.qty, '₲', 0, '.', ',')
|
|
|
+ return accounting.formatMoney(this.item.list_price * this.item.qty, this.symbol, 0, this.separator, ',')
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|