コード例 #1
0
ファイル: InvoiceFactory.cs プロジェクト: unicloud/FRP
 /// <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);
 }
コード例 #2
0
ファイル: InvoiceFactory.cs プロジェクト: unicloud/FRP
 /// <summary>
 ///     设置发票行属性
 /// </summary>
 /// <param name="invoiceLine">发票行</param>
 /// <param name="itemName">项名称</param>
 /// <param name="amount">金额</param>
 /// <param name="order">订单</param>
 /// <param name="orderLineId">订单行Id</param>
 /// <param name="note">备注</param>
 /// <param name="maintainItem">维修项</param>
 /// <param name="unitPrice">单价</param>
 public static void SetInvoiceLine(PurchaseInvoiceLine invoiceLine, string itemName, decimal amount, Order order,
     int orderLineId, string note, int? maintainItem, decimal unitPrice)
 {
     if (order != null)
     {
         var orderLine = order.OrderLines.FirstOrDefault(p => p.Id == orderLineId);
         invoiceLine.SetOrderLine(orderLine);
     }
     invoiceLine.SetAmount(amount);
     invoiceLine.SetNote(note);
 }
コード例 #3
0
ファイル: Invoice.cs プロジェクト: unicloud/FRP
        /// <summary>
        ///     设置订单
        /// </summary>
        /// <param name="order">订单</param>
        public void SetOrder(Order order)
        {
            if (order == null || order.IsTransient())
            {
                throw new ArgumentException("订单参数为空!");
            }

            OrderId = order.Id;
        }