From bd5ee080c23aba9ad305d6a2f66e916fb664b738 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 18 Dec 2019 23:54:58 +0530 Subject: [PATCH] fix: Formatting and model name --- .../DashboardSettings/DashboardSettings.js | 2 +- .../JournalEntrySettings.js | 34 +++++++++---------- models/doctype/Quotation/Quotation.js | 24 +++++++------ models/doctype/SalesOrder/SalesOrder.js | 18 +++++----- 4 files changed, 41 insertions(+), 37 deletions(-) diff --git a/models/doctype/DashboardSettings/DashboardSettings.js b/models/doctype/DashboardSettings/DashboardSettings.js index 11a1e041..5cea3748 100644 --- a/models/doctype/DashboardSettings/DashboardSettings.js +++ b/models/doctype/DashboardSettings/DashboardSettings.js @@ -1,5 +1,5 @@ module.exports = { - name: 'Dashboard', + name: 'DashboardSettings', label: 'Dashboard Settings', doctype: 'DocType', isSingle: 1, diff --git a/models/doctype/JournalEntrySettings/JournalEntrySettings.js b/models/doctype/JournalEntrySettings/JournalEntrySettings.js index 14d77872..079af924 100644 --- a/models/doctype/JournalEntrySettings/JournalEntrySettings.js +++ b/models/doctype/JournalEntrySettings/JournalEntrySettings.js @@ -1,18 +1,18 @@ module.exports = { - "name": "JournalEntrySetting", - "label": "Journal Entry Setting", - "doctype": "DocType", - "isSingle": 1, - "isChild": 0, - "keywordFields": [], - "fields": [ - { - "fieldname": "numberSeries", - "label": "Number Series", - "fieldtype": "Link", - "target": "NumberSeries", - "required": 1, - "default": "JV" - } - ] -} \ No newline at end of file + name: 'JournalEntrySettings', + label: 'Journal Entry Setting', + doctype: 'DocType', + isSingle: 1, + isChild: 0, + keywordFields: [], + fields: [ + { + fieldname: 'numberSeries', + label: 'Number Series', + fieldtype: 'Link', + target: 'NumberSeries', + required: 1, + default: 'JV' + } + ] +}; diff --git a/models/doctype/Quotation/Quotation.js b/models/doctype/Quotation/Quotation.js index 5ce20400..2ef930bd 100644 --- a/models/doctype/Quotation/Quotation.js +++ b/models/doctype/Quotation/Quotation.js @@ -1,20 +1,24 @@ const model = require('frappejs/model'); const SalesInvoice = require('../SalesInvoice/SalesInvoice'); -const Quotation = model.extend(SalesInvoice, { - name: "Quotation", - label: "Quotation", - settings: "QuotationSettings", +const Quotation = model.extend( + SalesInvoice, + { + name: 'Quotation', + label: 'Quotation', + settings: 'QuotationSettings', fields: [ - { - "fieldname": "items", - "childtype": "QuotationItem" - } + { + fieldname: 'items', + childtype: 'QuotationItem' + } ], links: [] -}, { + }, + { skipFields: ['account'], overrideProps: ['links'] -}); + } +); module.exports = Quotation; diff --git a/models/doctype/SalesOrder/SalesOrder.js b/models/doctype/SalesOrder/SalesOrder.js index 4c2fb72d..569c12bd 100644 --- a/models/doctype/SalesOrder/SalesOrder.js +++ b/models/doctype/SalesOrder/SalesOrder.js @@ -2,13 +2,13 @@ const model = require('frappejs/model'); const Quotation = require('../Quotation/Quotation'); module.exports = model.extend(Quotation, { - name: "SalesOrder", - label: "Sales Order", - settings: "SalesOrderSettings", - fields: [ - { - "fieldname": "items", - "childtype": "SalesOrderItem" - } - ] + name: 'SalesOrder', + label: 'Sales Order', + settings: 'SalesOrderSettings', + fields: [ + { + fieldname: 'items', + childtype: 'SalesOrderItem' + } + ] });