Hi there
I'm using the following code
- //Get the discount amount based on the discount code
- fetchdiscount = DTKC_Discount_Configuration [Discount_Code == input.Discount_Code];
- input.Discount_Amount = fetchdiscount.Discount_Amount;
- input.TOTAL_TO_PAY = (input.Total_Cost_Before_Any_Discount - input.Discount_Amount);
My question is - if there is no match for Discount Code, how do I force the input.Discount Amount to be 0
At the moment if there is no match I get an error saying something to the effect of can't calculate a null value.
Cheers
Aaron