public ProductionOrderExtraExpensesSheetPayment(ProductionOrderExtraExpensesSheet extraExpensesSheet, string paymentDocumentNumber, DateTime date, decimal sumInCurrency,
                                                        CurrencyRate currencyRate, ProductionOrderPaymentForm form) : base(paymentDocumentNumber, date, sumInCurrency, currencyRate, form,
                                                                                                                           ProductionOrderPaymentType.ProductionOrderExtraExpensesSheetPayment)
        {
            ValidationUtils.NotNull(extraExpensesSheet, "Не указан лист дополнительных расходов.");
            ExtraExpensesSheet = extraExpensesSheet;
            ExtraExpensesSheet.AddPayment(this);

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

            ValidationUtils.Assert(!(currencyRate != null && extraExpensesSheet.Currency != currencyRate.Currency), "Курс не соответствует валюте листа дополнительных расходов.");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Удаление листа дополнительных расходов
 /// </summary>
 /// <param name="extraExpensesSheet">Лист дополнительных расходов</param>
 /// <param name="currentDateTime">Текущее время</param>
 public virtual void DeleteExtraExpensesSheet(ProductionOrderExtraExpensesSheet extraExpensesSheet, DateTime currentDateTime)
 {
     extraExpensesSheet.DeletionDate = currentDateTime;
     extraExpensesSheets.Remove(extraExpensesSheet);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Добавление листа дополнительных расходов
 /// </summary>
 /// <param name="extraExpensesSheet">Лист дополнительных расходов</param>
 public virtual void AddExtraExpensesSheet(ProductionOrderExtraExpensesSheet extraExpensesSheet)
 {
     extraExpensesSheets.Add(extraExpensesSheet);
     extraExpensesSheet.ProductionOrder = this;
 }