English Boards > Support

Two question about the grouping tag

(1/2) > >>

rvandam:
I have implemented the grouping tag, using {PRODUCT TAG}. Everything is now sorted in the right tagged groups. We have however two questions:

* is there a way to influence the appearing order of the tag groups? On our tickets we have now the groups starters, main courses and deserts in random order on the tickets. How does Sambapos do the sorting of the product tag groups? By time entered?

* the items of one order number are added, so 1 x Cola, 1x Cola becomes 2x Cola. When the table is closed and reopened again, and one Cola is added, I have on the tickets 2 x Cola and 1 x Cola, instead of 3 x Cola.

Last weekend we had a group of 20 people having a party. During the evening all the time drinks and food were added to their table. This led to a 1,5 meter long ticket :)

rvandam:
I am aware of the option "Lines grouped by tag" in print jobs. But unfortunately only the group tag description is given, and not the single products grouped, so it is hard for the customer to check the bill.

rvandam:
With help here:
http://stackoverflow.com/questions/14661719/sorting-and-grouping#comment20496411_14661719

 I archieved the sorting part. In the source code I changed:

if (template.GroupTemplate.Contains("{PRODUCT TAG}"))
            {
                var groups = lines.GroupBy(GetMenuItemTag);
                var result = new List<string>();
                foreach (var grp in groups)
                {
                    var grpSep = template.GroupTemplate.Replace("{PRODUCT TAG}", grp.Key);
                    result.AddRange(grpSep.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries));
                    result.AddRange(grp.SelectMany(x => FormatLines(template, x).Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)));
                }
                return result;
            }

Into

if (template.GroupTemplate.Contains("{PRODUCT TAG}"))
            {
                var groups = lines.GroupBy(GetMenuItemTag).OrderBy(l => l.Key);
                var result = new List<string>();
                foreach (var grp in groups)
                {
                    var grpSep = template.GroupTemplate.Replace("{PRODUCT TAG}", grp.Key);
                    result.AddRange(grpSep.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries));
                    result.AddRange(grp.SelectMany(x => FormatLines(template, x).Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)));
                }
                return result;
            }

If I tag the product now like "1 Starter" "2 Main course" "3 desert" I get the items in the right order on the ticket.

Do you have any hint on grouping the articles on the tickets? I mean that 1 x coffee 2x coffee becomes 3 x coffee?

lemmings:
Dont know if you aware but you can use the merge lines option in the printer template, this will merge all the same products together an update the quantity accordingly.

rvandam:
@lemmings what??????? Oh nooo how could I have missed that......Thank you for pointing this out, you saved me a lot of time!

Another option that is there by default. I really like Sambapos (and get tired of myself sometimes).

Navigation

[0] Message Index

[#] Next page

Go to full version