1
0
mirror of https://github.com/IRPTeam/IRP.git synced 2025-09-16 08:56:27 +02:00

#IRP-714 #IRP-712 bugfix (#2848)

* #IRP-714

* #IRP-712

---------

Co-authored-by: Andrey Vorobyov <andrey.vorobyov@mail.com>
This commit is contained in:
Andrey Vorobyov
2025-08-11 10:12:45 +03:00
committed by GitHub
parent 58bd2e12c1
commit ced9caaa43
3 changed files with 13 additions and 8 deletions

View File

@@ -508,7 +508,7 @@ Function ExtractValueByType(ExtDimensionType, ObjectData, RowData, ArrayOfTypes,
EndIf;
EndDo;
Else
Raise R().UnsupportedRowDataType;
Raise R().UnsupportedRowDataType;
EndIf;
EndIf;
@@ -662,7 +662,8 @@ Function __GetAccountingOperationsByLedgerType(Ref, Period, DocTransactionType,
| InformationRegister.LedgerTypeOperations.SliceLast(&Period, LedgerType = &LedgerType
| AND AccountingOperation.Parent = &AccountingOperationGroup) AS LedgerTypeOperationsSliceLast
|WHERE
| LedgerTypeOperationsSliceLast.Use";
| LedgerTypeOperationsSliceLast.Use
| AND NOT LedgerTypeOperationsSliceLast.AccountingOperation.DeletionMark";
Query.SetParameter("Period", Period);
Query.SetParameter("LedgerType", LedgerType);
Query.SetParameter("AccountingOperationGroup", AccountingOperationGroup);
@@ -1950,9 +1951,8 @@ Procedure FillAccountingRowAnalytics(Parameters, Row = Undefined)
AnalyticParameters.Insert("MetadataName" , Parameters.MetadataName);
AnalyticData = Documents[Parameters.MetadataName].GetAccountingAnalytics(AnalyticParameters);
If AnalyticData = Undefined Then
Raise StrTemplate(R().DocumentAccountingOpNotSupported,
Parameters.MetadataName, Parameters.Operation);
If AnalyticData = Undefined Then
Raise StrTemplate(R().DocumentAccountingOpNotSupported, Parameters.MetadataName, Parameters.Operation);
EndIf;
AnalyticRow.Operation = AnalyticData.Operation;

View File

@@ -25,6 +25,10 @@ Function IsUseCompanies() Export
Return GetFunctionalOption("UseCompanies");
EndFunction
Function IsUseLegalName() Export
Return GetFunctionalOption("UseLegalName");
EndFunction
Function IsUsePartnersHierarchy() Export
Return GetFunctionalOption("UsePartnersHierarchy");
EndFunction
@@ -269,7 +273,7 @@ Function GetDefault_Store(Value = Undefined, IsUpdateDefaults = False) Export
EndFunction
Function GetDefault_LegalName(Parameters, Value = Undefined) Export
If IsUseCompanies() Then
If IsUseLegalName() Then
Return Value;
EndIf;
Query = New Query();
@@ -286,7 +290,7 @@ Function GetDefault_LegalName(Parameters, Value = Undefined) Export
QuerySelection = QueryResult.Select();
If QuerySelection.Next() Then
If QuerySelection.Count() > 1 Then
Raise StrTemplate(R().Error_FoundMoreThanOneCompany);
Raise StrTemplate(R().Error_FoundMoreThanOneCompany);
EndIf;
Return New Structure("Ref, DeletionMark", QuerySelection.Ref, QuerySelection.DeletionMark);
EndIf;
@@ -404,7 +408,7 @@ Function CreateDefault_AgreementByType(Partner, AgreementType, Value)
EndFunction
Function CreateDefault_LegalName(Parameters, Value = Undefined) Export
If IsUseCompanies() Then
If IsUseLegalName() Then
Return Value;
EndIf;

View File

@@ -609,6 +609,7 @@ Function GetAnalytics_WithholdingTax(Parameters)
Parameters.ObjectData.TaxAgreement,
Parameters.ObjectData.TaxAgreement.CurrencyMovementType.Currency);
AdditionalAnalytics = New Structure;
AdditionalAnalytics.Insert("WithholdingTax", TaxesServer.GetWithholdingTaxRef());
AdditionalAnalytics.Insert("Company" , Parameters.ObjectData.Company);
AdditionalAnalytics.Insert("Partner" , Parameters.ObjectData.TaxPartner);
AdditionalAnalytics.Insert("Agreement" , Parameters.ObjectData.TaxAgreement);