Announcement

Collapse
No announcement yet.

Formula problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formula problem

    Hi. While creating the formula, I encountered a problem that I cannot deal with.
    As in the code provided:

    $dzial1=((($wynik/$rmbkurs*$chinyprowizja+((2000+$morskifracht)/((68/$cbm)*1000))))*($cenaclo)*($nowaprowizja)*$dolarku rs)*$czynnik;
    $dzial2=$wynik*$czynnik;

    ifThenElse(

    $cbm == 0,
    $pre=number\round($dzial2, 2) ,
    $pre=number\round($dzial1, 2)

    );


    If I type in the cbm1000 - 0 field when adding a record, I have an error 500, I cannot leave this field blank either. Would anyone know how to solve this?
    Thanks!

  • #2
    Can't help you here, look like you have bunch of variable but the full formula is not posted so someone can't really spotted the error.

    Essentially your problem is, when field cbm1000 = 0, your EspoCRM get Error 500?

    My recommendation would be see if it just the value that is causing this error or it the formula, I notice you have this;

    $cbm == 0,

    if you were to change it to this
    $cbm == 1,

    Then test cbm1000 = 0, does it work or still Error 500? Then test cbm1000 = 1, test it again.

    Comment

    Working...
    X