/// <summary> /// Отмена приемки /// </summary> public virtual void CancelReceipt() { CheckPossibilityToCancelReceipt(); State = ReturnFromClientWaybillState.Accepted; ReceiptedBy = null; ReceiptDate = null; // Автоматически переводим сделку на этап "Закрытие договора", если она была закрыта deal.MoveToContractClosingStage(); }
public ReturnFromClientWaybill(string number, DateTime date, AccountOrganization recipient, Deal deal, Team team, Storage recipientStorage, ReturnFromClientReason returnFromClientReason, User curator, User createdBy, DateTime creationDate) : base(WaybillType.ReturnFromClientWaybill, number, date, curator, createdBy, creationDate) { ValidationUtils.NotNull(deal, "Не указана сделка."); ValidationUtils.NotNull(recipient, "Не указана организация-приемщик."); ValidationUtils.NotNull(recipientStorage, "Не указано место хранения-приемщик."); ValidationUtils.NotNull(returnFromClientReason, "Не указана причина возврата."); ValidationUtils.NotNull(team, "Не указана команда."); State = ReturnFromClientWaybillState.Draft; distributions = new HashedSet <DealPaymentDocumentDistributionToReturnFromClientWaybill>(); Recipient = recipient; RecipientStorage = recipientStorage; ReturnFromClientReason = returnFromClientReason; Deal = deal; Team = team; // Автоматически переводим сделку на этап "Закрытие договора", если она была закрыта deal.MoveToContractClosingStage(); }