Item Sales report ODI = True strange results

OK, ditch the grouping all together and order by group, then name.
Probably would have been the simplest solution in the first place.

[Sales:4 ,5 ,4 , 2, 2,1]
{REPORT ORDER DETAILS:M.GroupCode.asc,O.MenuItemName.asc,O.PortionName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True)}

Its not as clean as the original method but it works.

Hopefully they can fix it so we don’t need a workaround.

It is a shame that my all my automated tests uses upper case AND. So using AND or && as the operator will probably solve the issue but on next update using lower case and will also work fine.

2 Likes

Hi, was this fixed in the recent updates SambaPOS release or we still need the fix

No, don’t think so. It is an unfortunate side effect of the reporting system emre made to help people that didn’t know SQL.
You could create the report in SQL and bypass the report expressions or use alternative layout which doesn’t get effected by this issue.

Thanks @JTRTech all my Sandwiches items are missing in the reports and I cant use alternative characters. Is there any person with a work round, and anyone who has sql template/scripts for this problem that we can learn from

Can you demonstrait/elaborate exact issue? and show the report currently used

[Group Sales by Amount:2, 1, 1]
{REPORT ORDER DETAILS:O.ItemGroup,O.ExactTotal.Percent.desc,O.ExactTotal.Sum:(ODI=True)}
>Total|{REPORT ORDER DETAILS:O.ExactTotal.Sum:(ODI=True)}

[Group Sales by Quantity:2, 1, 1]
{REPORT ORDER DETAILS:O.ItemGroup,O.Quantity.Percent.desc,O.Quantity.Sum:(ODI=True)}
>Total||{REPORT ORDER DETAILS:O.Quantity.Sum:(ODI=True)}

[Sales:5, 2, 2,1]
@{REPORT ORDER DETAILS:O.MenuItemName,O.ExactTotal.Sum.desc:(ODI=True):{0}:,}
>{REPORT ORDER DETAILS:O.MenuItemName,O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1"}
{REPORT ORDER DETAILS:'     '+[O.PortionName],O.Quantity.Sum.desc,O.ExactTotal.Sum.desc:(ODI=True) and O.MenuItemName="$1":2}

Id recommend just ditching the the ‘ignore portion for normal’ bit (third line) and use something like this;

[Sales:4 ,5 ,4 , 2, 2, 2, 2]
{REPORT ORDER DETAILS:M.GroupCode.asc,O.MenuItemName.asc,O.PortionName,O.Price,O.Quantity.Sum.desc,O.Total.Sum.desc:(ODI=True)}

I have group code inline so products are also grouped by group code as useing for stock takes etc rather than seeing order of qty/value sold.
Price can probably come out too as thats in there to save printing price list out each time stocktaker comes.

Like this if you want it stripped down ordered by qty.
{REPORT ORDER DETAILS:,O.MenuItemName,O.PortionName,O.Quantity.Sum.desc,O.Total.Sum.desc:(ODI=True)}

That’s how our item sales report like. all item with sandwich are not in the sales report, I had other items like Lemon and Ginger but changed it to Lemon & ginger, But no I Sandwich must have the

and

Thanks, will look into that

Its the @ list that causes the issue I think not ODI.
Your using the @ declaration to list menu items in order to display portions on individual lines.
By keeping it inline and dropping the @ it resolves this issue.

I originally had similar issue with commas in names as default list is comma seperated however this can be avoided by using alternative character like pipe | or something.

Ive just double checked and sandwich works fine for me useig the above report.

Its a little squashed onscreen with the extra columns but usually print from office on A4 where more width;
image

Never thought about sandwiches, it came to light here when stocktaker noticed a variance on Brandy.
We dont do itemised stock for food so that never came up.

@stephencoduor what version are you using.
Just checked after noticing emre saying will fix for lowercase 'and.
On my version although beta should be fixed on current release version sandwich works…

Your report returns;
image

Guess I was wrong saying there wasnt a fix. guessing your using an older version. Think 5.1.20 is current release version.
Id hazzard a guess this was fixed arround the 5.2.18 range.

Looks like it might have been 5.2.16;

1 Like

Yes so replace and with AND in the expression.

I tested with lowercase and in the ‘constraint’, think his fix was to ignore lowercase and in fields or something.
In fact just rested capitals and either seems to work;

image

Think you just need to update @stephencoduor

1 Like

Thanks guys, I ll be upgrading today