Umm, no. LOL. You cannot manage Inventory Consumption via Price Definitions. You need to use Portions. That is what they are for.
Current version has support for multiple Price Definitions. It works very well.
Or Portion, but I digress… this is becoming a crazy nightmare. I had this grande vision of being able to Export, then modify offsite, then Delete/Archive, then Import.
Well, no dice. We don’t have enough fields… yet? Sure, it could work, but the export would just be easier to backup a pile of DB Tables, edit them using SSMS in Grid mode, then restore. I mean, the CSV file would be unnecessarily complex, with 100+ fields/columns. It’s the things like Category Order, Menu Item Order, Button widths per Category, colors, heights, more colors, column counts, colors. And what about Menu Item Order Tags? Automation Commands, etc?
This is the Export SQL at this point - it joins 12 Tables. If I included every Column of all the tables, it would be ridiculous …
SELECT
CAST(CAST(pr.[GroupCode] AS VARCHAR(8000)) AS TEXT) AS [ProductGroupCode]
,CAST(CAST(pr.[ItemType] AS VARCHAR(8000)) AS TEXT) AS [ProductItemType]
,CAST(CAST(pr.[Barcode] AS VARCHAR(8000)) AS TEXT) AS [ProductBarcode]
,CAST(CAST(pr.[Name] AS VARCHAR(8000)) AS TEXT) AS [ProductName]
,CAST(CAST(pr.[Tag] AS VARCHAR(8000)) AS TEXT) AS [ProductTag]
,CAST(CAST(po.[Name] AS VARCHAR(8000)) AS TEXT) AS [ProductPortionName]
,CAST(CAST(po.[Multiplier] AS VARCHAR(8000)) AS TEXT) AS [ProductPortionMultiplier]
,CAST(CAST(pp.[Price] AS VARCHAR(8000)) AS TEXT) AS [ProductPrice]
--,CAST(CAST(pp.[PriceTag] AS VARCHAR(8000)) AS TEXT) AS [ProductPriceTag]
,CAST(CAST(mn.[Name] AS VARCHAR(8000)) AS TEXT) AS [MenuName]
,CAST(CAST(mc.[Name] AS VARCHAR(8000)) AS TEXT) AS [MenuCategory]
,CAST(CAST(mc.[MainButtonColor] AS VARCHAR(8000)) AS TEXT) AS [CategoryButtonColour]
,CAST(CAST(mi.[Name] AS VARCHAR(8000)) AS TEXT) AS [MenuItemName]
,CAST(CAST(mi.[Header] AS VARCHAR(8000)) AS TEXT) AS [MenuItemHeader]
,CAST(CAST(mi.[SubMenuTag] AS VARCHAR(8000)) AS TEXT) AS [SubMenu]
,CAST(CAST(mi.[ItemPortion] AS VARCHAR(8000)) AS TEXT) AS [MenuItemPortion]
,CAST(CAST(mi.[ButtonColor] AS VARCHAR(8000)) AS TEXT) AS [MenuItemButtonColour]
,CAST(CAST(ir.[Name] AS VARCHAR(8000)) AS TEXT) AS [RecipeName]
,CAST(CAST(iri.[OrderTag] AS VARCHAR(8000)) AS TEXT) as [RecipeItemOrderTag]
,CAST(CAST(ii.[Name] AS VARCHAR(8000)) AS TEXT) AS [RecipeItemName]
,CAST(CAST(iri.[Quantity] AS VARCHAR(8000)) AS TEXT) as [RecipeItemQty]
,CAST(CAST(ii.[BaseUnit] AS VARCHAR(8000)) AS TEXT) as [RecipeItemUnit]
,CAST(CAST(iri.[ItemType] AS VARCHAR(8000)) AS TEXT) AS [RecipeItemType]
,CAST(CAST(ii.[Warehouse] AS VARCHAR(8000)) AS TEXT) AS [WarehouseName]
,CAST(CAST(ii.[WarehouseCode] AS VARCHAR(8000)) AS TEXT) AS [WarehouseCode]
,CAST(CAST(ii.[Name] AS VARCHAR(8000)) AS TEXT) AS [InventoryName]
,CAST(CAST(ii.[BaseUnit] AS VARCHAR(8000)) AS TEXT) as [BaseUnit]
,CAST(CAST(ii.[DefaultBaseUnitCost] AS VARCHAR(8000)) AS TEXT) as [DefaultBaseUnitCost]
,CAST(CAST(ii.[TransactionUnit] AS VARCHAR(8000)) AS TEXT) as [TransactionUnit]
,CAST(CAST(ii.[TransactionUnitMultiplier] AS VARCHAR(8000)) AS TEXT) as [TransactionUnitMultiplier]
,CAST(CAST(ii.[DefaultTransactionUnitCost] AS VARCHAR(8000)) AS TEXT) as [DefaultTransactionUnitCost]
--,CAST(CAST(itd.[Name] AS VARCHAR(8000)) AS TEXT) AS [InvDoc]
--,CAST(CAST(itx.[Quantity] AS VARCHAR(8000)) AS TEXT) AS [InvTxQty]
--,CAST(CAST(itx.[Unit] AS VARCHAR(8000)) AS TEXT) AS [InvTxUnit]
--,CAST(CAST(itx.[TotalPrice] AS VARCHAR(8000)) AS TEXT) AS [InvTxTotalPrice]
--,CAST(CAST(wh.[Name] AS VARCHAR(8000)) AS TEXT) AS [Warehouse]
,pp.[MenuItemPortionId]
FROM [MenuItemPortions] po
LEFT JOIN [MenuItemPrices] pp on pp.[MenuItemPortionId] = po.[Id]
LEFT JOIN [MenuItems] pr on po.[MenuItemId] = pr.[Id]
LEFT JOIN [ScreenMenuItems] mi on mi.[MenuItemId] = pr.[Id]
LEFT JOIN [ScreenMenuCategories] mc on mc.[Id] = mi.[ScreenMenuCategoryId]
LEFT JOIN [ScreenMenus] mn on mn.[Id] = mc.[ScreenMenuId]
LEFT JOIN [Recipes] ir on ir.[Portion_Id] = po.[Id]
LEFT JOIN [RecipeItems] iri on iri.[RecipeId] = ir.[Id]
LEFT JOIN [InventoryItems] ii on ii.[Id] = iri.[InventoryItem_Id]
--LEFT JOIN [Warehouses] wh on wh.[Name] = ii.[Warehouse]
--LEFT JOIN [InventoryTransactions] itx on itx.[InventoryItem_Id] = ii.[Id]
--LEFT JOIN [InventoryTransactionDocuments] itd on itd.[Id] = itx.[InventoryTransactionDocumentId]
--LEFT JOIN [Warehouses] wh on wh.[Id] = itx.[TargetWarehouseId]
WHERE 1=1
AND pr.[ItemType]=0
AND isnull(pp.[PriceTag],'(REG)')='(REG)'
AND isnull(iri.[ItemType],0)=0
ORDER BY pr.[GroupCode],pr.[Name],pp.[Price] DESC, mn.[Name],mc.[Name]
I think my grande vision is out-of-scope for the purpose of the Tool, and does not make practical sense.