How to set two calculated value to the payment field depending on conditions