Skip to content

Commit

Permalink
Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
DitriXNew committed May 22, 2024
1 parent 810bcbe commit d0c346b
Show file tree
Hide file tree
Showing 15 changed files with 354 additions and 197 deletions.
2 changes: 1 addition & 1 deletion IRP/src/Catalogs/Agreements/ManagerModule.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Function GetDefaultChoiceRef(Parameters, AgreementParameters) Export
EndIf;
EndDo;
If CountAgreementWithCompany = 1 Then
Agreement = TmpAgreement;
Agreement = TmpAgreement;
EndIf;
EndIf;

Expand Down
7 changes: 6 additions & 1 deletion IRP/src/CommonModules/ControllerClientServer_V2/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -1500,23 +1500,27 @@ Function BindTransactionType(Parameters)
Binding = New Structure();
Binding.Insert("BankPayment",
"StepChangeTransitAccountByAccount,
|StepClearByTransactionTypeBankPayment,
|StepClearByTransactionTypeBankPayment,
|StepPaymentListChangeAgreementByPartner,
|StepChangeTaxVisible,
|StepChangeVatRate_AgreementInList");

Binding.Insert("BankReceipt",
"StepChangeTransitAccountByAccount,
|StepClearByTransactionTypeBankReceipt,
|StepPaymentListChangeAgreementByPartner,
|StepChangeTaxVisible,
|StepChangeVatRate_AgreementInList");

Binding.Insert("CashPayment",
"StepClearByTransactionTypeCashPayment,
|StepPaymentListChangeAgreementByPartner,
|StepChangeTaxVisible,
|StepChangeVatRate_AgreementInList");

Binding.Insert("CashReceipt",
"StepClearByTransactionTypeCashReceipt,
|StepPaymentListChangeAgreementByPartner,
|StepChangeCashAccountByTransactionType,
|StepChangeTaxVisible,
|StepChangeVatRate_AgreementInList");
Expand Down Expand Up @@ -6837,6 +6841,7 @@ Procedure StepPaymentListChangeAgreementByPartner(Parameters, Chain) Export
Options.Agreement = GetPaymentListAgreement(Parameters, Row.Key);
Options.Company = GetCompany(Parameters);
Options.CurrentDate = GetDate(Parameters);
Options.TransactionType = GetTransactionType(Parameters);
Options.Key = Row.Key;
Options.StepName = "PaymentListChangeAgreementByPartner";
Chain.ChangeAgreementByPartner.Options.Add(Options);
Expand Down
43 changes: 11 additions & 32 deletions IRP/src/CommonModules/DocBankPaymentClient/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -227,46 +227,25 @@ Procedure AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessin
If CurrentData = Undefined Then
Return;
EndIf;

Parameters = New Structure();
Parameters.Insert("Partner" , CurrentData.Partner);
Parameters.Insert("LegalName", CurrentData.Payee);
Parameters.Insert("Company" , Object.Company);

OpenSettings = DocumentsClient.GetOpenSettingsStructure();
OpenSettings.ArrayOfFilters = New Array();
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True,
DataCompositionComparisonType.NotEqual));
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue(
"Enum.AgreementKinds.Standard"), DataCompositionComparisonType.NotEqual));
OpenSettings.FormParameters = New Structure();
OpenSettings.FormParameters.Insert("Partner", CurrentData.Partner);
OpenSettings.FormParameters.Insert("IncludeFilterByPartner", True);
OpenSettings.FormParameters.Insert("IncludePartnerSegments", True);
OpenSettings.FormParameters.Insert("EndOfUseDate", Object.Date);
OpenSettings.FormParameters.Insert("IncludeFilterByEndOfUseDate", True);
OpenSettings.FillingData = New Structure();
OpenSettings.FillingData.Insert("Partner", CurrentData.Partner);
OpenSettings.FillingData.Insert("LegalName", CurrentData.Payee);
OpenSettings.FillingData.Insert("Company", Object.Company);

DocumentsClient.AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessing, OpenSettings);
DocumentsClient.AgreementStartChoice_TransactionTypeFilter(Object, Form, Item, ChoiceData, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Export
CurrentData = Form.Items.PaymentList.CurrentData;
If CurrentData = Undefined Then
Return;
EndIf;

ArrayOfFilters = New Array();
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True, ComparisonType.NotEqual));
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue("Enum.AgreementKinds.Standard"),
ComparisonType.NotEqual));

