Unable to refund order if payment preference is offline(cash/COD/paypal/worldpay)
--------------------------------------------------------------------------------- Key: OFBIZ-295 URL: http://issues.apache.org/jira/browse/OFBIZ-295 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: order Affects Versions: SVN trunk Reporter: Marco Risaliti if we set order one of payment methods Mail Check/Money Order COD Pay With WorldPay Pay With PayPal and then refund the order. we will the such error: * ERROR: Could not complete the Create Quick Return From Order [file:/home/si/eclipse/workspace/ofbiz/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml#quickReturnFromOrder] process [problem invoking the [updateReturnHeader] service with the map named [updateHeaderCtx] containing [[needsInventoryReceive=Y, statusId=RETURN_ACCEPTED, returnId=10022, userLogin=[GenericEntity:UserLogin][createdStamp,2006-02-14 11:54:59.214(java.sql.Timestamp)][createdTxStamp,2006-02-14 11:54:58.146(java.sql.Timestamp)][currentPassword,47ca69ebb4bdc9ae0adec130880165d2cc05db1a(java.lang.String)][disabledDateTime,null()][enabled,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastUpdatedStamp,2006-02-14 11:55:01.349(java.sql.Timestamp)][lastUpdatedTxStamp,2006-02-14 11:54:59.562(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][successiveFailedLogins,null()][userLoginId,admin(java.lang.String)], locale=en_US]]: Problems with the transaction: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Service Error [processRefundReturn]: Unable to refund order #WS10021; there are no available payment preferences.; See logs for more detail] refund works if we select Credit Card or EFT Account All Comments Work Log Change History Sort Order: Comment by Si Chen [16/Feb/06 11:32 AM] [ Permlink ] This can probably be fixed by changing processRefund_ service to create a new Payment to recipient from company if no payment preference is found instead of just crashing. Comment by Jacques Le Roux [17/Mar/06 03:47 AM] [ Permlink ] In will have a look at this in 2 weeks from now. I need it for POS... Jacques Comment by Jacques Le Roux [22/Apr/06 03:00 AM] [ Permlink ] Hi All, I'm going to work on this Jacques Comment by Si Chen [22/Apr/06 10:27 AM] [ Permlink ] Jacques, There are two parts to the problem, and perhaps they are related. One is that the receive offline payments feature in the order manager should be creating Payment records. Two is that when refunding, it should be creating a reverse Payment based on the initial Payment. I'm not sure if the former would apply to your use in the POS, but please let me know. Si Comment by Jacques Le Roux [22/Apr/06 10:44 AM] [ Permlink ] Si, As far as I know, if I create A CASH payment method for _NA_ (paymentMethodId=10030) and change the statusId from PAYMENT_RECEVEID to PAYMENT_SETTLED of an OrderPaymentPreference issued from a POS order purchase, it seems to work. I'm not sure yet of what (or if) it involves more. Any idea ? Jacques Comment by Si Chen [22/Apr/06 04:24 PM] [ Permlink ] Jacques, Sorry I don't completely understand what you mean. Did you create a CASH payment? How? With receive offline payment or by changing the POS application? This may be just that simple, but please explain a bit more. Si Comment by Jacques Le Roux [22/Apr/06 06:17 PM] [ Permlink ] Si, I made a purchase in CASH with the POS and after made modifications with WebTools/Entity maintenance. It was a way to understand the problem and that seems to work. Now I have to change some code I think. Jacques Comment by Si Chen [22/Apr/06 06:37 PM] [ Permlink ] Oh that's great. SO it was just the wrong status being set. In that case, maybe we should just call updatePayment and change its status to SETTLED? Or should we wait until the POS closes out at the end of the day to settle it officially? (Actually, is that being done already, if you do end of day balance?) Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] Si, I think that calling updatePayment and changing the status to SETTLED is OK. I was also looking the other way but there is a problem at the moment when closing the POS (using CLose button in Manager Panel). I will take a look at this. It was working before and nothing have been change in POS code, so I'm expecting something outside but have no idea. I make a new POS issue for it. Thanks Jacques Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] Si, Will you please take care of the part outside of POS ? Thanks Jacques Comment by Si Chen [23/Apr/06 11:20 AM] [ Permlink ] Jacques, I wonder if it would be better as a business process to make payments SETTLED when the register is closed rather than just received? Of course, you're more familiar with the POS application, so I'd trust your judgement. I will take a look at the return code, but it will probably be in about a week or so - I'll be out of the office starting tomorrow. Si Comment by Jacques Le Roux [24/Apr/06 12:21 PM] [ Permlink ] Si, It's not POS specific. If you use CC in POS, and not CASH for example, you don't have any problem. So I think, to be consistent, that we have to apply the SETTLED status ASA the deal is done, in ecommerce, POS or whatever else sale channel... So I'll take a look at processRefund_ service ASAP. Any objection ? Jacques Comment by Si Chen [24/Apr/06 03:33 PM] [ Permlink ] Yes, that makes sense then. If you have some time, please help. I will not be able to look at it until next week. I think the idea might be to look at the original OrderPaymentPreference and then create one of the same paymentMethodTypeId, paymentTypeId="CUSTOMER_REFUND", etc. Comment by Si Chen [25/Apr/06 11:15 AM] [ Permlink ] Actually, Jacques, I just realized something: If you ring up a sale with a credit card, it is automatically charged and settled. The cashier does not need to do anything else to put that cash into the store. If you ring up a sale with cash, though, the cash is put into the drawer of the POS terminal, and it only goes into the store when the cashier "closes out" his drawer by bringing it to the manager. So the process with cash/check and credit cards is a bit different, and perhaps that means that they should be settled at different times (during closing the POS machine vs. as soon as captured.) What do you think? Si Comment by Jacques Le Roux [25/Apr/06 12:52 PM] [ Permlink ] Si, Yes indeed, you are totaly right. So something has to be done at least in POS because nothing like that happen nowadays. I will try to take a look tomorrow at the other part too (COD/paypal/worldpay, etc.) Jacques Comment by Marco Risaliti [13/Sep/06 01:51 AM] [ Permlink ] Hi Jacques, can you tell us if we can close it ? Thanks Marco It's a copy of the old-jira issue OFBIZ-741 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ http://issues.apache.org/jira/browse/OFBIZ-295?page=all ]
Jacopo Cappellato updated OFBIZ-295: ------------------------------------ Description: It's a copy of the old-jira issue http://jira.undersunconsulting.com/browse/OFBIZ-741 from Jinsong Mu. =========================================================== if we set order one of payment methods Mail Check/Money Order COD Pay With WorldPay Pay With PayPal and then refund the order. we will the such error: * ERROR: Could not complete the Create Quick Return From Order [file:/home/si/eclipse/workspace/ofbiz/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml#quickReturnFromOrder] process [problem invoking the [updateReturnHeader] service with the map named [updateHeaderCtx] containing [[needsInventoryReceive=Y, statusId=RETURN_ACCEPTED, returnId=10022, userLogin=[GenericEntity:UserLogin][createdStamp,2006-02-14 11:54:59.214(java.sql.Timestamp)][createdTxStamp,2006-02-14 11:54:58.146(java.sql.Timestamp)][currentPassword,47ca69ebb4bdc9ae0adec130880165d2cc05db1a(java.lang.String)][disabledDateTime,null()][enabled,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastUpdatedStamp,2006-02-14 11:55:01.349(java.sql.Timestamp)][lastUpdatedTxStamp,2006-02-14 11:54:59.562(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][successiveFailedLogins,null()][userLoginId,admin(java.lang.String)], locale=en_US]]: Problems with the transaction: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Service Error [processRefundReturn]: Unable to refund order #WS10021; there are no available payment preferences.; See logs for more detail] refund works if we select Credit Card or EFT Account All Comments Work Log Change History Sort Order: Comment by Si Chen [16/Feb/06 11:32 AM] [ Permlink ] This can probably be fixed by changing processRefund_ service to create a new Payment to recipient from company if no payment preference is found instead of just crashing. Comment by Jacques Le Roux [17/Mar/06 03:47 AM] [ Permlink ] In will have a look at this in 2 weeks from now. I need it for POS... Jacques Comment by Jacques Le Roux [22/Apr/06 03:00 AM] [ Permlink ] Hi All, I'm going to work on this Jacques Comment by Si Chen [22/Apr/06 10:27 AM] [ Permlink ] Jacques, There are two parts to the problem, and perhaps they are related. One is that the receive offline payments feature in the order manager should be creating Payment records. Two is that when refunding, it should be creating a reverse Payment based on the initial Payment. I'm not sure if the former would apply to your use in the POS, but please let me know. Si Comment by Jacques Le Roux [22/Apr/06 10:44 AM] [ Permlink ] Si, As far as I know, if I create A CASH payment method for _NA_ (paymentMethodId=10030) and change the statusId from PAYMENT_RECEVEID to PAYMENT_SETTLED of an OrderPaymentPreference issued from a POS order purchase, it seems to work. I'm not sure yet of what (or if) it involves more. Any idea ? Jacques Comment by Si Chen [22/Apr/06 04:24 PM] [ Permlink ] Jacques, Sorry I don't completely understand what you mean. Did you create a CASH payment? How? With receive offline payment or by changing the POS application? This may be just that simple, but please explain a bit more. Si Comment by Jacques Le Roux [22/Apr/06 06:17 PM] [ Permlink ] Si, I made a purchase in CASH with the POS and after made modifications with WebTools/Entity maintenance. It was a way to understand the problem and that seems to work. Now I have to change some code I think. Jacques Comment by Si Chen [22/Apr/06 06:37 PM] [ Permlink ] Oh that's great. SO it was just the wrong status being set. In that case, maybe we should just call updatePayment and change its status to SETTLED? Or should we wait until the POS closes out at the end of the day to settle it officially? (Actually, is that being done already, if you do end of day balance?) Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] Si, I think that calling updatePayment and changing the status to SETTLED is OK. I was also looking the other way but there is a problem at the moment when closing the POS (using CLose button in Manager Panel). I will take a look at this. It was working before and nothing have been change in POS code, so I'm expecting something outside but have no idea. I make a new POS issue for it. Thanks Jacques Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] Si, Will you please take care of the part outside of POS ? Thanks Jacques Comment by Si Chen [23/Apr/06 11:20 AM] [ Permlink ] Jacques, I wonder if it would be better as a business process to make payments SETTLED when the register is closed rather than just received? Of course, you're more familiar with the POS application, so I'd trust your judgement. I will take a look at the return code, but it will probably be in about a week or so - I'll be out of the office starting tomorrow. Si Comment by Jacques Le Roux [24/Apr/06 12:21 PM] [ Permlink ] Si, It's not POS specific. If you use CC in POS, and not CASH for example, you don't have any problem. So I think, to be consistent, that we have to apply the SETTLED status ASA the deal is done, in ecommerce, POS or whatever else sale channel... So I'll take a look at processRefund_ service ASAP. Any objection ? Jacques Comment by Si Chen [24/Apr/06 03:33 PM] [ Permlink ] Yes, that makes sense then. If you have some time, please help. I will not be able to look at it until next week. I think the idea might be to look at the original OrderPaymentPreference and then create one of the same paymentMethodTypeId, paymentTypeId="CUSTOMER_REFUND", etc. Comment by Si Chen [25/Apr/06 11:15 AM] [ Permlink ] Actually, Jacques, I just realized something: If you ring up a sale with a credit card, it is automatically charged and settled. The cashier does not need to do anything else to put that cash into the store. If you ring up a sale with cash, though, the cash is put into the drawer of the POS terminal, and it only goes into the store when the cashier "closes out" his drawer by bringing it to the manager. So the process with cash/check and credit cards is a bit different, and perhaps that means that they should be settled at different times (during closing the POS machine vs. as soon as captured.) What do you think? Si Comment by Jacques Le Roux [25/Apr/06 12:52 PM] [ Permlink ] Si, Yes indeed, you are totaly right. So something has to be done at least in POS because nothing like that happen nowadays. I will try to take a look tomorrow at the other part too (COD/paypal/worldpay, etc.) Jacques Comment by Marco Risaliti [13/Sep/06 01:51 AM] [ Permlink ] Hi Jacques, can you tell us if we can close it ? Thanks Marco was: if we set order one of payment methods Mail Check/Money Order COD Pay With WorldPay Pay With PayPal and then refund the order. we will the such error: * ERROR: Could not complete the Create Quick Return From Order [file:/home/si/eclipse/workspace/ofbiz/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml#quickReturnFromOrder] process [problem invoking the [updateReturnHeader] service with the map named [updateHeaderCtx] containing [[needsInventoryReceive=Y, statusId=RETURN_ACCEPTED, returnId=10022, userLogin=[GenericEntity:UserLogin][createdStamp,2006-02-14 11:54:59.214(java.sql.Timestamp)][createdTxStamp,2006-02-14 11:54:58.146(java.sql.Timestamp)][currentPassword,47ca69ebb4bdc9ae0adec130880165d2cc05db1a(java.lang.String)][disabledDateTime,null()][enabled,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastUpdatedStamp,2006-02-14 11:55:01.349(java.sql.Timestamp)][lastUpdatedTxStamp,2006-02-14 11:54:59.562(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][successiveFailedLogins,null()][userLoginId,admin(java.lang.String)], locale=en_US]]: Problems with the transaction: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Service Error [processRefundReturn]: Unable to refund order #WS10021; there are no available payment preferences.; See logs for more detail] refund works if we select Credit Card or EFT Account All Comments Work Log Change History Sort Order: Comment by Si Chen [16/Feb/06 11:32 AM] [ Permlink ] This can probably be fixed by changing processRefund_ service to create a new Payment to recipient from company if no payment preference is found instead of just crashing. Comment by Jacques Le Roux [17/Mar/06 03:47 AM] [ Permlink ] In will have a look at this in 2 weeks from now. I need it for POS... Jacques Comment by Jacques Le Roux [22/Apr/06 03:00 AM] [ Permlink ] Hi All, I'm going to work on this Jacques Comment by Si Chen [22/Apr/06 10:27 AM] [ Permlink ] Jacques, There are two parts to the problem, and perhaps they are related. One is that the receive offline payments feature in the order manager should be creating Payment records. Two is that when refunding, it should be creating a reverse Payment based on the initial Payment. I'm not sure if the former would apply to your use in the POS, but please let me know. Si Comment by Jacques Le Roux [22/Apr/06 10:44 AM] [ Permlink ] Si, As far as I know, if I create A CASH payment method for _NA_ (paymentMethodId=10030) and change the statusId from PAYMENT_RECEVEID to PAYMENT_SETTLED of an OrderPaymentPreference issued from a POS order purchase, it seems to work. I'm not sure yet of what (or if) it involves more. Any idea ? Jacques Comment by Si Chen [22/Apr/06 04:24 PM] [ Permlink ] Jacques, Sorry I don't completely understand what you mean. Did you create a CASH payment? How? With receive offline payment or by changing the POS application? This may be just that simple, but please explain a bit more. Si Comment by Jacques Le Roux [22/Apr/06 06:17 PM] [ Permlink ] Si, I made a purchase in CASH with the POS and after made modifications with WebTools/Entity maintenance. It was a way to understand the problem and that seems to work. Now I have to change some code I think. Jacques Comment by Si Chen [22/Apr/06 06:37 PM] [ Permlink ] Oh that's great. SO it was just the wrong status being set. In that case, maybe we should just call updatePayment and change its status to SETTLED? Or should we wait until the POS closes out at the end of the day to settle it officially? (Actually, is that being done already, if you do end of day balance?) Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] Si, I think that calling updatePayment and changing the status to SETTLED is OK. I was also looking the other way but there is a problem at the moment when closing the POS (using CLose button in Manager Panel). I will take a look at this. It was working before and nothing have been change in POS code, so I'm expecting something outside but have no idea. I make a new POS issue for it. Thanks Jacques Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] Si, Will you please take care of the part outside of POS ? Thanks Jacques Comment by Si Chen [23/Apr/06 11:20 AM] [ Permlink ] Jacques, I wonder if it would be better as a business process to make payments SETTLED when the register is closed rather than just received? Of course, you're more familiar with the POS application, so I'd trust your judgement. I will take a look at the return code, but it will probably be in about a week or so - I'll be out of the office starting tomorrow. Si Comment by Jacques Le Roux [24/Apr/06 12:21 PM] [ Permlink ] Si, It's not POS specific. If you use CC in POS, and not CASH for example, you don't have any problem. So I think, to be consistent, that we have to apply the SETTLED status ASA the deal is done, in ecommerce, POS or whatever else sale channel... So I'll take a look at processRefund_ service ASAP. Any objection ? Jacques Comment by Si Chen [24/Apr/06 03:33 PM] [ Permlink ] Yes, that makes sense then. If you have some time, please help. I will not be able to look at it until next week. I think the idea might be to look at the original OrderPaymentPreference and then create one of the same paymentMethodTypeId, paymentTypeId="CUSTOMER_REFUND", etc. Comment by Si Chen [25/Apr/06 11:15 AM] [ Permlink ] Actually, Jacques, I just realized something: If you ring up a sale with a credit card, it is automatically charged and settled. The cashier does not need to do anything else to put that cash into the store. If you ring up a sale with cash, though, the cash is put into the drawer of the POS terminal, and it only goes into the store when the cashier "closes out" his drawer by bringing it to the manager. So the process with cash/check and credit cards is a bit different, and perhaps that means that they should be settled at different times (during closing the POS machine vs. as soon as captured.) What do you think? Si Comment by Jacques Le Roux [25/Apr/06 12:52 PM] [ Permlink ] Si, Yes indeed, you are totaly right. So something has to be done at least in POS because nothing like that happen nowadays. I will try to take a look tomorrow at the other part too (COD/paypal/worldpay, etc.) Jacques Comment by Marco Risaliti [13/Sep/06 01:51 AM] [ Permlink ] Hi Jacques, can you tell us if we can close it ? Thanks Marco It's a copy of the old-jira issue OFBIZ-741 > Unable to refund order if payment preference is offline(cash/COD/paypal/worldpay) > --------------------------------------------------------------------------------- > > Key: OFBIZ-295 > URL: http://issues.apache.org/jira/browse/OFBIZ-295 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Marco Risaliti > > It's a copy of the old-jira issue http://jira.undersunconsulting.com/browse/OFBIZ-741 from Jinsong Mu. > =========================================================== > if we set order one of payment methods > Mail Check/Money Order > COD > Pay With WorldPay > Pay With PayPal > and then refund the order. we will the such error: > * ERROR: Could not complete the Create Quick Return From Order [file:/home/si/eclipse/workspace/ofbiz/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml#quickReturnFromOrder] process [problem invoking the [updateReturnHeader] service with the map named [updateHeaderCtx] containing [[needsInventoryReceive=Y, statusId=RETURN_ACCEPTED, returnId=10022, userLogin=[GenericEntity:UserLogin][createdStamp,2006-02-14 11:54:59.214(java.sql.Timestamp)][createdTxStamp,2006-02-14 11:54:58.146(java.sql.Timestamp)][currentPassword,47ca69ebb4bdc9ae0adec130880165d2cc05db1a(java.lang.String)][disabledDateTime,null()][enabled,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastUpdatedStamp,2006-02-14 11:55:01.349(java.sql.Timestamp)][lastUpdatedTxStamp,2006-02-14 11:54:59.562(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][successiveFailedLogins,null()][userLoginId,admin(java.lang.String)], locale=en_US]]: Problems with the transaction: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Service Error [processRefundReturn]: Unable to refund order #WS10021; there are no available payment preferences.; See logs for more detail] > refund works if we select Credit Card or EFT Account > > > All Comments Work Log Change History Sort Order: > Comment by Si Chen [16/Feb/06 11:32 AM] [ Permlink ] > This can probably be fixed by changing processRefund_ service to create a new Payment to recipient from company if no payment preference is found instead of just crashing. > Comment by Jacques Le Roux [17/Mar/06 03:47 AM] [ Permlink ] > In will have a look at this in 2 weeks from now. I need it for POS... > Jacques > Comment by Jacques Le Roux [22/Apr/06 03:00 AM] [ Permlink ] > Hi All, > I'm going to work on this > Jacques > Comment by Si Chen [22/Apr/06 10:27 AM] [ Permlink ] > Jacques, > There are two parts to the problem, and perhaps they are related. One is that the receive offline payments feature in the order manager should be creating Payment records. Two is that when refunding, it should be creating a reverse Payment based on the initial Payment. I'm not sure if the former would apply to your use in the POS, but please let me know. > Si > Comment by Jacques Le Roux [22/Apr/06 10:44 AM] [ Permlink ] > Si, > As far as I know, if I create A CASH payment method for _NA_ (paymentMethodId=10030) and change the statusId from PAYMENT_RECEVEID to PAYMENT_SETTLED of an OrderPaymentPreference issued from a POS order purchase, it seems to work. I'm not sure yet of what (or if) it involves more. > Any idea ? > Jacques > Comment by Si Chen [22/Apr/06 04:24 PM] [ Permlink ] > Jacques, > Sorry I don't completely understand what you mean. Did you create a CASH payment? How? With receive offline payment or by changing the POS application? > This may be just that simple, but please explain a bit more. > Si > Comment by Jacques Le Roux [22/Apr/06 06:17 PM] [ Permlink ] > Si, > I made a purchase in CASH with the POS and after made modifications with WebTools/Entity maintenance. > It was a way to understand the problem and that seems to work. Now I have to change some code I think. > Jacques > Comment by Si Chen [22/Apr/06 06:37 PM] [ Permlink ] > Oh that's great. SO it was just the wrong status being set. In that case, maybe we should just call updatePayment and change its status to SETTLED? Or should we wait until the POS closes out at the end of the day to settle it officially? (Actually, is that being done already, if you do end of day balance?) > Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] > Si, > I think that calling updatePayment and changing the status to SETTLED is OK. > I was also looking the other way but there is a problem at the moment when closing the POS (using CLose button in Manager Panel). I will take a look at this. It was working before and nothing have been change in POS code, so I'm expecting something outside but have no idea. I make a new POS issue for it. > Thanks > Jacques > Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] > Si, > Will you please take care of the part outside of POS ? > Thanks > Jacques > Comment by Si Chen [23/Apr/06 11:20 AM] [ Permlink ] > Jacques, > I wonder if it would be better as a business process to make payments SETTLED when the register is closed rather than just received? Of course, you're more familiar with the POS application, so I'd trust your judgement. > I will take a look at the return code, but it will probably be in about a week or so - I'll be out of the office starting tomorrow. > Si > Comment by Jacques Le Roux [24/Apr/06 12:21 PM] [ Permlink ] > Si, > It's not POS specific. If you use CC in POS, and not CASH for example, you don't have any problem. So I think, to be consistent, > that we have to apply the SETTLED status ASA the deal is done, in ecommerce, POS or whatever else sale channel... > So I'll take a look at processRefund_ service ASAP. > Any objection ? > Jacques > Comment by Si Chen [24/Apr/06 03:33 PM] [ Permlink ] > Yes, that makes sense then. If you have some time, please help. I will not be able to look at it until next week. I think the idea might be to look at the original OrderPaymentPreference and then create one of the same paymentMethodTypeId, paymentTypeId="CUSTOMER_REFUND", etc. > Comment by Si Chen [25/Apr/06 11:15 AM] [ Permlink ] > Actually, Jacques, I just realized something: > If you ring up a sale with a credit card, it is automatically charged and settled. The cashier does not need to do anything else to put that cash into the store. If you ring up a sale with cash, though, the cash is put into the drawer of the POS terminal, and it only goes into the store when the cashier "closes out" his drawer by bringing it to the manager. So the process with cash/check and credit cards is a bit different, and perhaps that means that they should be settled at different times (during closing the POS machine vs. as soon as captured.) > What do you think? > Si > Comment by Jacques Le Roux [25/Apr/06 12:52 PM] [ Permlink ] > Si, > Yes indeed, you are totaly right. > So something has to be done at least in POS because nothing like that happen nowadays. > I will try to take a look tomorrow at the other part too (COD/paypal/worldpay, etc.) > Jacques > Comment by Marco Risaliti [13/Sep/06 01:51 AM] [ Permlink ] > Hi Jacques, > can you tell us if we can close it ? > Thanks > Marco -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-295?page=all ]
Si Chen closed OFBIZ-295. ------------------------- Resolution: Fixed This is a duplicate of another issue I created: OFBIZ-459. The solution is actually very simple. > Unable to refund order if payment preference is offline(cash/COD/paypal/worldpay) > --------------------------------------------------------------------------------- > > Key: OFBIZ-295 > URL: http://issues.apache.org/jira/browse/OFBIZ-295 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: order > Affects Versions: SVN trunk > Reporter: Marco Risaliti > > It's a copy of the old-jira issue http://jira.undersunconsulting.com/browse/OFBIZ-741 from Jinsong Mu. > =========================================================== > if we set order one of payment methods > Mail Check/Money Order > COD > Pay With WorldPay > Pay With PayPal > and then refund the order. we will the such error: > * ERROR: Could not complete the Create Quick Return From Order [file:/home/si/eclipse/workspace/ofbiz/applications/order/script/org/ofbiz/order/order/OrderReturnServices.xml#quickReturnFromOrder] process [problem invoking the [updateReturnHeader] service with the map named [updateHeaderCtx] containing [[needsInventoryReceive=Y, statusId=RETURN_ACCEPTED, returnId=10022, userLogin=[GenericEntity:UserLogin][createdStamp,2006-02-14 11:54:59.214(java.sql.Timestamp)][createdTxStamp,2006-02-14 11:54:58.146(java.sql.Timestamp)][currentPassword,47ca69ebb4bdc9ae0adec130880165d2cc05db1a(java.lang.String)][disabledDateTime,null()][enabled,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastUpdatedStamp,2006-02-14 11:55:01.349(java.sql.Timestamp)][lastUpdatedTxStamp,2006-02-14 11:54:59.562(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][successiveFailedLogins,null()][userLoginId,admin(java.lang.String)], locale=en_US]]: Problems with the transaction: The current transaction is marked for rollback, not beginning a new transaction and aborting current operation; the rollbackOnly was caused by: Service Error [processRefundReturn]: Unable to refund order #WS10021; there are no available payment preferences.; See logs for more detail] > refund works if we select Credit Card or EFT Account > > > All Comments Work Log Change History Sort Order: > Comment by Si Chen [16/Feb/06 11:32 AM] [ Permlink ] > This can probably be fixed by changing processRefund_ service to create a new Payment to recipient from company if no payment preference is found instead of just crashing. > Comment by Jacques Le Roux [17/Mar/06 03:47 AM] [ Permlink ] > In will have a look at this in 2 weeks from now. I need it for POS... > Jacques > Comment by Jacques Le Roux [22/Apr/06 03:00 AM] [ Permlink ] > Hi All, > I'm going to work on this > Jacques > Comment by Si Chen [22/Apr/06 10:27 AM] [ Permlink ] > Jacques, > There are two parts to the problem, and perhaps they are related. One is that the receive offline payments feature in the order manager should be creating Payment records. Two is that when refunding, it should be creating a reverse Payment based on the initial Payment. I'm not sure if the former would apply to your use in the POS, but please let me know. > Si > Comment by Jacques Le Roux [22/Apr/06 10:44 AM] [ Permlink ] > Si, > As far as I know, if I create A CASH payment method for _NA_ (paymentMethodId=10030) and change the statusId from PAYMENT_RECEVEID to PAYMENT_SETTLED of an OrderPaymentPreference issued from a POS order purchase, it seems to work. I'm not sure yet of what (or if) it involves more. > Any idea ? > Jacques > Comment by Si Chen [22/Apr/06 04:24 PM] [ Permlink ] > Jacques, > Sorry I don't completely understand what you mean. Did you create a CASH payment? How? With receive offline payment or by changing the POS application? > This may be just that simple, but please explain a bit more. > Si > Comment by Jacques Le Roux [22/Apr/06 06:17 PM] [ Permlink ] > Si, > I made a purchase in CASH with the POS and after made modifications with WebTools/Entity maintenance. > It was a way to understand the problem and that seems to work. Now I have to change some code I think. > Jacques > Comment by Si Chen [22/Apr/06 06:37 PM] [ Permlink ] > Oh that's great. SO it was just the wrong status being set. In that case, maybe we should just call updatePayment and change its status to SETTLED? Or should we wait until the POS closes out at the end of the day to settle it officially? (Actually, is that being done already, if you do end of day balance?) > Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] > Si, > I think that calling updatePayment and changing the status to SETTLED is OK. > I was also looking the other way but there is a problem at the moment when closing the POS (using CLose button in Manager Panel). I will take a look at this. It was working before and nothing have been change in POS code, so I'm expecting something outside but have no idea. I make a new POS issue for it. > Thanks > Jacques > Comment by Jacques Le Roux [23/Apr/06 09:00 AM] [ Permlink ] > Si, > Will you please take care of the part outside of POS ? > Thanks > Jacques > Comment by Si Chen [23/Apr/06 11:20 AM] [ Permlink ] > Jacques, > I wonder if it would be better as a business process to make payments SETTLED when the register is closed rather than just received? Of course, you're more familiar with the POS application, so I'd trust your judgement. > I will take a look at the return code, but it will probably be in about a week or so - I'll be out of the office starting tomorrow. > Si > Comment by Jacques Le Roux [24/Apr/06 12:21 PM] [ Permlink ] > Si, > It's not POS specific. If you use CC in POS, and not CASH for example, you don't have any problem. So I think, to be consistent, > that we have to apply the SETTLED status ASA the deal is done, in ecommerce, POS or whatever else sale channel... > So I'll take a look at processRefund_ service ASAP. > Any objection ? > Jacques > Comment by Si Chen [24/Apr/06 03:33 PM] [ Permlink ] > Yes, that makes sense then. If you have some time, please help. I will not be able to look at it until next week. I think the idea might be to look at the original OrderPaymentPreference and then create one of the same paymentMethodTypeId, paymentTypeId="CUSTOMER_REFUND", etc. > Comment by Si Chen [25/Apr/06 11:15 AM] [ Permlink ] > Actually, Jacques, I just realized something: > If you ring up a sale with a credit card, it is automatically charged and settled. The cashier does not need to do anything else to put that cash into the store. If you ring up a sale with cash, though, the cash is put into the drawer of the POS terminal, and it only goes into the store when the cashier "closes out" his drawer by bringing it to the manager. So the process with cash/check and credit cards is a bit different, and perhaps that means that they should be settled at different times (during closing the POS machine vs. as soon as captured.) > What do you think? > Si > Comment by Jacques Le Roux [25/Apr/06 12:52 PM] [ Permlink ] > Si, > Yes indeed, you are totaly right. > So something has to be done at least in POS because nothing like that happen nowadays. > I will try to take a look tomorrow at the other part too (COD/paypal/worldpay, etc.) > Jacques > Comment by Marco Risaliti [13/Sep/06 01:51 AM] [ Permlink ] > Hi Jacques, > can you tell us if we can close it ? > Thanks > Marco -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |