mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
feat: add reference to number series doc
This commit is contained in:
parent
6912355e62
commit
0bd1706e2b
@ -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,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user