Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Web Development _ Help With An Html An If Statement

Posted by: wornout Jul 11 2019, 05:17 PM

I am trying to write a line of code that will do the below code but when run it works until I get to the code below
C10 has 0.00 in it
C14 has -403.20 in it
so it should Have refund but it keeps saying to pay

the wholecode is

{% if C10 >= C14  %}            
15    GST to pay        {{ C10 | minus: C14 }}
{% else %}            
15    GST refund        {{ C14 | minus: C10 }}
{% endif %}

Posted by: wornout Jul 11 2019, 06:00 PM

I think I have it
I put in an above equation {% assign C14 = C12| | minus: C13| times: -1 %}
witch make it a non negative number and it worked ... so far