Subversion Repositories SmartDukaan

Rev

Rev 36791 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36791 Rev 36884
Line 1883... Line 1883...
1883
            }
1883
            }
1884
        }
1884
        }
1885
 
1885
 
1886
        if (PRICE_APPROVAL_EMAIL.equalsIgnoreCase(email)) {
1886
        if (PRICE_APPROVAL_EMAIL.equalsIgnoreCase(email)) {
1887
            canSeePriceApproval = true;
1887
            canSeePriceApproval = true;
-
 
1888
            canSeeAll = true;
1888
        }
1889
        }
1889
 
1890
 
1890
        List<TransactionApprovalModel> approvalModelList;
1891
        List<TransactionApprovalModel> approvalModelList;
1891
        if (canSeeAll || (canSeeFirstPo && canSeePriceApproval)) {
1892
        if (canSeeAll || (canSeeFirstPo && canSeePriceApproval)) {
1892
            approvalModelList = bulkOrderService.getAllPendingTransactionApproval();
1893
            approvalModelList = bulkOrderService.getAllPendingTransactionApproval();
Line 1918... Line 1919...
1918
        if (authUser == null) {
1919
        if (authUser == null) {
1919
            throw new ProfitMandiBusinessException("UNAUTHORIZED", "User not found", "User not found");
1920
            throw new ProfitMandiBusinessException("UNAUTHORIZED", "User not found", "User not found");
1920
        }
1921
        }
1921
 
1922
 
1922
        EscalationType salesLevel = getSalesEscalationLevel(authUser.getId());
1923
        EscalationType salesLevel = getSalesEscalationLevel(authUser.getId());
1923
        boolean isSuperApprover = salesLevel != null && salesLevel.isGreaterThanEqualTo(EscalationType.L4);
1924
        boolean isSuperApprover = (salesLevel != null && salesLevel.isGreaterThanEqualTo(EscalationType.L4))
-
 
1925
                || PRICE_APPROVAL_EMAIL.equalsIgnoreCase(email);
1924
 
1926
 
1925
        if (!isSuperApprover) {
1927
        if (!isSuperApprover) {
1926
            // Verify the user has permission to approve this specific transaction type
1928
            // Verify the user has permission to approve this specific transaction type
1927
            TransactionApproval ta = transactionApprovalRepository.selectById(transactionId);
1929
            TransactionApproval ta = transactionApprovalRepository.selectById(transactionId);
1928
            if (ta.isFirstPo()) {
1930
            if (ta.isFirstPo()) {