コード例 #1
0
        private void CancelDocument(TransactionDocument document, CancelTransaction request)
        {
            var person         = document.Person;
            var cancelDocument = document.Void(_numberSequenceService);

            cancelDocument.Description = request.Description;

            person.Accept(cancelDocument);

            _transactionRepository.Add(cancelDocument);
        }
コード例 #2
0
        public void Cancel(CancelTransaction request)
        {
            var document = GetById(request.Id);

            if (IsLastTransaction(document) && !document.IsReferencingDocument)
            {
                DeleteDocument(document);
            }
            else
            {
                CancelDocument(document, request);
            }
        }