mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Merge branch 'fix-payment' into 'master'
Fix payment edit See merge request mohit.panjvani/crater-web!61
This commit is contained in:
@ -246,10 +246,10 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
customer (newValue) {
|
customer (newValue) {
|
||||||
this.formData.user_id = newValue.id
|
this.formData.user_id = newValue.id
|
||||||
|
if (!this.isEdit) {
|
||||||
this.invoice = null
|
this.invoice = null
|
||||||
this.formData.amount = 0
|
this.formData.amount = 0
|
||||||
this.invoiceList = []
|
this.invoiceList = []
|
||||||
if (!this.isEdit) {
|
|
||||||
this.fetchCustomerInvoices(newValue.id)
|
this.fetchCustomerInvoices(newValue.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -291,7 +291,6 @@ export default {
|
|||||||
this.customer = response.data.payment.user
|
this.customer = response.data.payment.user
|
||||||
this.formData.payment_date = moment(response.data.payment.payment_date, 'YYYY-MM-DD').toString()
|
this.formData.payment_date = moment(response.data.payment.payment_date, 'YYYY-MM-DD').toString()
|
||||||
this.formData.amount = parseFloat(response.data.payment.amount)
|
this.formData.amount = parseFloat(response.data.payment.amount)
|
||||||
this.maxPayableAmount = response.data.payment.amount
|
|
||||||
if (response.data.payment.invoice !== null) {
|
if (response.data.payment.invoice !== null) {
|
||||||
this.maxPayableAmount = parseInt(response.data.payment.amount) + parseInt(response.data.payment.invoice.due_amount)
|
this.maxPayableAmount = parseInt(response.data.payment.amount) + parseInt(response.data.payment.invoice.due_amount)
|
||||||
this.invoice = response.data.payment.invoice
|
this.invoice = response.data.payment.invoice
|
||||||
|
|||||||
Reference in New Issue
Block a user