| Line 1007... |
Line 1007... |
| 1007 |
final float totalInsuranceTaxRate = 18;
|
1007 |
final float totalInsuranceTaxRate = 18;
|
| 1008 |
for(InsurancePolicy insurancePolicy : insurancePolicies){
|
1008 |
for(InsurancePolicy insurancePolicy : insurancePolicies){
|
| 1009 |
float taxableInsurancePrice = insurancePolicy.getSaleAmount() / (1 + totalInsuranceTaxRate / 100);
|
1009 |
float taxableInsurancePrice = insurancePolicy.getSaleAmount() / (1 + totalInsuranceTaxRate / 100);
|
| 1010 |
CustomInsurancePolicy customInsurancePolicy = new CustomInsurancePolicy();
|
1010 |
CustomInsurancePolicy customInsurancePolicy = new CustomInsurancePolicy();
|
| 1011 |
customInsurancePolicy.setDescription("Damage Protection Plan for device IMEI #" + insurancePolicy.getSerialNumber() + "\n Certificate No. " + insurancePolicy.getPolicyNumber());
|
1011 |
customInsurancePolicy.setDescription("Damage Protection Plan for device IMEI #" + insurancePolicy.getSerialNumber() + "\n Certificate No. " + insurancePolicy.getPolicyNumber());
|
| 1012 |
customInsurancePolicy.setHsnCode("");
|
1012 |
customInsurancePolicy.setHsnCode("998716");
|
| 1013 |
customInsurancePolicy.setRate(taxableInsurancePrice);
|
1013 |
customInsurancePolicy.setRate(taxableInsurancePrice);
|
| 1014 |
customInsurancePolicy.setIgstRate(18);
|
1014 |
customInsurancePolicy.setIgstRate(18);
|
| 1015 |
customInsurancePolicy.setIgstAmount(taxableInsurancePrice * 18 /100);
|
1015 |
customInsurancePolicy.setIgstAmount(taxableInsurancePrice * 18 /100);
|
| 1016 |
customInsurancePolicy.setCgstRate(18);
|
1016 |
customInsurancePolicy.setCgstRate(18);
|
| 1017 |
customInsurancePolicy.setCgstAmount(taxableInsurancePrice * 9 /100);
|
1017 |
customInsurancePolicy.setCgstAmount(taxableInsurancePrice * 9 /100);
|
| 1018 |
customInsurancePolicy.setSgstRate(9);
|
1018 |
customInsurancePolicy.setSgstRate(9);
|
| 1019 |
customInsurancePolicy.setSgstAmount(taxableInsurancePrice * 9 /100);
|
1019 |
customInsurancePolicy.setSgstAmount(taxableInsurancePrice * 9 /100);
|
| - |
|
1020 |
customInsurancePolicy.setNetAmount(insurancePolicy.getSaleAmount());
|
| 1020 |
customInsurancePolicies.add(customInsurancePolicy);
|
1021 |
customInsurancePolicies.add(customInsurancePolicy);
|
| 1021 |
}
|
1022 |
}
|
| 1022 |
pdfModel.setInsurancePolicies(customInsurancePolicies);
|
1023 |
pdfModel.setInsurancePolicies(customInsurancePolicies);
|
| 1023 |
Customer customer = customerRepository.selectById(fofoOrder.getCustomerId());
|
1024 |
Customer customer = customerRepository.selectById(fofoOrder.getCustomerId());
|
| 1024 |
CustomCustomer customCustomer = new CustomCustomer();
|
1025 |
CustomCustomer customCustomer = new CustomCustomer();
|
| Line 1070... |
Line 1071... |
| 1070 |
customFofoOrderItem.setAmount(fofoLineItem.getQuantity() * (taxableSellingPrice-taxableDiscountPrice));
|
1071 |
customFofoOrderItem.setAmount(fofoLineItem.getQuantity() * (taxableSellingPrice-taxableDiscountPrice));
|
| 1071 |
customFofoOrderItem.setDescription(fofoLineItem.getBrand() + " " + fofoLineItem.getModelName() + " " + fofoLineItem.getModelNumber() + "-" + fofoLineItem.getColor() + "\n IMEIS - " + String.join(", ",this.toSerialNumbers(fofoLineItem.getFofoLineItemSerialNumbers())));
|
1072 |
customFofoOrderItem.setDescription(fofoLineItem.getBrand() + " " + fofoLineItem.getModelName() + " " + fofoLineItem.getModelNumber() + "-" + fofoLineItem.getColor() + "\n IMEIS - " + String.join(", ",this.toSerialNumbers(fofoLineItem.getFofoLineItemSerialNumbers())));
|
| 1072 |
customFofoOrderItem.setRate(taxableSellingPrice);
|
1073 |
customFofoOrderItem.setRate(taxableSellingPrice);
|
| 1073 |
customFofoOrderItem.setDiscount(taxableDiscountPrice);
|
1074 |
customFofoOrderItem.setDiscount(taxableDiscountPrice);
|
| 1074 |
customFofoOrderItem.setQuantity(fofoLineItem.getQuantity());
|
1075 |
customFofoOrderItem.setQuantity(fofoLineItem.getQuantity());
|
| - |
|
1076 |
customFofoOrderItem.setNetAmount((fofoLineItem.getSellingPrice()-fofoLineItem.getDiscount())*fofoLineItem.getQuantity());
|
| 1075 |
float igstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getIgstRate()) / 100;
|
1077 |
float igstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getIgstRate()) / 100;
|
| 1076 |
float cgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getCgstRate()) / 100;
|
1078 |
float cgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getCgstRate()) / 100;
|
| 1077 |
float sgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getSgstRate()) / 100;
|
1079 |
float sgstAmount = (customFofoOrderItem.getAmount() * fofoLineItem.getSgstRate()) / 100;
|
| 1078 |
customFofoOrderItem.setIgstRate(fofoLineItem.getIgstRate());
|
1080 |
customFofoOrderItem.setIgstRate(fofoLineItem.getIgstRate());
|
| 1079 |
customFofoOrderItem.setIgstAmount(igstAmount);
|
1081 |
customFofoOrderItem.setIgstAmount(igstAmount);
|