If you’re asking me I don’t know how it can be used
btw one should be mindful of the security implications of have any Database Task action activated during normal day to day operations. Regular users should be denied write access to that Database Task folder, otherwise they could change the SQL file to do whatever they wanted on the database.
They could also just execute SQL via cmd or mssms, or script… your #1 defense in security is discipline and knowing what your workers are doing.
To update via ssms or script I thought they would need the db password, and i was planning on locking the staff out of the settings files also. One of the main reasons for installing SambaPOS is to control the fraud, ;-}
You do not need DB password to do anything via SambaPOS. It already is logged into the db.
so please explain how a user without admin rights can run their own script for own db updates. If i can’t secure the system, there isn’t much point in the whole affair in my case. Maybe we should make this a new topic here?
POS systems are not designed as security systems. They are for convenience and efficiency and speed. If your main concern is security you may need to find something more specialized.
@QMcKay need help on How to remove the price from buttons as I tried but since am using pos my prices changed few times and its still showing old prices, so I wanted to remove the prices any script
What buttons? What do you mean remove price from buttons?
I think it is portion buttons.
I think it need to call script (seem expression [=…] can’t take \d)
function portion(name) { return name.replace(/ \d{1,9}(\.)?\d{0,2}/g,""); }
But I think price always have .xx at the end so, this should be more specific.
function portion(name) { return name.replace(/ \d{1,9}\.\d{2}/g,""); }
Hmm how the heck does portion buttons relate to this thread?
LOL Q screenshot has Portion Price
I see now…wow I am tired… it was like someone was in a room and everyone discussing something… then 20 minutes later one of the people suddenly wants to talk about something that was said 18 minutes ago but didnt tell them what it was and assumed they knew he was talking about something 18 minutes ago…
@Jesse Yes you are correct price from the buttons .
If you run the script again, the prices on the buttons will be updated to your current prices.
If you want to remove the prices completely, you can run this scrpt:
UPDATE mi SET [Header]= REPLACE(mi.[Name],'\r','<br/>')
FROM [ScreenMenuItems] mi
@QMcKay Thank you it worked great, It is very helpful if any one with some more useful task scripts tutorials .
@QMcKay I was browsing forum and thought I would try this. It does not seem to work anymore. It gives the following error.
Msg 8152, Level 16, State 13, Line 1
String or binary data would be truncated.
The statement has been terminated.
Sorry i was referring to this script.
UPDATE mi SET [Header]= REPLACE(mi.[Name],'\r','<br/>') + '<br/>' + convert(varchar(50),p.[Price])
FROM [ScreenMenuItems] mi
JOIN [MenuItems] pr on pr.[Id] = mi.[MenuItemId]
JOIN [MenuItemPortions] po on po.[MenuItemId] = pr.[Id] and po.[Id]=(SELECT min(po2.[Id]) FROM [MenuItemPortions] po2 WHERE po2.[MenuItemId]=pr.[Id])
JOIN [MenuItemPrices] p on p.[MenuItemPortionId] = po.[Id]
Oh well. It’s a complete hack anyway.
Maybe, try changing the value 50
to something greater, or smaller:
I figured as much just thought I would pick your brain. Ive never really dove into SQL much so that error is complete mystery to me.