Sales Report with Inventory and Item Profitability

Hello, is it possible to get a report similar to the one below;

I am trying to identify the profits per each product sold and also see the opening and current inventory.

I didn’t spend much time looking at it, but Profit and Loss reports have been created before, you can find one here, literally the very first link I got from search.

Post on forum if you need help updating your custom report.

2 Likes

Thanks @sabata, however, I have noticed that the forum does not delve into incorporating the total inventory per item. Is it possible to add it to the p&l report?

You need to define “Item” first. Is that an Inventory Item or a Product that you sell? Or is it the same thing, meaning you have a 1:1 relationship between Inventory and Products like a Retail store?

A can of Coke for example has a 1:1 relationship.

A bowl of homemade Chili however does not. The Chili Product that you sell is made of Inventory Items like Ground Beef, beans, tomatoes, etc. as defined by the Inventory Recipe for that Product.


In any case, you will need to combine multiple Report Tags to get all the columns in your example.

You need to read about the various Reporting Tags to understand what each type of Report will give you, and use different Tags in each column to pull the pertinent information.

https://sambapos.com/wiki/doku.php/custom_reporting

Thanks a lot. Please advise on how to combine tags. I am attempting as per the guidelines on Interesting idea for multiple entities using same account but I seem to be missing out something.

Kindly give me an example of combining two tags in a report.

Four (4) different Report Tags, one for each column …

[My Report:1,1,1,1]
>>COL1|COL2|COL3|COL4
{REPORT ORDER DETAILS:X}|{REPORT INVENTORY TRANSACTION DETAILS:X}|{REPORT CONSUMPTION DETAILS:X}|{REPORT COST DETAILS:X}

Thanks. I have entered the tags as on the attachment, but the inventory column is not indicating any amounts. What could be the issue?

The issue is that I cannot copy your Report from a picture of your screen and paste it into SambaPOS to try it for myself. We ceratainly like to see the output that you are getting (this is good), but it helps to have your Report in a copy/paste format.

Seriously though, it might be that you have not made any Inventory Purchases in the current Workperiod.

1 Like

Hello, see the image;

[Inventory Report:2,1,1,1,1]
>Item|Opening Stock|Cost|Value|Qty
{REPORT INVENTORY TRANSACTION DETAILS:T.Name,
T.Quantity, T.Price,T.TotalPrice}{REPORT COST DETAILS:C.Quantity}

I have bought some inventory and added the “|” character between “}{” but still can’t get it to work.

I have managed to have the totals work, but the main data is still blank.

[My Report:1,1,1,1]
>>COL1|COL2|COL3|COL4
{REPORT ORDER DETAILS:T.Date}|{REPORT INVENTORY TRANSACTION DETAILS:T.Name}|{REPORT CONSUMPTION DETAILS:C.Cost}|{REPORT COST DETAILS:C.AvgPrice}

>Total|{REPORT INVENTORY TRANSACTION DETAILS:T.Name.Count}|{REPORT CONSUMPTION DETAILS:C.Cost.Sum}|{REPORT COST DETAILS:C.AvgPrice.Sum}

What could be the issue? Please assist.

Highlight your report syntax and use code format button so we can see it correctly.

Looks like you still have no data to report. Have you made inventory purchases and sold those items?

Yeah, I already have inventory. I even bought some now but it still not displaying.

Show a screenshot of your inventory transactions.


499 is the total quantity of my inventory items and is correctly showing on the totals but not showing on the item breakdown.

Below is the code used in the above report;

[Item Profit Margins:2,1,1,1,1,1,1,1]
>Name|Group|Sales|Cost|Sale Price|Profit|Margin %|Inventory
{REPORT COST DETAILS:C.Name,M.GroupCode,C.Quantity,C.Cost,C.AvgPrice,[C.AvgPrice]-[C.Cost],([C.AvgPrice]-[C.Cost])/[C.AvgPrice]*100}|{REPORT INVENTORY TRANSACTION DETAILS:T.Quantity.Sum}

>Totals||{REPORT COST DETAILS:C.Quantity.Sum,C.Cost.Sum,C.AvgPrice.sum,([C.AvgPrice]-[C.Cost]).Sum}||{REPORT INVENTORY TRANSACTION DETAILS:T.Quantity.Sum}

So more than likely it’s because you need more than just T.Name for it to work.

What would I require to make it work?

Try some other fields with it. See what happens. I am confused though why are you using ORDER DETAILS with INVENTORY TRANSACTION DETAILS ? Those will not line up… you know that right? That is probably the real issue. Try removing REPORT ORDER DETAILS see if it works.

I have removed it, still not working. I require the inventory from {REPORT INVENTORY TRANSACTION DETAILS} and the sales and cost from {REPORT COST DETAILS}. Can those two line up?