public MovementWaybillRow(ReceiptWaybillRow receiptWaybillRow, decimal movingCount, ValueAddedTax valueAddedTax)
     : this()
 {
     ReceiptWaybillRow       = receiptWaybillRow; // Должно идти перед присваиванием количества, т.к. задает допустимое число его знаков после запятой
     MovingCount             = movingCount;
     this.valueAddedTax      = valueAddedTax;
     outgoingWaybillRowState = OutgoingWaybillRowState.Undefined;
 }
Beispiel #2
0
        /// <summary>
        /// Удаление позиции из накладной
        /// </summary>
        public virtual void DeleteRow(ReceiptWaybillRow row)
        {
            ValidationUtils.Assert(rows.Contains(row), "Позиция не содержится в накладной. Возможно, она была удалена.");
            row.CheckPossibilityToDelete();

            rows.Remove(row);
            row.DeletionDate = DateTime.Now;
        }
        public WriteoffWaybillRow(ReceiptWaybillRow receiptWaybillRow, decimal writingoffCount) : this()
        {
            ValidationUtils.NotNull(receiptWaybillRow, "Не указана партия товара.");

            ValidationUtils.Assert(writingoffCount > 0, "Количество списываемого товара должно быть положительным числом.");

            outgoingWaybillRowState = OutgoingWaybillRowState.Undefined;
            ReceiptWaybillRow       = receiptWaybillRow; // Должно идти перед присваиванием количества, т.к. задает допустимое число его знаков после запятой
            WritingoffCount         = writingoffCount;
        }
        public ExpenditureWaybillRow(ReceiptWaybillRow receiptWaybillRow, decimal sellingCount, ValueAddedTax valueAddedTax)
            : this()
        {
            ValidationUtils.NotNull(receiptWaybillRow, "Не указана партия товара.");
            ValidationUtils.Assert(sellingCount > 0, "Количество реализуемого товара должно быть положительным числом.");

            outgoingWaybillRowState = OutgoingWaybillRowState.Undefined;
            ReceiptWaybillRow       = receiptWaybillRow; // Должно идти перед присваиванием количества, т.к. задает допустимое число его знаков после запятой
            SellingCount            = sellingCount;
            ValueAddedTax           = valueAddedTax;
        }
Beispiel #5
0
        //internal static event EventHandler ReceiptWaybillRowAdded;

        #endregion

        #region Методы

        #region Позиции накладной

        /// <summary>
        /// Добавление позиции в накладную
        /// </summary>
        public virtual void AddRow(ReceiptWaybillRow row)
        {
            if (row.PendingCount > 0M)
            {
                ValidationUtils.Assert(!IsAccepted, "Невозможно добавить позицию к проведенной накладной.");
            }
            else
            {
                CheckPossibilityToEditRowFromReceipt();
            }

            ValidationUtils.Assert(!Rows.Any(x => x.Article == row.Article), "Данный товар уже содержится в накладной.");

            rows.Add(row);
            row.ReceiptWaybill = this;
        }