diff --git a/models/doctype/Payment/Payment.js b/models/doctype/Payment/Payment.js index 92405cfc..034344a6 100644 --- a/models/doctype/Payment/Payment.js +++ b/models/doctype/Payment/Payment.js @@ -20,7 +20,7 @@ module.exports = { fieldname: 'date', label: 'Posting Date', fieldtype: 'Date', - defaultValue: new Date().toISOString() + default: new Date().toISOString() }, { fieldname: 'account', @@ -102,8 +102,7 @@ module.exports = { label: 'Amount', fieldtype: 'Currency', required: 1, - readOnly: 1, - formula: doc => doc.getSum('for', 'amount') + default: doc => doc.getSum('for', 'amount') }, { fieldname: 'writeoff', diff --git a/src/sidebarConfig.js b/src/sidebarConfig.js index 3c9a3448..7dd6bec3 100644 --- a/src/sidebarConfig.js +++ b/src/sidebarConfig.js @@ -42,6 +42,11 @@ const config = { route: '/list/Item', doctype: 'Item' }, + { + label: _('Payments'), + route: '/list/Payment', + doctype: 'Payment' + }, { label: _('Journal Entry'), route: '/list/JournalEntry', @@ -71,6 +76,11 @@ const config = { route: '/list/Item', doctype: 'Item' }, + { + label: _('Payments'), + route: '/list/Payment', + doctype: 'Payment' + }, { label: _('Journal Entry'), route: '/list/JournalEntry',