You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by aswath satrasala <as...@gmail.com> on 2010/09/21 08:06:13 UTC

Re: Discount if paid within x days - supported?

Hello Aray,
I have a similar requirement to apply discount for the invoice.   Please
share, if there is any progress you have made, or on how you plan to do.

Following was my first attempt, but it failed.
- I tried to do it similar to 'apply tax'.
But, then, it was adding line items and then the whole invoice amount was
modified.


Any other ideas.

Regards,
-Aswath


On Thu, Sep 2, 2010 at 12:28 PM, aray <ar...@kenfuse.com> wrote:

>
> Thanks.. Yes, I can see the steps you mentioned are implemented and works
> just fine. My requirement is beyond association of terms to order/invoice
> and reporting the same. I actually need to apply the discount. Taking the
> example from my earlier email, need to close the invoice at $27 instead of
> $30 if paid within time. Thanks for confirming that it is not implemented.
> Will go ahead and give it a shot and share back on the approach taken.
>
> - Aray
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Discount-if-paid-within-x-days-supported-tp2401843p2484254.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: Discount if paid within x days - supported?

Posted by BJ Freeman <bj...@free-man.net>.
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<ar...@kenfuse.com>  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.
>>
>

Re: Discount if paid within x days - supported?

Posted by aswath satrasala <as...@gmail.com>.
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 <ar...@kenfuse.com> 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.
>

Re: Discount if paid within x days - supported?

Posted by aray <ar...@kenfuse.com>.
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.