AdditionalParameters = New Structure();
AdditionalParameters.Insert("IncludeFilterByEndOfUseDate", True);
AdditionalParameters.Insert("IncludeFilterByPartner", True);
AdditionalParameters.Insert("IncludePartnerSegments", True);
AdditionalParameters.Insert("EndOfUseDate", Object.Date);
AdditionalParameters.Insert("Partner", CurrentData.Partner);
DocumentsClient.AgreementEditTextChange(Object, Form, Item, Text, StandardProcessing, ArrayOfFilters,
AdditionalParameters);

Parameters = New Structure();
Parameters.Insert("Partner", CurrentData.Partner);

DocumentsClient.AgreementTextChange_TransactionTypeFilter(Object, Form, Item, Text, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

#EndRegion
Expand Down
39 changes: 9 additions & 30 deletions IRP/src/CommonModules/DocBankReceiptClient/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -219,24 +219,12 @@ Procedure AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessin
Return;
EndIf;

OpenSettings = DocumentsClient.GetOpenSettingsStructure();
OpenSettings.ArrayOfFilters = New Array();
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True,
DataCompositionComparisonType.NotEqual));
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue(
"Enum.AgreementKinds.Standard"), DataCompositionComparisonType.NotEqual));
OpenSettings.FormParameters = New Structure();
OpenSettings.FormParameters.Insert("Partner", CurrentData.Partner);
OpenSettings.FormParameters.Insert("IncludeFilterByPartner", True);
OpenSettings.FormParameters.Insert("IncludePartnerSegments", True);
OpenSettings.FormParameters.Insert("EndOfUseDate", Object.Date);
OpenSettings.FormParameters.Insert("IncludeFilterByEndOfUseDate", True);
OpenSettings.FillingData = New Structure();
OpenSettings.FillingData.Insert("Partner", CurrentData.Partner);
OpenSettings.FillingData.Insert("LegalName", CurrentData.Payer);
OpenSettings.FillingData.Insert("Company", Object.Company);
Parameters = New Structure();
Parameters.Insert("Partner" , CurrentData.Partner);
Parameters.Insert("LegalName", CurrentData.Payer);
Parameters.Insert("Company" , Object.Company);

DocumentsClient.AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessing, OpenSettings);
DocumentsClient.AgreementStartChoice_TransactionTypeFilter(Object, Form, Item, ChoiceData, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Export
Expand All @@ -245,19 +233,10 @@ Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Expo
Return;
EndIf;

ArrayOfFilters = New Array();
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True, ComparisonType.NotEqual));
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue("Enum.AgreementKinds.Standard"),
ComparisonType.NotEqual));

AdditionalParameters = New Structure();
AdditionalParameters.Insert("IncludeFilterByEndOfUseDate", True);
AdditionalParameters.Insert("IncludeFilterByPartner", True);
AdditionalParameters.Insert("IncludePartnerSegments", True);
AdditionalParameters.Insert("EndOfUseDate", Object.Date);
AdditionalParameters.Insert("Partner", CurrentData.Partner);
DocumentsClient.AgreementEditTextChange(Object, Form, Item, Text, StandardProcessing, ArrayOfFilters,
AdditionalParameters);
Parameters = New Structure();
Parameters.Insert("Partner", CurrentData.Partner);

DocumentsClient.AgreementTextChange_TransactionTypeFilter(Object, Form, Item, Text, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

#EndRegion
Expand Down
38 changes: 9 additions & 29 deletions IRP/src/CommonModules/DocCashPaymentClient/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -196,24 +196,12 @@ Procedure AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessin
Return;
EndIf;

OpenSettings = DocumentsClient.GetOpenSettingsStructure();
OpenSettings.ArrayOfFilters = New Array();
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True,
DataCompositionComparisonType.NotEqual));
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue(
"Enum.AgreementKinds.Standard"), DataCompositionComparisonType.NotEqual));
OpenSettings.FormParameters = New Structure();
OpenSettings.FormParameters.Insert("Partner", CurrentData.Partner);
OpenSettings.FormParameters.Insert("IncludeFilterByPartner", True);
OpenSettings.FormParameters.Insert("IncludePartnerSegments", True);
OpenSettings.FormParameters.Insert("EndOfUseDate", Object.Date);
OpenSettings.FormParameters.Insert("IncludeFilterByEndOfUseDate", True);
OpenSettings.FillingData = New Structure();
OpenSettings.FillingData.Insert("Partner", CurrentData.Partner);
OpenSettings.FillingData.Insert("LegalName", CurrentData.Payee);
OpenSettings.FillingData.Insert("Company", Object.Company);
Parameters = New Structure();
Parameters.Insert("Partner" , CurrentData.Partner);
Parameters.Insert("LegalName", CurrentData.Payee);
Parameters.Insert("Company" , Object.Company);

