Subversion Repositories SmartDukaan

Rev

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

Rev 23546 Rev 23552
Line 72... Line 72...
72
import com.spice.profitmandi.dao.entity.user.PrivateDealUser;
72
import com.spice.profitmandi.dao.entity.user.PrivateDealUser;
73
import com.spice.profitmandi.dao.enumuration.dtr.OtpType;
73
import com.spice.profitmandi.dao.enumuration.dtr.OtpType;
74
import com.spice.profitmandi.dao.enumuration.dtr.PaymentOptionReferenceType;
74
import com.spice.profitmandi.dao.enumuration.dtr.PaymentOptionReferenceType;
75
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
75
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
76
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
76
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
77
import com.spice.profitmandi.dao.repository.dtr.PaymentOptionTransactionRepository;
-
 
78
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
77
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
79
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
78
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
80
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
79
import com.spice.profitmandi.dao.repository.dtr.InsuranceProviderRepository;
81
import com.spice.profitmandi.dao.repository.dtr.OtpRepository;
80
import com.spice.profitmandi.dao.repository.dtr.OtpRepository;
-
 
81
import com.spice.profitmandi.dao.repository.dtr.PaymentOptionTransactionRepository;
82
import com.spice.profitmandi.dao.repository.dtr.PolicyNumberGenerationSequenceRepository;
82
import com.spice.profitmandi.dao.repository.dtr.PolicyNumberGenerationSequenceRepository;
83
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
83
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
84
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
84
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
85
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
85
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
86
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
86
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
Line 571... Line 571...
571
	@Override
571
	@Override
572
	public PdfModel getInvoicePdfModel(int fofoId, int orderId) throws ProfitMandiBusinessException {
572
	public PdfModel getInvoicePdfModel(int fofoId, int orderId) throws ProfitMandiBusinessException {
573
		
573
		
574
		FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoId, orderId);
574
		FofoOrder fofoOrder = fofoOrderRepository.selectByFofoIdAndOrderId(fofoId, orderId);
575
		
575
		
-
 
576
		List<PaymentOptionTransaction> paymentOptionTransactions = paymentOptionTransactionRepository.selectByReferenceIdAndType(fofoOrder.getId(), PaymentOptionReferenceType.ORDER);
-
 
577
		
-
 
578
		List<CustomPaymentOption> paymentOptions = new ArrayList<>();
-
 
579
 
576
		PdfModel pdfModel = new PdfModel();
580
		PdfModel pdfModel = new PdfModel();
-
 
581
		
-
 
582
		for(PaymentOptionTransaction paymentOptionTransaction : paymentOptionTransactions) {
-
 
583
			CustomPaymentOption cpi = new CustomPaymentOption();
-
 
584
			cpi.setAmount(paymentOptionTransaction.getAmount());
-
 
585
			cpi.setPaymentOption(paymentOptionRepository.selectById(paymentOptionTransaction.getPaymentOptionId()).getName());
-
 
586
		}
-
 
587
		pdfModel.setPaymentOptions(paymentOptions);
577
		pdfModel.setAuther("profitmandi");
588
		pdfModel.setAuther("profitmandi");
578
		pdfModel.setTitle("Retailer Invoice");
589
		pdfModel.setTitle("Retailer Invoice");
579
		pdfModel.setInvoiceDate(fofoOrder.getFormattedDate());
590
		pdfModel.setInvoiceDate(fofoOrder.getFormattedDate());
580
		
591
		
581
		// insurance calculation
592
		// insurance calculation