Subversion Repositories SmartDukaan

Rev

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

Rev 9328 Rev 9331
Line 112... Line 112...
112
        for (Row row : sheet) {
112
        for (Row row : sheet) {
113
            if(row.equals(firstRow))
113
            if(row.equals(firstRow))
114
                continue;
114
                continue;
115
            logger.info("Row no. " + row.getRowNum());
115
            logger.info("Row no. " + row.getRowNum());
116
            long itemId = (long)row.getCell(0).getNumericCellValue();
116
            long itemId = (long)row.getCell(0).getNumericCellValue();
117
            double mrp = row.getCell(1).getNumericCellValue();
117
            double mrp = Math.round(row.getCell(1).getNumericCellValue());
118
            double sellingPrice = row.getCell(2).getNumericCellValue();
118
            double sellingPrice = Math.round(row.getCell(2).getNumericCellValue());
119
            double mop = row.getCell(3).getNumericCellValue();
119
            double mop = Math.round(row.getCell(3).getNumericCellValue());
120
            double dealerPrice = row.getCell(4).getNumericCellValue();
120
            double dealerPrice = Math.round(row.getCell(4).getNumericCellValue());
121
            double transferPrice = row.getCell(5).getNumericCellValue();
121
            double transferPrice = Math.round(row.getCell(5).getNumericCellValue());
122
            double nlc = row.getCell(6).getNumericCellValue();
122
            double nlc = Math.round(row.getCell(6).getNumericCellValue());
123
            Item item = catClient.getItem(itemId);
123
            Item item = catClient.getItem(itemId);
124
            if(sellingPrice != item.getSellingPrice() || mrp != item.getMrp()){
124
            if(sellingPrice != item.getSellingPrice() || mrp != item.getMrp()){
125
            	item.setSellingPrice(sellingPrice);
125
            	item.setSellingPrice(sellingPrice);
126
            	item.setMrp(mrp);
126
            	item.setMrp(mrp);
127
            	catClient.updateItem(item);
127
            	catClient.updateItem(item);