mirror of
https://github.com/frappe/books.git
synced 2025-02-02 12:08:27 +00:00
feat: add enable barcode
This commit is contained in:
parent
fe68edd94d
commit
cf4f8d368c
@ -120,6 +120,7 @@ export class Item extends Doc {
|
|||||||
!this.fyo.singles.AccountingSettings?.enableInventory ||
|
!this.fyo.singles.AccountingSettings?.enableInventory ||
|
||||||
this.itemType !== 'Product' ||
|
this.itemType !== 'Product' ||
|
||||||
(this.inserted && !this.trackItem),
|
(this.inserted && !this.trackItem),
|
||||||
|
barcode: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
|
||||||
};
|
};
|
||||||
|
|
||||||
readOnly: ReadOnlyMap = {
|
readOnly: ReadOnlyMap = {
|
||||||
|
@ -9,6 +9,7 @@ export class InventorySettings extends Doc {
|
|||||||
valuationMethod?: ValuationMethod;
|
valuationMethod?: ValuationMethod;
|
||||||
stockReceivedButNotBilled?: string;
|
stockReceivedButNotBilled?: string;
|
||||||
costOfGoodsSold?: string;
|
costOfGoodsSold?: string;
|
||||||
|
enableBarcodes?: boolean;
|
||||||
|
|
||||||
static filters: FiltersMap = {
|
static filters: FiltersMap = {
|
||||||
stockInHand: () => ({
|
stockInHand: () => ({
|
||||||
|
@ -106,6 +106,12 @@
|
|||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"placeholder": "HSN/SAC Code"
|
"placeholder": "HSN/SAC Code"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "barcode",
|
||||||
|
"label": "Barcode",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"placeholder": "Barcode"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "trackItem",
|
"fieldname": "trackItem",
|
||||||
"label": "Track Item",
|
"label": "Track Item",
|
||||||
@ -122,6 +128,7 @@
|
|||||||
"description",
|
"description",
|
||||||
"incomeAccount",
|
"incomeAccount",
|
||||||
"expenseAccount",
|
"expenseAccount",
|
||||||
|
"barcode",
|
||||||
"hsnCode",
|
"hsnCode",
|
||||||
"trackItem"
|
"trackItem"
|
||||||
],
|
],
|
||||||
|
@ -45,6 +45,11 @@
|
|||||||
"label": "Cost Of Goods Sold Acc.",
|
"label": "Cost Of Goods Sold Acc.",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"target": "Account"
|
"target": "Account"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "enableBarcodes",
|
||||||
|
"label": "Enable Barcodes",
|
||||||
|
"fieldtype": "Check"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,8 @@ export default {
|
|||||||
fieldnames.includes('hideGetStarted') ||
|
fieldnames.includes('hideGetStarted') ||
|
||||||
fieldnames.includes('displayPrecision') ||
|
fieldnames.includes('displayPrecision') ||
|
||||||
fieldnames.includes('enableDiscounting') ||
|
fieldnames.includes('enableDiscounting') ||
|
||||||
fieldnames.includes('enableInventory')
|
fieldnames.includes('enableInventory') ||
|
||||||
|
fieldnames.includes('enableBarcodes')
|
||||||
) {
|
) {
|
||||||
this.showReloadToast();
|
this.showReloadToast();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user