Calculated fields [message #4282] |
Mon, 23 June 2014 09:20 |
htManager
Messages: 442 Registered: May 2014
|
Senior Member |
|
|
Hi Tony,
can I automatically calculate a field with a method of the radicore framework?
I have three fields, amount_netto, amount_tax and amount_brutto.
I want that the field amount_brutto is calculated automatically after filling out the fields amount_netto and amount_tax.
I used to develop desktop applications in ObjectPAL, a language called Object orientet Paradox Apllication Language for the desktop database Paradox for Windows. In this language I would have put the code in an event of the amount_tax field. But in a web environment with Radicore and PHP I don't know how to do this.
Thanks in advance, best regards,
Juergen
|
|
|
Re: Calculated fields [message #4284 is a reply to message #4282] |
Tue, 24 June 2014 04:08 |
AJM
Messages: 2373 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
No, the framework cannot do such things for you automatically, you have to write the code yourself.
When reading from the database you can build the calculation into the SQL statement such as:
SELECT product_id, unit_price, quantity, SUM(unit_price * quantity) AS extended_price ...
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|
|