2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 19:39:07 +00:00

fix: Generic make payment

This commit is contained in:
Faris Ansari 2019-11-08 16:16:02 +05:30
parent 6050db3c79
commit 5df933308d

View File

@ -208,13 +208,13 @@ export default {
name: payment.name, name: payment.name,
hideFields: ['party', 'date', 'account', 'paymentType', 'for'], hideFields: ['party', 'date', 'account', 'paymentType', 'for'],
values: { values: {
party: this.doc.customer, party: this.doc[this.partyField.fieldname],
account: this.doc.account, account: this.doc.account,
date: new Date().toISOString().slice(0, 10), date: new Date().toISOString().slice(0, 10),
paymentType: 'Receive', paymentType: this.doctype === 'SalesInvoice' ? 'Receive' : 'Pay',
for: [ for: [
{ {
referenceType: 'SalesInvoice', referenceType: this.doctype,
referenceName: this.doc.name, referenceName: this.doc.name,
amount: this.doc.outstandingAmount amount: this.doc.outstandingAmount
} }