Custom Report P&L profit and loss

I don’t understand participation sales but for the rest I’ve prepared something with V5.

[PL Report:5, 3, 3, 3, 3, 3, 3, 3]
>Name|Qty|Sales|Cost|Cost%|PM%|PM|P%
{REPORT COST DETAILS:[C.Name]+'.'+[C.PortionName],
C.Quantity.Sum,
[([C.AvgPrice]*[C.Quantity]).Sum],
[([C.Cost]*[C.Quantity]).Sum],
[($4/$3)];%##.00;-%##.00,
[($3-$4)/$3];%##.00;-%##.00,
[($3-$4)];#.00,
[(($3-$4)/$4)];%##.00;-%##.00}`
3 Likes

thank you so much… thanx a million. i will show this to the owners and will buy V5 deff…
but the Q is… will i be able to import my database SQL server V4 to V5 ? with no problems ??

Thank You again.

I am the Q.

The one and only :stuck_out_tongue_winking_eye:

No problem.

it don’t show database module… for some reason… maybe cause i have it as SQL ?? i have a server and 2 terminals, and i connect to SQL string… ?

I believe it is the % of units sold of a product from total qty of all products sold.
Similar to the % value for product group on work period but by qty rather than value.
Ie 100 x £1 coffees would give higher % than 4 x £25 steaks.
In an example if sales for a period were;
100 x Coffee £1 = Total Product Sales @ £100
4x Steak £25 = Total Product Sales @ £100
50 x Beer £4 = Total Product Sales @ £200
The sales % as on work period would show;
Coffee = £100 = 25%
Steak = £100 = 25%
Beer = £200 = 50%
Total Sales = £400 (100%)
The participation sales would be based on QTY giving these results;
Coffee = x100 = 64.9%
Steak = x4 = 2.6%
Beer = x50 = 32.5%
Total QTY= x154 (100%)

So it is one of those

[PL Report1:5, 3, 3, 3, 3]
>Name|Qty|Price|PS%|PC%
{REPORT COST DETAILS:[C.Name]+'.'+[C.PortionName],
C.Quantity,
C.AvgPrice,
([C.AvgPrice]*[C.Quantity]).Percent,
C.Quantity.Percent,
}
3 Likes

That looks like what I understand Participation % to be.

Love it!!! Haha!!!

i can copy using SQL management studio … if i installed V5 and put the database link string… will it connect direct ??

thank you so much for your great effort

Yes, using SSMS, do a backup of the DB first. Then you can restore if anything goes wrong. You can also restore to different named DB. For example, backup your V4 DB and restore it as SambaPOS5.

Then install V5
Change the connection string.
Logout out.
Close.
Restart SambaPOS.

thank you so much . i will be trying that.

i installed V5 on my laptop and connected to the network. and put my database string username and password to my V4 DB SQL server… it connected successfully … but everything is blank ?? as if i installed samba for the 1st time… ?? any advise ?

Definatly get the database name right?
If database name is not exactly the same samba will create a new one.
Use MSSQL Manager and check to see if you have multiple databases in the SQL instance.

You’ll create a backup on V4 and restore it on V5. If you don’t already have you can temporarily enable V4’s backup module in trial mode.

Q sent you a step by step tutorial for that on his previous post. You probably missed…

for some reason backup module will not show at all… i dont see it… under samba market… even though under add on folder i can see the DLL file… ?

In Samba Market, within SambaPOS, ensure you login using the link in the top right.

I find it just as easy to use SSMS though. In SSMS, right-click on your DB, then select Tasks > Backup Database. You can restore it in the same fashion by choosing Tasks > Restore Database.

To rename the DB during Restoration is easy too… Follow this post…

1 Like

Hi Emre. Can the report calculate total of the “PM” ?

Yes it can you can use .sum at end of report expression to sum that into single row.

1 Like

[PL Report:5, 3, 3, 3, 3, 3, 3, 3]

Name|Qty|Sales|Cost|Cost%|PM%|PM|P%
{REPORT COST DETAILS:[C.Name]+‘.’+[C.PortionName],
C.Quantity.Sum,
[([C.AvgPrice][C.Quantity]).Sum],
[([C.Cost]
[C.Quantity]).Sum],
[($4/$3)];%##.00;-%##.00,
[($3-$4)/$3];%##.00;-%##.00,
[($3-$4)];#.00,
[(($3-$4)/$4)];%##.00;-%##.00}`

can u show me where to add .sum to get total “PM”?