Subversion Repositories SmartDukaan

Rev

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

Rev 28390 Rev 28456
Line 780... Line 780...
780
				.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
780
				.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
781
 
781
 
782
		List<CustomPaymentOption> paymentOptions = new ArrayList<>();
782
		List<CustomPaymentOption> paymentOptions = new ArrayList<>();
783
 
783
 
784
		PdfModel pdfModel = new PdfModel();
784
		PdfModel pdfModel = new PdfModel();
785
		pdfModel.setCancelled(fofoOrder.getCancelledTimestamp() != null);
-
 
786
		for (PaymentOptionTransaction paymentOptionTransaction : paymentOptionTransactions) {
785
		for (PaymentOptionTransaction paymentOptionTransaction : paymentOptionTransactions) {
787
			CustomPaymentOption cpi = new CustomPaymentOption();
786
			CustomPaymentOption cpi = new CustomPaymentOption();
788
			cpi.setAmount(paymentOptionTransaction.getAmount());
787
			cpi.setAmount(paymentOptionTransaction.getAmount());
789
			cpi.setPaymentOption(
788
			cpi.setPaymentOption(
790
					paymentOptionRepository.selectById(paymentOptionTransaction.getPaymentOptionId()).getName());
789
					paymentOptionRepository.selectById(paymentOptionTransaction.getPaymentOptionId()).getName());
Line 820... Line 819...
820
			customInsurancePolicy.setSgstAmount(taxableInsurancePrice * 9 / 100);
819
			customInsurancePolicy.setSgstAmount(taxableInsurancePrice * 9 / 100);
821
			customInsurancePolicy.setNetAmount(insurancePolicy.getSaleAmount());
820
			customInsurancePolicy.setNetAmount(insurancePolicy.getSaleAmount());
822
			customInsurancePolicies.add(customInsurancePolicy);
821
			customInsurancePolicies.add(customInsurancePolicy);
823
		}
822
		}
824
		pdfModel.setInsurancePolicies(customInsurancePolicies);
823
		pdfModel.setInsurancePolicies(customInsurancePolicies);
825
		List<String> tncs = new ArrayList<>();
-
 
826
		tncs.add("I agree that goods received are in good working condition");
-
 
827
		tncs.add("Goods once sold cannot be exchanged or taken back");
-
 
828
		tncs.add("Warranty for the goods received by me is the responsibility of the manufacturer only.");
-
 
829
		tncs.add(
-
 
830
				"Tempered Glass Replacement will be done only for the Mobile Phone which was purchased from SmartDukaan");
-
 
831
		tncs.add(
-
 
832
				"Customers requesting Tempered Glass Replacement will have to bring the broken tempered glass, either pasted on the phone or along with the phone");
-
 
833
		tncs.add("Service fee of Rs.20 will be chargeable for each Tempered Glass Replacement");
-
 
834
		if (pdfModel.getInsurancePolicies() != null && pdfModel.getInsurancePolicies().size() > 0) {
-
 
835
			tncs.add("Damage protection provided is the responisibility of Protection Provider only");
-
 
836
		}
-
 
837
		pdfModel.setTncs(tncs);
-
 
838
 
824
 
839
		pdfModel.setCustomer(getCustomCustomer(fofoOrder));
825
		pdfModel.setCustomer(getCustomCustomer(fofoOrder));
840
		pdfModel.setInvoiceNumber(fofoOrder.getInvoiceNumber());
826
		pdfModel.setInvoiceNumber(fofoOrder.getInvoiceNumber());
841
		pdfModel.setTotalAmount(fofoOrder.getTotalAmount());
827
		pdfModel.setTotalAmount(fofoOrder.getTotalAmount());
842
 
828
 
Line 908... Line 894...
908
				.getCode();
894
				.getCode();
909
		String customerAddressStateCode = stateRepository.selectByName(pdfModel.getCustomer().getAddress().getState())
895
		String customerAddressStateCode = stateRepository.selectByName(pdfModel.getCustomer().getAddress().getState())
910
				.getCode();
896
				.getCode();
911
		pdfModel.setPartnerAddressStateCode(partnerAddressStateCode);
897
		pdfModel.setPartnerAddressStateCode(partnerAddressStateCode);
912
		pdfModel.setCustomerAddressStateCode(customerAddressStateCode);
898
		pdfModel.setCustomerAddressStateCode(customerAddressStateCode);
-
 
899
		pdfModel.setCancelled(pdfModel.setCancelled(fofoOrder.getCancelledTimestamp() != null));
-
 
900
		List<String> tncs = new ArrayList<>();
-
 
901
		tncs.add("I agree that goods received are in good working condition");
-
 
902
		tncs.add("Goods once sold cannot be exchanged or taken back");
-
 
903
		tncs.add("Warranty for the goods received by me is the responsibility of the manufacturer only.");
-
 
904
		tncs.add("Customer needs to activate the handset at the time of delivery to be eligible for the discount");
-
 
905
		tncs.add(
-
 
906
				"Tempered Glass Replacement will be done only for the Mobile Phone which was purchased from SmartDukaan");
-
 
907
		tncs.add(
-
 
908
				"Customers requesting Tempered Glass Replacement will have to bring the broken tempered glass, either pasted on the phone or along with the phone");
-
 
909
		tncs.add("Service fee of Rs.20 will be chargeable for each Tempered Glass Replacement");
-
 
910
		if (pdfModel.getInsurancePolicies() != null && pdfModel.getInsurancePolicies().size() > 0) {
-
 
911
			tncs.add("Damage protection provided is the responisibility of Protection Provider only");
-
 
912
		}
913
		pdfModel.setCancelled(false);
913
		pdfModel.setTncs(tncs);
914
		return pdfModel;
914
		return pdfModel;
915
 
915
 
916
	}
916
	}
917
 
917
 
918
	private CustomCustomer getCustomCustomer(FofoOrder fofoOrder) throws ProfitMandiBusinessException {
918
	private CustomCustomer getCustomCustomer(FofoOrder fofoOrder) throws ProfitMandiBusinessException {