Calc only one option between differents drowndown options

viatechcenter

viatechcenter
Could you please help me with calc element? I like to show in calc element results only the result selected since drowndown hide/show JE options.

In the image, for example, I select "Precio x Unidad" (for example, 20.00) dropdown option and multiply x "Unidades" field element (for example, 10). I need that the calc element result show only selected dropdown option.

Dropdown hide/show JE elements:
"precio x unidad" = 22
"precio x mayor" = 20
"precio con descuento" = 18

Dropdown hide/show JE element:
"precio x unidad" = 22

Field Element ("Unidades"):

10

Calc and show selected dropdown hide/show JE option:
22 ("precio x unidad") x 10 ("unidades") = 220

Not calc ni show:
"precio x mayor" = 20
"precio con descuento" = 18

Thanks
 

Attachments

  • calc_element_differents_options2.PNG
    calc_element_differents_options2.PNG
    59 KB · Views: 273
can you show us what PHP code you have got so far for the calculation? I'm all for helping you but doing it for you falls out of bronze level support I'm afraid.
 
can you show us what PHP code you have got so far for the calculation?

I am not good with PHP. This is the PHP code, but it does not work.

$a = '{fab_venta_5_repeat___precio}';
$b = '{fab_articulos___unidades_vendidas}';
$c = $a * $b;

I appreciate your help.
Thanks
Francisco
return $c;
 
So, if I'm understanding you correctly ...

If (say) the Precio dropdown is set to 'Precio x Unidad', you want to take the value in the precio_unidad field, multiply it by the value in the Stock field, and return it as the calc result for the Total field?

-- hugh
 
cheesegrits, I want to take the value in the precio_unidad field, multiply it by the value in the Unidades field, and return it as the calc result for the Total field.
 
BTW, I notice in your element names you have fab_venta_5_repeat___precio ... but on your image, I don't see any signs of a repeating group. Are you sure that's the correct element name?

Things get more complicated when dealing with repeated groups, so I need to be sure as to whether that's what you have, or not.

-- hugh
 
OK, bump this again on Monday or Tuesday. It's Sunday evening, and I've pretty much run out of steam for the day.

-- hugh
 
Please, I need your help

What is the calc PHP Code. In JE dropdown element I want to take the value in selected field (precio x unidad or precio x mayor or precio con descuento) , multiply it selected value element by the value in the Unidades field, and return it as the calc result for the Total field.

Thanks

Francisco
 
HI can you post the url to the page please? and PM me an administrator log in to the site
 
hi you have 3 different list called 'Venta' or similar and several differnt elements called 'Precio' - could you give me the list id that the calculation is on and the element ids that have the calculation please?
I tried searching but could not find them
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top