diff --git a/frappe/models/doctype/NumberSeries/NumberSeries.js b/frappe/models/doctype/NumberSeries/NumberSeries.js index 379e48ad..ecd85748 100644 --- a/frappe/models/doctype/NumberSeries/NumberSeries.js +++ b/frappe/models/doctype/NumberSeries/NumberSeries.js @@ -1,5 +1,18 @@ const { t } = require('frappe'); +const referenceTypeMap = { + SalesInvoice: t`Invoice`, + PurchaseInvoice: t`Bill`, + Payment: t`Payment`, + JournalEntry: t`Journal Entry`, + Quotation: t`Quotation`, + SalesOrder: t`SalesOrder`, + Fulfillment: t`Fulfillment`, + PurchaseOrder: t`PurchaseOrder`, + PurchaseReceipt: t`PurchaseReceipt`, + '-': t`None`, +}; + module.exports = { name: 'NumberSeries', documentClass: require('./NumberSeriesDocument.js'), @@ -14,11 +27,28 @@ module.exports = { fieldtype: 'Data', required: 1, }, + { + fieldname: 'referenceType', + label: t`Reference Type`, + fieldtype: 'Select', + options: Object.keys(referenceTypeMap), + map: referenceTypeMap, + default: '-', + required: 1, + }, + { + fieldname: 'start', + label: t`Start`, + fieldtype: 'Int', + default: 1001, + required: 1, + }, { fieldname: 'current', label: t`Current`, fieldtype: 'Int', required: 1, + readOnly: 1, }, ], };