Пример #1
0
        public ProductionOrderTransportSheetPayment(ProductionOrderTransportSheet transportSheet, string paymentDocumentNumber, DateTime date, decimal sumInCurrency,
                                                    CurrencyRate currencyRate, ProductionOrderPaymentForm form) : base(paymentDocumentNumber, date, sumInCurrency, currencyRate, form,
                                                                                                                       ProductionOrderPaymentType.ProductionOrderTransportSheetPayment)
        {
            ValidationUtils.NotNull(transportSheet, "Не указан транспортный лист.");
            TransportSheet = transportSheet;
            TransportSheet.AddPayment(this);

            ProductionOrder = TransportSheet.ProductionOrder;
            ProductionOrder.AddPayment(this);

            ValidationUtils.Assert(!(currencyRate != null && transportSheet.Currency != currencyRate.Currency), "Курс не соответствует валюте транспортного листа.");
        }
Пример #2
0
 /// <summary>
 /// Удаление транспортного листа
 /// </summary>
 /// <param name="transportSheet">Транспортный лист</param>
 /// <param name="currentDateTime">Текущее время</param>
 public virtual void DeleteTransportSheet(ProductionOrderTransportSheet transportSheet, DateTime currentDateTime)
 {
     transportSheet.DeletionDate = currentDateTime;
     transportSheets.Remove(transportSheet);
 }
Пример #3
0
 /// <summary>
 /// Добавление транспортного листа
 /// </summary>
 /// <param name="transportSheet">Транспортный лист</param>
 public virtual void AddTransportSheet(ProductionOrderTransportSheet transportSheet)
 {
     transportSheets.Add(transportSheet);
     transportSheet.ProductionOrder = this;
 }