Discounts not showing on ARInvoices

Forgot to mention: We did something like this at my last company. If certain orders were over $300, they would get $50 off of their order. I coded this in by distributing it to all lines as a % using that OrderHed.DiscountPercent.

Code was similar to this:

if ( oh.DocTotalCharges >= 300 )
{
    oh.DiscountPercent = 100m * (50m / oh.DocTotalCharges);
}

That way the discount would be applied in full once all lines were shipped, and didn’t look weird applying on a single line, as you mentioned.

4 Likes

You’re right, I figured it would be doing something different. I guess I didn’t explain it well enough.

Yes, I was using this field. I realised the hard way that there is much more to it than that.

This is a very good idea. I can see this working for most general discounts we’d apply. There are instances where I’d have to get creative, but the misc charge would also work.

Just to clarify, If I make 2 or more shipments for the same order, and the misc charge has a frequency of “First”, the misc charge will only be applied to the first invoice, not any following invoice?
Here I thought the frequency referred to the lines. I thought the misc charge would be applied to the first line (the alternative being applying it to all lines).

This is very helpful information, thank you for sharing!

2 Likes

That’s correct. I’ve never used the “Every” option, so I am not sure how that one works, but “First” means it will apply to the first shipment of any line on the order (if it’s a Header Misc Charge), or the first shipment of any quantity tied to that line (if it’s a Line Misc Charge). If it’s “Last”, then it applies to the final shipment that closes out that order.

2 Likes

That’s super useful. I really appreciate you sharing this knowledge. I guess I could have read it in the docs, but I never even thought about doing that.

You’ve helped me understand this side of Epicor a LOT more, so thank you very much!

1 Like