| Line 198... |
Line 198... |
| 198 |
List<File> attachments = this.savePolicyDocs(insurancePolicy.getPolicyNumber(), byteArrayOutputStream, deviceImg, deviceInvoiceImg);
|
198 |
List<File> attachments = this.savePolicyDocs(insurancePolicy.getPolicyNumber(), byteArrayOutputStream, deviceImg, deviceInvoiceImg);
|
| 199 |
messageText += "\n Please find your Invoice, and documents submitted by you.";
|
199 |
messageText += "\n Please find your Invoice, and documents submitted by you.";
|
| 200 |
String subject = "Your Gadget Cop damage Protection purchase is successful";
|
200 |
String subject = "Your Gadget Cop damage Protection purchase is successful";
|
| 201 |
this.sendMailWithAttachments(insuranceModel.getCustomerEmailId() , subject, messageText, attachments);
|
201 |
this.sendMailWithAttachments(insuranceModel.getCustomerEmailId() , subject, messageText, attachments);
|
| 202 |
|
202 |
|
| 203 |
float taxableInsuranceMargin = insurancePolicy.getSaleAmount() / (1 + ProfitMandiConstants.INSURANCE_TAX_RATE / 100);
|
203 |
float taxableInsuranceMargin = (insurancePolicy.getSaleAmount() - insurancePolicy.getPurchaseAmount()) / (1 + ProfitMandiConstants.INSURANCE_TAX_RATE / 100);
|
| 204 |
walletService.addAmountToWallet(uc.getUserId(), insurancePolicy.getId(), WalletReferenceType.CASHBACK, "Cashback against insurance policy",
|
204 |
walletService.addAmountToWallet(uc.getUserId(), insurancePolicy.getId(), WalletReferenceType.CASHBACK, "Cashback against insurance policy",
|
| 205 |
taxableInsuranceMargin);
|
205 |
taxableInsuranceMargin);
|
| 206 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
206 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 207 |
return responseSender.ok(true);
|
207 |
return responseSender.ok(true);
|
| 208 |
}
|
208 |
}
|