How to multiply a value with a number

QuestionsHow to multiply a value with a number
Thomas asked 1 year ago

Hello,

a value is stored in database without VAT. In grid this value should be displayed incl. VAT, for example +19% (*1.19)

How can I do this?

Thank you

1 Answers
Abu Ghufran Staff answered 1 year ago

Hello,

You can either do this calculation and formatting in sql query: e.g.

select vat+vat*0.19 as vat, field2, field3 from table.

Another way it to use on_data_display event and do it in php. e.g.

https://www.gridphp.com/demo/demos/editing/custom-events.phps
Line 51-52 and 193

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

6 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?