Subversion Repositories SmartDukaan

Rev

Rev 19973 | Rev 19979 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19973 Rev 19976
Line 326... Line 326...
326
					
326
					
327
					if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
327
					if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
328
						if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty() 
328
						if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty() 
329
								|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
329
								|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
330
							if(withBill){
330
							if(withBill){
331
								PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber(), invoiceFormat);
331
								PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , sellerInfo.getTin(), invoiceFormat);
332
								taxTable.setSpacingBefore(5.0f);
332
								taxTable.setSpacingBefore(5.0f);
333
								taxTable.setWidthPercentage(90.0f);
333
								taxTable.setWidthPercentage(90.0f);
334
								document.add(new DottedLineSeparator());
334
								document.add(new DottedLineSeparator());
335
								document.add(taxTable);
335
								document.add(taxTable);
336
							}else{
336
							}else{
Line 343... Line 343...
343
						} else {
343
						} else {
344
							document.newPage();
344
							document.newPage();
345
						}
345
						}
346
					} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
346
					} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
347
						if(withBill){
347
						if(withBill){
348
							PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber(), invoiceFormat);
348
							PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , sellerInfo.getTin(), invoiceFormat);
349
							taxTable.setSpacingBefore(5.0f);
349
							taxTable.setSpacingBefore(5.0f);
350
							taxTable.setWidthPercentage(90.0f);
350
							taxTable.setWidthPercentage(90.0f);
351
							document.add(new DottedLineSeparator());
351
							document.add(new DottedLineSeparator());
352
							document.add(taxTable);
352
							document.add(taxTable);
353
						}else{
353
						}else{
Line 357... Line 357...
357
							document.add(new DottedLineSeparator());
357
							document.add(new DottedLineSeparator());
358
							document.add(extraInfoTable);
358
							document.add(extraInfoTable);
359
						}
359
						}
360
					}
360
					}
361
					if(withBill){
361
					if(withBill){
362
						PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber(), invoiceFormat);
362
						PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
363
						taxTable.setSpacingBefore(5.0f);
363
						taxTable.setSpacingBefore(5.0f);
364
						taxTable.setWidthPercentage(90.0f);
364
						taxTable.setWidthPercentage(90.0f);
365
						document.add(new DottedLineSeparator());
365
						document.add(new DottedLineSeparator());
366
						document.add(taxTable);
366
						document.add(taxTable);
367
						if(order.getSource() == OrderSource.FLIPKART.getValue()) {
367
						if(order.getSource() == OrderSource.FLIPKART.getValue()) {
Line 512... Line 512...
512
					
512
					
513
					if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
513
					if ((new Long(order.getSource()).intValue() == OrderSource.EBAY.getValue()) && (order.getLogistics_provider_id()>7) &&(ordersList.size()==1)) {
514
						if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty() 
514
						if (order.getAirwaybill_no()== null || order.getAirwaybill_no().equals("null") || order.getAirwaybill_no().isEmpty() 
515
								|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
515
								|| order.getWarehouse_id() == 7 || order.getWarehouse_id() == 5 || order.getWarehouse_id() == 9) {
516
							if(withBill){
516
							if(withBill){
517
								PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber(), invoiceFormat);
517
								PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
518
								taxTable.setSpacingBefore(5.0f);
518
								taxTable.setSpacingBefore(5.0f);
519
								taxTable.setWidthPercentage(90.0f);
519
								taxTable.setWidthPercentage(90.0f);
520
								document.add(new DottedLineSeparator());
520
								document.add(new DottedLineSeparator());
521
								document.add(taxTable);
521
								document.add(taxTable);
522
							}else{
522
							}else{
Line 529... Line 529...
529
						} else {
529
						} else {
530
							document.newPage();
530
							document.newPage();
531
						}
531
						}
532
					} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
532
					} else if (new Long(order.getSource()).intValue() == OrderSource.SNAPDEAL.getValue() &&(ordersList.size()==1)) {
533
						if(withBill){
533
						if(withBill){
534
							PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber(), invoiceFormat);
534
							PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
535
							taxTable.setSpacingBefore(5.0f);
535
							taxTable.setSpacingBefore(5.0f);
536
							taxTable.setWidthPercentage(90.0f);
536
							taxTable.setWidthPercentage(90.0f);
537
							document.add(new DottedLineSeparator());
537
							document.add(new DottedLineSeparator());
538
							document.add(taxTable);
538
							document.add(taxTable);
539
						}else{
539
						}else{
Line 543... Line 543...
543
							document.add(new DottedLineSeparator());
543
							document.add(new DottedLineSeparator());
544
							document.add(extraInfoTable);
544
							document.add(extraInfoTable);
545
						}
545
						}
546
					}
546
					}
547
					if(withBill){
547
					if(withBill){
548
						PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , shippingLocation.getTinNumber(), invoiceFormat);
548
						PdfPTable taxTable = getTaxCumRetailInvoiceTable(ordersList, provider, shippingLocation.getLocation() + "-" + shippingLocation.getPincode() , this.sellerInfo.getTin(), invoiceFormat);
549
						taxTable.setSpacingBefore(5.0f);
549
						taxTable.setSpacingBefore(5.0f);
550
						taxTable.setWidthPercentage(90.0f);
550
						taxTable.setWidthPercentage(90.0f);
551
						document.add(new DottedLineSeparator());
551
						document.add(new DottedLineSeparator());
552
						document.add(taxTable);
552
						document.add(taxTable);
553
						if(order.getSource() == OrderSource.FLIPKART.getValue()) {
553
						if(order.getSource() == OrderSource.FLIPKART.getValue()) {
Line 759... Line 759...
759
		dispatchTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
759
		dispatchTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
760
		dispatchTable.addCell(customerTable);
760
		dispatchTable.addCell(customerTable);
761
		dispatchTable.addCell(new Phrase(" "));
761
		dispatchTable.addCell(new Phrase(" "));
762
		dispatchTable.addCell(providerInfoTable);
762
		dispatchTable.addCell(providerInfoTable);
763
 
763
 
764
		PdfPTable invoiceTable = getTopInvoiceTable(orderList, shippingLocation.getTinNumber(), invoiceFormat);
764
		PdfPTable invoiceTable = getTopInvoiceTable(orderList, this.sellerInfo.getTin(), invoiceFormat);
765
		PdfPTable addressTable = new PdfPTable(1);
765
		PdfPTable addressTable = new PdfPTable(1);
766
		addressTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
766
		addressTable.getDefaultCell().setBorder(Rectangle.NO_BORDER);
767
		addressTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
767
		addressTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
768
		
768
		
769
		PdfPCell addressCell = getAddressCell(shippingLocation.getLocation() +
769
		PdfPCell addressCell = getAddressCell(shippingLocation.getLocation() +