add due amount on invoice select

This commit is contained in:
yogesh_gohil
2019-11-20 16:57:31 +05:30
parent d29c343911
commit 1e6372cbb1

View File

@ -83,7 +83,7 @@
:allow-empty="false"
:disabled="isEdit"
:placeholder="$t('invoices.select_invoice')"
label="invoice_number"
:custom-label="invoiceWithAmount"
track-by="invoice_number"
/>
</div>
@ -283,6 +283,9 @@ export default {
'updatePayment',
'fetchPayment'
]),
invoiceWithAmount ({ invoice_number, due_amount }) {
return `${invoice_number} (${this.$utils.formatGraphMoney(due_amount, this.customer.currency)})`
},
async loadData () {
if (this.isEdit) {
let response = await this.fetchPayment(this.$route.params.id)