| Line 952... |
Line 952... |
| 952 |
continue;
|
952 |
continue;
|
| 953 |
}*/
|
953 |
}*/
|
| 954 |
long warehouseId = (long) sheet.getRow(iterator).getCell(1).getNumericCellValue();
|
954 |
long warehouseId = (long) sheet.getRow(iterator).getCell(1).getNumericCellValue();
|
| 955 |
double maxNLC = inventoryClient.getNlcForWarehouse(warehouseId, item.getId());
|
955 |
double maxNLC = inventoryClient.getNlcForWarehouse(warehouseId, item.getId());
|
| 956 |
if (maxNLC==0){
|
956 |
if (maxNLC==0){
|
| 957 |
sb.append(sku + "Max Nlc can't be 0"+"\n");
|
957 |
sb.append(sku + " Max Nlc can't be 0"+"\n");
|
| 958 |
continue;
|
958 |
continue;
|
| 959 |
}
|
959 |
}
|
| 960 |
flipkartItem.setWarehouseId(warehouseId);
|
960 |
flipkartItem.setWarehouseId(warehouseId);
|
| 961 |
flipkartItem.setMaxNlc(maxNLC);
|
961 |
flipkartItem.setMaxNlc(maxNLC);
|
| 962 |
}
|
962 |
}
|
| Line 1066... |
Line 1066... |
| 1066 |
flipkartItem.setCommissionValue(commission);
|
1066 |
flipkartItem.setCommissionValue(commission);
|
| 1067 |
serviceTax = roundTwoDecimals((marketplaceItem.getServiceTax()/100)*(flipkartItem.getCommissionValue()+marketplaceItem.getCourierCost()));
|
1067 |
serviceTax = roundTwoDecimals((marketplaceItem.getServiceTax()/100)*(flipkartItem.getCommissionValue()+marketplaceItem.getCourierCost()));
|
| 1068 |
flipkartItem.setServiceTaxValue(serviceTax);
|
1068 |
flipkartItem.setServiceTaxValue(serviceTax);
|
| 1069 |
double vatRate = catalogClientProd.getVatPercentageForItem(flipkartItem.getItem_id(),warehouse.getStateId(),marketplaceItem.getCurrentSp());
|
1069 |
double vatRate = catalogClientProd.getVatPercentageForItem(flipkartItem.getItem_id(),warehouse.getStateId(),marketplaceItem.getCurrentSp());
|
| 1070 |
marketplaceItem.setVat(vatRate);
|
1070 |
marketplaceItem.setVat(vatRate);
|
| 1071 |
logger.info("itemid is "+flipkartItem.getItem_id());
|
- |
|
| 1072 |
double vat = roundTwoDecimals((marketplaceItem.getCurrentSp()/(1+(marketplaceItem.getVat()/100))-(flipkartItem.getMaxNlc()/(1+(marketplaceItem.getVat()/100))))*(marketplaceItem.getVat()/100));
|
1071 |
double vat = roundTwoDecimals((marketplaceItem.getCurrentSp()/(1+(marketplaceItem.getVat()/100))-(flipkartItem.getMaxNlc()/(1+(marketplaceItem.getVat()/100))))*(marketplaceItem.getVat()/100));
|
| 1073 |
double inHouseCost = roundTwoDecimals(15+vat+(marketplaceItem.getReturnProvision()/100)*marketplaceItem.getCurrentSp()+marketplaceItem.getOtherCost());
|
1072 |
double inHouseCost = roundTwoDecimals(15+vat+(marketplaceItem.getReturnProvision()/100)*marketplaceItem.getCurrentSp()+marketplaceItem.getOtherCost());
|
| 1074 |
double lowest_possible_tp = roundTwoDecimals(flipkartItem.getMaxNlc()+inHouseCost);
|
1073 |
double lowest_possible_tp = roundTwoDecimals(flipkartItem.getMaxNlc()+inHouseCost);
|
| 1075 |
marketplaceItem.setMinimumPossibleTp(lowest_possible_tp);
|
1074 |
marketplaceItem.setMinimumPossibleTp(lowest_possible_tp);
|
| 1076 |
double lowest_possible_sp = roundTwoDecimals((flipkartItem.getMaxNlc()+(marketplaceItem.getCourierCost()+marketplaceItem.getClosingFee())*(1+marketplaceItem.getServiceTax()/100)*(1+(marketplaceItem.getVat()/100))+(15+marketplaceItem.getOtherCost())*(1+(marketplaceItem.getVat())/100))/(1-(marketplaceItem.getCommission()/100+marketplaceItem.getEmiFee()/100)*(1+(marketplaceItem.getServiceTax()/100))*(1+(marketplaceItem.getVat())/100)-(marketplaceItem.getReturnProvision()/100)*(1+(marketplaceItem.getVat())/100)));
|
1075 |
double lowest_possible_sp = roundTwoDecimals((flipkartItem.getMaxNlc()+(marketplaceItem.getCourierCost()+marketplaceItem.getClosingFee())*(1+marketplaceItem.getServiceTax()/100)*(1+(marketplaceItem.getVat()/100))+(15+marketplaceItem.getOtherCost())*(1+(marketplaceItem.getVat())/100))/(1-(marketplaceItem.getCommission()/100+marketplaceItem.getEmiFee()/100)*(1+(marketplaceItem.getServiceTax()/100))*(1+(marketplaceItem.getVat())/100)-(marketplaceItem.getReturnProvision()/100)*(1+(marketplaceItem.getVat())/100)));
|
| Line 1114... |
Line 1113... |
| 1114 |
System.out.println("Unable to stream the manifest file");
|
1113 |
System.out.println("Unable to stream the manifest file");
|
| 1115 |
}
|
1114 |
}
|
| 1116 |
}
|
1115 |
}
|
| 1117 |
|
1116 |
|
| 1118 |
public boolean checkEmptyString(Cell cell){
|
1117 |
public boolean checkEmptyString(Cell cell){
|
| 1119 |
if (cell==null){
|
1118 |
if (cell==null || cell.getCellType() == Cell.CELL_TYPE_BLANK){
|
| 1120 |
return true;
|
1119 |
return true;
|
| 1121 |
}
|
1120 |
}
|
| 1122 |
return false;
|
1121 |
return false;
|
| 1123 |
}
|
1122 |
}
|
| 1124 |
|
1123 |
|