| Line 20... |
Line 20... |
| 20 |
import in.shop2020.model.v1.order.OrderSource;
|
20 |
import in.shop2020.model.v1.order.OrderSource;
|
| 21 |
import in.shop2020.model.v1.order.OrderStatus;
|
21 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 22 |
import in.shop2020.model.v1.order.OrderType;
|
22 |
import in.shop2020.model.v1.order.OrderType;
|
| 23 |
import in.shop2020.model.v1.order.SnapdealOrder;
|
23 |
import in.shop2020.model.v1.order.SnapdealOrder;
|
| 24 |
import in.shop2020.model.v1.order.FlipkartOrder;
|
24 |
import in.shop2020.model.v1.order.FlipkartOrder;
|
| - |
|
25 |
import in.shop2020.model.v1.order.TaxType;
|
| 25 |
import in.shop2020.thrift.clients.CatalogClient;
|
26 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 26 |
import in.shop2020.thrift.clients.LogisticsClient;
|
27 |
import in.shop2020.thrift.clients.LogisticsClient;
|
| 27 |
import in.shop2020.thrift.clients.TransactionClient;
|
28 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 28 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
29 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
| 29 |
import in.shop2020.thrift.clients.InventoryClient;
|
30 |
import in.shop2020.thrift.clients.InventoryClient;
|
| Line 1029... |
Line 1030... |
| 1029 |
double salesTax = (rate * (orderAmount - order.getInsuranceAmount()))/(100 + rate);
|
1030 |
double salesTax = (rate * (orderAmount - order.getInsuranceAmount()))/(100 + rate);
|
| 1030 |
|
1031 |
|
| 1031 |
populateBottomInvoiceTable(order, invoiceTable, rate);
|
1032 |
populateBottomInvoiceTable(order, invoiceTable, rate);
|
| 1032 |
|
1033 |
|
| 1033 |
PdfPCell salesTaxCell = getPriceCell(salesTax);
|
1034 |
PdfPCell salesTaxCell = getPriceCell(salesTax);
|
| 1034 |
|
1035 |
|
| - |
|
1036 |
if(order.getTaxType() == TaxType.CFORM) {
|
| - |
|
1037 |
invoiceTable.addCell(getCFORMLabelCell());
|
| - |
|
1038 |
} else {
|
| 1035 |
invoiceTable.addCell(getVATLabelCell(isVAT));
|
1039 |
invoiceTable.addCell(getVATLabelCell(isVAT));
|
| - |
|
1040 |
}
|
| 1036 |
invoiceTable.addCell(new Phrase(rate + "%", helvetica8));
|
1041 |
invoiceTable.addCell(new Phrase(rate + "%", helvetica8));
|
| 1037 |
invoiceTable.addCell(salesTaxCell);
|
1042 |
invoiceTable.addCell(salesTaxCell);
|
| 1038 |
|
1043 |
|
| 1039 |
if(order.getInsurer() > 0) {
|
1044 |
if(order.getInsurer() > 0) {
|
| 1040 |
invoiceTable.addCell(getInsuranceCell(3));
|
1045 |
invoiceTable.addCell(getInsuranceCell(3));
|
| Line 1114... |
Line 1119... |
| 1114 |
vatCell.setColspan(3);
|
1119 |
vatCell.setColspan(3);
|
| 1115 |
vatCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
|
1120 |
vatCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
|
| 1116 |
return vatCell;
|
1121 |
return vatCell;
|
| 1117 |
}
|
1122 |
}
|
| 1118 |
|
1123 |
|
| - |
|
1124 |
private PdfPCell getCFORMLabelCell() {
|
| - |
|
1125 |
PdfPCell cFormCell = null;
|
| - |
|
1126 |
cFormCell = new PdfPCell(new Phrase("CST Against CForm", helveticaBold8));
|
| - |
|
1127 |
cFormCell.setColspan(3);
|
| - |
|
1128 |
cFormCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
|
| - |
|
1129 |
return cFormCell;
|
| - |
|
1130 |
}
|
| - |
|
1131 |
|
| 1119 |
private PdfPCell getAdvanceAmountCell(int colspan) {
|
1132 |
private PdfPCell getAdvanceAmountCell(int colspan) {
|
| 1120 |
PdfPCell insuranceCell = null;
|
1133 |
PdfPCell insuranceCell = null;
|
| 1121 |
insuranceCell = new PdfPCell(new Phrase("Advance Amount Received", helvetica8));
|
1134 |
insuranceCell = new PdfPCell(new Phrase("Advance Amount Received", helvetica8));
|
| 1122 |
insuranceCell.setColspan(colspan);
|
1135 |
insuranceCell.setColspan(colspan);
|
| 1123 |
insuranceCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
|
1136 |
insuranceCell.setHorizontalAlignment(Element.ALIGN_RIGHT);
|