mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-03 20:55:59 +00:00
fixed invoice discount
This commit is contained in:
@@ -511,12 +511,6 @@
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isDiscount(val) {
|
||||
if (!val) {
|
||||
this.invoice.discount_rate = 10
|
||||
this.invoice.discount_type = 'percent'
|
||||
}
|
||||
},
|
||||
'invoice.invoice_number': function (val) {
|
||||
this.invoice.variable_number = val
|
||||
},
|
||||
|
||||
@@ -416,14 +416,6 @@
|
||||
return total
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isDiscount(val) {
|
||||
if (!val) {
|
||||
this.invoice.discount_rate = null
|
||||
this.invoice.discount_type = null
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fullDetails: undefined,
|
||||
@@ -543,13 +535,14 @@
|
||||
})
|
||||
},
|
||||
addRow() {
|
||||
let lastTaxRate = this.invoice.items.slice(-1).pop()
|
||||
let lastItem = this.invoice.items.slice(-1).pop()
|
||||
|
||||
this.invoice.items.push({
|
||||
id: Math.floor(Math.random() * 10000000),
|
||||
description: '',
|
||||
amount: 1,
|
||||
tax_rate: lastTaxRate?.tax_rate || 21,
|
||||
unit: lastItem?.unit || this.$t('in_editor.default_unit'),
|
||||
tax_rate: lastItem?.tax_rate || 21,
|
||||
price: 1,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user