Subversion Repositories SmartDukaan

Rev

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

Rev 32765 Rev 32977
Line 762... Line 762...
762
        int totalAmount = 0;
762
        int totalAmount = 0;
763
        int totalQty = 0;
763
        int totalQty = 0;
764
        for (CartItem cartItem : cartItems) {
764
        for (CartItem cartItem : cartItems) {
765
            Item item = itemsMap.get(cartItem.getItemId());
765
            Item item = itemsMap.get(cartItem.getItemId());
766
            TagListing tagListing = tagListingMap.get(cartItem.getItemId());
766
            TagListing tagListing = tagListingMap.get(cartItem.getItemId());
-
 
767
            int catalogId = itemsMap.get(cartItem.getItemId()).getCatalogItemId();
767
            Float cashback = schemeService.getCatalogSchemeCashBack().get(itemsMap.get(cartItem.getItemId()).getCatalogItemId());
768
            Float cashback = schemeService.getCatalogSchemeCashBack(storeId, Arrays.asList(catalogId))
-
 
769
                    .get(itemsMap.get(cartItem.getItemId()).getCatalogItemId());
768
            cashback = cashback == null ? 0 : cashback;
770
            cashback = cashback == null ? 0 : cashback;
769
            float itemSellingPrice = tagListing.getMop() - cashback;
771
            float itemSellingPrice = tagListing.getMop() - cashback;
770
            CartItemResponseModel cartItemResponseModel = new CartItemResponseModel();
772
            CartItemResponseModel cartItemResponseModel = new CartItemResponseModel();
771
            cartItemResponseModel.setSellingPrice(cartItem.getSellingPrice());
773
            cartItemResponseModel.setSellingPrice(cartItem.getSellingPrice());
772
            if (itemSellingPrice != cartItem.getSellingPrice()) {
774
            if (itemSellingPrice != cartItem.getSellingPrice()) {
Line 896... Line 898...
896
                        fdi.setMrp(childItem.getDouble("mrp_f"));
898
                        fdi.setMrp(childItem.getDouble("mrp_f"));
897
                        fdi.setMop((float) childItem.getDouble("mop_f"));
899
                        fdi.setMop((float) childItem.getDouble("mop_f"));
898
                        fdi.setColor(childItem.has("color_s") ? childItem.getString("color_s") : "");
900
                        fdi.setColor(childItem.has("color_s") ? childItem.getString("color_s") : "");
899
                        fdi.setTagId(childItem.getInt("tagId_i"));
901
                        fdi.setTagId(childItem.getInt("tagId_i"));
900
                        fdi.setItem_id(itemId);
902
                        fdi.setItem_id(itemId);
901
                        Float cashBack = schemeService.getCatalogSchemeCashBack().get(ffdr.getCatalogId());
903
                        Float cashBack = schemeService.getCatalogSchemeCashBack(fofoId, Arrays.asList(ffdr.getCatalogId())).get(ffdr.getCatalogId());
902
                        cashBack = cashBack == null ? 0 : cashBack;
904
                        cashBack = cashBack == null ? 0 : cashBack;
903
                        // TODO:Dont commit
905
                        // TODO:Dont commit
904
                        // fdi.setCashback(Math.min(100, fdi.getMop()));
906
                        // fdi.setCashback(Math.min(100, fdi.getMop()));
905
                        fdi.setCashback(cashBack);
907
                        fdi.setCashback(cashBack);
906
                        fdi.setMinBuyQuantity(1);
908
                        fdi.setMinBuyQuantity(1);