Пример #1
0
        public static int SendNewInvoiceNotification(Invoice invoice, List<InvoiceItem> invoiceLines, KeyValueBunch extraArgs)
        {
            Contract contract = ContractSystem.ContractController.GetContract(invoice.ContractId);
            ContractAccount account = ContractSystem.ContractController.GetContractAccountSettings(invoice.ContractId);
			Dictionary<int, Service> invoiceServices = ServiceController.GetServicesDictionary(invoiceLines);
            Hashtable items = new Hashtable();

            items["Invoice"] = invoice;
            items["InvoiceLines"] = invoiceLines;
			items["InvoiceServices"] = invoiceServices;
            items["Tax"] = StorehouseController.GetTaxation(contract.ResellerId, invoice.TaxationId);
            items["Customer"] = account;
            items["IsEmail"] = "1";
            if (extraArgs != null)
                items["ExtraArgs"] = extraArgs;

            return SendSystemNotification(StoreSettings.NEW_INVOICE, account, items, "HtmlBody", "TextBody");
        }
Пример #2
0
        public static int SendNewInvoiceNotification(Invoice invoice)
        {
            List<InvoiceItem> invoiceLines = InvoiceController.GetCustomerInvoiceItems(invoice.InvoiceId);

            return SendNewInvoiceNotification(invoice, invoiceLines, null);
        }