[ https://issues.apache.org/jira/browse/OFBIZ-5565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14060083#comment-14060083 ]
Jacques Le Roux commented on OFBIZ-5565: ---------------------------------------- Actually it seems this is partly wrong. Contrary to UserLogin.currentPassword when you look at FinAccount.finAccountCode field using webtools/control/FindGeneric you don't see new generated finAccountCode encrypted (demo data are wrong). But if you read them with {code} delegator.findByAnd("FinAccount", UtilMisc.toMap("finAccountCode", finAccountCode), null, false); {code} where finAccountCode is not encrypted. Then you get something like {code} FinAccount][actualBalance,null()][availableBalance,null()][createdStamp,2014-07-13 11:29:37.874(java.sql.Timestamp)][createdTxStamp,2014-07-13 11:29:37.842(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][finAccountCode,$SHA$5tdhT$acnjOdDUF6mc1oNe8M1wHg14HZ8(java.lang.String)][finAccountId,10010(java.lang.String)][finAccountName,testGC(java.lang.String)][finAccountPin,$SHA$TrxBw$WkeXaZ54JE1fAAGYRbG95ziaWCc(java.lang.String)][finAccountTypeId,GIFTCERT_ACCOUNT(java.lang.String)][fromDate,null()][isRefundable,Y(java.lang.String)][lastUpdatedStamp,2014-07-13 11:29:37.874(java.sql.Timestamp)][lastUpdatedTxStamp,2014-07-13 11:29:37.842(java.sql.Timestamp)][organizationPartyId,Company(java.lang.String)][ownerPartyId,DemoCustomer(java.lang.String)][postToGlAccountId,null()][replenishLevel,1000000.00(java.math.BigDecimal)][replenishPaymentId,null()][statusId,FNACT_ACTIVE(java.lang.String)][thruDate,null()] {code} where, as you can see, finAccountCode and finAccountPin are encrypted using the new salted way Adam put in place. This misleaded me to think that FinAccount.finAccountCode was not encoded . I still don't understand the difference with UserLogin.currentPassword and I run out of time to get further. So, though it need to be clarified with UserLogin.currentPassword difference in webtools/control/FindGeneric, it seems removing the line {code} finAccountCode = finAccountCode.toUpperCase().replaceAll("[^0-9A-Z]", ""); {code} Is the right way to go > FinAccountHelper.getFinAccountFromCode() no longer returns financial account > ---------------------------------------------------------------------------- > > Key: OFBIZ-5565 > URL: https://issues.apache.org/jira/browse/OFBIZ-5565 > Project: OFBiz > Issue Type: Bug > Components: accounting, order > Affects Versions: Release Branch 13.07, Trunk > Environment: Primarily tested on Ubuntu, but affects all OS. > Reporter: Vyom Jain > Assignee: Adam Heath > Fix For: Trunk > > Attachments: OFBIZ-5565.patch > > > FinAccountHelper.getFinAccountFromCode() in trunk as well as in some of the > released versions is no longer able to fetch the Financial Account ID. > So all features dependent on this method would no longer work (an example > being paying by gift card during order entry process). > Per my research, this stopped working method post some changes related to how > data is encrypted (two strings will not have similar encrypted string). > I had tried this on a fresh SVN trunk checkout with absolutely no changes > (had been using Derby database). > Furthermore, the ant target gen-kek references old jars and that needs fixing > as well. > Steps to test - > 1. Create a new Financial account (gift certificate) for DemoCustomer - > https://demo-trunk.ofbiz.apache.org/accounting/control/FindFinAccount?ownerPartyId=DemoCustomer > and deposit some funds into it. > 2. Create an order for DemoCustomer from the Order Manager application. > 3. Use "Quick Finalize Order", try paying by the gift card created in step #1. > Observations - > 1. Returns an error "This gift card does not exist" > Related User ML post - > http://mail-archives.apache.org/mod_mbox/ofbiz-user/201403.mbox/%3CCAKuEJqZChmJaWF=rzn1z-vudnzbnsdulj4j6pxjtd5ijynu...@mail.gmail.com%3E > Thanks. -- This message was sent by Atlassian JIRA (v6.2#6252)