Ejemplo n.º 1
0
        /// <summary>
        ///     设置发票
        /// </summary>
        /// <param name="invoice">发票</param>
        public void SetInvoice(Invoice invoice)
        {
            //if (invoice == null || invoice.IsTransient())
            //{
            //    throw new ArgumentException("发票参数为空!");
            //}

            //Invoice = invoice;
            //InvoiceId = invoice.Id;
            //InvoiceNumber = invoice.InvoiceNumber;
            //if (invoice is PurchaseInvoice)
            //{
            //    InvoiceType = InvoiceType.采购发票;
            //}
            //else if (invoice is PrepaymentInvoice)
            //{
            //    InvoiceType = InvoiceType.预付款发票;
            //}
            //else if (invoice is LeaseInvoice)
            //{
            //    InvoiceType = InvoiceType.租赁发票;
            //}
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     添加付款通知行
        /// </summary>
        /// <param name="amount">金额</param>
        /// <param name="invoice">发票</param>
        /// <param name="note">备注</param>
        /// <returns></returns>
        public PaymentNoticeLine AddPaymentNoticeLine(decimal amount, Invoice invoice, string note)
        {
            var paymentNoticeLine = new PaymentNoticeLine
            {
                Amount = amount,
                Note = note
            };

            paymentNoticeLine.GenerateNewIdentity();
            paymentNoticeLine.SetInvoice(invoice);

            return paymentNoticeLine;
        }
Ejemplo n.º 3
0
 /// <summary>
 ///     设置发票属性
 /// </summary>
 /// <param name="invoice">发票</param>
 /// <param name="invoideCode">发票代码</param>
 /// <param name="invoiceDate">发票日期</param>
 /// <param name="operatorName">经办人</param>
 /// <param name="invoiceNumber">发票号</param>
 /// <param name="supplier">供应商</param>
 /// <param name="order">订单</param>
 /// <param name="paidAmount">已付金额</param>
 /// <param name="currency">币种</param>
 /// <param name="paymentScheduleLineId">付款计划行ID</param>
 /// <param name="status">发票状态</param>
 /// <returns>发票</returns>
 public static void SetInvoice(Invoice invoice, string invoideCode, DateTime invoiceDate, string operatorName,
     string invoiceNumber, Supplier supplier, Order order,
     decimal paidAmount, Currency currency, int? paymentScheduleLineId, int status)
 {
     invoice.InvoideCode = invoideCode;
     invoice.InvoiceDate = invoiceDate;
     invoice.SetOperator(operatorName);
     invoice.SetInvoiceNumber(invoiceNumber);
     invoice.SetSupplier(supplier);
     invoice.SetOrder(order);
     invoice.SetCurrency(currency);
     invoice.SetPaymentScheduleLine(paymentScheduleLineId);
     invoice.SetInvoiceStatus((InvoiceStatus) status);
 }
Ejemplo n.º 4
0
        /// <summary>
        ///     设置发票
        /// </summary>
        /// <param name="invoice">发票</param>
        public void SetInvoice(Invoice invoice)
        {
            if (invoice == null || invoice.IsTransient())
            {
                throw new ArgumentException("发票参数为空!");
            }

            Invoice = invoice;
            InvoiceId = invoice.Id;
            Status = ControlStatus.已匹配发票;
        }