Exemplo n.º 1
0
        /// <summary>
        /// Converts to vat return record.
        /// </summary>
        /// <param name="vatInfo">The vat information.</param>
        /// <returns></returns>
        private VatReturnsPerBusiness ConvertToVatReturnRecord(VatReturnInfo vatInfo)
        {
            VatReturnRecord v = new VatReturnRecord {
                DateDue        = vatInfo.DueDate,
                DateFrom       = vatInfo.FromDate,
                DateTo         = vatInfo.ToDate,
                Period         = vatInfo.Period,
                RegistrationNo = vatInfo.RegistrationNumber
            };

            HmrcBusiness business = new HmrcBusiness {
                RegistrationNo = vatInfo.RegistrationNumber,
                Name           = vatInfo.BusinessName,
                Address        = CreateAddressString(vatInfo.BusinessAddress)
            };

            IEnumerable <VatReturnEntry> entries = CreateVatReturnEntries(vatInfo);

            return(new VatReturnsPerBusiness {
                VatReturnRecord = v,
                Entries = entries,
                Business = business
            });
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates the vat return entries.
 /// </summary>
 /// <param name="vatInfo">The vat information.</param>
 /// <returns></returns>
 private IEnumerable <VatReturnEntry> CreateVatReturnEntries(VatReturnInfo vatInfo)
 {
     return(vatInfo.ReturnDetails.Select(ConvertToVatReturnEntry));
 }