Service charge working for one department, but not the other

Dear Guys, I have a samll problem trying to figure out why this is not working…
finally I decided to give it a try and definde to departments,two menus, two entites screens and two sets of tables for each entity. So far I was doing great, everything is working, SAMBA shows me the menus according to the dpartment selection… and the tables too.

Now the problem is the service charge. For one department the service charge works great, but for the other, for some reason not…

Here I have defined the service charge for the Pizzeria, and works great… no matter what…

Now I defined the same service charge for the Restaurant… but do not know why, i does not work at all…

surprisingly, if I take out the second constrain line… IT WORKS (but for all tables, not only for the M ones, and I need it to work for the M ones, becasue balcony has no service charge…)

Can anyone help me out? I have been trying this for the last three hours, and it seems that i am missing something simple enough to be under my nose…

THANKS!!!

1 Like
  1. You cannot used the same Entity Name twice. ie You cannot have M1 for both Entity Types.
  2. You have two different Entity Type Names, but using the same {ENTITY NAME:Table} tag - this needs to be different, because if you created Pizza first, then Table will belong to it and not Restaurant.

Cloning will cause these issues, because it can allow for duplicates, but manually adding duplicates is not allowed.

I did not clone anything… I had to enter all mannually since, I dont want to mess with sql tables, and as you say, manually entering somteimes shows you rules like duplicate names or so…

I forgot to tell that both start with M, but for pizzaria is MESA 1, and for Restaurante is Mesa R-1, the R in the middle defines the difference…

I did not understand the {Entity NAME:Table} part… sorry.

The strange thing is that if I delete the “M” part of the constraint it works…

THANKS!!!

Can you please post a screen shot of both Entity Types - Tables Restaurante & Tables Pizzaria
I think the issues is a naming convention for Entity Name.

For the Rules you should have

EntityTypeName Equals Tables Pizzeria
{ENTITY NAME:Table Pizzeria} Starts M

EntityTypeName Equals Tables Restaurante
{ENTITY NAME:Table Restaurante} Starts M

Update - You could actually use the following and achieve the result you need.

EntityTypeName Equals Tables Pizzeria
NewEntityName Starts M

if I use
EntityTypeName Equals Tables Pizzeria
{ENTITY NAME:Table Pizzeria} Starts M

EntityTypeName Equals Tables Restaurante
{ENTITY NAME:Table Restaurante} Starts M

it stops workin on both…

my entities:


Can you post a screen shot of the Entity Type setup for each

I think you nailed where the problem is…


the problem is that i am affraid of touching something and samba stop working… sorry…

G.

THANKS @JohnS IT WORKS PERFECT NOW!!!

It was simple, but sometimes i am affraid of touching or modifying something that messes up all… and this is really working so good… and it took me a lot of time…

THANKS AGAIN!!!

The Entity Name in both is the same -> Table. They should be different, like
Table Pizzaria
Table Restaurante

So when you refer to {ENTITY NAME:Table} it picks Tables Pizzaria first.

Fix up the Entity Name for each Entity Type.
Then in your rules you should be able to use

EntityTypeName Equals Tables Pizzeria
NewEntityName Starts M

@gerlandog, did you get it working ?

[quote=“gerlandog, post:8, topic:609”]
THANKS @JohnS IT WORKS PERFECT NOW!!!

It was simple, but sometimes i am affraid of touching or modifying something that messes up all… and this is really working so good… and it took me a lot of time…

THANKS AGAIN!!!