DocumentsClient.AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessing, OpenSettings);
DocumentsClient.AgreementStartChoice_TransactionTypeFilter(Object, Form, Item, ChoiceData, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Export
Expand All @@ -222,18 +210,10 @@ Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Expo
Return;
EndIf;

ArrayOfFilters = New Array();
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True, ComparisonType.NotEqual));
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue("Enum.AgreementKinds.Standard"),
ComparisonType.NotEqual));
AdditionalParameters = New Structure();
AdditionalParameters.Insert("IncludeFilterByEndOfUseDate", True);
AdditionalParameters.Insert("IncludeFilterByPartner", True);
AdditionalParameters.Insert("IncludePartnerSegments", True);
AdditionalParameters.Insert("EndOfUseDate", Object.Date);
AdditionalParameters.Insert("Partner", CurrentData.Partner);
DocumentsClient.AgreementEditTextChange(Object, Form, Item, Text, StandardProcessing, ArrayOfFilters,
AdditionalParameters);
Parameters = New Structure();
Parameters.Insert("Partner", CurrentData.Partner);

DocumentsClient.AgreementTextChange_TransactionTypeFilter(Object, Form, Item, Text, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

#EndRegion
Expand Down
38 changes: 9 additions & 29 deletions IRP/src/CommonModules/DocCashReceiptClient/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -201,24 +201,12 @@ Procedure AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessin
Return;
EndIf;

OpenSettings = DocumentsClient.GetOpenSettingsStructure();
OpenSettings.ArrayOfFilters = New Array();
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True,
DataCompositionComparisonType.NotEqual));
OpenSettings.ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue(
"Enum.AgreementKinds.Standard"), DataCompositionComparisonType.NotEqual));
OpenSettings.FormParameters = New Structure();
OpenSettings.FormParameters.Insert("Partner", CurrentData.Partner);
OpenSettings.FormParameters.Insert("IncludeFilterByPartner", True);
OpenSettings.FormParameters.Insert("IncludePartnerSegments", True);
OpenSettings.FormParameters.Insert("EndOfUseDate", Object.Date);
OpenSettings.FormParameters.Insert("IncludeFilterByEndOfUseDate", True);
OpenSettings.FillingData = New Structure();
OpenSettings.FillingData.Insert("Partner", CurrentData.Partner);
OpenSettings.FillingData.Insert("LegalName", CurrentData.Payer);
OpenSettings.FillingData.Insert("Company", Object.Company);
Parameters = New Structure();
Parameters.Insert("Partner" , CurrentData.Partner);
Parameters.Insert("LegalName", CurrentData.Payer);
Parameters.Insert("Company" , Object.Company);

DocumentsClient.AgreementStartChoice(Object, Form, Item, ChoiceData, StandardProcessing, OpenSettings);
DocumentsClient.AgreementStartChoice_TransactionTypeFilter(Object, Form, Item, ChoiceData, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Export
Expand All @@ -227,18 +215,10 @@ Procedure AgreementTextChange(Object, Form, Item, Text, StandardProcessing) Expo
Return;
EndIf;

ArrayOfFilters = New Array();
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("DeletionMark", True, ComparisonType.NotEqual));
ArrayOfFilters.Add(DocumentsClientServer.CreateFilterItem("Kind", PredefinedValue("Enum.AgreementKinds.Standard"),
ComparisonType.NotEqual));
AdditionalParameters = New Structure();
AdditionalParameters.Insert("IncludeFilterByEndOfUseDate", True);
AdditionalParameters.Insert("IncludeFilterByPartner", True);
AdditionalParameters.Insert("IncludePartnerSegments", True);
AdditionalParameters.Insert("EndOfUseDate", Object.Date);
AdditionalParameters.Insert("Partner", CurrentData.Partner);
DocumentsClient.AgreementEditTextChange(Object, Form, Item, Text, StandardProcessing, ArrayOfFilters,
AdditionalParameters);
Parameters = New Structure();
Parameters.Insert("Partner", CurrentData.Partner);

