Multiple Conditions within If Statements
I want to have the form automatically calculate/format the last row line based on fields labeled 1 and 2. It requires mutliple if statements with multiple conditions inside. I'm not sure if that's actually possible or not, but any help would be appreciated!

Below are issues I'm stuck on for fields 3 and 4. The table consists of the conditions with the desired result. The current script is underneath that.
For 3:
The number value entered in the targeted field doesn't change with any of the conditions.
Conditions | Result |
Reason Code = “INV - Customer Inventory Return” | Black/Helvetica |
Reason Code = “INV – Customer Inventory Return” Waived box is checked | 0% Black/Helvetica |
Otherwise | 0% ["RGB", 0.75, 0.75, 0.75]/Helvetica Oblique |
var RC = this.getField("Reason Code").value;
var cb = this.getField("WaivedButton").valueAsString;
if(cb == "On" && RC == "INV - Customer Inventory Return")
{event.value = '0';
event.target.textColor = color.black;
event.target.textFont = "Helvetica";}
else if(RC == "INV - Customer Inventory Return")
{event.target.textColor = color.black;
event.target.textFont = "Helvetica";}
else {event.target.textColor = ["RGB", 0.75, 0.75, 0.75];
event.target.textFont = "Helvetica-Oblique";}
For 4:
There's a hidden field that calculates the subtotal based on the other lines' total. When the waived box is checked the targeted field sets the text to match the last condition instead of the previous.
Conditions | Result |
Reason Code = “INV – Customer Inventory Return” Waived box not checked | = -(Subtotal x Percentage) Black/Helvetica |
Reason Code = “INV – Customer Inventory Return” Waived box checked | $0 Black/Helvetica |
Otherwise | $0 ["RGB", 0.75, 0.75, 0.75]/Helvetica Oblique |
var RC = this.getField("Reason Code").value;
var Sub = this.getField("Subtotal").value;
var Per = this.getField("Percentage").value;
var cb = this.getField("WaivedButton").valueAsString;
if((RC == "INV - Customer Inventory Return") && (cb == "Off"))
{event.value = -(Sub*Per);
event.target.textColor = color.black;
event.target.textFont = "Helvetica";}
else if((RC == "INV - Customer Inventory Return") && (cb == "On"))
{event.value = '0';
event.target.textColor = color.black;
event.target.textFont = "Helvetica";}
else {event.value = '0';
event.target.textColor = ["RGB", 0.75, 0.75, 0.75];
event.target.textFont = "Helvetica-Oblique";}
