From 2714171d0e075e35001e5c83b7bc82af8b2927c9 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Thu, 29 Mar 2018 12:58:56 +0530 Subject: [PATCH] Quotation added : Inherits from Invoice --- client/index.js | 1 + .../JournalEntrySettings.js} | 0 models/doctype/Quotation/Quotation.js | 7 +++++++ models/index.js | 3 ++- server/index.js | 6 +++--- 5 files changed, 13 insertions(+), 4 deletions(-) rename models/doctype/{JournalEntrySetting/JournalEntrySetting.js => JournalEntrySettings/JournalEntrySettings.js} (100%) create mode 100644 models/doctype/Quotation/Quotation.js diff --git a/client/index.js b/client/index.js index 41391414..1aca8f52 100644 --- a/client/index.js +++ b/client/index.js @@ -22,6 +22,7 @@ module.exports = { frappe.desk.menu.addItem('Accounts', '#list/Account'); frappe.desk.menu.addItem('Items', '#list/Item'); frappe.desk.menu.addItem('Customers', '#list/Customer'); + frappe.desk.menu.addItem('Quotation', '#list/Quotation'); frappe.desk.menu.addItem('Invoice', '#list/Invoice'); frappe.desk.menu.addItem('Journal Entry', '#list/JournalEntry'); frappe.desk.menu.addItem('Address', "#list/Address"); diff --git a/models/doctype/JournalEntrySetting/JournalEntrySetting.js b/models/doctype/JournalEntrySettings/JournalEntrySettings.js similarity index 100% rename from models/doctype/JournalEntrySetting/JournalEntrySetting.js rename to models/doctype/JournalEntrySettings/JournalEntrySettings.js diff --git a/models/doctype/Quotation/Quotation.js b/models/doctype/Quotation/Quotation.js new file mode 100644 index 00000000..8ee78ca7 --- /dev/null +++ b/models/doctype/Quotation/Quotation.js @@ -0,0 +1,7 @@ +const Invoice = require('../Invoice/Invoice'); +const Quotation = Invoice; + +Quotation.name = "Quotation"; +Quotation.label = "Quotation"; + +module.exports = Quotation; diff --git a/models/index.js b/models/index.js index 056261fb..51f3e2e9 100644 --- a/models/index.js +++ b/models/index.js @@ -23,7 +23,8 @@ module.exports = { JournalEntry: require('./doctype/JournalEntry/JournalEntry.js'), JournalEntryAccount: require('./doctype/JournalEntryAccount/JournalEntryAccount.js'), - JournalEntrySetting: require('./doctype/JournalEntrySetting/JournalEntrySetting.js'), + JournalEntrySettings: require('./doctype/JournalEntrySettings/JournalEntrySettings.js'), + Quotation: require('./doctype/Quotation/Quotation.js'), } } diff --git a/server/index.js b/server/index.js index 7138b10f..05050305 100644 --- a/server/index.js +++ b/server/index.js @@ -22,9 +22,9 @@ module.exports = { frappe.syncDoc(require('../fixtures/invoicePrint')); // init naming series if missing - await naming.createNumberSeries('INV-', 'InvoiceSetting'); - await naming.createNumberSeries('PAY-', 'PaymentSetting'); - await naming.createNumberSeries('JV-', 'JournalEntrySetting'); + await naming.createNumberSeries('INV-', 'InvoiceSettings'); + await naming.createNumberSeries('PAY-', 'PaymentSettings'); + await naming.createNumberSeries('JV-', 'JournalEntrySettings'); frappe.registerMethod({ method: 'general-ledger',