public int GetNumberOfEarnings(long organizationRoleUserId, PaymentStatus paymentStatus)
        {
            var paymentStatusToSend = paymentStatus == PaymentStatus.Paid ? PaymentStatus.Unpaid : PaymentStatus.Paid;
            var payPeriods          = _medicalVendorInvoiceRepository.GetMedicalVendorInvoicePayPeriods(organizationRoleUserId, paymentStatusToSend);

            return(_medicalVendorEarningRepository.GetEarningsNotInDateRanges(organizationRoleUserId, payPeriods));
        }
        public void GetMedicalVendorInvoicePayPeriodsReturnsListOfPayPeriods()
        {
            List <OrderedPair <DateTime, DateTime> > payPeriods = _repository.
                                                                  GetMedicalVendorInvoicePayPeriods(609, PaymentStatus.Paid);

            Assert.IsNotNull(payPeriods);
            Assert.IsNotEmpty(payPeriods);
        }
Exemplo n.º 3
0
        public List <MedicalVendorEarningCustomerAggregate> GetUnsettledEarningCustomerAggregates
            (long organizationRoleUserId)
        {
            List <OrderedPair <DateTime, DateTime> > dateRanges = _medicalVendorInvoiceRepository.
                                                                  GetMedicalVendorInvoicePayPeriods(organizationRoleUserId, PaymentStatus.Paid);

            return(_medicalVendorEarningCustomerAggregateRepository.GetEarningCustomerAggregatesNotInDateRanges
                       (organizationRoleUserId, dateRanges).OrderByDescending(a => a.EvaluationDate).ToList());
        }