Hello!
I'm creating a report on stock, and need the figures to accurately total remaining stock after movements.
The database holds the total quantity of stock moved in each transaction, and it's direction of movement (so either in or out).
The direction is a string (either - or +) and quantity a number. I need to combine these and convert to a number so I can run a sum on them, but have not been able to do this so far.
The below puts them in a string, but does anyone know how I can convert these to a number. When I try 'tonumber' I get 'The String is Non Numeric'.
{trans_detail.direction}&{trans_detail.qty-adjust}
Thanks!
I'm creating a report on stock, and need the figures to accurately total remaining stock after movements.
The database holds the total quantity of stock moved in each transaction, and it's direction of movement (so either in or out).
The direction is a string (either - or +) and quantity a number. I need to combine these and convert to a number so I can run a sum on them, but have not been able to do this so far.
The below puts them in a string, but does anyone know how I can convert these to a number. When I try 'tonumber' I get 'The String is Non Numeric'.
{trans_detail.direction}&{trans_detail.qty-adjust}
Thanks!