| Line 7... |
Line 7... |
| 7 |
import java.io.OutputStream;
|
7 |
import java.io.OutputStream;
|
| 8 |
import java.text.MessageFormat;
|
8 |
import java.text.MessageFormat;
|
| 9 |
import java.time.LocalDate;
|
9 |
import java.time.LocalDate;
|
| 10 |
import java.time.LocalDateTime;
|
10 |
import java.time.LocalDateTime;
|
| 11 |
import java.time.format.DateTimeFormatter;
|
11 |
import java.time.format.DateTimeFormatter;
|
| 12 |
import java.util.Arrays;
|
- |
|
| 13 |
import java.util.HashSet;
|
- |
|
| 14 |
import java.util.List;
|
- |
|
| 15 |
import java.util.Map;
|
- |
|
| 16 |
import java.util.Set;
|
12 |
import java.util.*;
|
| 17 |
import java.util.stream.Collectors;
|
13 |
import java.util.stream.Collectors;
|
| 18 |
|
14 |
|
| 19 |
import javax.mail.internet.InternetAddress;
|
15 |
import javax.mail.internet.InternetAddress;
|
| 20 |
import javax.mail.internet.MimeMessage;
|
16 |
import javax.mail.internet.MimeMessage;
|
| 21 |
import javax.servlet.http.HttpServletRequest;
|
17 |
import javax.servlet.http.HttpServletRequest;
|
| Line 300... |
Line 296... |
| 300 |
pdfModel.setAuther("profitmandi");
|
296 |
pdfModel.setAuther("profitmandi");
|
| 301 |
pdfModel.setTitle("Retailer Invoice");
|
297 |
pdfModel.setTitle("Retailer Invoice");
|
| 302 |
pdfModel.setInvoiceDate(getFormattedDate(insurancePolicy.getCreateTimestamp()));
|
298 |
pdfModel.setInvoiceDate(getFormattedDate(insurancePolicy.getCreateTimestamp()));
|
| 303 |
|
299 |
|
| 304 |
// insurance calculation
|
300 |
// insurance calculation
|
| 305 |
Set<CustomInsurancePolicy> customInsurancePolicies = new HashSet<>();
|
301 |
List<CustomInsurancePolicy> customInsurancePolicies = new ArrayList<>();
|
| 306 |
final float totalInsuranceTaxRate = 18;
|
302 |
final float totalInsuranceTaxRate = 18;
|
| 307 |
|
303 |
|
| 308 |
float taxableInsurancePrice = insurancePolicy.getSaleAmount() / (1 + totalInsuranceTaxRate / 100);
|
304 |
float taxableInsurancePrice = insurancePolicy.getSaleAmount() / (1 + totalInsuranceTaxRate / 100);
|
| 309 |
CustomInsurancePolicy customInsurancePolicy = new CustomInsurancePolicy();
|
305 |
CustomInsurancePolicy customInsurancePolicy = new CustomInsurancePolicy();
|
| 310 |
customInsurancePolicy.setDescription("Damage Protection Plan for device IMEI #"
|
306 |
customInsurancePolicy.setDescription("Damage Protection Plan for device IMEI #"
|
| Line 363... |
Line 359... |
| 363 |
providerAddress.setState(damageProtectionProvider.getState());
|
359 |
providerAddress.setState(damageProtectionProvider.getState());
|
| 364 |
|
360 |
|
| 365 |
customRetailer.setAddress(providerAddress);
|
361 |
customRetailer.setAddress(providerAddress);
|
| 366 |
pdfModel.setRetailer(customRetailer);
|
362 |
pdfModel.setRetailer(customRetailer);
|
| 367 |
|
363 |
|
| 368 |
Set<CustomOrderItem> customerFofoOrderItems = new HashSet<>();
|
364 |
List<CustomOrderItem> customerFofoOrderItems = new ArrayList<>();
|
| 369 |
pdfModel.setOrderItems(customerFofoOrderItems);
|
365 |
pdfModel.setOrderItems(customerFofoOrderItems);
|
| 370 |
pdfModel.setTncs(Arrays.asList("Please check out Policy Schedule for detailed terms and conditions."));
|
366 |
pdfModel.setTncs(Arrays.asList("Please check out Policy Schedule for detailed terms and conditions."));
|
| 371 |
return pdfModel;
|
367 |
return pdfModel;
|
| 372 |
}
|
368 |
}
|
| 373 |
|
369 |
|