Subversion Repositories SmartDukaan

Rev

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

Rev 34353 Rev 34354
Line 843... Line 843...
843
                if ((selectedGift == ScratchedGift.LED || selectedGift == ScratchedGift.MICROWAVE_OVEN)
843
                if ((selectedGift == ScratchedGift.LED || selectedGift == ScratchedGift.MICROWAVE_OVEN)
844
                        && (ledCount > 0 && ovenCount > 0)) {
844
                        && (ledCount > 0 && ovenCount > 0)) {
845
                    LOGGER.info("Both LED and Microwave Oven already given today.");
845
                    LOGGER.info("Both LED and Microwave Oven already given today.");
846
                    return ScratchedGift.ACCESSORIES_50_PERCENT_OFF;
846
                    return ScratchedGift.ACCESSORIES_50_PERCENT_OFF;
847
                }
847
                }
-
 
848
 
-
 
849
                if ((selectedGift == ScratchedGift.LED && ledCount > 0)) {
-
 
850
                    LOGGER.info("LED already given today.");
-
 
851
                    return ScratchedGift.ACCESSORIES_50_PERCENT_OFF;
-
 
852
                }
-
 
853
                if ((selectedGift == ScratchedGift.MICROWAVE_OVEN && ovenCount > 0)) {
-
 
854
                    LOGGER.info("Oven already given today.");
-
 
855
                    return ScratchedGift.ACCESSORIES_50_PERCENT_OFF;
-
 
856
                }
848
            }
857
            }
849
 
858
 
850
            //  Ensure only one Neckband per partner per day
859
            //  Ensure only one Neckband per partner per day
851
            if (selectedGift == ScratchedGift.NECK_BAND) {
860
            if (selectedGift == ScratchedGift.NECK_BAND) {
852
                List<FofoOrder> fofoOrders = fofoOrderRepository.selectByFofoId(fofoId, startDateTime, endDateTime, 0, 0);
861
                List<FofoOrder> fofoOrders = fofoOrderRepository.selectByFofoId(fofoId, startDateTime, endDateTime, 0, 0);