Early Discount error

Hi There, I have applied the early settlement discount as prescribed in the guide and it deducts it from the sales invoice, showing balance due X - early discount and then 0.00 due, but on the customer statement shows the discount amount as outstanding on the invoice, How do I correct it?