| Line 764... |
Line 764... |
| 764 |
return "schemes-partner";
|
764 |
return "schemes-partner";
|
| 765 |
}
|
765 |
}
|
| 766 |
|
766 |
|
| 767 |
}
|
767 |
}
|
| 768 |
|
768 |
|
| 769 |
private int getNlc(Item item, int fofoId, List<Scheme> schemes, TagListing tagListing)
|
769 |
private int getNlc(Item item, int fofoId, List<Scheme> schemes, TagListing tagListing) {
|
| 770 |
throws ProfitMandiBusinessException {
|
- |
|
| 771 |
int itemId = item.getId();
|
- |
|
| 772 |
if (item.getBrand().equals("Vivo") && fofoStoreRepository.getWarehousePartnerMap().get(7720).stream()
|
770 |
if (item.getBrand().equals("Vivo") && fofoStoreRepository.getWarehousePartnerMap().get(7720).stream()
|
| 773 |
.filter(x -> x.getId() == fofoId).count() > 0) {
|
771 |
.filter(x -> x.getId() == fofoId).count() > 0) {
|
| 774 |
schemes = schemes.stream().filter(x -> !x.getType().equals(SchemeType.INVESTMENT))
|
772 |
schemes = schemes.stream().filter(x -> !x.getType().equals(SchemeType.INVESTMENT))
|
| 775 |
.collect(Collectors.toList());
|
773 |
.collect(Collectors.toList());
|
| 776 |
}
|
774 |
}
|
| 777 |
float nlc = tagListing.getSellingPrice();
|
775 |
float nlc = tagListing.getSellingPrice();
|
| 778 |
for (Scheme scheme : schemes) {
|
776 |
for (Scheme scheme : schemes) {
|
| 779 |
if (scheme.getAmountType().equals(AmountType.PERCENTAGE)) {
|
777 |
if (scheme.getAmountType().equals(AmountType.PERCENTAGE)) {
|
| 780 |
if (tagListing != null) {
|
778 |
if (tagListing != null) {
|
| 781 |
float taxRate = stateGstRateRepository.getIgstTaxRate(Arrays.asList(itemId)).get(itemId);
|
- |
|
| 782 |
float taxableSellingPrice = tagListing.getSellingPrice() / (1 + taxRate / 100);
|
- |
|
| 783 |
float amount = taxableSellingPrice * scheme.getAmount() / 100;
|
779 |
float amount = tagListing.getSellingPrice() * scheme.getAmount() / 100;
|
| 784 |
scheme.setAmountModel(FormattingUtils.formatDecimal(amount) + " (" + scheme.getAmount() + "%)");
|
780 |
scheme.setAmountModel(FormattingUtils.formatDecimal(amount) + " (" + scheme.getAmount() + "%)");
|
| 785 |
nlc -= amount;
|
781 |
nlc -= amount;
|
| 786 |
} else {
|
782 |
} else {
|
| 787 |
scheme.setAmountModel(scheme.getAmount() + "%");
|
783 |
scheme.setAmountModel(scheme.getAmount() + "%");
|
| 788 |
}
|
784 |
}
|