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.itemType !== 'Product' ||
|
||||
(this.inserted && !this.trackItem),
|
||||
barcode: () => !this.fyo.singles.InventorySettings?.enableBarcodes,
|
||||
};
|
||||
|
||||
readOnly: ReadOnlyMap = {
|
||||
|
@ -9,6 +9,7 @@ export class InventorySettings extends Doc {
|
||||
valuationMethod?: ValuationMethod;
|
||||
stockReceivedButNotBilled?: string;
|
||||
costOfGoodsSold?: string;
|
||||
enableBarcodes?: boolean;
|
||||
|
||||
static filters: FiltersMap = {
|
||||
stockInHand: () => ({
|
||||
|
@ -106,6 +106,12 @@
|
||||
"fieldtype": "Int",
|
||||
"placeholder": "HSN/SAC Code"
|
||||
},
|
||||
{
|
||||
"fieldname": "barcode",
|
||||
"label": "Barcode",
|
||||
"fieldtype": "Data",
|
||||
"placeholder": "Barcode"
|
||||
},
|
||||
{
|
||||
"fieldname": "trackItem",
|
||||
"label": "Track Item",
|
||||
@ -122,6 +128,7 @@
|
||||
"description",
|
||||
"incomeAccount",
|
||||
"expenseAccount",
|
||||
"barcode",
|
||||
"hsnCode",
|
||||
"trackItem"
|
||||
],
|
||||
|
@ -45,6 +45,11 @@
|
||||
"label": "Cost Of Goods Sold Acc.",
|
||||
"fieldtype": "Link",
|
||||
"target": "Account"
|
||||
},
|
||||
{
|
||||
"fieldname": "enableBarcodes",
|
||||
"label": "Enable Barcodes",
|
||||
"fieldtype": "Check"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -126,7 +126,8 @@ export default {
|
||||
fieldnames.includes('hideGetStarted') ||
|
||||
fieldnames.includes('displayPrecision') ||
|
||||
fieldnames.includes('enableDiscounting') ||
|
||||
fieldnames.includes('enableInventory')
|
||||
fieldnames.includes('enableInventory') ||
|
||||
fieldnames.includes('enableBarcodes')
|
||||
) {
|
||||
this.showReloadToast();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user