mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
fix record payment from view invoice
This commit is contained in:
@ -183,7 +183,8 @@ export default {
|
|||||||
customerList: [],
|
customerList: [],
|
||||||
invoiceList: [],
|
invoiceList: [],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
maxPayableAmount: Number.MAX_SAFE_INTEGER
|
maxPayableAmount: Number.MAX_SAFE_INTEGER,
|
||||||
|
isSettingInitialData: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validations () {
|
validations () {
|
||||||
@ -247,7 +248,12 @@ export default {
|
|||||||
customer (newValue) {
|
customer (newValue) {
|
||||||
this.formData.user_id = newValue.id
|
this.formData.user_id = newValue.id
|
||||||
if (!this.isEdit) {
|
if (!this.isEdit) {
|
||||||
this.invoice = null
|
if (this.isSettingInitialData) {
|
||||||
|
this.isSettingInitialData = false
|
||||||
|
} else {
|
||||||
|
this.invoice = null
|
||||||
|
this.formData.invoice_id = null
|
||||||
|
}
|
||||||
this.formData.amount = 0
|
this.formData.amount = 0
|
||||||
this.invoiceList = []
|
this.invoiceList = []
|
||||||
this.fetchCustomerInvoices(newValue.id)
|
this.fetchCustomerInvoices(newValue.id)
|
||||||
@ -263,9 +269,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted () {
|
async mounted () {
|
||||||
// if (!this.$route.params.id) {
|
|
||||||
// this.$refs.baseSelect.$refs.search.focus()
|
|
||||||
// }
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
if (this.$route.params.id && !this.isEdit) {
|
if (this.$route.params.id && !this.isEdit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user