diff --git a/readme.md b/readme.md
index a09b2e33..f5bd7ca0 100644
--- a/readme.md
+++ b/readme.md
@@ -27,7 +27,7 @@
1. Все документы. Изменен логотип и цвет отметки на фиолетовый. В отметку добавлена дата и время подписания.
**Точки входа:** серверные методы [GetSignatureMarkForSimpleSignatureAsHtml](https://github.com/DirectumCompany/rx-examples/blob/master/src/Packages/Sungero.Examples/Sungero.Examples.Server/Sungero.Docflow/ModuleServerFunctions.cs#L22-L35) и [GetSignatureMarkForCertificateAsHtml](https://github.com/DirectumCompany/rx-examples/blob/master/src/Packages/Sungero.Examples/Sungero.Examples.Server/Sungero.Docflow/ModuleServerFunctions.cs#L48-L74) модуля Docflow.
-2. Входящий счёт. Цвет отметки изменён на красный, текст отметки изменен на "ПРИНЯТО К ОПЛАТЕ".
+2. Входящий счёт. Цвет отметки изменён на красный, текст отметки изменен на "ПРИНЯТО К ОПЛАТЕ".
**Точка входа:** серверный метод [GetSignatureMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/master/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L17-L29) документа IncomingInvoice.
3. Все документы. Изменено условие для интерактивного преобразования документов. Теперь изображения в формате jpg размером < 1 Mb конвертируются интерактивно.
@@ -36,17 +36,17 @@
4. Служебная записка. На первой странице документа, в верхнем левом углу поставить отметки о всех подписях документа. Отметки ставятся сверху вниз, с небольшим отступом друг от друга.
**Точка входа:** серверный метод [ConvertToPdfAndAddSignatureMark](https://github.com/DirectumCompany/rx-examples/blob/master/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L48-L128) документа Memo.
-5. Договор и дополнительное соглашение. Постраничная отметка об ЭП с поворотом.
+5. Договор и дополнительное соглашение. Постраничная отметка об ЭП с поворотом. Редактор отметок скрыт, т.к. данный вид отметки не поддерживается.
**Точки входа:** серверные методы [ConvertToPdfWithMarks](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/ContractualDocument/ContractualDocumentServerFunctions.cs#L17-L24), [UpdateContractPaginalApproveMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/ContractualDocument/ContractualDocumentServerFunctions.cs#L30-L48), [GetContractualApprovedMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/ContractualDocument/ContractualDocumentServerFunctions.cs#L56-L68) документа ContractualDocument, серверный метод [GetApprovedMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Contract/ContractServerFunctions.cs#L17-L20) документа Contract, серверный метод [GetApprovedMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/SupAgreement/SupAgreementServerFunctions.cs#L17-L20) документа SupAgreement
**Инициализация:** [CreateCustomMarkKinds](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Sungero.Docflow/ModuleInitializer.cs#L21-L43) модуля Docflow.
**Константы:** [PaginalApproveMarkKindSid](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractConstants.cs#L10), [PaginalApproveMarkKindClass](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractConstants.cs#L14), [PaginalApproveMarkKindMethod](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractConstants.cs#L18) документа Contract, [PaginalApproveMarkKindSid](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/SupAgreement/SupAgreementConstants.cs#L10), [PaginalApproveMarkKindClass](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/SupAgreement/SupAgreementConstants.cs#L14), [PaginalApproveMarkKindMethod](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/SupAgreement/SupAgreementConstants.cs#L18) документа SupAgreement.
-6. Служебная записка. Простановка на первой странице отметок о всех подписях документа.
+6. Служебная записка. Простановка на первой странице отметок о всех подписях документа. Редактор отметок скрыт, т.к. данный вид отметки не поддерживается.
**Точки входа:** серверные методы [ConvertToPdfWithMarks](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L19-L25), [UpdateMemoSignMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L31-L44), [GetOrCreateSignatureBasedMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L52-L69), [GetOrCreateSignatureMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L76-L80), [GetMemoSignMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L87-L91), [GetDocumentSignatures](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Memo/MemoServerFunctions.cs#L98-L105) документы Memo, серверные методы [GetContent](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Mark/MarkServerFunctions.cs#L17-L36), [GetContentWithSignerInfo](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Mark/MarkServerFunctions.cs#L44-L50) справочника Mark.
**Инициализация:** [CreateCustomMarkKinds](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Sungero.Docflow/ModuleInitializer.cs#L21-L43) модуля Docflow.
**Константы:** [SignMarkKindSid](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoConstants.cs#L10), [SignMarkKindClass](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoConstants.cs#L14), [SignMarkKindMethod](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoConstants.cs#L18), [MarkSignatureIdKey](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoConstants.cs#L22) документа Memo.
-7. Протокол. Простановка на пустой странице отметки со всеми подпиясми документа.
+7. Протокол. Простановка на пустой странице отметки со всеми подписями документа. Редактор отметок скрыт, т.к. данный вид отметки не поддерживается.
**Точки входа:** серверные методы [GetOrCreateSignatureMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Minutes/MinutesServerFunctions.cs#L16-L23), [DeleteVersionMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Minutes/MinutesServerFunctions.cs#L31-L38), [GetMinutesMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Minutes/MinutesServerFunctions.cs#L45-L66) документа Minute.
**Инициализация:** [CreateCustomMarkKinds](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Sungero.Docflow/ModuleInitializer.cs#L21-L43) модуля Docflow.
**Константы:** [MinutesMarkKindGuid](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesConstants.cs#L9), [MinutesMarkKindClass](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesConstants.cs#L12), [MinutesMarkKindMethod](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesConstants.cs#L15) документа Minute
@@ -54,7 +54,7 @@
### Преобразование в PDF и наложение отметки об оплате
1. Входящий счет. Простановка отметки об оплате.
-
**Точки входа:** серверный метод [ConvertToPdfWithMarks](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L18-L25), [UpdateInvoicePaymentMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L33-L48), [GetPaymentMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L54-L57) документа IncomingInvoice.
+
**Точки входа:** разделяемый метод [UpdateMarksBeforeConversion](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceSharedFunctions.cs#L21-L28), серверные методы [UpdateInvoicePaymentMark](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L33-L48), [GetPaymentMarkAsHtml](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L54-L57), [ValidateMarksDataBeforeOpenMarkEditor](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L143-L168), [ValidateMarksDataBeforeConversion](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs#L176-L206) документа IncomingInvoice.
**Инициализация:** [CreateCustomMarkKinds](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Server/Sungero.Docflow/ModuleInitializer.cs#L21-L43) модуля Docflow.
**Константы:** [PaymentMarkKindSid](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceConstants.cs#L10), [PaymentMarkKindClass](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceConstants.cs#L14), [PaymentMarkKindMethod](https://github.com/DirectumCompany/rx-examples/blob/4.11/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceConstants.cs#L18) документа IncomingInvoice.
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs b/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs
index 3a5e7667..e9b9974d 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Server/IncomingInvoice/IncomingInvoiceServerFunctions.cs
@@ -10,34 +10,23 @@ namespace Sungero.Examples.Server
{
partial class IncomingInvoiceFunctions
{
- ///
- /// Преобразовать документ в PDF с простановкой отметок.
- ///
- /// ИД версии, на которую будут проставлены отметки.
- /// Результат преобразования.
- public override Sungero.Docflow.Structures.OfficialDocument.IConversionToPdfResult ConvertToPdfWithMarks(long versionId)
- {
- /// Пример перекрытия, в котором при выполнении действия
- /// "Создать PDF-документ с отметками" для входящих счетов с состоянием "Оплачен"
- /// добавляется отметка "Оплачено" на преобразованный PDF-документ.
- this.UpdateInvoicePaymentMark();
- return base.ConvertToPdfWithMarks(versionId);
- }
-
///
/// Сохранить отметку для простановки на PDF документе с состоянием "Оплачено".
/// Удалить отметку в случае, если состояние документа было изменено
/// с "Оплачено" на другое.
///
- [Public]
+ [Public, Remote]
public virtual void UpdateInvoicePaymentMark()
{
if (_obj.LifeCycleState == Sungero.Contracts.IncomingInvoice.LifeCycleState.Paid)
{
var mark = GetOrCreateMark(IncomingInvoiceConstants.PaymentMarkKindSid);
- mark.XIndent = 12;
- mark.YIndent = 20;
- mark.Page = -1;
+ if (!mark.XIndent.HasValue)
+ mark.XIndent = 12;
+ if (!mark.YIndent.HasValue)
+ mark.YIndent = 20;
+ if (!mark.Page.HasValue)
+ mark.Page = -1;
mark.Save();
}
else
@@ -150,5 +139,70 @@ public virtual string GetSignatureMarkForCertificateAsHtml(Sungero.Domain.Shared
}
return html;
}
+
+ ///
+ /// Проверить свойства документа, необходимые для простановки отметок, перед открытием редактора отметок.
+ ///
+ /// ИД версии документа.
+ /// Текст ошибки, если она есть. Иначе пустая строка.
+ [Remote]
+ public override string ValidateMarksDataBeforeOpenMarkEditor(long versionId)
+ {
+ var signature = Docflow.PublicFunctions.OfficialDocument.GetSignatureForMark(_obj, _obj.LastVersion.Id);
+ var isPaid = _obj.LifeCycleState == LifeCycleState.Paid;
+
+ if (signature == null && !isPaid)
+ return IncomingInvoices.Resources.DocumentShouldBeApprovedOrPaidToOpenMarkEditor;
+
+ if (signature != null)
+ {
+ var separator = ". ";
+ var validationErrors = Docflow.PublicFunctions.Module.GetSignatureValidationErrorsAsString(signature, separator);
+ if (!string.IsNullOrEmpty(validationErrors))
+ {
+ return Docflow.OfficialDocuments.Resources.SignatureNotValidErrorForMarkEditorFormat(validationErrors);
+ }
+ }
+
+ return string.Empty;
+ }
+
+ ///
+ /// Проверить свойства документа, необходимые для простановки отметок.
+ ///
+ /// ИД версии документа.
+ /// Результат проверки свойств документа.
+ [Remote]
+ public override Docflow.Structures.OfficialDocument.IConversionToPdfResult ValidateMarksDataBeforeConversion(long versionId)
+ {
+ var info = Docflow.Structures.OfficialDocument.ConversionToPdfResult.Create();
+ var signature = Docflow.PublicFunctions.OfficialDocument.GetSignatureForMark(_obj, versionId);
+ var isPaid = _obj.LifeCycleState == LifeCycleState.Paid;
+
+ // Логика только для нового режима преобразования (утверждающая подпись не обязательна, если можно проставить другие отметки).
+ if (signature == null && !isPaid)
+ {
+ info.HasErrors = true;
+ info.ErrorTitle = IncomingInvoices.Resources.DocumentShouldBeApprovedOrPaidTitle;
+ info.ErrorMessage = IncomingInvoices.Resources.DocumentShouldBeApprovedOrPaid;
+ return info;
+ }
+
+ // Валидация подписи.
+ if (signature != null)
+ {
+ var separator = ". ";
+ var validationErrors = Docflow.PublicFunctions.Module.GetSignatureValidationErrorsAsString(signature, separator);
+ if (!string.IsNullOrEmpty(validationErrors))
+ {
+ info.HasErrors = true;
+ info.ErrorTitle = Docflow.OfficialDocuments.Resources.SignatureNotValidErrorTitle;
+ info.ErrorMessage = Docflow.OfficialDocuments.Resources.SignatureNotValidErrorFormat(validationErrors);
+ return info;
+ }
+ }
+
+ return info;
+ }
}
}
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractSharedFunctions.cs b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractSharedFunctions.cs
index 99dae2f6..63b21cd7 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractSharedFunctions.cs
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Contract/ContractSharedFunctions.cs
@@ -9,6 +9,9 @@ namespace Sungero.Examples.Shared
{
partial class ContractFunctions
{
-
+ public override bool AllowedToAddMarksManually()
+ {
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/ContractualDocument/ContractualDocumentSharedFunctions.cs b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/ContractualDocument/ContractualDocumentSharedFunctions.cs
index f87c5522..dec2b4ab 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/ContractualDocument/ContractualDocumentSharedFunctions.cs
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/ContractualDocument/ContractualDocumentSharedFunctions.cs
@@ -9,6 +9,9 @@ namespace Sungero.Examples.Shared
{
partial class ContractualDocumentFunctions
{
-
+ public override bool AllowedToAddMarksManually()
+ {
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.mtd b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.mtd
index 2f730dc1..9ba3322a 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.mtd
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.mtd
@@ -96,6 +96,7 @@
"PublicFunctions": [
{
"Name": "UpdateInvoicePaymentMark",
+ "IsRemote": true,
"Parameters": [
{
"Name": "incomingInvoice",
@@ -103,6 +104,7 @@
"ParameterTypeFullName": "Sungero.Examples.IIncomingInvoice, Sungero.Domain.Interfaces"
}
],
+ "Placement": "Shared",
"ReturnType": "void",
"ReturnTypeFullName": "System.Void"
}
@@ -112,7 +114,10 @@
"HtmlStampTemplateForCertificateCustom",
"HtmlStampTemplateForSignatureCustom",
"HtmlMarkTemplatePayment",
- "PaymentMarkName"
+ "PaymentMarkName",
+ "DocumentShouldBeApprovedOrPaidToOpenMarkEditor",
+ "DocumentShouldBeApprovedOrPaidTitle",
+ "DocumentShouldBeApprovedOrPaid"
],
"RibbonCardMetadata": {
"NameGuid": "da8e4adc-afdc-4ef8-96f8-d1989b34c51c",
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.resx b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.resx
index 1cdd3af4..44cb09ff 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.resx
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.resx
@@ -215,4 +215,13 @@
Mark "Paid"
+
+ To edit marks on the invoice, it must be paid or its latest version must be approved.
+
+
+ The invoice is not signed and not paid.
+
+
+ To convert the invoice to PDF, it must be paid or its last version must be approved.
+
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.ru.resx b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.ru.resx
index 4c0e3e0e..d7643d65 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.ru.resx
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoice.ru.resx
@@ -215,4 +215,13 @@
Отметка "Оплачено"
+
+ Для редактирования отметок документ должен быть оплачен или его последняя версия должна быть утверждена.
+
+
+ Документ не подписан и не оплачен.
+
+
+ Для преобразования в PDF документ должен быть оплачен или его последняя версия должна быть утверждена.
+
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceSharedFunctions.cs b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceSharedFunctions.cs
index 6844c11b..fc3aa71e 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceSharedFunctions.cs
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/IncomingInvoice/IncomingInvoiceSharedFunctions.cs
@@ -9,6 +9,22 @@ namespace Sungero.Examples.Shared
{
partial class IncomingInvoiceFunctions
{
-
+ public override List GetAvailableMarkKindsSids()
+ {
+ var marksKinds = base.GetAvailableMarkKindsSids();
+
+ if (_obj.LifeCycleState == Sungero.Contracts.IncomingInvoice.LifeCycleState.Paid)
+ marksKinds.Add(Sungero.Examples.Constants.Contracts.IncomingInvoice.PaymentMarkKindSid);
+
+ return marksKinds;
+ }
+
+ public override void UpdateMarksBeforeConversion(long versionId)
+ {
+ /// Пример перекрытия, в котором при выполнении действия
+ /// "Создать PDF-документ с отметками" для входящих счетов с состоянием "Оплачен"
+ /// добавляется отметка "Оплачено" на преобразованный PDF-документ.
+ Functions.IncomingInvoice.Remote.UpdateInvoicePaymentMark(_obj);
+ }
}
}
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoSharedFunctions.cs b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoSharedFunctions.cs
index 49be04ad..c744a0cb 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoSharedFunctions.cs
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Memo/MemoSharedFunctions.cs
@@ -9,6 +9,9 @@ namespace Sungero.Examples.Shared
{
partial class MemoFunctions
{
-
+ public override bool AllowedToAddMarksManually()
+ {
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesSharedFunctions.cs b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesSharedFunctions.cs
index d1af6d0d..c45f79ba 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesSharedFunctions.cs
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Minutes/MinutesSharedFunctions.cs
@@ -9,6 +9,9 @@ namespace Sungero.Examples.Shared
{
partial class MinutesFunctions
{
-
+ public override bool AllowedToAddMarksManually()
+ {
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Sungero.Docflow/Module.mtd b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Sungero.Docflow/Module.mtd
index 2a0e8d2e..0d7a2c2c 100644
--- a/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Sungero.Docflow/Module.mtd
+++ b/src/Packages/Sungero.Examples/Sungero.Examples.Shared/Sungero.Docflow/Module.mtd
@@ -4,6 +4,20 @@
"Name": "Docflow",
"AssociatedGuid": "15234f2e-0858-4733-a9cb-eaa6ed2b2a5e",
"AsyncHandlers": [
+ {
+ "NameGuid": "91e037c0-0ac9-412a-a283-1567d122af49",
+ "Name": "PrepareDocumentBodyForMarkEditor",
+ "DelayPeriod": 15,
+ "DelayStrategy": "ExponentialDelayStrategy",
+ "IsAncestorMetadata": true,
+ "Parameters": [
+ {
+ "NameGuid": "f29a4db6-2032-4e69-b9e8-ad31b48d483e",
+ "Name": "MarkEditorSessionId",
+ "ParameterType": "LongInteger"
+ }
+ ]
+ },
{
"NameGuid": "8d3ccc00-7327-4fc4-b055-781286f29e0e",
"Name": "SetFPoARegistrationState",
@@ -403,6 +417,13 @@
],
"IsVisible": false,
"Jobs": [
+ {
+ "NameGuid": "bd4d35ec-198e-4868-9240-305c00653785",
+ "Name": "DeleteMarkEditorSessions",
+ "IsAncestorMetadata": true,
+ "MonthSchedule": "Monthly",
+ "StartAt": "1753-01-01T22:00:00"
+ },
{
"NameGuid": "91cb2efd-0ef2-4073-b1d0-fce8bec52690",
"Name": "SyncFormalizedPowerOfAttorneyState",