Discount if paid within x days - supported?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Discount if paid within x days - supported?

aray
Hello Group,

I have a requirement to discount invoices if paid within the specified days. I could see the term type for the same (see below)  but no implementation and therefore looking to confirm.

<TermType description="Payment (discounted if paid within specified days)" hasTable="N" parentTypeId="FINANCIAL_TERM" termTypeId="FIN_PAYMENT_DISC"/>

If the implementation does not exist, then I would be interested in working on it. Would appreciate pointers on best way of doing this. My approach is to recalculate invoice total after applying the term if there is a match for the term period. To apply the discount, will create a payment Discount ledger and post the amount with no change to actual invoice.

- Aray
   
Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

BJ Freeman
some others may chime in but here is my take:
the main driving documents (entity) is Agreements.
that covers a lot of other entities.
and so you would have an agreement with a partyrelation type of
supplier(or some other type)
the Agreement type would be either Sales or Purchase
this eventually gets down to the Agreement Terms with a type Fincaical
terms.
in the Agreement  Terms you would setup the discount
https://demo-trunk.ofbiz.apache.org/webtools/control/FindGeneric?entityName=AgreementTerm&find=true&VIEW_SIZE=50&VIEW_INDEX=0

This is agreements are discussed in the data model book vol 1 starting
page 145.


=========================
BJ Freeman  <http://bjfreeman.elance.com>
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


aray sent the following on 8/31/2010 8:44 AM:

>
> Hello Group,
>
> I have a requirement to discount invoices if paid within the specified days.
> I could see the term type for the same (see below)  but no implementation
> and therefore looking to confirm.
>
> <TermType description="Payment (discounted if paid within specified days)"
> hasTable="N" parentTypeId="FINANCIAL_TERM" termTypeId="FIN_PAYMENT_DISC"/>
>
> If the implementation does not exist, then I would be interested in working
> on it. Would appreciate pointers on best way of doing this. My approach is
> to recalculate invoice total after applying the term if there is a match for
> the term period. To apply the discount, will create a payment Discount
> ledger and post the amount with no change to actual invoice.
>
> - Aray
>

Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

aray
Yes, I could associate the terms and see them show up in the invoice. However, could not see the invoice discounted based on the agreement term when a customer made the payment. I am looking at Sales orders only at this time. Searched through the code for usage of both parentTypeId="FINANCIAL_TERM"  and termTypeId="FIN_PAYMENT_DISC" and didn't find anything matching and hence the question.

If the implementation isn't there (except for association with the order) then would like to get pointers on best way of implementing it. As mentioned in my previous note, my take is to keep the invoice value as it is say $30. If the term says 10% discount if paid by date , then if the payment comes in before the date for $27 then apply that to the invoice with the remaining $3 show as paid from a discount account. May need to have a related account for tracking such pay by date discounts.

Thanks again.
- Aray
Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

BJ Freeman
my apologies, My answer was too cryptic.
it was meant to say, no it is not implemented and here is what you have
to consider in implementing it start at this point.
as you found there is seed data in the party component.
there are a couple direction you can go
you can setup ext data that generates template agreements or have it
part of the setup.
when a party is generated you associated a template with a party, as
describe in the previous email.
then when the sales happens you pull the associated agreement info into
the order then the invoice. This way if the terms for that order changes
you can have a report of orders and invoices that don't match the
agreements for that party.

my 2 cents
hope that helps.

=========================
BJ Freeman  <http://bjfreeman.elance.com>
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
aray sent the following on 8/31/2010 10:45 PM:


>
> Yes, I could associate the terms and see them show up in the invoice.
> However, could not see the invoice discounted based on the agreement term
> when a customer made the payment. I am looking at Sales orders only at this
> time. Searched through the code for usage of both
> parentTypeId="FINANCIAL_TERM"  and termTypeId="FIN_PAYMENT_DISC" and didn't
> find anything matching and hence the question.
>
> If the implementation isn't there (except for association with the order)
> then would like to get pointers on best way of implementing it. As mentioned
> in my previous note, my take is to keep the invoice value as it is say $30.
> If the term says 10% discount if paid by date , then if the payment comes in
> before the date for $27 then apply that to the invoice with the remaining $3
> show as paid from a discount account. May need to have a related account for
> tracking such pay by date discounts.
>
> Thanks again.
> - Aray
Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

aray
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
Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

aswath narayana
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 <[hidden email]> 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.
>
Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

aray
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
Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

BJ Freeman
In reply to this post by aray
did not see this till after I sent my reply.

I might suggest
1) when payment for a invoice is posted check the agreements for discounts
2) apply discount as a credit to the payment as a transaction
3) do not change the invoice
4) create a statements that show the invoice with credit for timely
payment per agreement.
this covers the discount and proper audit of the invoice discount in
transactions.
Need to change the invoice screen to show any transaction payments and
credits with a balance

PS did not get to ofbiz first time this is a second send
aray sent the following on 9/21/2010 5:06 AM:

>
> 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
>


Reply | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

aswath narayana
In reply to this post by aray
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 <[hidden email]> 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 | Threaded
Open this post in threaded view
|

Re: Discount if paid within x days - supported?

BJ Freeman
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<[hidden email]>  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.
>>
>