Hello All, Let me know if the following works in this case - Create an incoming payment and apply to the invoice as normal - Difference amount(discount). Create an incoming payment with the following
- Partyfrom: dummyparty - PaymentMethodType: GiftCard. - In the GlAccountDefaults menu, add the mapping for GiftCard to the required GLAccount (say invoicediscount glaccount). - Apply this payment to the same invoice -Aswath On Tue, Sep 21, 2010 at 5:36 PM, aray <[email protected]> wrote: > > I haven't quite finished the implementation since got pulled into something > else. However, my general approach is to (taking the same example I shared > earlier) > 1. Test an incoming payment and see if it fulfills the pre-payment > criteria. > If it does then subtract the discounted amount from the invoice and compare > to the payment and see if it meets the outstanding invoice amount after the > adjustment. If it does then auto create a dummy payment with the discounted > amount and then apply the same as well to clear off entire outstanding > invoice amount. > 2. The discounted amount payment should get credited to a trade or bill > discount account. > > So, essentially this solves the problem that we have but may not > necessarily > be the best way of doing this. One can think of applying the discount > directly to the invoice at the time of payment and preserving that sate. > This is something that we may end up doing once we go past the basic > implementation. > > - Aray > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Discount-if-paid-within-x-days-supported-tp2401843p2548479.html > Sent from the OFBiz - User mailing list archive at Nabble.com. >
