Subversion Repositories SmartDukaan

Rev

Rev 34675 | Rev 34832 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34675 Rev 34695
Line 13... Line 13...
13
import com.spice.profitmandi.dao.entity.fofo.LoanTransaction;
13
import com.spice.profitmandi.dao.entity.fofo.LoanTransaction;
14
import com.spice.profitmandi.dao.entity.transaction.LineItem;
14
import com.spice.profitmandi.dao.entity.transaction.LineItem;
15
import com.spice.profitmandi.dao.entity.transaction.Order;
15
import com.spice.profitmandi.dao.entity.transaction.Order;
16
import com.spice.profitmandi.dao.entity.transaction.Transaction;
16
import com.spice.profitmandi.dao.entity.transaction.Transaction;
17
import com.spice.profitmandi.dao.entity.transaction.TransactionApproval;
17
import com.spice.profitmandi.dao.entity.transaction.TransactionApproval;
18
import com.spice.profitmandi.dao.entity.user.User;
-
 
19
import com.spice.profitmandi.dao.enumuration.transaction.TransactionApprovalStatus;
18
import com.spice.profitmandi.dao.enumuration.transaction.TransactionApprovalStatus;
20
import com.spice.profitmandi.dao.model.CartItem;
19
import com.spice.profitmandi.dao.model.CartItem;
21
import com.spice.profitmandi.dao.model.UserCart;
20
import com.spice.profitmandi.dao.model.UserCart;
22
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
21
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
23
import com.spice.profitmandi.dao.repository.catalog.BidRepository;
22
import com.spice.profitmandi.dao.repository.catalog.BidRepository;
Line 187... Line 186...
187
 
186
 
188
            double netAmountInHand = creditAvailability.doubleValue() + walletAmount;
187
            double netAmountInHand = creditAvailability.doubleValue() + walletAmount;
189
            LOGGER.info("netAmountInHand - " + netAmountInHand);
188
            LOGGER.info("netAmountInHand - " + netAmountInHand);
190
            if (totalPayableAmount > ProfitMandiConstants.MAX_NEGATIVE_WALLET_VALUE && netAmountInHand < totalPayableAmount) {
189
            if (totalPayableAmount > ProfitMandiConstants.MAX_NEGATIVE_WALLET_VALUE && netAmountInHand < totalPayableAmount) {
191
                if (type.equals(ProfitMandiConstants.PO_TYPE.MANUAL)) {
190
                if (type.equals(ProfitMandiConstants.PO_TYPE.MANUAL)) {
192
                    User user = user_userRepository.selectById(fofoId);
-
 
193
                    throw new ProfitMandiBusinessException("Skipping order due to insufficient balance for id - ", fofoId, user.getName());
191
                    throw new ProfitMandiBusinessException("Skipping order due to insufficient balance for id - ", fofoId, String.valueOf(fofoId));
194
                } else {
192
                } else {
195
                    if (scheduleType.equals(ProfitMandiConstants.BID_CRON_ENUM.TODAY)) {
193
                    if (scheduleType.equals(ProfitMandiConstants.BID_CRON_ENUM.TODAY)) {
196
                        finalBidStatus = bidService.sendMailToRBM(netAmountInHand, totalPayableAmount, fofoId);
194
                        finalBidStatus = bidService.sendMailToRBM(netAmountInHand, totalPayableAmount, fofoId);
197
                        LOGGER.info("Skipping order due to insufficient balance for id - "+ fofoId+ " Sending mail to RBM");
195
                        LOGGER.info("Skipping order due to insufficient balance for id - "+ fofoId+ " Sending mail to RBM");
198
                        //throw new ProfitMandiBusinessException("Skipping order due to insufficient balance for id - ", fofoId, " ,Sending mail to RBM");
196
                        //throw new ProfitMandiBusinessException("Skipping order due to insufficient balance for id - ", fofoId, " ,Sending mail to RBM");