DocumentsClient.AgreementTextChange_TransactionTypeFilter(Object, Form, Item, Text, StandardProcessing, Object.TransactionType, Parameters);
EndProcedure

#EndRegion
Expand Down
65 changes: 54 additions & 11 deletions IRP/src/CommonModules/ModelClientServer_V2/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -3341,10 +3341,16 @@ Function ClearByTransactionTypeBankPaymentExecute(Options) Export
Or Options.TransactionType = Outgoing_ReturnToCustomerByPOS Then

StrByType = "
|Partner,
|Agreement,
|Payee,
|LegalNameContract";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If (PartnerType = "Vendor" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType))
Or (PartnerType = "Customer" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType)) Then
StrByType = StrByType + ",
|Partner";
EndIf;

If Options.TransactionType = Outgoing_ReturnToCustomerByPOS Then
StrByType = StrByType + ",
Expand All @@ -3360,10 +3366,15 @@ Function ClearByTransactionTypeBankPaymentExecute(Options) Export

ElsIf Options.TransactionType = Outgoing_OtherPartner Then
StrByType = "
|Partner,
|Agreement,
|Payee,
|LegalNameContract";
|LegalNameContract";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If PartnerType = "Other" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Outgoing_RetailCustomerAdvance Then
StrByType = "
|RetailCustomer,
Expand Down Expand Up @@ -3504,7 +3515,6 @@ Function ClearByTransactionTypeBankReceiptExecute(Options) Export
Or Options.TransactionType = Incoming_PaymentFromCustomerByPOS Then

StrByType = "
|Partner,
|Agreement,
|Payer,
|LegalNameContract";
Expand All @@ -3528,12 +3538,23 @@ Function ClearByTransactionTypeBankReceiptExecute(Options) Export
StrByType = StrByType + ", Project";
EndIf;

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If (PartnerType = "Vendor" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType))
Or (PartnerType = "Customer" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType)) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Incoming_OtherPartner Then
StrByType = "
|Partner,
|Agreement,
|Payer,
|LegalNameContract";
|LegalNameContract";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If PartnerType = "Other" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Incoming_TransferFromPOS Then
StrByType = "
|POSAccount,
Expand Down Expand Up @@ -3642,17 +3663,28 @@ Function ClearByTransactionTypeCashPaymentExecute(Options) Export
|RetailCustomer";
ElsIf Options.TransactionType = Outgoing_PaymentToVendor Or Options.TransactionType = Outgoing_ReturnToCustomer Then
StrByType = "
|Partner,
|Agreement,
|Payee,
|LegalNameContract,
|Project";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If (PartnerType = "Vendor" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType))
Or (PartnerType = "Customer" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType)) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Outgoing_OtherPartner Then
StrByType = "
|Partner,
|Agreement,
|Payee,
|LegalNameContract";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If PartnerType = "Other" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Outgoing_SalaryPayment Then
StrByType = "
|Employee,
Expand Down Expand Up @@ -3739,17 +3771,28 @@ Function ClearByTransactionTypeCashReceiptExecute(Options) Export
|AmountExchange";
ElsIf Options.TransactionType = Incoming_PaymentFromCustomer Or Options.TransactionType = Incoming_ReturnFromVendor Then
StrByType = "
|Partner,
|Agreement,
|Payer,
|LegalNameContract,
|Project";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If (PartnerType = "Vendor" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType))
Or (PartnerType = "Customer" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType)) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Incoming_OtherPartner Then
StrByType = "
|Partner,
|Agreement,
|Payer,
|LegalNameContract";
|LegalNameContract";

PartnerType = ModelServer_V2.GetPartnerTypeByTransactionType(Options.TransactionType);
If PartnerType = "Other" And CommonFunctionsServer.GetRefAttribute(Options.Partner, PartnerType) Then
StrByType = StrByType + ",
|Partner";
EndIf;
ElsIf Options.TransactionType = Incoming_RetailCustomerAdvance Then
StrByType = "
|RetailCustomer";
Expand Down
Loading

0 comments on commit d0c346b

Please sign in to comment.