Subject: My Credit Issue REL-119313
From: Atmaram Tiwari <[email-masked]>
To: Monika Garg <[email-masked]>, "[email-masked]" <[email-masked]>, Venkata Burle <[email-masked]>, Apoorv Joshi <[email-masked]>
Cc: Suhas Bennikal <[email-masked]>
Date: Sun, 1 Nov 2020 07:21:23 +0000

Hi Monika,

Issue is with the lmgExpireWalletTransactionsCron Job which is keep debiting the amount even fund is expired in wallet.

Customer has unused 26 AED fund with expired Fund type and each time job is deducting the 26 AED in his last balance, so it has gone to minus -1846 AED.

@Monika Garg<mailto:[email-masked]> It is just small amount so we can give 26AED promo credit and update the last balance to customer wallet and make him happy .

@Venkata Burle<mailto:[email-masked]>  plz let us know which  team can take this fwd to fix it permanent.

p_isactive
p_uid
p_lastbalance
p_nextexpirydate
p_uid
Code
p_referralamount
p_amount
Code
Code
true
landmark-ae
-1794.00000000
2020-04-10 00:00:00.0
[email-masked]
REFERRAL
3.96000000
3.96000000
ORDER_PLACED
DEBIT
true
landmark-ae
-1794.00000000
2020-04-10 00:00:00.0
[email-masked]
REFERRAL
20.00000000
FUND_EXPIRED
CREDIT
true
landmark-ae
-1794.00000000
2020-04-10 00:00:00.0
[email-masked]
REFERRAL
2.00000000
FUND_EXPIRED
CREDIT
true
landmark-ae
-1794.00000000
2020-04-10 00:00:00.0
[email-masked]
REFERRAL
4.00000000
FUND_EXPIRED
CREDIT
true
landmark-ae
-1794.00000000
2020-04-10 00:00:00.0
[email-masked]
REFERRAL
3.96000000
REFERRAL_FUND
CREDIT

*********************************************************************************************************
My Credit Issue  REL-119313
*********************************************************************************************************

select  {w.isactive},{bs.uid},{w.lastbalance},{w.nextexpirydate},{c.uid},{ft.code},
{wt.referralAmount},
{wt.amount},
{ty.code},
{tt.code}

from {

                LMGMyCreditWallet  as w
                left join basestore as bs on {w.basestore}={bs.pk}
                left join customer as c on {w.user}={c.pk}

                left join LMGMyCreditFundDetails as f on {f.wallet} ={w.pk}
                left join FundType as ft on {ft.pk} ={f.fundtype}
    left join LMGMyCreditWalletTransaction as wt on {wt.wallet} ={w.pk}
    left join WalletTransactionEntryType as ty on {ty.pk} ={wt.entrytype}
    left join WalletTransactionType as tt on {tt.pk} ={wt.TransactionType}

}

where {c.uid}=[email-masked]' //Wallet PK
*********************************************************************************************************

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.SerializationFeature;
import de.hybris.platform.commerceservices.impersonation.ImpersonationContext;
import de.hybris.platform.commerceservices.impersonation.ImpersonationService;
spring.getBean "myCreditLMGWalletService"
spring.getBean "myCreditLMGWalletFacade"
spring.getBean "impersonationService";
spring.getBean "lmgOrderService"
userId= "[email-masked]";

ObjectMapper mapper = new ObjectMapper();

order ="9602294364";
orderModel = lmgOrderService.getOrderbyCode(order);

ImpersonationContext context = new ImpersonationContext();
context.setOrder(orderModel);
impersonationService.executeInContext(context,
new ImpersonationService.Executor() {
public Object execute() throws Exception
{
lmgWalletTransactionDetails = myCreditLMGWalletFacade.getWalletDetails(userId);

                try{
                                                                String json = mapper.writeValueAsString(lmgWalletTransactionDetails);
                                                                println(json);

                                                                                wallet = myCreditLMGWalletService.getWalletDetails(userId);
                               println  wallet.getBaseStore().getUid();

                                println wallet.getPk();
       println wallet.getIsActive()
       println wallet.getLastBalance()

       println wallet.getNextExpiryDate()
       println wallet.getUser().getUid();

 }catch(IOException a){
        a.printStackTrace();
    }

  for( w in lmgWalletTransactionDetails.getWalletTransactions())
                                {
                                                for( w1 in w.getWalletTransactions())
                                                {
                                                                w1.getAmount() + ":" + w1.getTransactionDate() + ":" + w1.getTransactionType();
                                                }
                                }
}
});

----------------------------------------------
Atmaram Tiwari
Web Team | Landmark Group
18th floor Al Marsa, South Tecom Zone D Dubai Marina P.O.Box 25030
w: webteam.com<http://www.webteam.com/>
m: +971 52 117 4306
m: +91 98 999 73807
t:   +971   4 517 2015 int:(2015)
This e-mail message (which includes attachment/s thereto, if any, and the information therein), is legally privileged, proprietary, strictly confidential and exempt from disclosure, which is not waived or lost by mis-transmission or error. If you are not the original intended recipient of this message, it may be unlawful and illegal for you to read, print, retain, copy, disseminate, disclose or otherwise use this message, or take any action in reliance on it, and the same is prohibited and forbidden. If you have received this email in error, please notify the sender immediately by return reply and delete the message from your system without printing or making a copy. Neither the sender nor we are liable for any loss or damage as a result of this message, or for any delay, interception, corruption, virus, error, omission, improper or incomplete transmission thereof. www.landmarkgroup.com