1b.app
Link copied -

Margin variable is incorrectly calculated in formulas

Good afternoon. I use the Margin variable in the formula, and if the margin = a positive value - everything is OK, if it is negative - it does not count correctly. Counting in action Calculate and write the value to the additional field if the conditions are met - formula 100*[margin]/([suminorder]-[margin]). On the example of the process https://crm.ohrana.ua/admin/customorder/zakaz-klienta/1744067/edit/
If the margin = 80 (positive value) - everything is OK, the results are here http://joxi.ru/5md9yzMial3Go2, i.e. 80*100/(100-80)=400
If the margin = -300 (negative value) the calculation is not correct http://joxi.ru/bmoK5YVT7G3KGm, but should be -300*100/(100-(-300)=-75
The action is configured in the procedure https://crm.ohrana.ua/admin/shop/workflow/16/procedure/755/?status=0, you can test on the above process
In addition, in the same action, it is possible to check if the margin is more / less http://joxi.ru/nAy1OY8faqgoQA, I thought to divide with a positive value, consider one
Original question is available on version: ru

Answers:

https://crm.ohrana.ua/admin/shop/workflow/16/procedure/755/?status=0,
you need variables that can be negative - wrap in brackets - and count -75
10.09.2021, 15:45
Original comment available on version: ru


Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment