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 |
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? |
This post was updated on .
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) acutally: 1000 - 0-(1200+0) = -200 --> OK, we owe 200$ to the customer my way: 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. |
Administrator
|
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. |
Administrator
|
In reply to this post by Robert Gan
When you will provide a patch, update the file before.
I have formatted and refactored the code to make transferAmount calculation more clear Jacques Jacques Le Roux wrote: > When you will provide a patch, update the file before. > I have formatted and refactored the code to make transferAmount calculation more clear > > Jacques > > Jacques Le Roux wrote: >> 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. |
Administrator
|
Fixed, see http://svn.apache.org/viewvc?view=revision&revision=r1529418
Jacques Jacques Le Roux wrote: > When you will provide a patch, update the file before. > I have formatted and refactored the code to make transferAmount calculation more clear > > Jacques > > Jacques Le Roux wrote: >> When you will provide a patch, update the file before. >> I have formatted and refactored the code to make transferAmount calculation more clear >> >> Jacques >> >> Jacques Le Roux wrote: >>> 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. |
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 |
This post was updated on .
In reply to this post by Robert Gan
Hello All,
Credits or refunds can only be performed against settled transactions. The transaction against which the credit / refund was submitted has not been settled, so a credit cannot be issued. This transaction type is used to refund a customer for a transaction that was originally processed and successfully settled through the payment gateway named as Authorize.net. We can perform Refund transaction from Apache OFBiz (13.07.01) using "Manual Electronic Transaction" tab provided that we need setup a custom payment method in a store which you're going to use like in this case it will be "CC Authorize dot net refund (aimCCRefund)". Regards, |
Free forum by Nabble | Edit this page |