PB with calc plugin

csantof

Member
I have created one form with many calculations all works well but regularly one calculation stays on loading.
I am not recording into my base because I use them as a financial calculator.

I do not why the calculation does not work. Can you help me to find a solution?

Thanks
 

Attachments

  • Capture calc ok.JPG
    Capture calc ok.JPG
    99.4 KB · Views: 86
  • Capture no 3.JPG
    Capture no 3.JPG
    28.9 KB · Views: 82
  • Capture no.JPG
    Capture no.JPG
    29.4 KB · Views: 91
  • Capture no2.JPG
    Capture no2.JPG
    29.8 KB · Views: 90
My calculation are very simple and I activate Ajax calcul
examples:
1/
$vara = {sk_lissage___p1} * ({sk_lissage___tx1} / 1200);
$echa = {sk_lissage___echa1} + $vara;
$mens1 = number_format($echa,2);
return $mens1;

2/
$txsecon = {sk_lissage___txs2} /1200;
$puiss = pow((1 + $txsecon),-({sk_lissage___dur2}*12));
$haut = {sk_lissage___p2} * $txsecon;
$bas = 1-$puiss;
$calc = $haut/$bas;
$form = number_format($calc,2);
return $form;
 
If any of those elements in the placeholders are empty, the code will error out. Put single quotes around them, and cast them to either int (for one's you expect to have no decimals) or float (for values with decimal point), like...

(int)'{sk_lissage___p1}'

Sent from my HTC 10 using Tapatalk
 
I have corrected my calculation code and it is same thing with same error.
I have tried without calcul Ajax but this is doing nothing.
 
You may have to use _raw in placeholders.
You should not use common variables like $form.
You may get unexpected 0 somewhere.
For debugging var_dump();exit; your variables or return them as strings.
 
I tried with all solutions but I have always the same problem.
I followed the help page but on the example it use common variable and now they should no longer be used.

I do not know what to think anymore with your component :
Problem with PDF file not solved
Problem with Calc plugin not solved

I know there is a solution, it is enough to find it.
 
Your problems are not replicatable and not reported by anybody else.

Coding and debugging code is up to you.
 
Problem with PDF file not solved

We provide PDF output as a "best effort". Joomla does not support PDF as a document type, so we provide the 3rd party DOMPDF library to convert HTML to PDF. The DOMPDF library has a lot of limitations, and often requires customization of templates. What we provide is a starting point, from which you can customize your PDF outputs. In the free Community support, there is a very finite limit on how much help we can provide with these 3rd party integrations.

Problem with Calc plugin not solved

The problem is somewhere within your custom code. I'm sorry that we aren't providing enough free support helping you write your own code. If you tell me how much of my time you would like for free helping you write custom code, I'll tell you if I can afford to do it.

If you'd like to take out a standard sub for a month, I'll log in to your site and take a look, see if I can fix it for you.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top