1) how do you know this payment is in full and the remainder is the discount. What if they make a partial payment then make another before the due date?
2) how do you determine if the amount not paid is the right discount?
3) how do you determine if the amount paid is the full amount with in the time period specified. this normally is stored in the Agreements attached to the order or in a partyrelationship between the organization (to) and the other party (from) involved.
that has a role of Customer
so the invoice is tied to an order so you look up the agreement tied to the order.

to answer you specific question.
once you determine that the amount is the full amount within the specified period you then take the extra and post a transaction against the invoice, but not in the invoice, as a credit, with a note that is is for discount based on certian critera what ever that was.
you would have a AcctgTransEntryType for Discountcredit


aswath satrasala sent the following on 9/24/2010 3:38 AM:


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.


Reply via email to