Custom Keypad CANCEL button does not work

Those need to be Rule Constraints. Set a custom constraint for Command value Greater 0 and another custom constraint for Command Value Is Not Null. Then set it to match All. That should work.

thanks ill see what i can do, what about enabling a minus for the petty cash value, where would i put this in the expression to allow me to type a minus figure if needed?

You are dealing with accounting… you do not record it as a minus. This would need to be a completely separate transaction to record negative values and it would need accounting built around it as well. It would be best to create this to run from accounting screen as a manager function. Correcting drawer balances etc should be done by you or a trusted manager.

i only have petty cash set up as an expense, i dont have one setup as income, so if i did petty cash for £5, then realised it should be £4 i need to enter -1

So in the description i would type “Correction” with value -1 so this makes the overall balance correct.

I do the same for my floats, i dont really use accounting like you do, know where near as complex as i dont need it like that so my float value is setup so on work period start i get a keypad pop up to enter float value, then when i “remove” the float before cashing up i use the same account bit that enters the float BUT do a minus figure so it removes it from my float line and cash line, so my cash line equals exactly what is in the till as the float has been removed

ill add screen shot of that in a sec

start work period

then this automatically appears and i enter 50.00

work period started

go to accounts and it shows cash balance in my drawer as 50.00

then at end of day i remove float as minus 50.00

and account screen shows zero cash balance as ive entered 50 and removed 50 and zero for float balance

I understand this isnt exactly how its designed, but its really bacis that i need and it works for me

i want the petty cash to work the same so i need to be able to enter a ,minus to keep things simple for me :slight_smile:

The value would not be recorded as a -1 though…

So where is your float value stored? EDIT: Ohh i get what your saying. You are entering transactions manually.

Hmm I dont get it…In your screenshots I dont see how entering -50.00 is reflected… I see it went in as a Debit to balance it… It went in as 50.00 not -50.00

yea, so what do i need to add to the expression to allow me to type a minus?

Also the constraints i added to the rule dont work, when i click my petty cash button nothing happens now at all, the keypad doesnt popup so i think it needs to be something in the expression to make sure there is a value typed in for descrption, like the number field for petty cash value a little red cross appears and doesnt let you do anything until a number that matches the expression format is entered

if i do remove float as 50.00 instead of minus 50.00 it adds it to the credit column, if i enter it as minus 50.00 it enters it on the debit column

this is screen shot of +50.00 making credit 100.00

this is -50.00 making Debit 100.00

Yeah I told you wrong I was thinking it was setup differently. I am going by only info you have provided… it still needs to be a constraint… maybe an action constraint.

OK I see what you are saying… i do not know how you have it set up. So you simply need to be able to type in -50.00 in the keyboard… it wont let you type the -? Its probably because your regex is not allowing it. You are allowing only numbers.

So…

yea thats correct the keyboard wont let me type the -

when we looked at this when i needed to put the decimal point in you created the expression with the decimal in it so this allowed me to type it, i assumed that the expression would now need to be amended to allow me to use the minus?

i just dont know how to do it

Try

[?Enter Petty Cash Value;((-)?\d{1}.\d{2}|\d{1}\d{1}?.\d{2}|\d{1}\d{1}\d{1}?.\d{2}|\d{1}\d{1}\d{1}\d{1}?.\d{2})?]

Wait thats not right either one second.

May I learn what that horrible regex does? Are you trying to allow only numbers?

that worked but it only allowed up to 9.99

I assume your using this to restrict the format they can type the amount in?

@emre theres probably a more simple way but i dont know about expressions so i experimented with it

it allows me to type a number as x.xx or xx.xx or xxx.xx or xxxx.xx

@Jesse when trying your first example with the minus it then only let me type an amount in the format of x.xx

Try this:

[?Enter Petty Cash Value;(-?\d{1}.\d{2}|-?\d{1}\d{1}?.\d{2}|\d{1}\d{1}\d{1}?.\d{2}|-?\d{1}\d{1}\d{1}\d{1}?.\d{2})?]

@Jesse that allows me to type the minus, however when i click enter instead of processing it it takes me to the account screen to do it again. when i do this as a plus number it just accepts it and remains on POS screen and logs it in accounts

Strange…let me try again lol.

Does this work?

[?Enter Petty Cash Value;((-)?\d{1}.\d{2}|(-)?\d{1}\d{1}?.\d{2}|(-)?\d{1}\d{1}\d{1}?.\d{2}|(-)?\d{1}\d{1}\d{1}\d{1}?.\d{2})?]