You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Robert G." <ga...@mercon24.de> on 2013/09/17 00:46:46 UTC

Credit note / Refund Item price

Hey, I am looking at the retourn / refund process at the moment

My steps:
1. create an order
2. ship it
3. create a return (within the order view)
4. I accept the return and click finished

The Retourn ID is created and I can get a document. Within the financial
history of the customer I see the return info and the outstanding payment to
the customer which is still not applied to a return invoice...and the
invoices is not created. where can I find it?

Of course I can create manually i.ex a "return finished good" invoice that I
can apply the payment to it, but I am wondering if I missed a step above so
that the return invoice (credit note) is automatically created and I can
apply the payment as soon as I have done it with my bank.

I am lookinf forward for any hint.

greetings robert





--
View this message in context: http://ofbiz.135035.n4.nabble.com/Credit-note-Refund-Item-price-tp4643993.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Credit note / Refund Item price

Posted by Jacques Le Roux <ja...@les7arts.com>.
It seems that your explanation makes sense, thanks for the "translation"  ;). 
Unfortutnately I have no knowledge about this part of the code and did not look yet into details

Could you please open a Jira and submit a patch with your comments in code (this will help much)

Thanks

Jacques

Robert G. wrote:
> I played a little around and found in PartyFinancialHistory.groovy the
> calculation of "totalToBeReceived" / "totalToBePayed"
> 
> I believe, that these are the amounts that the company owe to the customer
> or the customer owe to the company...
> 
> if so, I think there is a misscalculation (cause I do not get correct
> amounts there)
> 
> your code:
> transferAmount =
> totalInvSaApplied.add(totalInvSaNotApplied).subtract(totalInvPuApplied.add(totalInvPuNotApplied)).subtract(totalPayInApplied.add(totalPayInNotApplied).*add*(totalPayOutApplied.add(totalPayOutNotApplied)));
> 
> my opinion:
> transferAmount =
> totalInvSaApplied.add(totalInvSaNotApplied).subtract(totalInvPuApplied.add(totalInvPuNotApplied)).subtract(totalPayInApplied.add(totalPayInNotApplied).*subtract*(totalPayOutApplied.add(totalPayOutNotApplied)));
> 
> in easier looking:
> your code:
> Sales Invoices - purchase invoices - (incomming payments + outgoing
> payments)
> 
> my code:
> Sales Invoices - purchase invoices - (incomming payments - outgoing
> payments)
> 
> So lets test the cases:
> *1. customer payed and we refund items *
> payment 1000$
> sales invoices (applied and unapplied) = 1000$
> purchase invoice (refund) = 100$ (item refund)
> refund payment 100$
> 
> acutally: 1000 - 100-(1000+100) = -100 --> Wrong, because we allready payed
> and invoiced back
> my way: 1000 - 100 -(1000-100) = 0  --> OK
> 
> 2. customer payed more than he should (1200 instead of 1000) but we have not
> refunded it (same amounts)
> 1000 - 0 - (1200 - 0) = -200 --> OK, we owe 200$ to the customer
> 
> what do you think, am I wrong? otherwise I do not understand the meaning of
> the field value.

Re: Credit note / Refund Item price

Posted by "Robert G." <ga...@mercon24.de>.
I played a little around and found in PartyFinancialHistory.groovy the
calculation of "totalToBeReceived" / "totalToBePayed"

I believe, that these are the amounts that the company owe to the customer
or the customer owe to the company...

if so, I think there is a misscalculation (cause I do not get correct
amounts there)

your code:
transferAmount =
totalInvSaApplied.add(totalInvSaNotApplied).subtract(totalInvPuApplied.add(totalInvPuNotApplied)).subtract(totalPayInApplied.add(totalPayInNotApplied).*add*(totalPayOutApplied.add(totalPayOutNotApplied)));

my opinion:
transferAmount =
totalInvSaApplied.add(totalInvSaNotApplied).subtract(totalInvPuApplied.add(totalInvPuNotApplied)).subtract(totalPayInApplied.add(totalPayInNotApplied).*subtract*(totalPayOutApplied.add(totalPayOutNotApplied)));

in easier looking:
your code:
Sales Invoices - purchase invoices - (incomming payments + outgoing
payments)

my code:
Sales Invoices - purchase invoices - (incomming payments - outgoing
payments)

So lets test the cases:
*1. customer payed and we refund items *
payment 1000$
sales invoices (applied and unapplied) = 1000$
purchase invoice (refund) = 100$ (item refund)
refund payment 100$

acutally: 1000 - 100-(1000+100) = -100 --> Wrong, because we allready payed
and invoiced back 
my way: 1000 - 100 -(1000-100) = 0  --> OK

2. customer payed more than he should (1200 instead of 1000) but we have not
refunded it (same amounts)
1000 - 0 - (1200 - 0) = -200 --> OK, we owe 200$ to the customer

what do you think, am I wrong? otherwise I do not understand the meaning of
the field value.







--
View this message in context: http://ofbiz.135035.n4.nabble.com/Credit-note-Refund-Item-price-tp4643993p4644052.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Credit note / Refund Item price

Posted by "Robert G." <ga...@mercon24.de>.
I also tried to create manually an invoice for purchase refund...(refund for
an item the customer bought).

Than I made an outgoing payment, but this increases the amount which we owe
to the customer within the transaction history of the customer. A credit
note (refund invoice) should decrease it i think...

what am I doing wrong?



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Credit-note-Refund-Item-price-tp4643993p4643994.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Credit note / Refund Item price

Posted by Prateek <pr...@gmail.com>.
Hello Robert,

Are you able to perform Refund process from Apache OFBiz?

I'm also trying to follow the steps (suggested by you), but I'm also unable
to refund transactions.

Also I'm trying to follow below steps:-
-  User opens any completed order which he/she want to create return of.
-  User clicks on [Create Return] button.
-  The system displays the list of order items and other payment/adjustment
components.
-  User selects the items and components which need to be returned.
-  User can select the items return type(Refund/Replacement), return reason
and return quantity and can calculate the return.
- User clicks on [Return Selected Items] button. The return will get created
in the system.
- User accepts the return and sends a confirmation email to customer.
- User will be able to see the return order link if return has any
replacement item.



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Credit-note-Refund-Item-price-tp4643993p4659847.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Credit note / Refund Item price

Posted by "Robert G." <ga...@mercon24.de>.
haha, great Jaques, thanks!

We just went online with the ofbiz shop a week before and my head was
smoking...so sorry for the delay concerning patches / jiras.

from near feature on I will provide them more fast :)

Greetings, 

Robert



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Credit-note-Refund-Item-price-tp4643993p4644423.html
Sent from the OFBiz - User mailing list archive at Nabble.com.