Example #1
0
 public static InvoiceLine GetFreeCallComponent(this Invoice invoice, Contract contract, decimal freeCallAmount, IInvoiceSettings settings)
 {
     return new InvoiceLine
     {
         ContractId = contract.Id.Value,
         Call = null,
         Description = settings.FreeCallComponentDescription,
         Invoice = invoice,
         GstAmount = -freeCallAmount / 11M,
         LineAmount = -freeCallAmount
     };
 }
Example #2
0
 public static InvoiceLine GetEnvironmentalLine(this Invoice invoice, IInvoiceSettings settings)
 {
     return new InvoiceLine
     {
         ContractId = null,
         Call = null,
         Description = settings.EnvironmentalLevyDescription,
         Invoice = invoice,
         Quantity = 1.0,
         LineAmount = 2.50M,
         GstAmount = 2.50M / 11
     };
 }
Example #3
0
 public static InvoiceLine GetContractSuspensionLine(this Invoice invoice, Contract contract, IInvoiceSettings settings)
 {
     return new InvoiceLine
     {
         ContractId = contract.Id.Value,
         Call = null,
         Description = settings.ContractSuspensionDescription,
         Invoice = invoice,
         Quantity = 1,
         LineAmount = 10.00M,
         GstAmount = 10.00M / 11M
     };
 }
Example #4
0
        public void SetUp()
        {
            _generator = new Mock<INumberGeneratorService>();
            _invoiceRepository = new Mock<IInvoiceRepository>();
            _accountRepository = new Mock<IAccountRepository>();
            _planRepository = new Mock<IPlanRepository>();
            _networkRepository = new Mock<INetworkRepository>();
            _contractRepository = new Mock<IContractRepository>();
            _contactRepository = new Mock<IContactRepository>();
            _companyRepository = new Mock<ICompanyRepository>();
            _settingsRepository = new Mock<ISettingRepository>();
            _contractService = new Mock<IContractService>();
            _customFeeRepository = new Mock<ICustomFeeRepository>();
            _dateTime = new Mock<IDateTimeFacade>();
            _ewayService = new Mock<IEwayPaymentsService>();
            _invoiceSettings = new InvoiceSettings(_settingsRepository.Object);
            _hardcopyRepository = new Mock<IInvoiceHardcopyRepository>();

            _activityService = new Mock<IActivityLoggingService>();
        }
Example #5
0
 public InvoicingService(IInvoiceRepository invoiceRepository, IAccountRepository accountRepository, 
     IPlanRepository planRepository, INetworkRepository networkRepository, IContractRepository contractRepository, IContactRepository contactRepository,
     ICompanyRepository companyRepository, INumberGeneratorService numberGeneratorService,
     ISettingRepository settingRepository, ICustomFeeRepository customFeeRepository, IInvoiceHardcopyRepository hardcopyRepository, IContractService contractService,
     IInvoiceSettings invoiceSettings, IEwayPaymentsService ewayPaymentsService, IDateTimeFacade dateTime)
 {
     _invoiceRepository = invoiceRepository;
     _accountRepository = accountRepository;
     _planRepository = planRepository;
     _networkRepository = networkRepository;
     _contractRepository = contractRepository;
     _contactRepository = contactRepository;
     _companyRepository = companyRepository;
     _numberGeneratorService = numberGeneratorService;
     _settingRepository = settingRepository;
     _contractService = contractService;
     _customFeeRepository = customFeeRepository;
     _invoiceHardcopyRepository = hardcopyRepository;
     _invoiceSettings = invoiceSettings;
     _ewayPaymentsService = ewayPaymentsService;
     _dateTime = dateTime;
 }
Example #6
0
 public static InvoiceLine GetNetworkAccessLine(this Invoice invoice, Contract contract, Plan plan, IInvoiceSettings settings)
 {
     return new InvoiceLine
     {
         Call = null,
         Description = settings.NetworkAccessFeeDescription,
         Invoice = invoice,
         Quantity = 1.0,
         ContractId = contract.Id.Value,
         LineAmount = plan.PlanAmount,
         GstAmount = plan.PlanAmount / 11
     };
 }