fix: price list table visiblity

- make price list searchable
- remove row edit from price list
This commit is contained in:
18alantom
2023-06-07 11:58:15 +05:30
parent 9a53e9c648
commit 89e45c604c
3 changed files with 11 additions and 6 deletions
-1
View File
@@ -32,7 +32,6 @@
"label": "Item Prices",
"fieldtype": "Table",
"target": "PriceListItem",
"edit": true,
"required": true,
"section": "Item Prices"
}
+1 -1
View File
@@ -27,5 +27,5 @@
"section": "Item"
}
],
"quickEditFields": ["item", "unit", "rate"]
"tableFields": ["item", "unit", "rate"]
}
+10 -4
View File
@@ -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[];
}