Merge branch 'record-payment' into 'master'

fix record payment from view invoice

See merge request mohit.panjvani/crater-web!79
This commit is contained in:
Mohit Panjwani
2019-11-27 06:13:46 +00:00

View File

@ -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) {
if (this.isSettingInitialData) {
this.isSettingInitialData = false
} else {
this.invoice = null 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)