diff --git a/schemas/app/PriceList.json b/schemas/app/PriceList.json index 733aa5bd..9d2c3a30 100644 --- a/schemas/app/PriceList.json +++ b/schemas/app/PriceList.json @@ -32,7 +32,6 @@ "label": "Item Prices", "fieldtype": "Table", "target": "PriceListItem", - "edit": true, "required": true, "section": "Item Prices" } diff --git a/schemas/app/PriceListItem.json b/schemas/app/PriceListItem.json index e4bceacc..2a498ece 100644 --- a/schemas/app/PriceListItem.json +++ b/schemas/app/PriceListItem.json @@ -27,5 +27,5 @@ "section": "Item" } ], - "quickEditFields": ["item", "unit", "rate"] + "tableFields": ["item", "unit", "rate"] } diff --git a/src/utils/search.ts b/src/utils/search.ts index 8c040c8c..a27f2d85 100644 --- a/src/utils/search.ts +++ b/src/utils/search.ts @@ -194,8 +194,7 @@ function getListViewList(fyo: Fyo): SearchItem[] { ModelNameEnum.PrintTemplate, ]; - const hasInventory = fyo.doc.singles.AccountingSettings?.enableInventory; - if (hasInventory) { + if (fyo.doc.singles.AccountingSettings?.enableInventory) { schemaNames.push( ModelNameEnum.StockMovement, ModelNameEnum.Shipment, @@ -205,11 +204,18 @@ function getListViewList(fyo: Fyo): SearchItem[] { ); } - const hasBatch = fyo.doc.singles.InventorySettings?.enableBatches; - if (hasBatch) { + if (fyo.doc.singles.AccountingSettings?.enablePriceList) { + schemaNames.push(ModelNameEnum.PriceList); + } + + if (fyo.singles.InventorySettings?.enableBatches) { schemaNames.push(ModelNameEnum.Batch); } + if (fyo.singles.InventorySettings?.enableSerialNumber) { + schemaNames.push(ModelNameEnum.SerialNumber); + } + if (fyo.store.isDevelopment) { schemaNames = Object.keys(fyo.schemaMap) as ModelNameEnum[]; }