Beispiel #1
0
        public InvoiceRun CreateInvoiceRun()
        {
            var compenentAuthority = model.CompetentAuthorities.First();

            var ibisFileData = new IbisFileData
            {
                Id                  = IntegerToGuid(GetNextId()),
                FileId              = GetNextId(),
                CustomerFileData    = "Customer file data",
                CustomerFileName    = "Customer file name",
                TransactionFileData = "Transaction file data",
                TransactionFileName = "Transaction file name"
            };

            var user = GetOrCreateUser("Invoice Run User");

            var invoiceRun = new InvoiceRun
            {
                Id                   = IntegerToGuid(GetNextId()),
                IssuedDate           = DateTime.UtcNow,
                IssuedByUserId       = user.Id,
                CompetentAuthority   = compenentAuthority,
                CompetentAuthorityId = compenentAuthority.Id,
                IbisFileData         = ibisFileData,
                IbisFileDataId       = ibisFileData.Id
            };

            model.InvoiceRuns.Add(invoiceRun);

            return(invoiceRun);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a member upload associated with the specified scheme and sets the member
        /// upload as being submitted. An invoice run can optionally be assigned to the submitted
        /// member upload.
        /// </summary>
        /// <param name="scheme"></param>
        /// <param name="invoiceRun"></param>
        /// <returns></returns>
        public MemberUpload CreateSubmittedMemberUpload(Scheme scheme, InvoiceRun invoiceRun = null)
        {
            var memberUpload = CreateMemberUpload(scheme);

            memberUpload.IsSubmitted   = true;
            memberUpload.SubmittedDate = DateTime.UtcNow;
            memberUpload.TotalCharges  = 30;

            if (invoiceRun != null)
            {
                memberUpload.InvoiceRun   = invoiceRun;
                memberUpload.InvoiceRunId = invoiceRun.Id;
            }

            return(memberUpload);
        }
        public InvoiceRun CreateInvoiceRun()
        {
            var compenentAuthority = model.CompetentAuthorities.First();

            var ibisFileData = new IbisFileData
            {
                Id = IntegerToGuid(GetNextId()),
                FileId = GetNextId(),
                CustomerFileData = "Customer file data",
                CustomerFileName = "Customer file name",
                TransactionFileData = "Transaction file data",
                TransactionFileName = "Transaction file name"
            };

            var user = GetOrCreateUser("Invoice Run User");

            var invoiceRun = new InvoiceRun
            {
                Id = IntegerToGuid(GetNextId()),
                IssuedDate = DateTime.UtcNow,
                IssuedByUserId = user.Id,
                CompetentAuthority = compenentAuthority,
                CompetentAuthorityId = compenentAuthority.Id,
                IbisFileData = ibisFileData,
                IbisFileDataId = ibisFileData.Id
            };

            model.InvoiceRuns.Add(invoiceRun);

            return invoiceRun;
        }
        /// <summary>
        /// Creates a member upload associated with the specified scheme and sets the member
        /// upload as being submitted. An invoice run can optionally be assigned to the submitted
        /// member upload.
        /// </summary>
        /// <param name="scheme"></param>
        /// <param name="invoiceRun"></param>
        /// <returns></returns>
        public MemberUpload CreateSubmittedMemberUpload(Scheme scheme, InvoiceRun invoiceRun = null)
        {
            var memberUpload = CreateMemberUpload(scheme);

            memberUpload.IsSubmitted = true;
            memberUpload.SubmittedDate = DateTime.UtcNow;
            memberUpload.TotalCharges = 30;

            if (invoiceRun != null)
            {
                memberUpload.InvoiceRun = invoiceRun;
                memberUpload.InvoiceRunId = invoiceRun.Id;
            }

            return memberUpload;
        }