mirror of
https://github.com/frappe/books.git
synced 2024-09-20 03:29:00 +00:00
feat: add field to segregate items by purpose
This commit is contained in:
parent
b4397a9132
commit
d9108d5103
@ -1,5 +1,11 @@
|
||||
import frappe, { t } from 'frappe';
|
||||
|
||||
const itemForMap = {
|
||||
purchases: t`Purchases`,
|
||||
sales: t`Sales`,
|
||||
both: t`Both`,
|
||||
};
|
||||
|
||||
export default {
|
||||
name: 'Item',
|
||||
label: t`Item`,
|
||||
@ -42,6 +48,14 @@ export default {
|
||||
default: 'Product',
|
||||
options: ['Product', 'Service'],
|
||||
},
|
||||
{
|
||||
fieldname: 'for',
|
||||
label: t`For`,
|
||||
fieldtype: 'Select',
|
||||
options: Object.keys(itemForMap),
|
||||
map: itemForMap,
|
||||
default: 'both',
|
||||
},
|
||||
{
|
||||
fieldname: 'incomeAccount',
|
||||
label: t`Income`,
|
||||
@ -115,6 +129,7 @@ export default {
|
||||
'rate',
|
||||
'unit',
|
||||
'itemType',
|
||||
'for',
|
||||
'tax',
|
||||
'description',
|
||||
'incomeAccount',
|
||||
|
Loading…
Reference in New Issue
Block a user