| Line 228... |
Line 228... |
| 228 |
PdfPTable dispatchAdviceTable = null;
|
228 |
PdfPTable dispatchAdviceTable = null;
|
| 229 |
//TODO fix this logic
|
229 |
//TODO fix this logic
|
| 230 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7)) {
|
230 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7)) {
|
| 231 |
if(order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
231 |
if(order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
| 232 |
dispatchAdviceTable = new PdfPTable(1);
|
232 |
dispatchAdviceTable = new PdfPTable(1);
|
| 233 |
} else {
|
233 |
} else {
|
| - |
|
234 |
if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty()) {
|
| - |
|
235 |
dispatchAdviceTable = new PdfPTable(1);
|
| - |
|
236 |
} else {
|
| 234 |
EbayInvoiceGenerationService invoiceGenerationService = new EbayInvoiceGenerationService();
|
237 |
EbayInvoiceGenerationService invoiceGenerationService = new EbayInvoiceGenerationService();
|
| 235 |
dispatchAdviceTable = invoiceGenerationService.getDispatchAdviceTable(orderId, warehouseId);
|
238 |
dispatchAdviceTable = invoiceGenerationService.getDispatchAdviceTable(orderId, warehouseId);
|
| - |
|
239 |
}
|
| 236 |
}
|
240 |
}
|
| 237 |
} else {
|
241 |
} else {
|
| 238 |
|
- |
|
| 239 |
dispatchAdviceTable = getDispatchAdviceTable(order, warehouse, provider, barcodeFontSize, destCode, withBill, shippingLocation);
|
242 |
dispatchAdviceTable = getDispatchAdviceTable(order, warehouse, provider, barcodeFontSize, destCode, withBill, shippingLocation);
|
| 240 |
}
|
243 |
}
|
| 241 |
dispatchAdviceTable.setSpacingAfter(10.0f);
|
244 |
dispatchAdviceTable.setSpacingAfter(10.0f);
|
| 242 |
dispatchAdviceTable.setWidthPercentage(90.0f);
|
245 |
dispatchAdviceTable.setWidthPercentage(90.0f);
|
| 243 |
|
246 |
|
| 244 |
document.add(dispatchAdviceTable);
|
247 |
document.add(dispatchAdviceTable);
|
| 245 |
//TODO fix this logic
|
248 |
//TODO fix this logic
|
| 246 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7)) {
|
249 |
if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7)) {
|
| - |
|
250 |
if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty()
|
| - |
|
251 |
|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
|
| - |
|
252 |
if(withBill){
|
| - |
|
253 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(order, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber());
|
| - |
|
254 |
taxTable.setSpacingBefore(5.0f);
|
| - |
|
255 |
taxTable.setWidthPercentage(90.0f);
|
| - |
|
256 |
document.add(new DottedLineSeparator());
|
| - |
|
257 |
document.add(taxTable);
|
| - |
|
258 |
}else{
|
| - |
|
259 |
PdfPTable extraInfoTable = getExtraInfoTable(order, provider, 16, warehouse.getBillingType());
|
| - |
|
260 |
extraInfoTable.setSpacingBefore(5.0f);
|
| - |
|
261 |
extraInfoTable.setWidthPercentage(90.0f);
|
| - |
|
262 |
document.add(new DottedLineSeparator());
|
| - |
|
263 |
document.add(extraInfoTable);
|
| - |
|
264 |
}
|
| - |
|
265 |
} else {
|
| 247 |
document.newPage();
|
266 |
document.newPage();
|
| - |
|
267 |
}
|
| 248 |
}
|
268 |
}
|
| 249 |
if(withBill){
|
269 |
if(withBill){
|
| 250 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(order, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber());
|
270 |
PdfPTable taxTable = getTaxCumRetailInvoiceTable(order, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber());
|
| 251 |
taxTable.setSpacingBefore(5.0f);
|
271 |
taxTable.setSpacingBefore(5.0f);
|
| 252 |
taxTable.setWidthPercentage(90.0f);
|
272 |
taxTable.setWidthPercentage(90.0f);
|