Displaying all items in Report Cost Details

No its retail setup 1:1, also the inventory item and the products name are same.

That’s fair enough but dont forget samba is restaurant so dont expect everything for a retail setup to be plug and play.

Do that, then you can use name to constrain the cost report and menu item reports inline.

Use it in SQL Report? Or Report cost details tag?

Report cost expression.
I explained already.
Look at default wp report for basic example of @list
You would report list of menu items on @
Then in seperate report cost and report menu item expressions return fields needed with constraint of c.name and menu item name =$1
The @ gives a list of all menu items.
Then the report loops through each item checking cost for inventory item of same name and menu item details for that name also.

Ok i will try it out but if i get the data correct in sql, it will be better because i can get anything in sql.

@Jesse can you help us with this?

Yes you can get anything with SQL but you dont know SQL :wink: and the amount of joints etc taking that route vs just doing the above is more complex.

But again as i said i want selling price, cost price and instock items all these in one print and according to my study Report Cost Details have selling price and cost price but not instock items detail. Report Consumption Details have instock i.e C.Inventory. So tell me if there is anything i can combine both tags? and get all three details?

I Tried this:

[Item Profit Margins:2,2,3,1,1]
Name|Cost|Selling Price
@{REPORT MENU ITEM DETAILS:M.Name}
$1|{REPORT COST DETAILS:C.Name,C.Cost,C.AvgPrice}

Giving me this:

You dont listen
 you need to add the constraint to the report - something like {REPORT COST DETAILS:C.Name,C.Cost,C.AvgPrice:C.Name=$1}

[Item Profit Margins:2,2,3,1,1]
Name|Cost|Selling Price
@{REPORT MENU ITEM DETAILS:M.Name}
$1|{REPORT COST DETAILS:C.Name,C.Cost,C.AvgPrice:C.Name=$1}

But its only giving me names.

Your $1 at beginning is giving those names, you will want either to use $1 for list value or use the name fields in report as that if worked would show name twice.
The constraint must be invalid.
Try (C.Name=$1) or change to M.Name

i tried what u tell but same result


You’ll have to wait for someone else to answer then because I dont use inventory and not got time to do a bunch of testing to get you and answer.

i manage to get the correct data in sql.

SELECT MenuItems.Id, MenuItems.Name, InventoryItems.DefaultBaseUnitCost, MenuItemPrices.Price, MenuItems.GroupCode
FROM MenuItems
INNER JOIN InventoryItems ON MenuItems.Name=InventoryItems.Name
INNER JOIN MenuItemPrices ON MenuItems.Id = MenuItemPrices.Id

image

But when m trying to get data from PeriodicConsumptionItems its not giving me any data. Any idea why? I checked whole forum everybody getting values from it but only m getting blank.

SELECT PeriodicConsumptionItems.*
FROM PeriodicConsumptionItems

There are different methods and ways to do what you need but one of the easiest ways to do it would be to use Product Tags or Inventory Item tags. This should be somewhat easier if you do 1:1 stock counts i.e. 1 Coke = 1 Can

There you can state cost prices or selling prices and have them shown in the reports. Depending whether you want to list them by sales, consumption or some other way.

Its called periodic because at the end of work period SambaPOS updates your cost and consumption. I cant remember what the default cost report shows but I think it was just based on what you sold and % margin of what you make per item.

At the moment I have a lot on my hands but in couple of weeks if you are still stuck I could help you out.

But why periodic consumtion is not giving me any data?

Had you ended work period?
He is saying that table is propagated once period is closed.
Have you made recipes?

1 Like