diff --git a/models/doctype/Quotation/Quotation.js b/models/doctype/Quotation/Quotation.js index 8ee78ca7..5ddb0a85 100644 --- a/models/doctype/Quotation/Quotation.js +++ b/models/doctype/Quotation/Quotation.js @@ -3,5 +3,6 @@ const Quotation = Invoice; Quotation.name = "Quotation"; Quotation.label = "Quotation"; +Quotation.settings = "QuotationSettings"; module.exports = Quotation; diff --git a/models/doctype/QuotationSettings/QuotationSettings.js b/models/doctype/QuotationSettings/QuotationSettings.js new file mode 100644 index 00000000..fd423aa3 --- /dev/null +++ b/models/doctype/QuotationSettings/QuotationSettings.js @@ -0,0 +1,8 @@ +const InvoiceSettings = require('../InvoiceSettings/InvoiceSettings'); +const QuotationSettings = InvoiceSettings; +QuotationSettings.name = "QuotationSettings"; +QuotationSettings.label = "Quotation Settings"; +QuotationSettings.fields.find((field)=>{ + if (field.fieldname == "numberSeries") field.default = "QTN"; +}); +module.exports = QuotationSettings; \ No newline at end of file diff --git a/models/index.js b/models/index.js index 51f3e2e9..269bf3de 100644 --- a/models/index.js +++ b/models/index.js @@ -26,5 +26,6 @@ module.exports = { JournalEntrySettings: require('./doctype/JournalEntrySettings/JournalEntrySettings.js'), Quotation: require('./doctype/Quotation/Quotation.js'), + QuotationSettings: require('./doctype/QuotationSettings/QuotationSettings.js'), } } diff --git a/server/index.js b/server/index.js index 05050305..bf4dd365 100644 --- a/server/index.js +++ b/server/index.js @@ -25,6 +25,7 @@ module.exports = { await naming.createNumberSeries('INV-', 'InvoiceSettings'); await naming.createNumberSeries('PAY-', 'PaymentSettings'); await naming.createNumberSeries('JV-', 'JournalEntrySettings'); + await naming.createNumberSeries('QTN-', 'QuotationSettings'); frappe.registerMethod({ method: 'general-ledger',