diff --git a/IRP/src/AccumulationRegisters/R5022T_Expenses/ManagerModule.bsl b/IRP/src/AccumulationRegisters/R5022T_Expenses/ManagerModule.bsl
index 8ae60a6fd0..5988f8d603 100644
--- a/IRP/src/AccumulationRegisters/R5022T_Expenses/ManagerModule.bsl
+++ b/IRP/src/AccumulationRegisters/R5022T_Expenses/ManagerModule.bsl
@@ -98,19 +98,23 @@ Procedure Expenses_LoadRecords(CalculationMovementCostRef) Export
CurrenciesParameters = New Structure();
PostingDataTables = New Map();
- PostingDataTables.Insert(RecordSet, New Structure("RecordSet", ExpenseTable));
+
+ ExpenseTableSettings = PostingServer.PostingTableSettings(RecordSet.Metadata().Name, ExpenseTable, RecordSet);
+ PostingDataTables.Insert(RecordSet.Metadata(), ExpenseTableSettings);
+
ArrayOfPostingInfo = New Array();
For Each DataTable In PostingDataTables Do
ArrayOfPostingInfo.Add(DataTable);
EndDo;
CurrenciesParameters.Insert("Object", QuerySelection.Document);
+ CurrenciesParameters.Insert("Metadata", QuerySelection.Document.Metadata());
CurrenciesParameters.Insert("ArrayOfPostingInfo", ArrayOfPostingInfo);
CurrenciesServer.PreparePostingDataTables(CurrenciesParameters, Undefined);
For Each ItemOfPostingInfo In ArrayOfPostingInfo Do
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R5022T_Expenses") Then
+ If ItemOfPostingInfo.Key = Metadata.AccumulationRegisters.R5022T_Expenses Then
RecordSet.Read();
- For Each RowPostingInfo In ItemOfPostingInfo.Value.RecordSet Do
+ For Each RowPostingInfo In ItemOfPostingInfo.Value.PrepareTable Do
FillPropertyValues(RecordSet.Add(), RowPostingInfo);
EndDo;
RecordSet.SetActive(True);
diff --git a/IRP/src/AccumulationRegisters/R6020B_BatchBalance/ManagerModule.bsl b/IRP/src/AccumulationRegisters/R6020B_BatchBalance/ManagerModule.bsl
index ee30586fa6..204dd0289e 100644
--- a/IRP/src/AccumulationRegisters/R6020B_BatchBalance/ManagerModule.bsl
+++ b/IRP/src/AccumulationRegisters/R6020B_BatchBalance/ManagerModule.bsl
@@ -30,7 +30,7 @@ Procedure BatchBalance_Clear(DocObjectRef, Cancel) Export
EndDo;
EndProcedure
-Procedure BatchBalance_CollectRecords(DocObject) Export
+Function BatchBalance_CollectRecords(DocObject) Export
Query = New Query;
Query.Text =
"SELECT
@@ -198,9 +198,8 @@ Procedure BatchBalance_CollectRecords(DocObject) Export
|WHERE
| R6040T_BatchShortageIncoming.Document = &Document";
Query.SetParameter("Document", DocObject.Ref);
- QueryResult = Query.Execute();
- DocObject.RegisterRecords.R6020B_BatchBalance.Load(QueryResult.Unload());
-EndProcedure
+ Return Query.Execute().Unload();
+EndFunction
Procedure BatchBalance_LoadRecords(CalculationMovementCostRef) Export
Query = New Query;
diff --git a/IRP/src/AccumulationRegisters/R6060T_CostOfGoodsSold/ManagerModule.bsl b/IRP/src/AccumulationRegisters/R6060T_CostOfGoodsSold/ManagerModule.bsl
index 84452d5881..55f04279db 100644
--- a/IRP/src/AccumulationRegisters/R6060T_CostOfGoodsSold/ManagerModule.bsl
+++ b/IRP/src/AccumulationRegisters/R6060T_CostOfGoodsSold/ManagerModule.bsl
@@ -32,7 +32,7 @@ Procedure CostOfGoodsSold_Clear(DocObjectRef, Cancel) Export
EndDo;
EndProcedure
-Procedure CostOfGoodsSold_CollectRecords(DocObject) Export
+Function CostOfGoodsSold_CollectRecords(DocObject) Export
Query = New Query;
Query.Text =
"SELECT
@@ -249,9 +249,8 @@ Procedure CostOfGoodsSold_CollectRecords(DocObject) Export
| OR BatchWiseBalance.AllocatedRevenueTaxAmount <> 0)";
Query.SetParameter("Document", DocObject.Ref);
- QueryResult = Query.Execute();
- DocObject.RegisterRecords.R6060T_CostOfGoodsSold.Load(QueryResult.Unload());
-EndProcedure
+ Return Query.Execute().Unload();
+EndFunction
Procedure CostOfGoodsSold_LoadRecords(CalculationMovementCostRef) Export
Query = New Query;
diff --git a/IRP/src/AccumulationRegisters/R8510B_BookValueOfFixedAsset/ManagerModule.bsl b/IRP/src/AccumulationRegisters/R8510B_BookValueOfFixedAsset/ManagerModule.bsl
index b318abbd7e..072d7f69f7 100644
--- a/IRP/src/AccumulationRegisters/R8510B_BookValueOfFixedAsset/ManagerModule.bsl
+++ b/IRP/src/AccumulationRegisters/R8510B_BookValueOfFixedAsset/ManagerModule.bsl
@@ -72,19 +72,23 @@ Procedure BookValueOfFixedAsset_LoadRecords(CalculationMovementCostRef) Export
CurrenciesParameters = New Structure();
PostingDataTables = New Map();
- PostingDataTables.Insert(RecordSet, New Structure("RecordSet", BookValueTable));
+
+ BookValueTableSettings = PostingServer.PostingTableSettings(RecordSet.Metadata().Name, BookValueTable, RecordSet);
+ PostingDataTables.Insert(RecordSet.Metadata(), BookValueTableSettings);
+
ArrayOfPostingInfo = New Array();
For Each DataTable In PostingDataTables Do
ArrayOfPostingInfo.Add(DataTable);
EndDo;
CurrenciesParameters.Insert("Object", QuerySelection.Document);
+ CurrenciesParameters.Insert("Metadata", QuerySelection.Document.Metadata());
CurrenciesParameters.Insert("ArrayOfPostingInfo", ArrayOfPostingInfo);
CurrenciesServer.PreparePostingDataTables(CurrenciesParameters, Undefined);
For Each ItemOfPostingInfo In ArrayOfPostingInfo Do
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R8510B_BookValueOfFixedAsset") Then
+ If ItemOfPostingInfo.Key = Metadata.AccumulationRegisters.R8510B_BookValueOfFixedAsset Then
RecordSet.Read();
- For Each RowPostingInfo In ItemOfPostingInfo.Value.RecordSet Do
+ For Each RowPostingInfo In ItemOfPostingInfo.Value.PrepareTable Do
FillPropertyValues(RecordSet.Add(), RowPostingInfo);
EndDo;
RecordSet.SetActive(True);
diff --git a/IRP/src/ChartsOfAccounts/Basic/ObjectModule.bsl b/IRP/src/ChartsOfAccounts/Basic/ObjectModule.bsl
index 2469f73a92..502f46c9e3 100644
--- a/IRP/src/ChartsOfAccounts/Basic/ObjectModule.bsl
+++ b/IRP/src/ChartsOfAccounts/Basic/ObjectModule.bsl
@@ -6,7 +6,9 @@ Procedure BeforeWrite(Cancel)
Result = GetSearchCodeAndOrder(ThisObject.Code);
ThisObject.SearchCode = Result.SearchCode;
- ThisObject.Order = Result.Order;
+ If Not ValueIsFilled(ThisObject.Order) Then
+ ThisObject.Order = Result.Order;
+ EndIf;
EndProcedure
Function GetSearchCodeAndOrder(_Code)
diff --git a/IRP/src/CommonForms/ReportForm/Form.form b/IRP/src/CommonForms/ReportForm/Form.form
index daa443c665..fd7d0419a4 100644
--- a/IRP/src/CommonForms/ReportForm/Form.form
+++ b/IRP/src/CommonForms/ReportForm/Form.form
@@ -1061,6 +1061,10 @@
Left
true
+
+ DetailProcessing
+ ResultDetailProcessing
+
100
true
10
@@ -1517,6 +1521,31 @@
+
+ IsDetailProcessing
+
+ en
+ Is detail processing
+
+
+ ru
+ Обрабатывается детализация
+
+
+ tr
+ Detal işleniyor
+
+ 5
+
+ Boolean
+
+
+ true
+
+
+ true
+
+
CustomParameters
@@ -1567,6 +1596,12 @@
Auto
+
+ IsDetailProcessing
+
+ Boolean
+
+
diff --git a/IRP/src/CommonForms/ReportForm/Module.bsl b/IRP/src/CommonForms/ReportForm/Module.bsl
index 9fc8b5f82f..80f813ca3d 100644
--- a/IRP/src/CommonForms/ReportForm/Module.bsl
+++ b/IRP/src/CommonForms/ReportForm/Module.bsl
@@ -1,13 +1,20 @@
+
#Region FormEventHandlers
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
- ReportFullName = ReportName();
+ ThisObject.IsDetailProcessing = Parameters.IsDetailProcessing;
+ ReportFullName = ReportName(ThisObject);
ExternalCommandsServer.CreateCommands(ThisObject, ReportFullName, Enums.FormTypes.ObjectForm);
EndProcedure
&AtClient
Procedure OnOpen(Cancel)
+ If ThisObject.IsDetailProcessing Then
+ ThisObject.VariantModified = False;
+ ComposeResult();
+ EndIf;
+
CustomParametersSwitch();
EditReportSwitch();
EndProcedure
@@ -47,9 +54,9 @@ EndProcedure
#Region Private
-&AtServer
-Function ReportName()
- SplittedFormName = StrSplit(ThisObject.FormName, ".");
+&AtClientAtServerNoContext
+Function ReportName(Form)
+ SplittedFormName = StrSplit(Form.FormName, ".");
SplittedFormName.Delete(SplittedFormName.UBound());
Return StrConcat(SplittedFormName, ".");
EndFunction
@@ -65,4 +72,265 @@ Procedure EditReportSwitch()
Items.Result.Edit = Items.FormEditReport.Check;
EndProcedure
-#EndRegion
\ No newline at end of file
+#EndRegion
+
+&AtClient
+Procedure ResultDetailProcessing(Item, Details, StandardProcessing, AdditionalParameters)
+ _ReportName = StrSplit(ThisObject.FormName, ".")[1];
+ ReportsWithDetailProcessing = GetReportsWithDetailProcesing();
+ If ReportsWithDetailProcessing.Find(_ReportName) = Undefined Then
+ Return; // report not support detail processing
+ EndIf;
+
+ DetailsInfo = ExtractDetailsInfo(_ReportName, Details);
+
+ If Not DetailsInfo.AdditionalDetailsActions.MenuList.Count() Then
+ Return; // additional menu list is empty
+ EndIf;
+
+ StandardProcessing = False;
+
+ SourceOfSettings = New DataCompositionAvailableSettingsSource(ThisObject.Report);
+ DetailsProcess = New DataCompositionDetailsProcess(ThisObject.DetailsData, SourceOfSettings);
+
+ StandardActions = New Array();
+ StandardActions.Add(DataCompositionDetailsProcessingAction.ApplyAppearance);
+ StandardActions.Add(DataCompositionDetailsProcessingAction.DrillDown);
+ StandardActions.Add(DataCompositionDetailsProcessingAction.Filter);
+ StandardActions.Add(DataCompositionDetailsProcessingAction.Group);
+ StandardActions.Add(DataCompositionDetailsProcessingAction.OpenValue);
+ StandardActions.Add(DataCompositionDetailsProcessingAction.Order);
+ StandardActions.Add(DataCompositionDetailsProcessingAction.None);
+
+ NotifyParameters = New Structure("Details, DetailsInfo, ReportName", Details, DetailsInfo, _ReportName);
+
+ Notify = New NotifyDescription("DoDetailProcess", ThisObject, NotifyParameters);
+ DetailsProcess.ShowActionChoice(Notify, Details, StandardActions, DetailsInfo.AdditionalDetailsActions.MenuList);
+EndProcedure
+
+&AtClient
+Procedure DoDetailProcess(SelectedAction, ApplyingSettings, NotifyParams) Экспорт
+
+ If SelectedAction = DataCompositionDetailsProcessingAction.None Then
+ Return;
+ ElsIf SelectedAction = DataCompositionDetailsProcessingAction.DrillDown
+ Or SelectedAction = DataCompositionDetailsProcessingAction.ApplyAppearance
+ Or SelectedAction = DataCompositionDetailsProcessingAction.Filter
+ Or SelectedAction = DataCompositionDetailsProcessingAction.Group
+ Or SelectedAction = DataCompositionDetailsProcessingAction.Order Then
+
+ DetailsProcessDescription = New DataCompositionDetailsProcessDescription(ThisObject.DetailsData, NotifyParams.Details, ApplyingSettings);
+
+ ReportParameters = New Structure();
+ ReportParameters.Insert("GenerateOnOpen", True);
+ ReportParameters.Insert("Details" , DetailsProcessDescription);
+
+ OpenForm(ThisObject.FormName, ReportParameters, , New UUID());
+
+ ElsIf SelectedAction = DataCompositionDetailsProcessingAction.OpenValue Then
+ ShowValue(,ApplyingSettings);
+ Else
+
+ OtherReportFormName = NotifyParams.DetailsInfo.AdditionalDetailsActions.OtherReportMapping[SelectedAction];
+ OtherReportForm = GetForm(OtherReportFormName, New Structure("IsDetailProcessing", True), ThisObject, New UUID());
+
+ SettingsComposer1 = ThisObject.Report.SettingsComposer;
+ SettingsComposer2 = OtherReportForm.Report.SettingsComposer;
+
+ ApplyingFilters = GetApplyingFilters(NotifyParams.ReportName, SelectedAction, NotifyParams.DetailsInfo.DetailValuesMap);
+
+ If ApplyingFilters.Property("DataParameters") Then
+ For Each DataParameter In ApplyingFilters.DataParameters Do
+ SourceParameter = GetSettingsComposerParameter(SettingsComposer1, DataParameter.Key);
+ SetSettingsComposerParameter(SettingsComposer2, DataParameter.Value, SourceParameter.Value, SourceParameter.Use);
+ EndDo;
+ EndIf;
+
+ If ApplyingFilters.Property("UserFilters") Then
+ For Each UserFilter In ApplyingFilters.UserFilters Do
+ SourceFilter = GetSettingsComposerFilter(SettingsComposer1, UserFilter.Key);
+ If SourceFilter <> Undefined And SourceFilter.Use Then
+ _Name = UserFilter.Value;
+ _Value = SourceFilter.Value;
+ _ComparisonType = SourceFilter.ComparisonType;
+ SetSettingsComposerFilter(SettingsComposer2, _Name, _Value, _ComparisonType);
+ EndIf;
+ EndDo;
+ EndIf;
+
+ If ApplyingFilters.Property("DetailsFilters") Then
+ For Each DetailFilter In ApplyingFilters.DetailsFilters Do
+ _Name = DetailFilter.Value.FieldName;
+ _Value = DetailFilter.Key;
+ _ComparisonType = DetailFilter.Value.ComparisonType;
+ SetSettingsComposerFilter(SettingsComposer2, _Name, _Value, _ComparisonType);
+ EndDo;
+ EndIf;
+
+ If ApplyingFilters.Property("DetailsFiltersGroupOR") Then
+ For Each GroupItem In ApplyingFilters.DetailsFiltersGroupOR Do
+ GroupOr = CreateSettingsComposerFilterGroup(SettingsComposer2, "OR");
+ For Each FilterItem In GroupItem Do
+ For Each DetailFilter In FilterItem Do
+ _Name = DetailFilter.Value.FieldName;
+ _Value = DetailFilter.Key;
+ _ComparisonType = DetailFilter.Value.ComparisonType;
+ AddSettingsComposerFilterToGroup(SettingsComposer2, GroupOr, _Name, _Value, _ComparisonType);
+ EndDo;
+ EndDo;
+ EndDo;
+ EndIf;
+
+ OtherReportForm.Open();
+ EndIf;
+EndProcedure
+
+&AtServer
+Function ExtractDetailsInfo(_ReportName, Details)
+ DetailsDataPaths = Reports[_ReportName].GetDetailsDataPaths();
+ ArrayOfDetailsDataPaths = StrSplit(DetailsDataPaths, ",");
+ For i=0 To ArrayOfDetailsDataPaths.Count() -1 Do
+ ArrayOfDetailsDataPaths[i] = TrimAll(ArrayOfDetailsDataPaths[i]);
+ EndDo;
+
+ Data = GetFromTempStorage(ThisObject.DetailsData);
+ DetailValuesMap = Новый Map();
+ FillMapByDataPaths(Data.Items[Details], DetailValuesMap, ArrayOfDetailsDataPaths);
+
+ AdditionalDetailsActions = Reports[_ReportName].GetAdditionalDetailsActions(DetailValuesMap);
+
+ Return New Structure("DetailValuesMap, AdditionalDetailsActions", DetailValuesMap, AdditionalDetailsActions);
+EndFunction
+
+&AtServer
+Procedure FillMapByDataPaths(FieldOrGroup, DetailValuesMap, ArrayOfDetailsDataPaths)
+ ArrayOfParents = FieldOrGroup.GetParents();
+ For Each Parent In ArrayOfParents Do
+ If TypeOf(Parent) = Type("DataCompositionGroupDetailsItem") Then
+ FillMapByDataPaths(Parent, DetailValuesMap, ArrayOfDetailsDataPaths);
+ ElsIf TypeOf(Parent) = Type("DataCompositionFieldDetailsItem") Then
+ ArrayOfFields = Parent.GetFields();
+ For Each FieldInfo In ArrayOfFields Do
+ If ArrayOfDetailsDataPaths.Find(FieldInfo.Field) <> Undefined
+ And Not ValueIsFilled(DetailValuesMap[FieldInfo.Field]) Then
+ DetailValuesMap[FieldInfo.Field] = FieldInfo.Value;
+ EndIf;
+ FillMapByDataPaths(Parent, DetailValuesMap, ArrayOfDetailsDataPaths);
+ EndDo;
+ EndIf;
+ EndDo;
+EndProcedure
+
+&AtServer
+Function GetApplyingFilters(_ReportName, SelectedAction, DetailValuesMap)
+ Return Reports[_ReportName].GetApplyingFilters(SelectedAction, DetailValuesMap);
+EndFunction
+
+&AtClient
+Function GetSettingsComposerFilter(SettingsComposer, Name)
+ FindField = New DataCompositionField(Name);
+ For Each Item In SettingsComposer.Settings.Filter.Items Do
+ If Item.LeftValue = FindField Then
+ UserFilterItem = SettingsComposer.UserSettings.Items.Find(Item.UserSettingID);
+ Filter = New Structure();
+ Filter.Insert("Value", UserFilterItem.RightValue);
+ Filter.Insert("Use", UserFilterItem.Use);
+ Filter.Insert("ComparisonType", UserFilterItem.ComparisonType);
+ Return Filter;
+ EndIf;
+ EndDo;;
+ Return Undefined;
+EndFunction
+
+&AtClient
+Function GetSettingsComposerParameter(SettingsComposer, Name)
+ Id = SettingsComposer.Settings.DataParameters.Items.Find(Name).UserSettingID;
+ Parameter = SettingsComposer.UserSettings.Items.Find(Id);
+ Return New Structure("Value, Use", Parameter.Value, Parameter.Use);
+EndFunction
+
+&AtClient
+Procedure SetSettingsComposerParameter(SettingsComposer, Name, Value, Use)
+ Id = SettingsComposer.Settings.DataParameters.Items.Find(Name).UserSettingID;
+ Parameter = SettingsComposer.UserSettings.Items.Find(Id);
+ Parameter.Value = Value;
+ Parameter.Use = Use;
+EndProcedure
+
+&AtClient
+Procedure SetSettingsComposerFilter(SettingsComposer, Name, Value, ComparisonType)
+ Field = New DataCompositionField(Name);
+
+ FilterItem = Undefined;
+ For Each Item In SettingsComposer.Settings.Filter.Items Do
+ If Item.LeftValue = Field Then
+ FilterItem = Item;
+ Break;
+ EndIf;
+ EndDo;
+
+ If FilterItem <> Undefined Then
+ UserFilterItem = SettingsComposer.UserSettings.Items.Find(FilterItem.UserSettingID);
+ UserFilterItem.ComparisonType = ComparisonType;
+ UserFilterItem.Use = True;
+ UserFilterItem.RightValue = Value;
+ Return;
+ EndIf;
+
+ Found = False;
+ For Each Item In SettingsComposer.UserSettings.Items Do
+ If TypeOf(Item) = Type("DataCompositionFilter") Then
+ UserFilterItem = Item.Items.Add(Type("DataCompositionFilterItem"));
+ UserFilterItem.LeftValue = Field;
+ UserFilterItem.ComparisonType = ComparisonType;
+ UserFilterItem.Use = True;
+ UserFilterItem.RightValue = Value;
+ Found = True;
+ EndIf;
+ EndDo;
+
+ If Not Found Then
+ If SettingsComposer.Settings.Filter.FilterAvailableFields.Items.Find(Name) <> Undefined Then
+ UserFilterItem = SettingsComposer.Settings.Filter.Items.Add(Type("DataCompositionFilterItem"));
+ UserFilterItem.LeftValue = Field;
+ UserFilterItem.ComparisonType = ComparisonType;
+ UserFilterItem.Use = True;
+ UserFilterItem.RightValue = Value;
+ UserFilterItem.UserSettingID = New UUID();
+ EndIf;
+ EndIf;
+EndProcedure
+
+&AtClient
+Function CreateSettingsComposerFilterGroup(SettingsComposer, GroupType)
+ FilterGroup = SettingsComposer.Settings.Filter.Items.Add(Type("DataCompositionFilterItemGroup"));
+ If Upper(GroupType) = "OR" Then
+ FilterGroup.GroupType = DataCompositionFilterItemsGroupType.OrGroup;
+ ElsIf Upper(GroupType) = "NOT" Then
+ FilterGroup.GroupType = DataCompositionFilterItemsGroupType.NotGroup;
+ ElsIf Upper(GroupType) = "AND" Then
+ FilterGroup.GroupType = DataCompositionFilterItemsGroupType.AndGroup;
+ EndIf;
+ Return FilterGroup;
+EndFunction
+
+&AtClient
+Procedure AddSettingsComposerFilterToGroup(SettingsComposer, FilterGroup, Name, Value, ComparisonType)
+ If SettingsComposer.Settings.Filter.FilterAvailableFields.Items.Find(Name) <> Undefined Then
+ UserFilterItem = FilterGroup.Items.Add(Type("DataCompositionFilterItem"));
+ UserFilterItem.LeftValue = New DataCompositionField(Name);
+ UserFilterItem.ComparisonType = ComparisonType;
+ UserFilterItem.Use = True;
+ UserFilterItem.RightValue = Value;
+// UserFilterItem.UserSettingID = New UUID();
+ EndIf;
+EndProcedure
+
+&AtClient
+Function GetReportsWithDetailProcesing()
+ ReportsWithDetails = New Array();
+ ReportsWithDetails.Add("TrialBalance");
+ ReportsWithDetails.Add("TrialBalanceByAccount");
+ ReportsWithDetails.Add("AccountAnalysis");
+ Return ReportsWithDetails;
+EndFunction
diff --git a/IRP/src/CommonModules/AccountingServer/Module.bsl b/IRP/src/CommonModules/AccountingServer/Module.bsl
index 3ca368363c..3177463048 100644
--- a/IRP/src/CommonModules/AccountingServer/Module.bsl
+++ b/IRP/src/CommonModules/AccountingServer/Module.bsl
@@ -490,16 +490,16 @@ Function __GetT9011S_AccountsCashAccount(Period, Company, LedgerTypeVariant, Cas
Return Result;
EndFunction
-Function GetT9012S_AccountsPartner(AccountParameters, Partner, Agreement) Export
+Function GetT9012S_AccountsPartner(AccountParameters, Partner, Agreement, Currency) Export
Return AccountingServerReuse.GetT9012S_AccountsPartner_Reuse(
// Return __GetT9012S_AccountsPartner(
AccountParameters.Period,
AccountParameters.Company,
AccountParameters.LedgerTypeVariant,
- Partner, Agreement);
+ Partner, Agreement, Currency);
EndFunction
-Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner, Agreement) Export
+Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner, Agreement, Currency) Export
Query = New Query();
Query.Text =
"SELECT
@@ -512,7 +512,8 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Agreement = &Agreement
- | AND Partner.Ref IS NULL) AS ByAgreement
+ | AND Partner.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByAgreement
|
|UNION ALL
|
@@ -525,20 +526,36 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Partner = &Partner
- | AND Agreement.Ref IS NULL) AS ByPartner
+ | AND Agreement.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByPartner
+ |
+ |UNION ALL
+ |
+ |SELECT
+ | ByCurrency.AccountAdvancesVendor,
+ | ByCurrency.AccountTransactionsVendor,
+ | 3
+ |FROM
+ | InformationRegister.T9012S_AccountsPartner.SliceLast(&Period, Vendor
+ | AND Company = &Company
+ | AND LedgerTypeVariant = &LedgerTypeVariant
+ | AND Currency = &Currency
+ | AND Agreement.Ref IS NULL
+ | AND Partner.Ref IS NULL) AS ByCurrency
|
|UNION ALL
|
|SELECT
| ByCompany.AccountAdvancesVendor,
| ByCompany.AccountTransactionsVendor,
- | 3
+ | 4
|FROM
| InformationRegister.T9012S_AccountsPartner.SliceLast(&Period, Vendor
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Partner.Ref IS NULL
- | AND Agreement.Ref IS NULL) AS ByCompany
+ | AND Agreement.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByCompany
|;
|
|///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -552,7 +569,8 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Agreement = &Agreement
- | AND Partner.Ref IS NULL) AS ByAgreement
+ | AND Partner.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByAgreement
|
|UNION ALL
|
@@ -565,20 +583,36 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Partner = &Partner
- | AND Agreement.Ref IS NULL) AS ByPartner
+ | AND Agreement.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByPartner
+ |
+ |UNION ALL
+ |
+ |SELECT
+ | ByCurrency.AccountAdvancesCustomer,
+ | ByCurrency.AccountTransactionsCustomer,
+ | 3
+ |FROM
+ | InformationRegister.T9012S_AccountsPartner.SliceLast(&Period, Customer
+ | AND Company = &Company
+ | AND LedgerTypeVariant = &LedgerTypeVariant
+ | AND Currency = &Currency
+ | AND Agreement.Ref IS NULL
+ | AND Partner.Ref IS NULL) AS ByCurrency
|
|UNION ALL
|
|SELECT
| ByCompany.AccountAdvancesCustomer,
| ByCompany.AccountTransactionsCustomer,
- | 3
+ | 4
|FROM
| InformationRegister.T9012S_AccountsPartner.SliceLast(&Period, Customer
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Partner.Ref IS NULL
- | AND Agreement.Ref IS NULL) AS ByCompany
+ | AND Agreement.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByCompany
|;
|
|/////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -592,7 +626,8 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Agreement = &Agreement
- | AND Partner.Ref IS NULL) AS ByAgreement
+ | AND Partner.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByAgreement
|
|UNION ALL
|
@@ -605,14 +640,29 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
| AND Company = &Company
| AND LedgerTypeVariant = &LedgerTypeVariant
| AND Partner = &Partner
- | AND Agreement.Ref IS NULL) AS ByPartner
+ | AND Agreement.Ref IS NULL
+ | AND Currency.Ref IS NULL) AS ByPartner
+ |
+ |UNION ALL
+ |
+ |SELECT
+ | ByCurrency.AccountAdvancesOther,
+ | ByCurrency.AccountTransactionsOther,
+ | 3
+ |FROM
+ | InformationRegister.T9012S_AccountsPartner.SliceLast(&Period, Other
+ | AND Company = &Company
+ | AND LedgerTypeVariant = &LedgerTypeVariant
+ | AND Currency = &Currency
+ | AND Agreement.Ref IS NULL
+ | AND Partner.Ref IS NULL) AS ByCurrency
|
|UNION ALL
|
|SELECT
| ByCompany.AccountAdvancesOther,
| ByCompany.AccountTransactionsOther,
- | 3
+ | 4
|FROM
| InformationRegister.T9012S_AccountsPartner.SliceLast(&Period, Other
| AND Company = &Company
@@ -661,6 +711,7 @@ Function __GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner
Query.SetParameter("LedgerTypeVariant" , LedgerTypeVariant);
Query.SetParameter("Partner" , Partner);
Query.SetParameter("Agreement" , Agreement);
+ Query.SetParameter("Currency" , Currency);
QueryResults = Query.ExecuteBatch();
@@ -925,6 +976,9 @@ Procedure UpdateAccountingTables(Object,
EndDo;
EndDo;
EndIf;
+
+ AccountingRowAnalytics.FillValues(Object.Ref, "Document");
+ AccountingExtDimensions.FillValues(Object.Ref, "Document");
EndProcedure
Function GetDocumentData(Object, TableRow, MainTableName)
@@ -1207,19 +1261,23 @@ Function GetAccountingData_LandedCost(Parameters)
CurrenciesParameters = New Structure();
PostingDataTables = New Map();
- PostingDataTables.Insert(RecordSet_AccountingAmounts, New Structure("RecordSet", TableAccountingAmounts));
+
+ TableAccountingAmountsSettings = PostingServer.PostingTableSettings(RecordSet_AccountingAmounts.Metadata().Name, TableAccountingAmounts, RecordSet_AccountingAmounts);
+ PostingDataTables.Insert(RecordSet_AccountingAmounts.Metadata(), TableAccountingAmountsSettings);
+
ArrayOfPostingInfo = New Array();
For Each DataTable In PostingDataTables Do
ArrayOfPostingInfo.Add(DataTable);
EndDo;
CurrenciesParameters.Insert("Object", Parameters.Recorder);
+ CurrenciesParameters.Insert("Metadata", Parameters.Recorder.Metadata());
CurrenciesParameters.Insert("ArrayOfPostingInfo", ArrayOfPostingInfo);
CurrenciesParameters.Insert("IsLandedCost", True);
CurrenciesServer.PreparePostingDataTables(CurrenciesParameters, CurrenciesTable);
For Each ItemOfPostingInfo In ArrayOfPostingInfo Do
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.T1040T_AccountingAmounts") Then
- For Each RowPostingInfo In ItemOfPostingInfo.Value.RecordSet Do
+ If ItemOfPostingInfo.Key = Metadata.AccumulationRegisters.T1040T_AccountingAmounts Then
+ For Each RowPostingInfo In ItemOfPostingInfo.Value.PrepareTable Do
FillPropertyValues(CalculatedTableAccountingAmounts.Add(), RowPostingInfo);
EndDo;
EndIf;
@@ -1647,8 +1705,8 @@ Procedure UpdateAnalyticsJE(QueryTable)
_AccountingExtDimensions,
AccountingClientServer.GetDocumentMainTable(Row.Ref));
- _AccountingRowAnalytics.FillValues(True, "Active");
- _AccountingExtDimensions.FillValues(True, "Active");
+ //_AccountingRowAnalytics.FillValues(True, "Active");
+ //_AccountingExtDimensions.FillValues(True, "Active");
RecordSet_T9050S.Load(_AccountingRowAnalytics);
RecordSet_T9050S.Write();
diff --git a/IRP/src/CommonModules/AccountingServerReuse/Module.bsl b/IRP/src/CommonModules/AccountingServerReuse/Module.bsl
index a0c1db4501..1d6e4e8bd4 100644
--- a/IRP/src/CommonModules/AccountingServerReuse/Module.bsl
+++ b/IRP/src/CommonModules/AccountingServerReuse/Module.bsl
@@ -7,8 +7,8 @@ Function GetT9011S_AccountsCashAccount_Reuse(Period, Company, LedgerTypeVariant,
Return AccountingServer.__GetT9011S_AccountsCashAccount(Period, Company, LedgerTypeVariant, CashAccount);
EndFunction
-Function GetT9012S_AccountsPartner_Reuse(Period, Company, LedgerTypeVariant, Partner, Agreement) Export
- Return AccountingServer.__GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner, Agreement);
+Function GetT9012S_AccountsPartner_Reuse(Period, Company, LedgerTypeVariant, Partner, Agreement, Currency) Export
+ Return AccountingServer.__GetT9012S_AccountsPartner(Period, Company, LedgerTypeVariant, Partner, Agreement, Currency);
EndFunction
Function GetT9013S_AccountsTax_Reuse(Period, Company, LedgerTypeVariant, Tax, VatRate) Export
diff --git a/IRP/src/CommonModules/AdvancesRelevanceServer/Module.bsl b/IRP/src/CommonModules/AdvancesRelevanceServer/Module.bsl
index c3b828f3b7..ef5273595a 100644
--- a/IRP/src/CommonModules/AdvancesRelevanceServer/Module.bsl
+++ b/IRP/src/CommonModules/AdvancesRelevanceServer/Module.bsl
@@ -790,7 +790,7 @@ Procedure SetBound(DocObject, BoundParameters, RelevanceRegisterName)
EndProcedure
Function CopyRecords(Records, RegisterMetadata, FilterAttribute, FilterByCurrencyMovementType)
- RecordsCopy = PostingServer.CreateTable(RegisterMetadata);
+ RecordsCopy = CommonFunctionsServer.CreateTable(RegisterMetadata);
For Each Record In Records Do
If ValueIsFilled(Record[FilterAttribute]) Then
Continue;
diff --git a/IRP/src/CommonModules/CommonFunctionsServer/Module.bsl b/IRP/src/CommonModules/CommonFunctionsServer/Module.bsl
index 3560ba7430..5b758fa283 100644
--- a/IRP/src/CommonModules/CommonFunctionsServer/Module.bsl
+++ b/IRP/src/CommonModules/CommonFunctionsServer/Module.bsl
@@ -1368,7 +1368,7 @@ Procedure __CheckUniqueDescriptions(Cancel, Object) Export
Query.SetParameter("Ref", Object.Ref);
- Array_where = New Array();
+ Array_where = New Array(); // Array Of String
For Each KeyValue In QueryParameters Do
Array_where.Add(StrTemplate("Table.%1 = &%1", KeyValue.Key));
@@ -1387,3 +1387,178 @@ EndProcedure
#EndRegion
+#Region Tables
+
+Function JoinTables(ArrayOfJoiningTables, Fields) Export
+
+ If Not ArrayOfJoiningTables.Count() Then
+ Return New ValueTable();
+ EndIf;
+
+ ArrayOfFieldsPut = New Array(); // Array Of String
+ ArrayOfFieldsSelect = New Array(); // Array Of String
+
+ Counter = 1;
+ For Each Field In StrSplit(Fields, ",") Do
+ ArrayOfFieldsPut.Add(StrTemplate(" tmp.%1 AS %1 ", TrimAll(Field)));
+ ArrayOfFieldsSelect.Add(StrTemplate(" _tmp_.%1 AS %1 ", TrimAll(Field)));
+ Counter = Counter + 1;
+ EndDo;
+ PutText = StrConcat(ArrayOfFieldsPut, ",");
+ SelectText = StrConcat(ArrayOfFieldsSelect, ",");
+
+ ArrayOfPutText = New Array(); // Array Of String
+ ArrayOfSelectText = New Array(); // Array Of String
+
+ Counter = 1;
+ Query = New Query();
+
+ DoExecuteQuery = False;
+ For Each Table In ArrayOfJoiningTables Do
+ If Not Table.Count() Then
+ Continue;
+ EndIf;
+ DoExecuteQuery = True;
+
+ ArrayOfPutText.Add(
+ StrTemplate(
+ "select %1
+ |into tmp%2
+ |from
+ | &Table%2 as tmp
+ |", PutText, String(Counter)));
+
+ ArrayOfSelectText.Add(
+ StrReplace(
+ StrTemplate(
+ "select %1
+ |from tmp%2 as tmp%2
+ |", SelectText, String(Counter)), "_tmp_", "tmp" + String(Counter)));
+
+ Query.SetParameter("Table" + String(Counter), Table);
+ Counter = Counter + 1;
+ EndDo;
+
+ If DoExecuteQuery Then
+ Query.Text = StrConcat(ArrayOfPutText, " ; ") + " ; " + StrConcat(ArrayOfSelectText, " union all ");
+ QueryResult = Query.Execute();
+ QueryTable = QueryResult.Unload();
+ Return QueryTable;
+ Else
+ Return New ValueTable();
+ EndIf;
+EndFunction
+
+Procedure MergeTables(MasterTable, SourceTable, AddColumnFromSourceTable = "") Export
+ If Not IsBlankString(AddColumnFromSourceTable) Then
+ Column = SourceTable.Columns.Find(AddColumnFromSourceTable);
+ If Not Column = Undefined And MasterTable.Columns.Find(AddColumnFromSourceTable) = Undefined Then
+ MasterTable.Columns.Add(AddColumnFromSourceTable, Column.ValueType);
+ EndIf;
+ EndIf;
+ For Each Row In SourceTable Do
+ FillPropertyValues(MasterTable.Add(), Row);
+ EndDo;
+EndProcedure
+
+Function CreateTable(RegisterMetadata) Export
+ Table = New ValueTable();
+ For Each Item In RegisterMetadata.Dimensions Do
+ Table.Columns.Add(Item.Name, Item.Type);
+ EndDo;
+
+ For Each Item In RegisterMetadata.Resources Do
+ Table.Columns.Add(Item.Name, Item.Type);
+ EndDo;
+ For Each Item In RegisterMetadata.Attributes Do
+ Table.Columns.Add(Item.Name, Item.Type);
+ EndDo;
+
+ For Each Item In RegisterMetadata.StandardAttributes Do
+ If Upper(Item.Name) = Upper("Period") Then
+ Table.Columns.Add(Item.Name, Item.Type);
+ EndIf;
+ EndDo;
+ Return Table;
+EndFunction
+
+// Tables is equal.
+//
+// Parameters:
+// Table1 - ValueTable - Table1
+// Table2 - ValueTable - Table2
+//
+// Returns:
+// Boolean - Tables is equal
+Function TablesIsEqual(Table1, Table2, DeleteColumns = "") Export
+ If Table1.Count() <> Table2.Count() Then
+ Return False;
+ EndIf;
+
+ If Table1.Count() = 0 Then
+ Return True;
+ EndIf;
+
+ For Each Column In StrSplit(DeleteColumns, ",") Do
+ DeleteColumn(Table1, Column);
+ DeleteColumn(Table2, Column);
+ EndDo;
+
+ If Table1.Count() = 1 Then
+ MD5_1 = GetMD5(Table1);
+ MD5_2 = GetMD5(Table2);
+ Else
+ Text = "SELECT
+ | *
+ |INTO VTSort1
+ |FROM
+ | &VT1 AS VT1
+ |;
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | *
+ |INTO VTSort2
+ |FROM
+ | &VT2 AS VT2
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | *
+ |FROM
+ | VTSort1 AS VTSort1
+ |AUTOORDER
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | *
+ |FROM
+ | VTSort2 AS VTSort2
+ |AUTOORDER";
+
+ Query = New Query();
+ Query.Text = Text;
+ Query.SetParameter("VT1", Table1);
+ Query.SetParameter("VT2", Table2);
+ QueryResult = Query.ExecuteBatch();
+
+ MD5_1 = GetMD5(QueryResult[2].Unload());
+ MD5_2 = GetMD5(QueryResult[3].Unload());
+ EndIf;
+ If MD5_1 = MD5_2 Then
+ Return True;
+ Else
+ Return False;
+ EndIf;
+
+EndFunction
+
+Procedure DeleteColumn(Table, ColumnName) Export
+ If Table.Columns.Find(ColumnName) <> Undefined Then
+ Table.Columns.Delete(ColumnName);
+ EndIf;
+EndProcedure
+
+
+#EndRegion
\ No newline at end of file
diff --git a/IRP/src/CommonModules/CurrenciesServer/Module.bsl b/IRP/src/CommonModules/CurrenciesServer/Module.bsl
index 73c2ec3a81..3e88223314 100644
--- a/IRP/src/CommonModules/CurrenciesServer/Module.bsl
+++ b/IRP/src/CommonModules/CurrenciesServer/Module.bsl
@@ -4,16 +4,15 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
ArrayOfPostingInfo = Parameters.ArrayOfPostingInfo;
Else
For Each PostingInfo In Parameters.PostingDataTables Do
- RecordSetMetadata = PostingInfo.Key.Metadata();
If Parameters.Property("MultiCurrencyExcludePostingDataTables")
- And Parameters.MultiCurrencyExcludePostingDataTables.Find(RecordSetMetadata) <> Undefined Then
+ And Parameters.MultiCurrencyExcludePostingDataTables.Find(PostingInfo.Value.Metadata) <> Undefined Then
Continue;
EndIf;
- If Metadata.AccumulationRegisters.Contains(RecordSetMetadata)
- Or Metadata.InformationRegisters.Contains(RecordSetMetadata) Then
+ If Metadata.AccumulationRegisters.Contains(PostingInfo.Value.Metadata)
+ Or Metadata.InformationRegisters.Contains(PostingInfo.Value.Metadata) Then
- Dimension = RecordSetMetadata.Dimensions.Find("CurrencyMovementType");
+ Dimension = PostingInfo.Value.Metadata.Dimensions.Find("CurrencyMovementType");
// Register supported multicurrency
If Dimension <> Undefined Then
ArrayOfPostingInfo.Add(PostingInfo);
@@ -22,8 +21,7 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
EndDo;
EndIf;
- If ArrayOfPostingInfo.Count() And
- (Parameters.Object.Metadata().TabularSections.Find("Currencies") <> Undefined Or CurrencyTable <> Undefined) Then
+ If ArrayOfPostingInfo.Count() And (Parameters.Metadata.TabularSections.Find("Currencies") <> Undefined Or CurrencyTable <> Undefined) Then
TempTableManager = New TempTablesManager();
Query = New Query();
Query.TempTablesManager = TempTableManager;
@@ -44,28 +42,30 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
_PaymentList.Columns.Add("LegalName");
_PaymentList.Columns.Add("Key");
_PaymentList.Columns.Add("BasisDocument");
+
+
- If TypeOf(Parameters.Object.Ref) = Type("DocumentRef.CashReceipt") Or TypeOf(Parameters.Object.Ref) = Type("DocumentRef.BankReceipt") Then
+ If Parameters.Metadata = Metadata.Documents.CashReceipt Or Parameters.Metadata = Metadata.Documents.BankReceipt Then
DocumentCondition = True;
- RegisterType = Type("AccumulationRegisterRecordSet.R2021B_CustomersTransactions");
+ RegisterType = Metadata.AccumulationRegisters.R2021B_CustomersTransactions;
For Each RowPaymentList In Parameters.Object.PaymentList Do
NewRowPaymentList = _PaymentList.Add();
FillPropertyValues(NewRowPaymentList, RowPaymentList);
NewRowPaymentList.LegalName = RowPaymentList.Payer;
EndDo;
EndIf;
- If TypeOf(Parameters.Object.Ref) = Type("DocumentRef.CashPayment") Or TypeOf(Parameters.Object.Ref) = Type("DocumentRef.BankPayment") Then
+ If Parameters.Metadata = Metadata.Documents.CashPayment Or Parameters.Metadata = Metadata.Documents.BankPayment Then
DocumentCondition = True;
- RegisterType = Type("AccumulationRegisterRecordSet.R1021B_VendorsTransactions");
+ RegisterType = Metadata.AccumulationRegisters.R1021B_VendorsTransactions;
For Each RowPaymentList In Parameters.Object.PaymentList Do
NewRowPaymentList = _PaymentList.Add();
FillPropertyValues(NewRowPaymentList, RowPaymentList);
NewRowPaymentList.LegalName = RowPaymentList.Payee;
EndDo;
EndIf;
- If TypeOf(Parameters.Object.Ref) = Type("DocumentRef.EmployeeCashAdvance") Then
+ If Parameters.Metadata = Metadata.Documents.EmployeeCashAdvance Then
DocumentCondition = True;
- RegisterType = Type("AccumulationRegisterRecordSet.R1021B_VendorsTransactions");
+ RegisterType = Metadata.AccumulationRegisters.R1021B_VendorsTransactions;
For Each RowPaymentList In Parameters.Object.PaymentList Do
If Not ValueIsFilled(RowPaymentList.Invoice) Then
Continue;
@@ -89,12 +89,13 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
TableOfAgreementMovementTypes.Columns.Add("LegalName");
TableOfAgreementMovementTypes.Columns.Add("Amount");
TableOfAgreementMovementTypes.Columns.Add("Key");
- For Each ItemOfPostingInfo In ArrayOfPostingInfo Do
- If TypeOf(ItemOfPostingInfo.Key) = RegisterType Then
- If ItemOfPostingInfo.Value.Recordset.Columns.Find("Key") = Undefined Then
- ItemOfPostingInfo.Value.Recordset.Columns.Add("Key", New TypeDescription(Metadata.DefinedTypes.typeRowID.Type));
+ For Each ItemOfPostingInfoRow In ArrayOfPostingInfo Do
+ ItemOfPostingInfo = ItemOfPostingInfoRow.Value;
+ If ItemOfPostingInfo.Metadata = RegisterType Then
+ If ItemOfPostingInfo.PrepareTable.Columns.Find("Key") = Undefined Then
+ ItemOfPostingInfo.PrepareTable.Columns.Add("Key", New TypeDescription(Metadata.DefinedTypes.typeRowID.Type));
EndIf;
- For Each RowRecordSet In ItemOfPostingInfo.Value.Recordset Do
+ For Each RowRecordSet In ItemOfPostingInfo.PrepareTable Do
NewRow = TableOfAgreementMovementTypes.Add();
NewRow.MovementType = RowRecordSet.Agreement.CurrencyMovementType;
NewRow.Partner = RowRecordSet.Partner;
@@ -157,12 +158,12 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
EndIf;
Query.Execute();
- For Each ItemOfPostingInfo In ArrayOfPostingInfo Do
- If ItemOfPostingInfo.Value.RecordSet.Count() Then
- UseAgreementMovementType = IsUseAgreementMovementType(ItemOfPostingInfo);
- UseCurrencyJoin = IsUseCurrencyJoin(Parameters, ItemOfPostingInfo);
- ItemOfPostingInfo.Value.RecordSet = ExpandTable(TempTableManager, ItemOfPostingInfo.Value.RecordSet, UseAgreementMovementType, UseCurrencyJoin);
-
+ For Each ItemOfPostingInfoRow In ArrayOfPostingInfo Do
+ ItemOfPostingInfo = ItemOfPostingInfoRow.Value;
+ If ItemOfPostingInfo.PrepareTable.Count() Then
+ UseAgreementMovementType = IsUseAgreementMovementType(ItemOfPostingInfo.Metadata);
+ UseCurrencyJoin = IsUseCurrencyJoin(Parameters, ItemOfPostingInfo.Metadata);
+ ItemOfPostingInfo.PrepareTable = ExpandTable(TempTableManager, ItemOfPostingInfo.PrepareTable, UseAgreementMovementType, UseCurrencyJoin);
IsOffsetOfAdvances = CommonFunctionsClientServer.GetFromAddInfo(Parameters, "IsOffsetOfAdvances", False);
IsLandedCost = CommonFunctionsClientServer.GetFromAddInfo(Parameters, "IsLandedCost", False);
@@ -170,29 +171,29 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
If Not IsOffsetOfAdvances And Not IsLandedCost Then
// Advances
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R1020B_AdvancesToVendors")
- Or TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R2020B_AdvancesFromCustomers") Then
+ If ItemOfPostingInfo.Metadata = Metadata.AccumulationRegisters.R1020B_AdvancesToVendors
+ Or ItemOfPostingInfo.Metadata = Metadata.AccumulationRegisters.R2020B_AdvancesFromCustomers Then
AdvancesCurrencyRevaluation = GetAdvancesCurrencyRevaluation(Parameters.Object.Ref);
For Each Row In AdvancesCurrencyRevaluation Do
- FillPropertyValues(ItemOfPostingInfo.Value.RecordSet.Add(), Row);
+ FillPropertyValues(ItemOfPostingInfo.PrepareTable.Add(), Row);
EndDo;
EndIf;
// Transactions
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R1021B_VendorsTransactions")
- Or TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R2021B_CustomersTransactions") Then
+ If ItemOfPostingInfo.Metadata = Metadata.AccumulationRegisters.R1021B_VendorsTransactions
+ Or ItemOfPostingInfo.Metadata = Metadata.AccumulationRegisters.R2021B_CustomersTransactions Then
TransactionsCurrencyRevaluation = GetTransactionsCurrencyRevaluation(Parameters.Object.Ref);
For Each Row In TransactionsCurrencyRevaluation Do
- FillPropertyValues(ItemOfPostingInfo.Value.RecordSet.Add(), Row);
+ FillPropertyValues(ItemOfPostingInfo.PrepareTable.Add(), Row);
EndDo;
EndIf;
// Accounting amounts
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.T1040T_AccountingAmounts") Then
+ If ItemOfPostingInfo.Metadata = Metadata.AccumulationRegisters.T1040T_AccountingAmounts Then
Op = Catalogs.AccountingOperations;
AccountingOperations = New ValueTable();
@@ -226,7 +227,7 @@ Procedure PreparePostingDataTables(Parameters, CurrencyTable, AddInfo = Undefine
For Each RowAmounts In AccountingAmounts Do
For Each RowOperation In AccountingOperations.FindRows(New Structure("DocType, AmountType", TypeOf(Parameters.Object.Ref), RowAmounts.AmountType)) Do
For Each OperationItem In RowOperation.Operations Do
- NewRow = ItemOfPostingInfo.Value.RecordSet.Add();
+ NewRow = ItemOfPostingInfo.PrepareTable.Add();
FillPropertyValues(NewRow, RowAmounts);
NewRow.Operation = OperationItem;
EndDo;
@@ -332,25 +333,30 @@ Function GetAccountingAmounts(DocRef)
Return QueryTable;
EndFunction
-Function IsUseAgreementMovementType(ItemOfPostingInfo)
- UseAgreementMovementType = True;
- If TypeOf(ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R3010B_CashOnHand") Or TypeOf(
- ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R2020B_AdvancesFromCustomers") Or TypeOf(
- ItemOfPostingInfo.Key) = Type("AccumulationRegisterRecordSet.R1020B_AdvancesToVendors") Then
- UseAgreementMovementType = False;
+Function IsUseAgreementMovementType(RecMetadata)
+
+ TypeOfRecordSetsArray = New Array();
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R3010B_CashOnHand);
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R2020B_AdvancesFromCustomers);
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R1020B_AdvancesToVendors);
+
+ If TypeOfRecordSetsArray.Find(RecMetadata) = Undefined Then
+ Return True;
+ Else
+ Return False;
EndIf;
- Return UseAgreementMovementType;
+
EndFunction
-Function IsUseCurrencyJoin(Parameters, ItemOfPostingInfo)
+Function IsUseCurrencyJoin(Parameters, RecMetadata)
UseCurrencyJoin = False;
TypeOfRecordSetsArray = New Array();
- TypeOfRecordSetsArray.Add(Type("AccumulationRegisterRecordSet.R3035T_CashPlanning"));
- TypeOfRecordSetsArray.Add(Type("AccumulationRegisterRecordSet.R3010B_CashOnHand"));
- TypeOfRecordSetsArray.Add(Type("AccumulationRegisterRecordSet.R3015B_CashAdvance"));
- TypeOfRecordSetsArray.Add(Type("AccumulationRegisterRecordSet.R2021B_CustomersTransactions"));
- TypeOfRecordSetsArray.Add(Type("AccumulationRegisterRecordSet.R1021B_VendorsTransactions"));
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R3035T_CashPlanning);
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R3010B_CashOnHand);
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R3015B_CashAdvance);
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R2021B_CustomersTransactions);
+ TypeOfRecordSetsArray.Add(Metadata.AccumulationRegisters.R1021B_VendorsTransactions);
FilterByDocument = False;
@@ -364,7 +370,7 @@ Function IsUseCurrencyJoin(Parameters, ItemOfPostingInfo)
FilterByDocument = True;
EndIf;
- If FilterByDocument And TypeOfRecordSetsArray.Find(TypeOf(ItemOfPostingInfo.Key)) <> Undefined Then
+ If FilterByDocument And TypeOfRecordSetsArray.Find(RecMetadata) <> Undefined Then
UseCurrencyJoin = True;
EndIf;
diff --git a/IRP/src/CommonModules/ObjectAccessFullAccess/Module.bsl b/IRP/src/CommonModules/ObjectAccessFullAccess/Module.bsl
index 6ecb44d70e..ca86de528f 100644
--- a/IRP/src/CommonModules/ObjectAccessFullAccess/Module.bsl
+++ b/IRP/src/CommonModules/ObjectAccessFullAccess/Module.bsl
@@ -120,10 +120,23 @@ Procedure CalculateAndUpdateAccessKey_Document(Source)
Source.SetNewObjectRef(Ref);
EndIf;
- Reg = InformationRegisters.T9100A_ObjectAccessMap.CreateRecordManager();
- Reg.ObjectAccessKeys = AccessKeyRef;
- Reg.ObjectRef = Ref;
- Reg.Write();
+ Query = New Query;
+ Query.Text =
+ "SELECT TRUE FROM InformationRegister.T9100A_ObjectAccessMap AS T9100A_ObjectAccessMap
+ |WHERE
+ | T9100A_ObjectAccessMap.ObjectRef = &ObjectRef
+ | AND T9100A_ObjectAccessMap.ObjectAccessKeys = &ObjectAccessKeys";
+
+ Query.SetParameter("ObjectRef", Ref);
+ Query.SetParameter("ObjectAccessKeys", AccessKeyRef);
+ QueryResult = Query.Execute();
+
+ If QueryResult.IsEmpty() Then
+ Reg = InformationRegisters.T9100A_ObjectAccessMap.CreateRecordManager();
+ Reg.ObjectAccessKeys = AccessKeyRef;
+ Reg.ObjectRef = Ref;
+ Reg.Write();
+ EndIf;
EndProcedure
// Update access keys Document.
diff --git a/IRP/src/CommonModules/OffsetOfAdvancesServer/Module.bsl b/IRP/src/CommonModules/OffsetOfAdvancesServer/Module.bsl
index eaf4a084df..caf9252076 100644
--- a/IRP/src/CommonModules/OffsetOfAdvancesServer/Module.bsl
+++ b/IRP/src/CommonModules/OffsetOfAdvancesServer/Module.bsl
@@ -888,10 +888,12 @@ Procedure Write_SelfRecords(Parameters,
// Currency calculation
PostingDataTables = New Map();
-
- PostingDataTables.Insert(RecordSet_Advances , New Structure("RecordSet", TableAdvances));
- PostingDataTables.Insert(RecordSet_Transactions , New Structure("RecordSet", TableTransactions));
- PostingDataTables.Insert(RecordSet_AccountingAmounts, New Structure("RecordSet", TableAccountingAmounts));
+ RecordSet_AdvancesSettings = PostingServer.PostingTableSettings(RecordSet_Advances.Metadata().Name, TableAdvances, RecordSet_Advances);
+ PostingDataTables.Insert(RecordSet_Advances.Metadata() , RecordSet_AdvancesSettings);
+ RecordSet_TransactionsSettings = PostingServer.PostingTableSettings(RecordSet_Transactions.Metadata().Name, TableTransactions, RecordSet_Transactions);
+ PostingDataTables.Insert(RecordSet_Transactions.Metadata() , RecordSet_TransactionsSettings);
+ RecordSet_AccountingAmountsSettings = PostingServer.PostingTableSettings(RecordSet_AccountingAmounts.Metadata().Name, TableAccountingAmounts, RecordSet_AccountingAmounts);
+ PostingDataTables.Insert(RecordSet_AccountingAmounts.Metadata(), RecordSet_AccountingAmountsSettings);
ArrayOfPostingInfo = New Array();
For Each DataTable In PostingDataTables Do
@@ -900,16 +902,16 @@ Procedure Write_SelfRecords(Parameters,
CurrenciesParameters = New Structure();
CurrenciesParameters.Insert("Object", Row.Document);
+ CurrenciesParameters.Insert("Metadata", Row.Document.Metadata());
CurrenciesParameters.Insert("ArrayOfPostingInfo", ArrayOfPostingInfo);
- CurrenciesParameters.Insert("IsOffsetOfAdvances",
- CommonFunctionsClientServer.GetFromAddInfo(Parameters, "IsOffsetOfAdvances", False));
+ CurrenciesParameters.Insert("IsOffsetOfAdvances", CommonFunctionsClientServer.GetFromAddInfo(Parameters, "IsOffsetOfAdvances", False));
CurrenciesServer.PreparePostingDataTables(CurrenciesParameters, Undefined);
// Advances
- ItemOfPostingInfo = GetFromPostingInfo(ArrayOfPostingInfo, Type("AccumulationRegisterRecordSet." + Parameters.RegisterName_Advances));
+ ItemOfPostingInfo = GetFromPostingInfo(ArrayOfPostingInfo, Metadata.AccumulationRegisters[Parameters.RegisterName_Advances]);
RecordSet_Advances.Read();
- For Each RowPostingInfo In ItemOfPostingInfo.Value.RecordSet Do
+ For Each RowPostingInfo In ItemOfPostingInfo.Value.PrepareTable Do
FillPropertyValues(RecordSet_Advances.Add(), RowPostingInfo);
EndDo;
RecordSet_Advances.SetActive(True);
@@ -925,24 +927,15 @@ Procedure Write_SelfRecords(Parameters,
RecordSet_Advances.Write();
// Transactions
- ItemOfPostingInfo = GetFromPostingInfo(ArrayOfPostingInfo, Type("AccumulationRegisterRecordSet." + Parameters.RegisterName_Transactions));
+ ItemOfPostingInfo = GetFromPostingInfo(ArrayOfPostingInfo, Metadata.AccumulationRegisters[Parameters.RegisterName_Transactions]);
RecordSet_Transactions.Read();
- For Each RowPostingInfo In ItemOfPostingInfo.Value.RecordSet Do
+ For Each RowPostingInfo In ItemOfPostingInfo.Value.PrepareTable Do
FillPropertyValues(RecordSet_Transactions.Add(), RowPostingInfo);
EndDo;
RecordSet_Transactions.SetActive(True);
RecordSet_Transactions.Write();
-
-/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// CurrenciesServer.RevaluateCurrency_CustomersTransactions(Parameters,
-// RecordSet_Transactions,
-// TableAccountingAmounts_CurrencyRevaluation);
-//
-// RecordSet_Transactions.SetActive(True);
-// RecordSet_Transactions.Write();
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
+
CurrenciesServer.RevaluateCurrency_Transactions(Parameters,
RecordSet_Transactions,
TableTransactions_CurrencyRevaluation,
@@ -952,11 +945,11 @@ Procedure Write_SelfRecords(Parameters,
RecordSet_Transactions.SetActive(True);
RecordSet_Transactions.Write();
- ItemOfPostingInfo = GetFromPostingInfo(ArrayOfPostingInfo, Type("AccumulationRegisterRecordSet.T1040T_AccountingAmounts"));
+ ItemOfPostingInfo = GetFromPostingInfo(ArrayOfPostingInfo, Metadata.AccumulationRegisters.T1040T_AccountingAmounts);
// Accounting amounts (advances)
RecordSet_AccountingAmounts.Read();
- For Each RowPostingInfo In ItemOfPostingInfo.Value.RecordSet Do
+ For Each RowPostingInfo In ItemOfPostingInfo.Value.PrepareTable Do
FillPropertyValues(RecordSet_AccountingAmounts.Add(), RowPostingInfo);
EndDo;
RecordSet_AccountingAmounts.SetActive(True);
@@ -977,11 +970,11 @@ EndProcedure
Function GetFromPostingInfo(ArrayOfPostingInfo, RecordSetType)
For Each ItemOfPostingInfo In ArrayOfPostingInfo Do
- If TypeOf(ItemOfPostingInfo.Key) = RecordSetType Then
+ If ItemOfPostingInfo.Key = RecordSetType Then
Return ItemOfPostingInfo;
EndIf;
EndDo;
- Raise StrTemplate("Not found [%1] in arrayf of posting info", RecordSetType);
+ Raise StrTemplate("Not found [%1] in array of posting info", RecordSetType);
EndFunction
Procedure WriteTablesToTempTables(Parameters,
diff --git a/IRP/src/CommonModules/PostingServer/Module.bsl b/IRP/src/CommonModules/PostingServer/Module.bsl
index 9826a72320..463a97e3a0 100644
--- a/IRP/src/CommonModules/PostingServer/Module.bsl
+++ b/IRP/src/CommonModules/PostingServer/Module.bsl
@@ -1,4 +1,13 @@
+#Region API
+
+// Post.
+//
+// Parameters:
+// DocObject - DocumentObjectDocumentName, DocumentRefDocumentName - Doc object
+// Cancel - Boolean - Cancel
+// PostingMode - DocumentPostingMode - Posting mode
+// AddInfo - Undefined - Add info
Procedure Post(DocObject, Cancel, PostingMode, AddInfo = Undefined) Export
If Cancel Then
@@ -16,7 +25,7 @@ Procedure Post(DocObject, Cancel, PostingMode, AddInfo = Undefined) Export
CurrencyTable = CommonFunctionsClientServer.GetFromAddInfo(AddInfo, "CurrencyTable");
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
- RegisteredRecords = RegisterRecords(DocObject, Parameters.PostingDataTables, Parameters.Object.RegisterRecords);
+ RegisteredRecords = RegisterRecords(Parameters);
RegisteredRecordsArray = New Array;
For Each Record In RegisteredRecords Do
@@ -26,7 +35,6 @@ Procedure Post(DocObject, Cancel, PostingMode, AddInfo = Undefined) Export
Record.Value.RecordSet.LockForUpdate = True;
EndIf;
Record.Value.RecordSet.Write();
- WriteInTransaction = True;
Else // write only when transaction will be commited
Record.Value.RecordSet.Write = True;
EndIf;
@@ -38,29 +46,55 @@ Procedure Post(DocObject, Cancel, PostingMode, AddInfo = Undefined) Export
Parameters.Module.PostingCheckAfterWrite(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
EndProcedure
+// Get posting parameters.
+//
+// Parameters:
+// DocObject - DocumentRefDocumentName - Doc object
+// PostingMode - DocumentPostingMode - Posting mode
+// AddInfo - Undefined, Structure - Add info
+//
+// Returns:
+// Structure - Get posting parameters:
+// * Cancel - Boolean -
+// * Object - DocumentRefDocumentName -
+// * PostingByRef - Boolean -
+// * IsReposting - Boolean -
+// * PointInTime - PointInTime -
+// * TempTablesManager - TempTablesManager -
+// * Metadata - MetadataObjectDocument -
+// * Module - DocumentManagerDocumentName, DocumentManager.SalesOrder -
+// * DocumentDataTables - Structure -
+// * DocumentDataTables - Map -
+// * LockDataSources - Map -
+// * PostingDataTables - Array Of KeyAndValue:
+// ** Key - MetadataObject -
+// ** Value - See PostingTableSettings
Function GetPostingParameters(DocObject, PostingMode, AddInfo = Undefined)
Cancel = False;
Parameters = New Structure();
Parameters.Insert("Cancel", Cancel);
Parameters.Insert("Object", DocObject);
+ Parameters.Insert("PostingByRef", DocObject.Ref = DocObject);
Parameters.Insert("IsReposting", False);
Parameters.Insert("PointInTime", DocObject.PointInTime());
Parameters.Insert("TempTablesManager", New TempTablesManager());
Parameters.Insert("Metadata", DocObject.Ref.Metadata());
+ Parameters.Insert("DocumentDataTables", New Structure);
+ Parameters.Insert("LockDataSources", New Map);
+ Parameters.Insert("PostingDataTables", New Map);
- Module = Documents[Parameters.Metadata.Name];
+ Module = Documents[Parameters.Metadata.Name]; // DocumentManager.SalesOrder, DocumentManagerDocumentName
Parameters.Insert("Module", Module);
- DocumentDataTables = Module.PostingGetDocumentDataTables(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
- Parameters.Insert("DocumentDataTables", DocumentDataTables);
+ Parameters.DocumentDataTables = Module.PostingGetDocumentDataTables(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
+
If Cancel Then
Parameters.Cancel = True;
Return Parameters;
EndIf;
- LockDataSources = Module.PostingGetLockDataSource(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
- Parameters.Insert("LockDataSources", LockDataSources);
+ Parameters.LockDataSources = Module.PostingGetLockDataSource(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
If Cancel Then
Parameters.Cancel = True;
Return Parameters;
@@ -68,8 +102,8 @@ Function GetPostingParameters(DocObject, PostingMode, AddInfo = Undefined)
// Save pointers to locks
DataLock = Undefined;
- If LockDataSources <> Undefined Then
- DataLock = SetLock(LockDataSources);
+ If Parameters.LockDataSources <> Undefined Then
+ DataLock = SetLock(Parameters.LockDataSources);
EndIf;
If TypeOf(AddInfo) = Type("Structure") Then
AddInfo.Insert("DataLock", DataLock);
@@ -81,15 +115,21 @@ Function GetPostingParameters(DocObject, PostingMode, AddInfo = Undefined)
Return Parameters;
EndIf;
- PostingDataTables = Module.PostingGetPostingDataTables(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
- If Parameters.Property("PostingDataTables") Then
- Parameters.PostingDataTables = PostingDataTables;
- Else
- Parameters.Insert("PostingDataTables", PostingDataTables);
- EndIf;
+ Parameters.PostingDataTables = Module.PostingGetPostingDataTables(DocObject.Ref, Cancel, PostingMode, Parameters, AddInfo);
Return Parameters;
EndFunction
+// Set lock.
+// @skip-check property-return-type, dynamic-access-method-not-found, invocation-parameter-type-intersect, statement-type-change, variable-value-type
+//
+// Parameters:
+// LockDataSources - Map - Lock data sources:
+// * Key - Undefined -
+// * Value - Structure:
+// ** Fields - Array Of String -
+//
+// Returns:
+// DataLock - Set lock
Function SetLock(LockDataSources)
DataLock = New DataLock();
@@ -107,26 +147,24 @@ Function SetLock(LockDataSources)
EndDo;
EndDo;
If LockDataSources.Count() Then
+ //@skip-check lock-out-of-try
DataLock.Lock();
EndIf;
Return DataLock;
EndFunction
-Function RegisterRecords(DocObject, PostingDataTables, AllRegisterRecords)
- For Each RecordSet In AllRegisterRecords Do
- If PostingDataTables.Get(RecordSet) = Undefined Then
- RecordSet.Write = True;
- EndIf;
- EndDo;
-
+// Register records.
+//
+// Parameters:
+// Parameters - See GetPostingParameters
+//
+// Returns:
+// Map - Register records
+Function RegisterRecords(Parameters)
RegisteredRecords = New Map();
- For Each Row In PostingDataTables Do
- If Not Row.Value.Property("RecordSet") Then
- Continue;
- EndIf;
-
- RecordSet = Row.Key;
- TableForLoad = Row.Value.RecordSet.Copy();
+ For Each Row In Parameters.PostingDataTables Do
+ RecordSet = Row.Value.RecordSet_Document;
+ TableForLoad = Row.Value.PrepareTable.Copy();
// Set record type
If Row.Value.Property("RecordType") Then
@@ -141,134 +179,95 @@ Function RegisterRecords(DocObject, PostingDataTables, AllRegisterRecords)
TableForLoad.Columns.Add("Active");
TableForLoad.FillValues(True, "Active");
EndIf;
-
+
+ If Row.Value.Metadata = Metadata.AccumulationRegisters.R6020B_BatchBalance
+ Or Row.Value.Metadata = AccumulationRegisters.R6060T_CostOfGoodsSold Then
+ Continue; //Never rewrite
+ EndIf;
+
// MD5
- If RecordSetIsEqual(DocObject, RecordSet, TableForLoad) Then
+ If RecordSetIsEqual(RecordSet, TableForLoad) Then
Continue;
EndIf;
-
+
+ //If Not Parameters.PostingByRef Then
+ WriteAdvances(Parameters.Object, Row.Value.Metadata, TableForLoad);
+
+ UpdateCosts(Parameters.Object, Row.Value.Metadata, TableForLoad, RegisteredRecords);
+ //EndIf;
// Set write
WriteInTransaction = False;
If Row.Value.Property("WriteInTransaction") And Row.Value.WriteInTransaction Then
WriteInTransaction = True;
EndIf;
-
- RegisteredRecords.Insert(RecordSet.Metadata(), New Structure("RecordSet, WriteInTransaction", RecordSet, WriteInTransaction));
+ Data = New Structure;
+ Data.Insert("RecordSet", RecordSet);
+ Data.Insert("WriteInTransaction", WriteInTransaction);
+ Data.Insert("Metadata", RecordSet.Metadata());
+ RegisteredRecords.Insert(RecordSet.Metadata(), Data);
EndDo;
Return RegisteredRecords;
EndFunction
-Function RecordSetIsEqual(DocObject, RecordSet, TableForLoad)
- If TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R6020B_BatchBalance")
- Or TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R6060T_CostOfGoodsSold") Then
- Return True; //Never rewrite
- EndIf;
-
+Function RecordSetIsEqual(RecordSet, TableForLoad)
RecordSet.Read();
TableOldRecords = RecordSet.Unload();
RecordSet.Load(TableForLoad);
- Result = TablesIsEqual(RecordSet.Unload(), TableOldRecords);
- AccReg = Metadata.AccumulationRegisters;
- If TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R1020B_AdvancesToVendors") Then
- AdvancesRelevanceServer.SetBound_Advances(DocObject, TableForLoad, AccReg.R1020B_AdvancesToVendors);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R2020B_AdvancesFromCustomers") Then
- AdvancesRelevanceServer.SetBound_Advances(DocObject, TableForLoad, AccReg.R2020B_AdvancesFromCustomers);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R1021B_VendorsTransactions") Then
- AdvancesRelevanceServer.SetBound_Transactions(DocObject, TableForLoad, AccReg.R1021B_VendorsTransactions);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R2021B_CustomersTransactions") Then
- AdvancesRelevanceServer.SetBound_Transactions(DocObject, TableForLoad, AccReg.R2021B_CustomersTransactions);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R5012B_VendorsAging") Then
- AdvancesRelevanceServer.SetBound_Aging(DocObject, TableForLoad, AccReg.R5012B_VendorsAging);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R5011B_CustomersAging") Then
- AdvancesRelevanceServer.SetBound_Aging(DocObject, TableForLoad, AccReg.R5011B_CustomersAging);
- EndIf;
+ Result = CommonFunctionsServer.TablesIsEqual(RecordSet.Unload(), TableOldRecords, "Recorder,LineNumber,PointInTime,UniqueID");
- If TypeOf(RecordSet) = Type("InformationRegisterRecordSet.T6020S_BatchKeysInfo") Then
- AccumulationRegisters.R6020B_BatchBalance.BatchBalance_CollectRecords(DocObject);
- AccumulationRegisters.R6060T_CostOfGoodsSold.CostOfGoodsSold_CollectRecords(DocObject);
- TableForLoadEmpty = CreateTable(Metadata.InformationRegisters.T6020S_BatchKeysInfo);
- For Each Row In TableForLoad Do
- FillPropertyValues(TableForLoadEmpty.Add(), Row);
- EndDo;
- InformationRegisters.T6030S_BatchRelevance.BatchRelevance_SetBound(DocObject, TableForLoadEmpty);
- EndIf;
-
Return Result;
EndFunction
-// Tables is equal.
-//
-// Parameters:
-// Table1 - ValueTable - Table1
-// Table2 - ValueTable - Table2
-//
-// Returns:
-// Boolean - Tables is equal
-Function TablesIsEqual(Table1, Table2, DeleteColumns = "Recorder,LineNumber,PointInTime,UniqueID") Export
- If Table1.Count() <> Table2.Count() Then
- Return False;
- EndIf;
-
- If Table1.Count() = 0 Then
- Return True;
- EndIf;
-
- For Each Column In StrSplit(DeleteColumns, ",") Do
- DeleteColumn(Table1, Column);
- DeleteColumn(Table2, Column);
- EndDo;
-
- If Table1.Count() = 1 Then
- MD5_1 = CommonFunctionsServer.GetMD5(Table1);
- MD5_2 = CommonFunctionsServer.GetMD5(Table2);
- Else
- Text = "SELECT
- | *
- |INTO VTSort1
- |FROM
- | &VT1 AS VT1
- |;
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | *
- |INTO VTSort2
- |FROM
- | &VT2 AS VT2
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | *
- |FROM
- | VTSort1 AS VTSort1
- |AUTOORDER
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | *
- |FROM
- | VTSort2 AS VTSort2
- |AUTOORDER";
-
- Query = New Query();
- Query.Text = Text;
- Query.SetParameter("VT1", Table1);
- Query.SetParameter("VT2", Table2);
- QueryResult = Query.ExecuteBatch();
-
- MD5_1 = CommonFunctionsServer.GetMD5(QueryResult[2].Unload());
- MD5_2 = CommonFunctionsServer.GetMD5(QueryResult[3].Unload());
- EndIf;
- Return MD5_1 = MD5_2;
+#EndRegion
-EndFunction
+Procedure WriteAdvances(DocObject, RecordMeta, TableForLoad) Export
+ If RecordMeta = Metadata.AccumulationRegisters.R1020B_AdvancesToVendors Then
+ AdvancesRelevanceServer.SetBound_Advances(DocObject, TableForLoad, Metadata.AccumulationRegisters.R1020B_AdvancesToVendors);
+ ElsIf RecordMeta = Metadata.AccumulationRegisters.R2020B_AdvancesFromCustomers Then
+ AdvancesRelevanceServer.SetBound_Advances(DocObject, TableForLoad, Metadata.AccumulationRegisters.R2020B_AdvancesFromCustomers);
+ ElsIf RecordMeta = Metadata.AccumulationRegisters.R1021B_VendorsTransactions Then
+ AdvancesRelevanceServer.SetBound_Transactions(DocObject, TableForLoad, Metadata.AccumulationRegisters.R1021B_VendorsTransactions);
+ ElsIf RecordMeta = Metadata.AccumulationRegisters.R2021B_CustomersTransactions Then
+ AdvancesRelevanceServer.SetBound_Transactions(DocObject, TableForLoad, Metadata.AccumulationRegisters.R2021B_CustomersTransactions);
+ ElsIf RecordMeta = Metadata.AccumulationRegisters.R5012B_VendorsAging Then
+ AdvancesRelevanceServer.SetBound_Aging(DocObject, TableForLoad, Metadata.AccumulationRegisters.R5012B_VendorsAging);
+ ElsIf RecordMeta = Metadata.AccumulationRegisters.R5011B_CustomersAging Then
+ AdvancesRelevanceServer.SetBound_Aging(DocObject, TableForLoad, Metadata.AccumulationRegisters.R5011B_CustomersAging);
+ EndIf;
+EndProcedure
-Procedure DeleteColumn(Table, ColumnName)
- If Table.Columns.Find(ColumnName) <> Undefined Then
- Table.Columns.Delete(ColumnName);
+Procedure UpdateCosts(DocObject, RecordMeta, TableForLoad, RegisteredRecords)
+ If RecordMeta = Metadata.InformationRegisters.T6020S_BatchKeysInfo Then
+
+ R6020B_BatchBalance_RecordSet = AccumulationRegisters.R6020B_BatchBalance.CreateRecordSet();
+ R6020B_BatchBalance_RecordSet.Filter.Recorder.Set(DocObject.Ref);
+ R6020B_BatchBalance = AccumulationRegisters.R6020B_BatchBalance.BatchBalance_CollectRecords(DocObject);
+ R6020B_BatchBalance_RecordSet.Load(R6020B_BatchBalance);
+
+ Data = New Structure;
+ Data.Insert("RecordSet", R6020B_BatchBalance_RecordSet);
+ Data.Insert("WriteInTransaction", True);
+ Data.Insert("Metadata", R6020B_BatchBalance_RecordSet.Metadata());
+ RegisteredRecords.Insert(R6020B_BatchBalance_RecordSet.Metadata(), Data);
+
+ R6060T_CostOfGoodsSold_RecordSet = AccumulationRegisters.R6060T_CostOfGoodsSold.CreateRecordSet();
+ R6060T_CostOfGoodsSold_RecordSet.Filter.Recorder.Set(DocObject.Ref);
+ R6060T_CostOfGoodsSold = AccumulationRegisters.R6060T_CostOfGoodsSold.CostOfGoodsSold_CollectRecords(DocObject);
+ R6060T_CostOfGoodsSold_RecordSet.Load(R6060T_CostOfGoodsSold);
+
+ Data = New Structure;
+ Data.Insert("RecordSet", R6060T_CostOfGoodsSold_RecordSet);
+ Data.Insert("WriteInTransaction", True);
+ Data.Insert("Metadata", R6060T_CostOfGoodsSold_RecordSet.Metadata());
+ RegisteredRecords.Insert(R6060T_CostOfGoodsSold_RecordSet.Metadata(), Data);
+
+ TableForLoadEmpty = CommonFunctionsServer.CreateTable(Metadata.InformationRegisters.T6020S_BatchKeysInfo);
+ For Each Row In TableForLoad Do
+ FillPropertyValues(TableForLoadEmpty.Add(), Row);
+ EndDo;
+ InformationRegisters.T6030S_BatchRelevance.BatchRelevance_SetBound(DocObject, TableForLoadEmpty);
EndIf;
EndProcedure
@@ -310,99 +309,6 @@ Procedure CalculateQuantityByUnit(DataTable) Export
EndDo;
EndProcedure
-Function JoinTables(ArrayOfJoiningTables, Fields) Export
-
- If Not ArrayOfJoiningTables.Count() Then
- Return New ValueTable();
- EndIf;
-
- ArrayOfFieldsPut = New Array();
- ArrayOfFieldsSelect = New Array();
-
- Counter = 1;
- For Each Field In StrSplit(Fields, ",") Do
- ArrayOfFieldsPut.Add(StrTemplate(" tmp.%1 AS %1 ", TrimAll(Field)));
- ArrayOfFieldsSelect.Add(StrTemplate(" _tmp_.%1 AS %1 ", TrimAll(Field)));
- Counter = Counter + 1;
- EndDo;
- PutText = StrConcat(ArrayOfFieldsPut, ",");
- SelectText = StrConcat(ArrayOfFieldsSelect, ",");
-
- ArrayOfPutText = New Array();
- ArrayOfSelectText = New Array();
-
- Counter = 1;
- Query = New Query();
-
- DoExecuteQuery = False;
- For Each Table In ArrayOfJoiningTables Do
- If Not Table.Count() Then
- Continue;
- EndIf;
- DoExecuteQuery = True;
-
- ArrayOfPutText.Add(
- StrTemplate(
- "select %1
- |into tmp%2
- |from
- | &Table%2 as tmp
- |", PutText, String(Counter)));
-
- ArrayOfSelectText.Add(
- StrReplace(
- StrTemplate(
- "select %1
- |from tmp%2 as tmp%2
- |", SelectText, String(Counter)), "_tmp_", "tmp" + String(Counter)));
-
- Query.SetParameter("Table" + String(Counter), Table);
- Counter = Counter + 1;
- EndDo;
-
- If DoExecuteQuery Then
- Query.Text = StrConcat(ArrayOfPutText, " ; ") + " ; " + StrConcat(ArrayOfSelectText, " union all ");
- QueryResult = Query.Execute();
- QueryTable = QueryResult.Unload();
- Return QueryTable;
- Else
- Return New ValueTable();
- EndIf;
-EndFunction
-
-Procedure MergeTables(MasterTable, SourceTable, AddColumnFromSourceTable = "") Export
- If Not IsBlankString(AddColumnFromSourceTable) Then
- Column = SourceTable.Columns.Find(AddColumnFromSourceTable);
- If Not Column = Undefined And MasterTable.Columns.Find(AddColumnFromSourceTable) = Undefined Then
- MasterTable.Columns.Add(AddColumnFromSourceTable, Column.ValueType);
- EndIf;
- EndIf;
- For Each Row In SourceTable Do
- FillPropertyValues(MasterTable.Add(), Row);
- EndDo;
-EndProcedure
-
-Function CreateTable(RegisterMetadata) Export
- Table = New ValueTable();
- For Each Item In RegisterMetadata.Dimensions Do
- Table.Columns.Add(Item.Name, Item.Type);
- EndDo;
-
- For Each Item In RegisterMetadata.Resources Do
- Table.Columns.Add(Item.Name, Item.Type);
- EndDo;
- For Each Item In RegisterMetadata.Attributes Do
- Table.Columns.Add(Item.Name, Item.Type);
- EndDo;
-
- For Each Item In RegisterMetadata.StandardAttributes Do
- If Upper(Item.Name) = Upper("Period") Then
- Table.Columns.Add(Item.Name, Item.Type);
- EndIf;
- EndDo;
- Return Table;
-EndFunction
-
Procedure ShowPostingErrorMessage(QueryTable, Parameters, AddInfo = Undefined) Export
If QueryTable.Columns.Find("Unposting") = Undefined Then
QueryTable.Columns.Add("Unposting");
@@ -614,7 +520,7 @@ Function PrepareRecordsTables(Dimensions, LineNumberJoinConditionField, ItemList
ArrayOfDimensions = StrSplit(Dimensions, ",");
JoinCondition = "";
- ArrayOfSelectedFields = New Array();
+ ArrayOfSelectedFields = New Array(); // Array Of String
For Each ItemOfDimension In ArrayOfDimensions Do
If Upper(TrimAll(ItemOfDimension)) = Upper(TrimAll(LineNumberJoinConditionField)) Then
Continue;
@@ -751,7 +657,7 @@ Procedure CheckBalance_AfterWrite(Ref, Cancel, Parameters, TableNameWithItemKeys
EndIf;
If Not Records_InDocument.Columns.Count() Then
- Records_InDocument = CreateTable(Metadata.AccumulationRegisters.R4011B_FreeStocks);
+ Records_InDocument = CommonFunctionsServer.CreateTable(Metadata.AccumulationRegisters.R4011B_FreeStocks);
EndIf;
Exists_R4011B_FreeStocks = CommonFunctionsClientServer.GetFromAddInfo(AddInfo, "Exists_R4011B_FreeStocks");
@@ -778,7 +684,7 @@ Procedure CheckBalance_AfterWrite(Ref, Cancel, Parameters, TableNameWithItemKeys
EndIf;
If Not Records_InDocument.Columns.Count() Then
- Records_InDocument = CreateTable(Metadata.AccumulationRegisters.R4010B_ActualStocks);
+ Records_InDocument = CommonFunctionsServer.CreateTable(Metadata.AccumulationRegisters.R4010B_ActualStocks);
EndIf;
Exists_R4010B_ActualStocks = CommonFunctionsClientServer.GetFromAddInfo(AddInfo, "Exists_R4010B_ActualStocks");
@@ -1159,6 +1065,7 @@ Function CheckBalance_ExecuteQuery(Ref, Parameters, Tables, RecordType, Unpostin
EndFunction
Function UseRegister(Name) Export
+ // Delete CashInTransit
Return Mid(Name, 7, 1) = "_" Or Mid(Name, 4, 1) = "_" Or Mid(Name, 3, 1) = "_";
EndFunction
@@ -1201,22 +1108,81 @@ Procedure FillPostingTables(Tables, Ref, QueryArray, Parameters) Export
For Each VT In Tables Do
QueryTable = GetQueryTableByName(VT.Key, Parameters);
If QueryTable.Count() Then
- MergeTables(Tables[VT.Key], QueryTable, "RecordType");
+ CommonFunctionsServer.MergeTables(Tables[VT.Key], QueryTable, "RecordType");
EndIf;
EndDo;
EndProcedure
+// Set posting data tables.
+//
+// Parameters:
+// PostingDataTables - Map:
+// * Key - MetadataObject
+// * Value - See PostingTableSettings
+// Parameters - See GetPostingParameters
+// UseOldRegisters - Boolean - Use old registers
Procedure SetPostingDataTables(PostingDataTables, Parameters, UseOldRegisters = False) Export
+
+ RegisterRecords = GetRegisterRecords(Parameters);
+
For Each Table In Parameters.DocumentDataTables Do
If UseOldRegisters Or UseRegister(Table.Key) Then
- Settings = New Structure("RegisterName", Table.Key);
- Settings.Insert("RecordSet", Table.Value);
- Settings.Insert("WriteInTransaction", True);
- PostingDataTables.Insert(Parameters.Object.RegisterRecords[Table.Key], Settings);
+ SetPostingDataTable(PostingDataTables, Parameters, Table.Key, Table.Value, RegisterRecords);
EndIf;
EndDo;
EndProcedure
+Function GetRegisterRecords(Parameters)
+ If Parameters.PostingByRef Then
+ TmpDoc = Documents[Parameters.Metadata.Name].CreateDocument();
+ RegisterRecords = TmpDoc.RegisterRecords;
+ Else
+ //@skip-check property-return-type
+ RegisterRecords = Parameters.Object.RegisterRecords; // RegisterRecordsCollection
+ EndIf;
+
+ Return RegisterRecords;
+EndFunction
+
+Procedure SetPostingDataTable(PostingDataTables, Parameters, Name, VT, RegisterRecords = Undefined) Export
+
+ If RegisterRecords = Undefined Then
+ RegisterRecords = GetRegisterRecords(Parameters);
+ EndIf;
+
+ RecSetData = RegisterRecords[Name];
+ If Parameters.PostingByRef Then
+ RecSetData.Filter.Recorder.Set(Parameters.Object);
+ EndIf;
+ Settings = PostingTableSettings(Name, VT, RecSetData);
+ PostingDataTables.Insert(RecSetData.Metadata(), Settings);
+EndProcedure
+
+// Posting table settings.
+//
+// Parameters:
+// RegisterName - String -
+// Table - ValueTable -
+// RecSetData - InformationRegisterRecordSetInformationRegisterName, AccountingRegisterRecordSetAccountingRegisterName, CalculationRegisterRecordSetCalculationRegisterName, AccumulationRegisterRecordSetAccumulationRegisterName - Rec set data
+//
+// Returns:
+// Structure - Posting table settings:
+// * RegisterName - String -
+// * PrepareTable - ValueTable -
+// * WriteInTransaction - Boolean -
+// * Metadata - MetadataObjectInformationRegister, MetadataObjectAccountingRegister, MetadataObjectCalculationRegister, MetadataObjectAccumulationRegister -
+// * RecordSet_Document - AccumulationRegisterRecordSet, InformationRegisterRecordSet -
+// * RecordType - Undefined, AccumulationRecordType -
+Function PostingTableSettings(RegisterName, Table, RecSetData) Export
+ Settings = New Structure;
+ Settings.Insert("RegisterName", RegisterName);
+ Settings.Insert("PrepareTable", Table);
+ Settings.Insert("WriteInTransaction", True);
+ Settings.Insert("Metadata", RecSetData.Metadata());
+ Settings.Insert("RecordSet_Document", RecSetData);
+ Return Settings;
+EndFunction
+
Procedure GetLockDataSource(DataMapWithLockFields, DocumentDataTables, UseOldRegisters = False) Export
For Each Register In DocumentDataTables Do
If UseOldRegisters Or UseRegister(Register.Key) Then
@@ -1229,7 +1195,7 @@ EndProcedure
Procedure SetRegisters(Tables, DocumentRef, UseOldRegisters = False) Export
For Each Register In DocumentRef.Metadata().RegisterRecords Do
If UseOldRegisters Or UseRegister(Register.Name) Then
- Tables.Insert(Register.Name, CreateTable(Register));
+ Tables.Insert(Register.Name, CommonFunctionsServer.CreateTable(Register));
EndIf;
EndDo;
EndProcedure
@@ -1254,6 +1220,70 @@ Function Exists_R2001T_Sales() Export
| R2001T_Sales.Recorder = &Ref";
EndFunction
+#Region BatchInfo
+
+// Get batch keys info settings.
+//
+// Returns:
+// Structure - Get batch keys info settings:
+// * Dimensions - String -
+// * Totals - String -
+// * DataTable - ValueTable -
+// * CurrencyMovementType - ChartOfCharacteristicTypesRef.CurrencyMovementType -
+Function GetBatchKeysInfoSettings() Export
+ BatchKeysInfoSettings = New Structure;
+ BatchKeysInfoSettings.Insert("Dimensions", "");
+ BatchKeysInfoSettings.Insert("Totals", "");
+ BatchKeysInfoSettings.Insert("DataTable", New ValueTable());
+ BatchKeysInfoSettings.Insert("CurrencyMovementType", ChartsOfCharacteristicTypes.CurrencyMovementType.EmptyRef());
+ Return BatchKeysInfoSettings;
+EndFunction
+
+// Set batch key info table.
+//
+// Parameters:
+// Parameters - See GetPostingParameters
+// BatchKeysInfoSettings - See GetBatchKeysInfoSettings
+Procedure SetBatchKeyInfoTable(Parameters, BatchKeysInfoSettings) Export
+
+ If BatchKeysInfoSettings.DataTable.Columns.Find("CurrencyMovementType") = Undefined Then
+ BatchKeysInfoSettings.DataTable.Columns.Add("CurrencyMovementType", New TypeDescription("ChartOfCharacteristicTypesRef.CurrencyMovementType"));
+ EndIf;
+
+ TotalsArray = New Array;
+ For Each Row In StrSplit(BatchKeysInfoSettings.Totals, ", ", False) Do
+ TotalsArray.Add("SUM(" + Row + ") AS " + Row);
+ EndDo;
+
+ Query = New Query;
+ Query.TempTablesManager = Parameters.TempTablesManager;
+ Query.Text =
+ "SELECT
+ | DataTable.*
+ |INTO tmp_BatchKeysInfo
+ |FROM
+ | &DataTable AS DataTable
+ |;
+ |
+ |SELECT
+ | %1 %2 %3
+ |INTO BatchKeysInfo
+ |FROM
+ | tmp_BatchKeysInfo
+ |WHERE
+ | CurrencyMovementType = &CurrencyMovementType
+ |GROUP BY
+ | %1";
+
+ Query.Text = StrTemplate(Query.Text, BatchKeysInfoSettings.Dimensions, ?(TotalsArray.Count() > 0, ",", ""),StrConcat(TotalsArray, ", "));
+
+ Query.SetParameter("DataTable", BatchKeysInfoSettings.DataTable);
+ Query.SetParameter("CurrencyMovementType", BatchKeysInfoSettings.CurrencyMovementType);
+ Query.Execute();
+EndProcedure
+
+#EndRegion
+
#Region CheckDocumentPosting
// Check document array.
@@ -1297,16 +1327,15 @@ Function CheckDocumentArray(DocumentArray, isJob = False) Export
BackgroundJobAPIServer.NotifyStream(Msg);
EndIf;
-
For Each Doc In DocumentArray Do
- DocObject = Doc.GetObject();
+ DocObject = Doc;
Parameters = GetPostingParameters(DocObject, PostingMode, AddInfo);
// Multi currency integration
CurrencyTable = CommonFunctionsClientServer.GetFromAddInfo(AddInfo, "CurrencyTable");
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
- RegisteredRecords = RegisterRecords(DocObject, Parameters.PostingDataTables, Parameters.Object.RegisterRecords);
+ RegisteredRecords = RegisterRecords(Parameters);
If RegisteredRecords.Count() > 0 Then
Result = New Structure;
diff --git a/IRP/src/CommonModules/UndopostingServer/Module.bsl b/IRP/src/CommonModules/UndopostingServer/Module.bsl
index 791b294022..7c1ec96c1b 100644
--- a/IRP/src/CommonModules/UndopostingServer/Module.bsl
+++ b/IRP/src/CommonModules/UndopostingServer/Module.bsl
@@ -1,27 +1,21 @@
+// Undopost.
+//
+// Parameters:
+// DocObject - DocumentObjectDocumentName - Doc object
+// Cancel - Boolean - Cancel
+// AddInfo - Undefined - Add info
Procedure Undopost(DocObject, Cancel, AddInfo = Undefined) Export
If Cancel Then
Return;
EndIf;
-
For Each RecordSet In DocObject.RegisterRecords Do
TableForLoad = New ValueTable();
- AccReg = Metadata.AccumulationRegisters;
- If TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R1020B_AdvancesToVendors") Then
- AdvancesRelevanceServer.SetBound_Advances(DocObject, TableForLoad, AccReg.R1020B_AdvancesToVendors);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R2020B_AdvancesFromCustomers") Then
- AdvancesRelevanceServer.SetBound_Advances(DocObject, TableForLoad, AccReg.R2020B_AdvancesFromCustomers);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R1021B_VendorsTransactions") Then
- AdvancesRelevanceServer.SetBound_Transactions(DocObject, TableForLoad, AccReg.R1021B_VendorsTransactions);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R2021B_CustomersTransactions") Then
- AdvancesRelevanceServer.SetBound_Transactions(DocObject, TableForLoad, AccReg.R2021B_CustomersTransactions);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R5012B_VendorsAging") Then
- AdvancesRelevanceServer.SetBound_Aging(DocObject, TableForLoad, AccReg.R5012B_VendorsAging);
- ElsIf TypeOf(RecordSet) = Type("AccumulationRegisterRecordSet.R5011B_CustomersAging") Then
- AdvancesRelevanceServer.SetBound_Aging(DocObject, TableForLoad, AccReg.R5011B_CustomersAging);
- ElsIf TypeOf(RecordSet) = Type("InformationRegisterRecordSet.T6020S_BatchKeysInfo") Then
+ PostingServer.WriteAdvances(DocObject, RecordSet.Metadata(), TableForLoad);
+
+ If RecordSet.Metadata() = Metadata.InformationRegisters.T6020S_BatchKeysInfo Then
InformationRegisters.T6030S_BatchRelevance.BatchRelevance_SetBound(DocObject,
- PostingServer.CreateTable(Metadata.InformationRegisters.T6020S_BatchKeysInfo));
+ CommonFunctionsServer.CreateTable(Metadata.InformationRegisters.T6020S_BatchKeysInfo));
EndIf;
EndDo;
@@ -30,25 +24,27 @@ Procedure Undopost(DocObject, Cancel, AddInfo = Undefined) Export
Parameters.Insert("IsReposting", False);
Parameters.Insert("PointInTime", DocObject.PointInTime());
Parameters.Insert("TempTablesManager", New TempTablesManager());
+ Parameters.Insert("DocumentDataTables", New Structure);
+ Parameters.Insert("LockDataSources", New Map);
+ Parameters.Insert("PostingDataTables", New Map);
+ Parameters.Insert("Metadata", DocObject.Ref.Metadata());
+
+ Module = Documents[DocObject.Ref.Metadata().Name]; // DocumentManager.SalesOrder
- Module = Documents[DocObject.Ref.Metadata().Name];
-
- DocumentDataTables = Module.UndopostingGetDocumentDataTables(DocObject.Ref, Cancel, Parameters, AddInfo);
- Parameters.Insert("DocumentDataTables", DocumentDataTables);
+ Parameters.DocumentDataTables = Module.UndopostingGetDocumentDataTables(DocObject.Ref, Cancel, Parameters, AddInfo);
If Cancel Then
Return;
EndIf;
- LockDataSources = Module.UndopostingGetLockDataSource(DocObject.Ref, Cancel, Parameters, AddInfo);
- Parameters.Insert("LockDataSources", LockDataSources);
+ Parameters.LockDataSources = Module.UndopostingGetLockDataSource(DocObject.Ref, Cancel, Parameters, AddInfo);
If Cancel Then
Return;
EndIf;
// Save pointers to locks
DataLock = Undefined;
- If LockDataSources <> Undefined Then
- DataLock = SetLock(LockDataSources);
+ If Parameters.LockDataSources <> Undefined Then
+ DataLock = SetLock(Parameters.LockDataSources);
EndIf;
If TypeOf(AddInfo) = Type("Structure") Then
AddInfo.Insert("DataLock", DataLock);
@@ -60,7 +56,7 @@ Procedure Undopost(DocObject, Cancel, AddInfo = Undefined) Export
EndIf;
For Each RecordSet In DocObject.RegisterRecords Do
- If Upper(RecordSet.Metadata().Name) = Upper("TM1010B_RowIDMovements") Then
+ If RecordSet.Metadata() = Metadata.AccumulationRegisters.TM1010B_RowIDMovements Then
Continue;
EndIf;
RecordSet.Clear();
diff --git a/IRP/src/Configuration/Configuration.mdo b/IRP/src/Configuration/Configuration.mdo
index 032650fe2b..6d3c6c5fbd 100644
--- a/IRP/src/Configuration/Configuration.mdo
+++ b/IRP/src/Configuration/Configuration.mdo
@@ -434,8 +434,8 @@
CommonModule.CatCashAccountsServer
CommonModule.CatCompaniesClient
CommonModule.CatCompaniesServer
- CommonModule.CatConfigurationMetadataServer
CommonModule.CatExpenseAndRevenueTypesServer
+ CommonModule.CatConfigurationMetadataServer
CommonModule.CatItemsServer
CommonModule.CatPartnersServer
CommonModule.CatRetailCustomersClient
@@ -1233,6 +1233,10 @@
Report.DetailingSupplies
Report.ProductionPlanning
Report.AdditionalDocumentTablesCheck
+ Report.TrialBalance
+ Report.TrialBalanceByAccount
+ Report.AccountCard
+ Report.AccountAnalysis
DataProcessor.AnaliseDocumentMovements
DataProcessor.AnalyseXDTO
DataProcessor.BuilderExample
diff --git a/IRP/src/DataProcessors/AnaliseDocumentMovements/AnaliseDocumentMovements.mdo b/IRP/src/DataProcessors/AnaliseDocumentMovements/AnaliseDocumentMovements.mdo
index 4d03b00080..ebe85fa305 100644
--- a/IRP/src/DataProcessors/AnaliseDocumentMovements/AnaliseDocumentMovements.mdo
+++ b/IRP/src/DataProcessors/AnaliseDocumentMovements/AnaliseDocumentMovements.mdo
@@ -97,7 +97,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Documents/AdditionalCostAllocation/ManagerModule.bsl b/IRP/src/Documents/AdditionalCostAllocation/ManagerModule.bsl
index f32e1687f5..b5cd090e6f 100644
--- a/IRP/src/Documents/AdditionalCostAllocation/ManagerModule.bsl
+++ b/IRP/src/Documents/AdditionalCostAllocation/ManagerModule.bsl
@@ -52,7 +52,12 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
EndIf;
PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.R6070T_OtherPeriodsExpenses, New Structure("RecordSet, WriteInTransaction", OtherPeriodsExpensesByBasis, Parameters.IsReposting));
+
+ R6070T_OtherPeriodsExpenses = Metadata.AccumulationRegisters.R6070T_OtherPeriodsExpenses;
+ R6070TSettings = PostingServer.PostingTableSettings(R6070T_OtherPeriodsExpenses.Name, OtherPeriodsExpensesByBasis, Parameters.Object.RegisterRecords.R6070T_OtherPeriodsExpenses);
+ R6070TSettings.WriteInTransaction = Parameters.IsReposting;
+ PostingDataTables.Insert(R6070T_OtherPeriodsExpenses, R6070TSettings);
+
Parameters.Insert("PostingDataTables", PostingDataTables);
CostAllocationObject = Parameters.Object;
@@ -60,8 +65,7 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
Parameters.Object = CostAllocationObject;
- For Each RowRecordSet In Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.R6070T_OtherPeriodsExpenses).RecordSet Do
+ For Each RowRecordSet In Parameters.PostingDataTables.Get(R6070T_OtherPeriodsExpenses).PrepareTable Do
FillPropertyValues(TableOtherPeriodsExpensesRecalculated.Add(), RowRecordSet);
EndDo;
EndDo;
@@ -81,8 +85,12 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
EndIf;
PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.T6060S_BatchCostAllocationInfo,
- New Structure("RecordSet, WriteInTransaction", BatchCostAllocationInfoByBasis, Parameters.IsReposting));
+
+ T6060S_BatchCostAllocationInfo = Metadata.InformationRegisters.T6060S_BatchCostAllocationInfo;
+ T6060SSettings = PostingServer.PostingTableSettings(T6060S_BatchCostAllocationInfo.Name, BatchCostAllocationInfoByBasis, Parameters.Object.RegisterRecords.T6060S_BatchCostAllocationInfo);
+ T6060SSettings.WriteInTransaction = Parameters.IsReposting;
+ PostingDataTables.Insert(T6060S_BatchCostAllocationInfo, T6060SSettings);
+
Parameters.Insert("PostingDataTables", PostingDataTables);
CostAllocationObject = Parameters.Object;
@@ -90,8 +98,7 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
Parameters.Object = CostAllocationObject;
- For Each RowRecordSet In Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.T6060S_BatchCostAllocationInfo).RecordSet Do
+ For Each RowRecordSet In Parameters.PostingDataTables.Get(T6060S_BatchCostAllocationInfo).PrepareTable Do
FillPropertyValues(BatchCostAllocationInfoRecalculated.Add(), RowRecordSet);
EndDo;
EndDo;
@@ -111,8 +118,8 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
BatchKeysInfo.FillValues(Enums.BatchDirection.Receipt, "Direction");
Tables.T6020S_BatchKeysInfo = BatchKeysInfo;
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.R6070T_OtherPeriodsExpenses.Metadata());
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6060S_BatchCostAllocationInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.AccumulationRegisters.R6070T_OtherPeriodsExpenses);
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6060S_BatchCostAllocationInfo);
EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
diff --git a/IRP/src/Documents/AdditionalRevenueAllocation/ManagerModule.bsl b/IRP/src/Documents/AdditionalRevenueAllocation/ManagerModule.bsl
index 2aff04eef2..e02449f3f3 100644
--- a/IRP/src/Documents/AdditionalRevenueAllocation/ManagerModule.bsl
+++ b/IRP/src/Documents/AdditionalRevenueAllocation/ManagerModule.bsl
@@ -52,7 +52,12 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
EndIf;
PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.R6080T_OtherPeriodsRevenues, New Structure("RecordSet, WriteInTransaction", OtherPeriodsRevenuesByBasis, Parameters.IsReposting));
+
+ R6080T_OtherPeriodsRevenues = Metadata.AccumulationRegisters.R6080T_OtherPeriodsRevenues;
+ R6080TSettings = PostingServer.PostingTableSettings(R6080T_OtherPeriodsRevenues.Name, OtherPeriodsRevenuesByBasis, Parameters.Object.RegisterRecords.R6080T_OtherPeriodsRevenues);
+ R6080TSettings.WriteInTransaction = Parameters.IsReposting;
+ PostingDataTables.Insert(R6080T_OtherPeriodsRevenues, R6080TSettings);
+
Parameters.Insert("PostingDataTables", PostingDataTables);
RevenueAllocationObject = Parameters.Object;
@@ -60,8 +65,7 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
Parameters.Object = RevenueAllocationObject;
- For Each RowRecordSet In Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.R6080T_OtherPeriodsRevenues).RecordSet Do
+ For Each RowRecordSet In Parameters.PostingDataTables.Get(R6080T_OtherPeriodsRevenues).PrepareTable Do
FillPropertyValues(TableOtherPeriodsRevenuesRecalculated.Add(), RowRecordSet);
EndDo;
EndDo;
@@ -82,8 +86,12 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
EndIf;
PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.T6070S_BatchRevenueAllocationInfo,
- New Structure("RecordSet, WriteInTransaction", BatchRevenueAllocationInfoByBasis, Parameters.IsReposting));
+
+ T6070S_BatchRevenueAllocationInfo = Metadata.InformationRegisters.T6070S_BatchRevenueAllocationInfo;
+ T6070SSettings = PostingServer.PostingTableSettings(T6070S_BatchRevenueAllocationInfo.Name, BatchRevenueAllocationInfoByBasis, Parameters.Object.RegisterRecords.T6070S_BatchRevenueAllocationInfo);
+ T6070SSettings.WriteInTransaction = Parameters.IsReposting;
+ PostingDataTables.Insert(T6070S_BatchRevenueAllocationInfo, T6070SSettings);
+
Parameters.Insert("PostingDataTables", PostingDataTables);
RevenueAllocationObject = Parameters.Object;
@@ -91,8 +99,7 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
Parameters.Object = RevenueAllocationObject;
- For Each RowRecordSet In Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.T6070S_BatchRevenueAllocationInfo).RecordSet Do
+ For Each RowRecordSet In Parameters.PostingDataTables.Get(T6070S_BatchRevenueAllocationInfo).PrepareTable Do
FillPropertyValues(BatchRevenueAllocationInfoRecalculated.Add(), RowRecordSet);
EndDo;
EndDo;
@@ -112,8 +119,8 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
BatchKeysInfo.FillValues(Enums.BatchDirection.Receipt, "Direction");
Tables.T6020S_BatchKeysInfo = BatchKeysInfo;
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.R6080T_OtherPeriodsRevenues.Metadata());
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6070S_BatchRevenueAllocationInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.AccumulationRegisters.R6080T_OtherPeriodsRevenues);
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6070S_BatchRevenueAllocationInfo);
EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
diff --git a/IRP/src/Documents/BankPayment/ManagerModule.bsl b/IRP/src/Documents/BankPayment/ManagerModule.bsl
index fb2b897467..a610c98dd6 100644
--- a/IRP/src/Documents/BankPayment/ManagerModule.bsl
+++ b/IRP/src/Documents/BankPayment/ManagerModule.bsl
@@ -9,153 +9,17 @@ EndFunction
#Region Posting
Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
-
- AccReg = Metadata.AccumulationRegisters;
- Tables = New Structure;
- Tables.Insert("CashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
-
- QueryPaymentList = New Query;
- QueryPaymentList.Text = GetQueryTextBankPaymentPaymentList();
- QueryPaymentList.SetParameter("Ref", Ref);
- QueryResultsPaymentList = QueryPaymentList.Execute();
- QueryTablePaymentList = QueryResultsPaymentList.Unload();
-
- Query = New Query;
- Query.Text = GetQueryTextQueryTable();
- Query.SetParameter("QueryTable", QueryTablePaymentList);
- QueryResults = Query.ExecuteBatch();
-
- Tables.CashInTransit = QueryResults[1].Unload();
-
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
- Return Tables;
-EndFunction
-Function GetQueryTextBankPaymentPaymentList()
- Return "SELECT
- | BankPaymentPaymentList.Ref.Company AS Company,
- | BankPaymentPaymentList.Ref.Currency AS Currency,
- | BankPaymentPaymentList.Ref.Account AS Account,
- | BankPaymentPaymentList.Ref.TransitAccount AS TransitAccount,
- | CASE
- | WHEN BankPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
- | THEN CASE
- | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN BankPaymentPaymentList.PlaningTransactionBasis
- | ELSE BankPaymentPaymentList.BasisDocument
- | END
- | ELSE UNDEFINED
- | END AS BasisDocument,
- | CASE
- | WHEN BankPaymentPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
- | THEN TRUE
- | ELSE FALSE
- | END
- | AND
- | NOT CASE
- | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsAdvance,
- | BankPaymentPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
- | CASE
- | WHEN BankPaymentPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
- | AND BankPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
- | THEN BankPaymentPaymentList.Agreement.StandardAgreement
- | ELSE BankPaymentPaymentList.Agreement
- | END AS Agreement,
- | BankPaymentPaymentList.Partner AS Partner,
- | BankPaymentPaymentList.Payee AS Payee,
- | BankPaymentPaymentList.Ref.Date AS Period,
- | BankPaymentPaymentList.TotalAmount AS Amount,
- | CASE
- | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency = BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyTransfer,
- | CASE
- | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyExchange,
- | BankPaymentPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
- | BankPaymentPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
- | BankPaymentPaymentList.Ref AS PaymentDocument,
- | BankPaymentPaymentList.Key AS Key,
- | BankPaymentPaymentList.ProfitLossCenter AS ProfitLossCenter,
- | BankPaymentPaymentList.ExpenseType AS ExpenseType,
- | BankPaymentPaymentList.AdditionalAnalytic AS AdditionalAnalytic,
- | BankPaymentPaymentList.Commission AS Commission,
- | BankPaymentPaymentList.Ref.Branch AS Branch
- |FROM
- | Document.BankPayment.PaymentList AS BankPaymentPaymentList
- |WHERE
- | BankPaymentPaymentList.Ref = &Ref";
-EndFunction
+ Tables = New Structure;
-Function GetQueryTextQueryTable()
- Return "SELECT
- | QueryTable.Company AS Company,
- | QueryTable.Currency AS Currency,
- | QueryTable.Account AS Account,
- | QueryTable.TransitAccount AS TransitAccount,
- | QueryTable.BasisDocument AS BasisDocument,
- | QueryTable.IsAdvance,
- | QueryTable.PlaningTransactionBasis AS PlaningTransactionBasis,
- | QueryTable.Agreement AS Agreement,
- | QueryTable.Partner AS Partner,
- | QueryTable.Payee AS Payee,
- | QueryTable.Period AS Period,
- | QueryTable.Amount AS Amount,
- | QueryTable.IsMoneyTransfer AS IsMoneyTransfer,
- | QueryTable.IsMoneyExchange AS IsMoneyExchange,
- | QueryTable.FromAccount AS FromAccount,
- | QueryTable.ToAccount AS ToAccount,
- | QueryTable.PaymentDocument AS PaymentDocument,
- | QueryTable.Key AS Key,
- | QueryTable.ProfitLossCenter AS ProfitLossCenter,
- | QueryTable.ExpenseType AS ExpenseType,
- | QueryTable.AdditionalAnalytic AS AdditionalAnalytic,
- | QueryTable.Commission AS Commission,
- | QueryTable.Branch
- |INTO tmp
- |FROM
- | &QueryTable AS QueryTable
- |;
- |
- |//[1]//////////////////////////////////////////////////////////////////////////////
- |SELECT
- | tmp.Company AS Company,
- | tmp.PlaningTransactionBasis AS BasisDocument,
- | tmp.FromAccount AS FromAccount,
- | tmp.ToAccount AS ToAccount,
- | tmp.Currency AS Currency,
- | tmp.Amount AS Amount,
- | tmp.Period,
- | tmp.Key
- |FROM
- | tmp AS tmp
- |WHERE
- | tmp.IsMoneyTransfer";
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
+
+ Return Tables;
EndFunction
Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
@@ -187,12 +51,11 @@ EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
PostingDataTables = New Map;
-
- // CashInIransit
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit, New Structure("RecordType, RecordSet", AccumulationRecordType.Receipt, Parameters.DocumentDataTables.CashInTransit));
-
PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
-
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
Return PostingDataTables;
EndFunction
@@ -246,6 +109,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R1020B_AdvancesToVendors());
QueryArray.Add(R1021B_VendorsTransactions());
QueryArray.Add(R2020B_AdvancesFromCustomers());
@@ -383,6 +247,98 @@ EndFunction
#Region Posting_MainTables
+Function CashInTransit()
+ Return "SELECT
+ | BankPaymentPaymentList.Ref.Company AS Company,
+ | BankPaymentPaymentList.Ref.Currency AS Currency,
+ | BankPaymentPaymentList.Ref.Account AS Account,
+ | BankPaymentPaymentList.Ref.TransitAccount AS TransitAccount,
+ | CASE
+ | WHEN BankPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
+ | THEN CASE
+ | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN BankPaymentPaymentList.PlaningTransactionBasis
+ | ELSE BankPaymentPaymentList.BasisDocument
+ | END
+ | ELSE UNDEFINED
+ | END AS BasisDocument,
+ | CASE
+ | WHEN BankPaymentPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
+ | THEN TRUE
+ | ELSE FALSE
+ | END
+ | AND NOT CASE
+ | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsAdvance,
+ | BankPaymentPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
+ | CASE
+ | WHEN BankPaymentPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
+ | AND BankPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
+ | THEN BankPaymentPaymentList.Agreement.StandardAgreement
+ | ELSE BankPaymentPaymentList.Agreement
+ | END AS Agreement,
+ | BankPaymentPaymentList.Partner AS Partner,
+ | BankPaymentPaymentList.Payee AS Payee,
+ | BankPaymentPaymentList.Ref.Date AS Period,
+ | BankPaymentPaymentList.TotalAmount AS Amount,
+ | CASE
+ | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency = BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyTransfer,
+ | CASE
+ | WHEN VALUETYPE(BankPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT BankPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> BankPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyExchange,
+ | BankPaymentPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
+ | BankPaymentPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
+ | BankPaymentPaymentList.Ref AS PaymentDocument,
+ | BankPaymentPaymentList.Key AS Key,
+ | BankPaymentPaymentList.ProfitLossCenter AS ProfitLossCenter,
+ | BankPaymentPaymentList.ExpenseType AS ExpenseType,
+ | BankPaymentPaymentList.AdditionalAnalytic AS AdditionalAnalytic,
+ | BankPaymentPaymentList.Commission AS Commission,
+ | BankPaymentPaymentList.Ref.Branch AS Branch
+ |INTO TablePaymentList
+ |FROM
+ | Document.BankPayment.PaymentList AS BankPaymentPaymentList
+ |WHERE
+ | BankPaymentPaymentList.Ref = &Ref
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | VALUE(AccumulationRecordType.Receipt) AS RecordType,
+ | tmp.Company AS Company,
+ | tmp.PlaningTransactionBasis AS BasisDocument,
+ | tmp.FromAccount AS FromAccount,
+ | tmp.ToAccount AS ToAccount,
+ | tmp.Currency AS Currency,
+ | tmp.Amount AS Amount,
+ | tmp.Period,
+ | tmp.Key
+ |INTO CashInTransit
+ |FROM
+ | TablePaymentList AS tmp
+ |WHERE
+ | tmp.IsMoneyTransfer";
+EndFunction
+
Function R1020B_AdvancesToVendors()
Return "SELECT
| VALUE(AccumulationRecordType.Receipt) AS RecordType,
@@ -987,7 +943,11 @@ Function GetAnalytics_PaymentToVendor(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
IsAdvance = AccountingServer.IsAdvance(Parameters.RowData);
If IsAdvance Then
If ValueIsFilled(Debit.AccountAdvancesVendor) Then
@@ -1017,7 +977,11 @@ Function GetAnalytics_OffsetOfAdvances(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsVendor) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsVendor;
EndIf;
diff --git a/IRP/src/Documents/BankReceipt/ManagerModule.bsl b/IRP/src/Documents/BankReceipt/ManagerModule.bsl
index 54775e634f..7a993b3474 100644
--- a/IRP/src/Documents/BankReceipt/ManagerModule.bsl
+++ b/IRP/src/Documents/BankReceipt/ManagerModule.bsl
@@ -9,182 +9,17 @@ EndFunction
#Region Posting
Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- AccReg = Metadata.AccumulationRegisters;
- Tables = New Structure;
- Tables.Insert("CashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
- Tables.Insert("CashInTransit_POS", PostingServer.CreateTable(AccReg.CashInTransit));
-
- QueryPaymentList = New Query;
- QueryPaymentList.Text = GetQueryTextBankReceiptPaymentList();
- QueryPaymentList.SetParameter("Ref", Ref);
- QueryResultsPaymentList = QueryPaymentList.Execute();
- QueryTablePaymentList = QueryResultsPaymentList.Unload();
-
- Query = New Query;
- Query.Text = GetQueryTextQueryTable();
- Query.SetParameter("QueryTable", QueryTablePaymentList);
- QueryResults = Query.ExecuteBatch();
-
- Tables.CashInTransit = QueryResults[1].Unload();
- Tables.CashInTransit_POS = QueryResults[2].Unload();
-
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
- Return Tables;
-EndFunction
-
-Function GetQueryTextBankReceiptPaymentList()
- Return "SELECT
- | BankReceiptPaymentList.Ref.Company AS Company,
- | BankReceiptPaymentList.Ref.Currency AS Currency,
- | BankReceiptPaymentList.Ref.CurrencyExchange AS CurrencyExchange,
- | BankReceiptPaymentList.Ref.Account AS Account,
- | BankReceiptPaymentList.Ref.TransitAccount AS TransitAccount,
- | CASE
- | WHEN BankReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
- | THEN CASE
- | WHEN (VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | OR VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashStatement))
- | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN BankReceiptPaymentList.PlaningTransactionBasis
- | ELSE BankReceiptPaymentList.BasisDocument
- | END
- | ELSE UNDEFINED
- | END AS BasisDocument,
- | CASE
- | WHEN BankReceiptPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
- | THEN TRUE
- | ELSE FALSE
- | END
- | AND NOT CASE
- | WHEN (VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | OR VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashStatement))
- | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsAdvance,
- | BankReceiptPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
- | CASE
- | WHEN BankReceiptPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
- | AND BankReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
- | THEN BankReceiptPaymentList.Agreement.StandardAgreement
- | ELSE BankReceiptPaymentList.Agreement
- | END AS Agreement,
- | BankReceiptPaymentList.Partner AS Partner,
- | BankReceiptPaymentList.Payer AS Payer,
- | BankReceiptPaymentList.Ref.Date AS Period,
- | BankReceiptPaymentList.TotalAmount AS Amount,
- | BankReceiptPaymentList.AmountExchange AS AmountExchange,
- | CASE
- | WHEN VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency = BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyTransfer,
- | CASE
- | WHEN VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyExchange,
- | CASE
- | WHEN VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashStatement)
- | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | THEN TRUE
- | ELSE FALSE
- | END AS TransferFromPOS,
- | BankReceiptPaymentList.Ref.Account AS ToAccount_POS,
- | BankReceiptPaymentList.POSAccount AS FromAccount_POS,
- | BankReceiptPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
- | BankReceiptPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
- | BankReceiptPaymentList.Ref AS ReceiptDocument,
- | BankReceiptPaymentList.Key,
- | BankReceiptPaymentList.ProfitLossCenter AS ProfitLossCenter,
- | BankReceiptPaymentList.ExpenseType AS ExpenseType,
- | BankReceiptPaymentList.AdditionalAnalytic AS AdditionalAnalytic,
- | BankReceiptPaymentList.Commission AS Commission,
- | BankReceiptPaymentList.Ref.Branch AS Branch
- |FROM
- | Document.BankReceipt.PaymentList AS BankReceiptPaymentList
- |WHERE
- | BankReceiptPaymentList.Ref = &Ref";
-EndFunction
+
+ Tables = New Structure;
-Function GetQueryTextQueryTable()
- Return "SELECT
- | QueryTable.Company AS Company,
- | QueryTable.Currency AS Currency,
- | QueryTable.CurrencyExchange AS CurrencyExchange,
- | QueryTable.Account AS Account,
- | QueryTable.TransitAccount AS TransitAccount,
- | QueryTable.PlaningTransactionBasis AS PlaningTransactionBasis,
- | QueryTable.BasisDocument AS BasisDocument,
- | QueryTable.IsAdvance AS IsAdvance,
- | QueryTable.Agreement AS Agreement,
- | QueryTable.Partner AS Partner,
- | QueryTable.Payer AS Payer,
- | QueryTable.Period AS Period,
- | QueryTable.Amount AS Amount,
- | QueryTable.AmountExchange AS AmountExchange,
- | QueryTable.IsMoneyTransfer AS IsMoneyTransfer,
- | QueryTable.IsMoneyExchange AS IsMoneyExchange,
- | QueryTable.FromAccount AS FromAccount,
- | QueryTable.ToAccount AS ToAccount,
- | QueryTable.ReceiptDocument AS ReceiptDocument,
- | QueryTable.Key AS Key,
- | QueryTable.TransferFromPOS AS TransferFromPOS,
- | QueryTable.ToAccount_POS AS ToAccount_POS,
- | QueryTable.FromAccount_POS AS FromAccount_POS,
- | QueryTable.ProfitLossCenter AS ProfitLossCenter,
- | QueryTable.ExpenseType AS ExpenseType,
- | QueryTable.AdditionalAnalytic AS AdditionalAnalytic,
- | QueryTable.Commission AS Commission,
- | QueryTable.Branch AS Branch
- |INTO tmp
- |FROM
- | &QueryTable AS QueryTable
- |;
- |
- |//[1]//////////////////////////////////////////////////////////////////////////////
- |SELECT
- | tmp.Company AS Company,
- | tmp.PlaningTransactionBasis AS BasisDocument,
- | tmp.FromAccount AS FromAccount,
- | tmp.ToAccount AS ToAccount,
- | tmp.Currency AS Currency,
- | tmp.Amount AS Amount,
- | tmp.Period,
- | tmp.Key
- |FROM
- | tmp AS tmp
- |WHERE
- | tmp.IsMoneyTransfer
- |;
- |
- |//[2]//////////////////////////////////////////////////////////////////////////////
- |SELECT
- | tmp.Company AS Company,
- | tmp.PlaningTransactionBasis AS BasisDocument,
- | tmp.FromAccount_POS AS FromAccount,
- | tmp.ToAccount_POS AS ToAccount,
- | tmp.Currency AS Currency,
- | tmp.Amount AS Amount,
- | tmp.Period,
- | tmp.Key
- |FROM
- | tmp AS tmp
- |WHERE
- | tmp.TransferFromPOS";
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
+
+ Return Tables;
EndFunction
Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
@@ -216,24 +51,11 @@ EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
PostingDataTables = New Map;
-
- // CashInIransit
- ArrayOfTables = New Array;
- Table1 = Parameters.DocumentDataTables.CashInTransit.Copy();
- Table1.Columns.Add("RecordType", New TypeDescription("AccumulationRecordType"));
- Table1.FillValues(AccumulationRecordType.Expense, "RecordType");
- ArrayOfTables.Add(Table1);
-
- Table2 = Parameters.DocumentDataTables.CashInTransit_POS.Copy();
- Table2.Columns.Add("RecordType", New TypeDescription("AccumulationRecordType"));
- Table2.FillValues(AccumulationRecordType.Expense, "RecordType");
- ArrayOfTables.Add(Table2);
-
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit, New Structure("RecordSet, WriteInTransaction", PostingServer.JoinTables(ArrayOfTables,
- "RecordType, Period, Company, BasisDocument, FromAccount, ToAccount, Currency, Amount, Key"), Parameters.IsReposting));
-
PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
-
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
Return PostingDataTables;
EndFunction
@@ -287,6 +109,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R1020B_AdvancesToVendors());
QueryArray.Add(R1021B_VendorsTransactions());
QueryArray.Add(R2020B_AdvancesFromCustomers());
@@ -429,6 +252,127 @@ EndFunction
#Region Posting_MainTables
+Function CashInTransit()
+ Return "SELECT
+ | BankReceiptPaymentList.Ref.Company AS Company,
+ | BankReceiptPaymentList.Ref.Currency AS Currency,
+ | BankReceiptPaymentList.Ref.CurrencyExchange AS CurrencyExchange,
+ | BankReceiptPaymentList.Ref.Account AS Account,
+ | BankReceiptPaymentList.Ref.TransitAccount AS TransitAccount,
+ | CASE
+ | WHEN BankReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
+ | THEN CASE
+ | WHEN (VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | OR VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashStatement))
+ | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN BankReceiptPaymentList.PlaningTransactionBasis
+ | ELSE BankReceiptPaymentList.BasisDocument
+ | END
+ | ELSE UNDEFINED
+ | END AS BasisDocument,
+ | CASE
+ | WHEN BankReceiptPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
+ | THEN TRUE
+ | ELSE FALSE
+ | END
+ | AND NOT CASE
+ | WHEN (VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | OR VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashStatement))
+ | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsAdvance,
+ | BankReceiptPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
+ | CASE
+ | WHEN BankReceiptPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
+ | AND BankReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
+ | THEN BankReceiptPaymentList.Agreement.StandardAgreement
+ | ELSE BankReceiptPaymentList.Agreement
+ | END AS Agreement,
+ | BankReceiptPaymentList.Partner AS Partner,
+ | BankReceiptPaymentList.Payer AS Payer,
+ | BankReceiptPaymentList.Ref.Date AS Period,
+ | BankReceiptPaymentList.TotalAmount AS Amount,
+ | BankReceiptPaymentList.AmountExchange AS AmountExchange,
+ | CASE
+ | WHEN VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency = BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyTransfer,
+ | CASE
+ | WHEN VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | BankReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> BankReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyExchange,
+ | CASE
+ | WHEN VALUETYPE(BankReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashStatement)
+ | AND NOT BankReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS TransferFromPOS,
+ | BankReceiptPaymentList.Ref.Account AS ToAccount_POS,
+ | BankReceiptPaymentList.POSAccount AS FromAccount_POS,
+ | BankReceiptPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
+ | BankReceiptPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
+ | BankReceiptPaymentList.Ref AS ReceiptDocument,
+ | BankReceiptPaymentList.Key,
+ | BankReceiptPaymentList.ProfitLossCenter AS ProfitLossCenter,
+ | BankReceiptPaymentList.ExpenseType AS ExpenseType,
+ | BankReceiptPaymentList.AdditionalAnalytic AS AdditionalAnalytic,
+ | BankReceiptPaymentList.Commission AS Commission,
+ | BankReceiptPaymentList.Ref.Branch AS Branch
+ |INTO TablePaymentList
+ |FROM
+ | Document.BankReceipt.PaymentList AS BankReceiptPaymentList
+ |WHERE
+ | BankReceiptPaymentList.Ref = &Ref
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | VALUE(AccumulationRecordType.Expense) AS RecordType,
+ | tmp.Company AS Company,
+ | tmp.PlaningTransactionBasis AS BasisDocument,
+ | tmp.FromAccount AS FromAccount,
+ | tmp.ToAccount AS ToAccount,
+ | tmp.Currency AS Currency,
+ | tmp.Amount AS Amount,
+ | tmp.Period,
+ | tmp.Key
+ |INTO CashInTransit
+ |FROM
+ | TablePaymentList AS tmp
+ |WHERE
+ | tmp.IsMoneyTransfer
+ |
+ |UNION ALL
+ |
+ |SELECT
+ | VALUE(AccumulationRecordType.Expense),
+ | tmp.Company AS Company,
+ | tmp.PlaningTransactionBasis AS BasisDocument,
+ | tmp.FromAccount_POS AS FromAccount,
+ | tmp.ToAccount_POS AS ToAccount,
+ | tmp.Currency AS Currency,
+ | tmp.Amount AS Amount,
+ | tmp.Period,
+ | tmp.Key
+ |FROM
+ | TablePaymentList AS tmp
+ |WHERE
+ | tmp.TransferFromPOS";
+EndFunction
+
Function R3027B_EmployeeCashAdvance()
Return "SELECT
| VALUE(AccumulationRecordType.Expense) AS RecordType,
@@ -1092,7 +1036,11 @@ Function GetAnalytics_DR_R3010B_CR_R2020B_R2021B(Parameters)
AdditionalAnalytics.Insert("Account", Parameters.ObjectData.Account);
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics, AdditionalAnalytics);
- Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
IsAdvance = AccountingServer.IsAdvance(Parameters.RowData);
If IsAdvance Then
If ValueIsFilled(Credit.AccountAdvancesCustomer) Then
@@ -1114,7 +1062,11 @@ Function GetAnalytics_DR_R2021B_CR_R2020B(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsCustomer) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsCustomer;
EndIf;
diff --git a/IRP/src/Documents/CashPayment/ManagerModule.bsl b/IRP/src/Documents/CashPayment/ManagerModule.bsl
index 932f3cb1dd..ad947b3fb7 100644
--- a/IRP/src/Documents/CashPayment/ManagerModule.bsl
+++ b/IRP/src/Documents/CashPayment/ManagerModule.bsl
@@ -9,151 +9,17 @@ EndFunction
#Region Posting
Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- AccReg = Metadata.AccumulationRegisters;
- Tables = New Structure;
- Tables.Insert("CashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
-
- QueryPaymentList = New Query;
- QueryPaymentList.Text = GetQueryTextCashPaymentPaymentList();
- QueryPaymentList.SetParameter("Ref", Ref);
- QueryResultsPaymentList = QueryPaymentList.Execute();
- QueryTablePaymentList = QueryResultsPaymentList.Unload();
-
- Query = New Query;
- Query.Text = GetQueryTextQueryTable();
- Query.SetParameter("QueryTable", QueryTablePaymentList);
- QueryResults = Query.ExecuteBatch();
-
- Tables.CashInTransit = QueryResults[1].Unload();
-
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
-
- Return Tables;
-EndFunction
-Function GetQueryTextCashPaymentPaymentList()
- Return "SELECT
- | CashPaymentPaymentList.Ref.Company AS Company,
- | CashPaymentPaymentList.Ref.Currency AS Currency,
- | CashPaymentPaymentList.Ref.CashAccount AS CashAccount,
- | CASE
- | WHEN CashPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
- | THEN CASE
- | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN CashPaymentPaymentList.PlaningTransactionBasis
- | ELSE CashPaymentPaymentList.BasisDocument
- | END
- | ELSE UNDEFINED
- | END AS BasisDocument,
- | CASE
- | WHEN CashPaymentPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
- | THEN TRUE
- | ELSE FALSE
- | END
- | AND
- | NOT CASE
- | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsAdvance,
- | CashPaymentPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
- | CASE
- | WHEN CashPaymentPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
- | AND CashPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
- | THEN CashPaymentPaymentList.Agreement.StandardAgreement
- | ELSE CashPaymentPaymentList.Agreement
- | END AS Agreement,
- | CashPaymentPaymentList.Partner AS Partner,
- | CashPaymentPaymentList.Payee AS Payee,
- | CashPaymentPaymentList.Ref.Date AS Period,
- | CashPaymentPaymentList.TotalAmount AS Amount,
- | CASE
- | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency = CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyTransfer,
- | CASE
- | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyExchange,
- | CashPaymentPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
- | CashPaymentPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
- | CashPaymentPaymentList.Ref AS PaymentDocument,
- | CashPaymentPaymentList.Key AS Key,
- | CashPaymentPaymentList.Ref.Branch AS Branch
- |FROM
- | Document.CashPayment.PaymentList AS CashPaymentPaymentList
- |WHERE
- | CashPaymentPaymentList.Ref = &Ref";
-EndFunction
+ Tables = New Structure;
-Function GetQueryTextQueryTable()
- Return "SELECT
- | QueryTable.Company AS Company,
- | QueryTable.Currency AS Currency,
- | QueryTable.CashAccount AS CashAccount,
- | QueryTable.BasisDocument AS BasisDocument,
- | QueryTable.IsAdvance AS IsAdvance,
- | QueryTable.PlaningTransactionBasis AS PlaningTransactionBasis,
- | QueryTable.Agreement AS Agreement,
- | QueryTable.Partner AS Partner,
- | QueryTable.Payee AS Payee,
- | QueryTable.Period AS Period,
- | QueryTable.Amount AS Amount,
- | QueryTable.IsMoneyTransfer AS IsMoneyTransfer,
- | QueryTable.IsMoneyExchange AS IsMoneyExchange,
- | QueryTable.FromAccount AS FromAccount,
- | QueryTable.ToAccount AS ToAccount,
- | QueryTable.PaymentDocument AS PaymentDocument,
- | QueryTable.Key AS Key,
- | QueryTable.Branch AS Branch
- |INTO tmp
- |FROM
- | &QueryTable AS QueryTable
- |;
- |
- |//[1]//////////////////////////////////////////////////////////////////////////////
- |SELECT
- | tmp.Company AS Company,
- | tmp.PlaningTransactionBasis AS BasisDocument,
- | tmp.FromAccount AS FromAccount,
- | tmp.ToAccount AS ToAccount,
- | tmp.Currency AS Currency,
- | SUM(tmp.Amount) AS Amount,
- | tmp.Period,
- | tmp.Key
- |FROM
- | tmp AS tmp
- |WHERE
- | tmp.IsMoneyTransfer
- |GROUP BY
- | tmp.Company,
- | tmp.PlaningTransactionBasis,
- | tmp.FromAccount,
- | tmp.ToAccount,
- | tmp.Currency,
- | tmp.Period,
- | tmp.Key";
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
+
+ Return Tables;
EndFunction
Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
@@ -185,11 +51,11 @@ EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
PostingDataTables = New Map;
-
- // CashInIransit
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit, New Structure("RecordType, RecordSet", AccumulationRecordType.Receipt, Parameters.DocumentDataTables.CashInTransit));
-
PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
Return PostingDataTables;
EndFunction
@@ -243,6 +109,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R1020B_AdvancesToVendors());
QueryArray.Add(R1021B_VendorsTransactions());
QueryArray.Add(R2020B_AdvancesFromCustomers());
@@ -347,6 +214,101 @@ EndFunction
#Region Posting_MainTables
+Function CashInTransit()
+ Return "SELECT
+ | CashPaymentPaymentList.Ref.Company AS Company,
+ | CashPaymentPaymentList.Ref.Currency AS Currency,
+ | CashPaymentPaymentList.Ref.CashAccount AS CashAccount,
+ | CASE
+ | WHEN CashPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
+ | THEN CASE
+ | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN CashPaymentPaymentList.PlaningTransactionBasis
+ | ELSE CashPaymentPaymentList.BasisDocument
+ | END
+ | ELSE UNDEFINED
+ | END AS BasisDocument,
+ | CASE
+ | WHEN CashPaymentPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
+ | THEN TRUE
+ | ELSE FALSE
+ | END
+ | AND NOT CASE
+ | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsAdvance,
+ | CashPaymentPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
+ | CASE
+ | WHEN CashPaymentPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
+ | AND CashPaymentPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
+ | THEN CashPaymentPaymentList.Agreement.StandardAgreement
+ | ELSE CashPaymentPaymentList.Agreement
+ | END AS Agreement,
+ | CashPaymentPaymentList.Partner AS Partner,
+ | CashPaymentPaymentList.Payee AS Payee,
+ | CashPaymentPaymentList.Ref.Date AS Period,
+ | CashPaymentPaymentList.TotalAmount AS Amount,
+ | CASE
+ | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency = CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyTransfer,
+ | CASE
+ | WHEN VALUETYPE(CashPaymentPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashPaymentPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashPaymentPaymentList.PlaningTransactionBasis.SendCurrency <> CashPaymentPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyExchange,
+ | CashPaymentPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
+ | CashPaymentPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
+ | CashPaymentPaymentList.Ref AS PaymentDocument,
+ | CashPaymentPaymentList.Key AS Key,
+ | CashPaymentPaymentList.Ref.Branch AS Branch
+ |INTO TablePaymentList
+ |FROM
+ | Document.CashPayment.PaymentList AS CashPaymentPaymentList
+ |WHERE
+ | CashPaymentPaymentList.Ref = &Ref
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | VALUE(AccumulationRecordType.Receipt) AS RecordType,
+ | tmp.Company AS Company,
+ | tmp.PlaningTransactionBasis AS BasisDocument,
+ | tmp.FromAccount AS FromAccount,
+ | tmp.ToAccount AS ToAccount,
+ | tmp.Currency AS Currency,
+ | SUM(tmp.Amount) AS Amount,
+ | tmp.Period,
+ | tmp.Key
+ |INTO CashInTransit
+ |FROM
+ | TablePaymentList AS tmp
+ |WHERE
+ | tmp.IsMoneyTransfer
+ |GROUP BY
+ | tmp.Company,
+ | tmp.PlaningTransactionBasis,
+ | tmp.FromAccount,
+ | tmp.ToAccount,
+ | tmp.Currency,
+ | tmp.Period,
+ | tmp.Key";
+EndFunction
+
Function R3021B_CashInTransitIncoming()
Return
"SELECT
@@ -868,7 +830,11 @@ Function GetAnalytics_PaymentToVendor(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
IsAdvance = AccountingServer.IsAdvance(Parameters.RowData);
If IsAdvance Then
If ValueIsFilled(Debit.AccountAdvancesVendor) Then
@@ -898,7 +864,11 @@ Function GetAnalytics_OffsetOfAdvances(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsVendor) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsVendor;
EndIf;
diff --git a/IRP/src/Documents/CashReceipt/ManagerModule.bsl b/IRP/src/Documents/CashReceipt/ManagerModule.bsl
index de6392034f..1b8b963336 100644
--- a/IRP/src/Documents/CashReceipt/ManagerModule.bsl
+++ b/IRP/src/Documents/CashReceipt/ManagerModule.bsl
@@ -9,155 +9,17 @@ EndFunction
#Region Posting
Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- AccReg = Metadata.AccumulationRegisters;
- Tables = New Structure;
- Tables.Insert("CashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
-
- QueryPaymentList = New Query;
- QueryPaymentList.Text = GetQueryTextCashReceiptPaymentList();
- QueryPaymentList.SetParameter("Ref", Ref);
- QueryResultsPaymentList = QueryPaymentList.Execute();
- QueryTablePaymentList = QueryResultsPaymentList.Unload();
-
- Query = New Query;
- Query.Text = GetQueryTextQueryTable();
- Query.SetParameter("QueryTable", QueryTablePaymentList);
- QueryResults = Query.ExecuteBatch();
-
- Tables.CashInTransit = QueryResults[1].Unload();
-
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
-
- Return Tables;
-EndFunction
-Function GetQueryTextCashReceiptPaymentList()
- Return "SELECT
- | CashReceiptPaymentList.Ref.Company AS Company,
- | CashReceiptPaymentList.Ref.Currency AS Currency,
- | CashReceiptPaymentList.Ref.CurrencyExchange AS CurrencyExchange,
- | CashReceiptPaymentList.Ref.CashAccount AS CashAccount,
- | CASE
- | WHEN CashReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
- | THEN CASE
- | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN CashReceiptPaymentList.PlaningTransactionBasis
- | ELSE CashReceiptPaymentList.BasisDocument
- | END
- | ELSE UNDEFINED
- | END AS BasisDocument,
- | CASE
- | WHEN CashReceiptPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
- | THEN TRUE
- | ELSE FALSE
- | END
- | AND
- | NOT CASE
- | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsAdvance,
- | CashReceiptPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
- | CASE
- | WHEN CashReceiptPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
- | AND CashReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
- | THEN CashReceiptPaymentList.Agreement.StandardAgreement
- | ELSE CashReceiptPaymentList.Agreement
- | END AS Agreement,
- | CashReceiptPaymentList.Partner AS Partner,
- | CashReceiptPaymentList.Payer AS Payer,
- | CashReceiptPaymentList.Ref.Date AS Period,
- | CashReceiptPaymentList.TotalAmount AS Amount,
- | CashReceiptPaymentList.AmountExchange AS AmountExchange,
- | CASE
- | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency = CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyTransfer,
- | CASE
- | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
- | AND
- | NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
- | AND
- | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
- | THEN TRUE
- | ELSE FALSE
- | END AS IsMoneyExchange,
- | CashReceiptPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
- | CashReceiptPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
- | CashReceiptPaymentList.Ref AS ReceiptDocument,
- | CashReceiptPaymentList.Key AS Key,
- | CashReceiptPaymentList.Ref.Branch AS Branch
- |FROM
- | Document.CashReceipt.PaymentList AS CashReceiptPaymentList
- |WHERE
- | CashReceiptPaymentList.Ref = &Ref";
-EndFunction
+ Tables = New Structure;
-Function GetQueryTextQueryTable()
- Return "SELECT
- | QueryTable.Company AS Company,
- | QueryTable.Currency AS Currency,
- | QueryTable.CurrencyExchange AS CurrencyExchange,
- | QueryTable.CashAccount AS CashAccount,
- | QueryTable.BasisDocument AS BasisDocument,
- | QueryTable.IsAdvance AS IsAdvance,
- | QueryTable.PlaningTransactionBasis AS PlaningTransactionBasis,
- | QueryTable.Agreement AS Agreement,
- | QueryTable.Partner AS Partner,
- | QueryTable.Payer AS Payer,
- | QueryTable.Period AS Period,
- | QueryTable.Amount AS Amount,
- | QueryTable.AmountExchange AS AmountExchange,
- | QueryTable.IsMoneyTransfer AS IsMoneyTransfer,
- | QueryTable.IsMoneyExchange AS IsMoneyExchange,
- | QueryTable.FromAccount AS FromAccount,
- | QueryTable.ToAccount AS ToAccount,
- | QueryTable.ReceiptDocument,
- | QueryTable.Key AS Key,
- | QueryTable.Branch AS Branch
- |INTO tmp
- |FROM
- | &QueryTable AS QueryTable
- |;
- |
- |//[1]//////////////////////////////////////////////////////////////////////////////
- |SELECT
- | tmp.Company AS Company,
- | tmp.PlaningTransactionBasis AS BasisDocument,
- | tmp.FromAccount AS FromAccount,
- | tmp.ToAccount AS ToAccount,
- | tmp.Currency AS Currency,
- | SUM(tmp.Amount) AS Amount,
- | tmp.Period,
- | tmp.Key
- |FROM
- | tmp AS tmp
- |WHERE
- | tmp.IsMoneyTransfer
- |GROUP BY
- | tmp.Company,
- | tmp.PlaningTransactionBasis,
- | tmp.FromAccount,
- | tmp.ToAccount,
- | tmp.Currency,
- | tmp.Period,
- | tmp.Key";
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
+
+ Return Tables;
EndFunction
Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
@@ -188,11 +50,11 @@ EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
PostingDataTables = New Map;
-
- // CashInIransit
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit, New Structure("RecordType, RecordSet", AccumulationRecordType.Expense, Parameters.DocumentDataTables.CashInTransit));
-
PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
Return PostingDataTables;
EndFunction
@@ -246,6 +108,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R1020B_AdvancesToVendors());
QueryArray.Add(R1021B_VendorsTransactions());
QueryArray.Add(R2020B_AdvancesFromCustomers());
@@ -346,6 +209,104 @@ EndFunction
#Region Posting_MainTables
+
+Function CashInTransit()
+ Return "SELECT
+ | CashReceiptPaymentList.Ref.Company AS Company,
+ | CashReceiptPaymentList.Ref.Currency AS Currency,
+ | CashReceiptPaymentList.Ref.CurrencyExchange AS CurrencyExchange,
+ | CashReceiptPaymentList.Ref.CashAccount AS CashAccount,
+ | CASE
+ | WHEN CashReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByDocuments)
+ | THEN CASE
+ | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN CashReceiptPaymentList.PlaningTransactionBasis
+ | ELSE CashReceiptPaymentList.BasisDocument
+ | END
+ | ELSE UNDEFINED
+ | END AS BasisDocument,
+ | CASE
+ | WHEN CashReceiptPaymentList.Agreement = VALUE(Catalog.Agreements.EmptyRef)
+ | THEN TRUE
+ | ELSE FALSE
+ | END
+ | AND NOT CASE
+ | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsAdvance,
+ | CashReceiptPaymentList.PlaningTransactionBasis AS PlaningTransactionBasis,
+ | CASE
+ | WHEN CashReceiptPaymentList.Agreement.Kind = VALUE(Enum.AgreementKinds.Regular)
+ | AND CashReceiptPaymentList.Agreement.ApArPostingDetail = VALUE(Enum.ApArPostingDetail.ByStandardAgreement)
+ | THEN CashReceiptPaymentList.Agreement.StandardAgreement
+ | ELSE CashReceiptPaymentList.Agreement
+ | END AS Agreement,
+ | CashReceiptPaymentList.Partner AS Partner,
+ | CashReceiptPaymentList.Payer AS Payer,
+ | CashReceiptPaymentList.Ref.Date AS Period,
+ | CashReceiptPaymentList.TotalAmount AS Amount,
+ | CashReceiptPaymentList.AmountExchange AS AmountExchange,
+ | CASE
+ | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency = CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyTransfer,
+ | CASE
+ | WHEN VALUETYPE(CashReceiptPaymentList.PlaningTransactionBasis) = TYPE(Document.CashTransferOrder)
+ | AND NOT CashReceiptPaymentList.PlaningTransactionBasis.Date IS NULL
+ | AND
+ | CashReceiptPaymentList.PlaningTransactionBasis.SendCurrency <> CashReceiptPaymentList.PlaningTransactionBasis.ReceiveCurrency
+ | THEN TRUE
+ | ELSE FALSE
+ | END AS IsMoneyExchange,
+ | CashReceiptPaymentList.PlaningTransactionBasis.Sender AS FromAccount,
+ | CashReceiptPaymentList.PlaningTransactionBasis.Receiver AS ToAccount,
+ | CashReceiptPaymentList.Ref AS ReceiptDocument,
+ | CashReceiptPaymentList.Key AS Key,
+ | CashReceiptPaymentList.Ref.Branch AS Branch
+ |INTO TablePaymentList
+ |FROM
+ | Document.CashReceipt.PaymentList AS CashReceiptPaymentList
+ |WHERE
+ | CashReceiptPaymentList.Ref = &Ref
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | VALUE(AccumulationRecordType.Expense) AS RecordType,
+ | tmp.Company AS Company,
+ | tmp.PlaningTransactionBasis AS BasisDocument,
+ | tmp.FromAccount AS FromAccount,
+ | tmp.ToAccount AS ToAccount,
+ | tmp.Currency AS Currency,
+ | SUM(tmp.Amount) AS Amount,
+ | tmp.Period,
+ | tmp.Key
+ |INTO CashInTransit
+ |FROM
+ | TablePaymentList AS tmp
+ |WHERE
+ | tmp.IsMoneyTransfer
+ |GROUP BY
+ | tmp.Company,
+ | tmp.PlaningTransactionBasis,
+ | tmp.FromAccount,
+ | tmp.ToAccount,
+ | tmp.Currency,
+ | tmp.Period,
+ | tmp.Key";
+EndFunction
+
Function R3027B_EmployeeCashAdvance()
Return "SELECT
| VALUE(AccumulationRecordType.Expense) AS RecordType,
@@ -893,7 +854,11 @@ Function GetAnalytics_DR_R3010B_CR_R2020B_R2021B(Parameters)
AdditionalAnalytics.Insert("Account", Parameters.ObjectData.CashAccount);
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics, AdditionalAnalytics);
- Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
IsAdvance = AccountingServer.IsAdvance(Parameters.RowData);
If IsAdvance Then
If ValueIsFilled(Credit.AccountAdvancesCustomer) Then
@@ -915,7 +880,11 @@ Function GetAnalytics_DR_R2021B_CR_R2020B(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsCustomer) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsCustomer;
EndIf;
diff --git a/IRP/src/Documents/CashStatement/ManagerModule.bsl b/IRP/src/Documents/CashStatement/ManagerModule.bsl
index 341127bb1a..7047e7bb35 100644
--- a/IRP/src/Documents/CashStatement/ManagerModule.bsl
+++ b/IRP/src/Documents/CashStatement/ManagerModule.bsl
@@ -9,42 +9,17 @@ EndFunction
#Region Posting
Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ QueryArray = GetQueryTextsSecondaryTables();
+ PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- AccReg = Metadata.AccumulationRegisters;
Tables = New Structure;
- Tables.Insert("CashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
-
- Query_CashInTransit = New Query;
- Query_CashInTransit.Text = GetQueryText_CashStatement_CashInTransit();
- Query_CashInTransit.SetParameter("Ref", Ref);
- QueryResult_CashInTransit = Query_CashInTransit.Execute();
- CashInTransit = QueryResult_CashInTransit.Unload();
-
- Tables.CashInTransit = CashInTransit;
- QueryArray = GetQueryTextsSecondaryTables();
- PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
Return Tables;
EndFunction
-Function GetQueryText_CashStatement_CashInTransit()
- Return "SELECT
- | Table.Ref.Company AS Company,
- | Table.Ref AS BasisDocument,
- | Table.Account AS FromAccount,
- | Table.ReceiptingAccount AS ToAccount,
- | Table.Currency AS Currency,
- | Table.Amount AS Amount,
- | Table.Ref.Date AS Period,
- | Table.Key
- |FROM
- | Document.CashStatement.PaymentList AS Table
- |WHERE
- | Table.Ref = &Ref
- | AND Table.Account.Type = VALUE(Enum.CashAccountTypes.POS)";
-EndFunction
-
Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
DataMapWithLockFields = New Map;
Return DataMapWithLockFields;
@@ -59,19 +34,18 @@ Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo
Tables.R3035T_CashPlanning.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
Tables.R3021B_CashInTransitIncoming.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
Tables.R3011T_CashFlow.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.CashInTransit.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
EndProcedure
Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
PostingDataTables = New Map;
-
- // CashInTransit
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit,
- New Structure("RecordType, RecordSet", AccumulationRecordType.Receipt, Parameters.DocumentDataTables.CashInTransit));
-
PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
-
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
Return PostingDataTables;
EndFunction
@@ -125,6 +99,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R3010B_CashOnHand());
QueryArray.Add(R3011T_CashFlow());
QueryArray.Add(R3021B_CashInTransitIncoming());
@@ -166,6 +141,25 @@ EndFunction
#Region Posting_MainTables
+Function CashInTransit()
+ Return "SELECT
+ | VALUE(AccumulationRecordType.Receipt) AS RecordType,
+ | Table.Ref.Company AS Company,
+ | Table.Ref AS BasisDocument,
+ | Table.Account AS FromAccount,
+ | Table.ReceiptingAccount AS ToAccount,
+ | Table.Currency AS Currency,
+ | Table.Amount AS Amount,
+ | Table.Ref.Date AS Period,
+ | Table.Key
+ |INTO CashInTransit
+ |FROM
+ | Document.CashStatement.PaymentList AS Table
+ |WHERE
+ | Table.Ref = &Ref
+ | AND Table.Account.Type = VALUE(Enum.CashAccountTypes.POS)";
+EndFunction
+
Function R3010B_CashOnHand()
Return "SELECT
| VALUE(AccumulationRecordType.Expense) AS RecordType,
diff --git a/IRP/src/Documents/CommissioningOfFixedAsset/ManagerModule.bsl b/IRP/src/Documents/CommissioningOfFixedAsset/ManagerModule.bsl
index 4c9974b0b0..9fb1133272 100644
--- a/IRP/src/Documents/CommissioningOfFixedAsset/ManagerModule.bsl
+++ b/IRP/src/Documents/CommissioningOfFixedAsset/ManagerModule.bsl
@@ -15,7 +15,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/Documents/CreditNote/ManagerModule.bsl b/IRP/src/Documents/CreditNote/ManagerModule.bsl
index cab8e06ae5..dbb2d51aa0 100644
--- a/IRP/src/Documents/CreditNote/ManagerModule.bsl
+++ b/IRP/src/Documents/CreditNote/ManagerModule.bsl
@@ -541,7 +541,11 @@ Function GetAnalytics_CustomerAdvancesExpenses(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.RowData.Currency);
+
AccountingAnalytics.Debit = Debit.AccountAdvancesCustomer;
// Debit - Analytics
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics);
@@ -561,7 +565,11 @@ Function GetAnalytics_OffsetOfAdvancesCustomer(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.RowData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsCustomer) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsCustomer;
EndIf;
@@ -582,7 +590,11 @@ Function GetAnalytics_VendorTransactionExpenses(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.RowData.Currency);
+
If ValueIsFilled(Debit.AccountTransactionsVendor) Then
AccountingAnalytics.Debit = Debit.AccountTransactionsVendor;
EndIf;
diff --git a/IRP/src/Documents/DebitNote/ManagerModule.bsl b/IRP/src/Documents/DebitNote/ManagerModule.bsl
index 49310e60c6..0e95d15293 100644
--- a/IRP/src/Documents/DebitNote/ManagerModule.bsl
+++ b/IRP/src/Documents/DebitNote/ManagerModule.bsl
@@ -540,7 +540,11 @@ Function GetAnalytics_VendorAdvancesRevenues(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.RowData.Currency);
+
AccountingAnalytics.Debit = Debit.AccountAdvancesVendor;
// Debit - Analytics
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics);
@@ -560,7 +564,11 @@ Function GetAnalytics_OffsetOfAdvancesVendor(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.RowData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsVendor) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsVendor;
EndIf;
@@ -581,7 +589,11 @@ Function GetAnalytics_CustomerTransactionRevenues(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Parameters.RowData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Parameters.RowData.Agreement,
+ Parameters.RowData.Currency);
+
If ValueIsFilled(Debit.AccountTransactionsCustomer) Then
AccountingAnalytics.Debit = Debit.AccountTransactionsCustomer;
EndIf;
diff --git a/IRP/src/Documents/DecommissioningOfFixedAsset/ManagerModule.bsl b/IRP/src/Documents/DecommissioningOfFixedAsset/ManagerModule.bsl
index 2cbdb542ac..9cfa2e14f9 100644
--- a/IRP/src/Documents/DecommissioningOfFixedAsset/ManagerModule.bsl
+++ b/IRP/src/Documents/DecommissioningOfFixedAsset/ManagerModule.bsl
@@ -16,7 +16,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Parameters.Insert("QueryParameters", GetAdditionalQueryParameters(Ref));
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/Documents/ForeignCurrencyRevaluation/ManagerModule.bsl b/IRP/src/Documents/ForeignCurrencyRevaluation/ManagerModule.bsl
index 6db10172c2..cc9e635b64 100644
--- a/IRP/src/Documents/ForeignCurrencyRevaluation/ManagerModule.bsl
+++ b/IRP/src/Documents/ForeignCurrencyRevaluation/ManagerModule.bsl
@@ -409,8 +409,8 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Query.SetParameter("ExpensesTable", ExpenseRevenueInfo.ExpensesTable);
Query.Execute();
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.R5022T_Expenses.Metadata());
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.R5021T_Revenues.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.AccumulationRegisters.R5022T_Expenses);
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.AccumulationRegisters.R5021T_Revenues);
// Accounting
@@ -488,7 +488,11 @@ Function GetAnalytics_DR_R5022T_Expenses_CR_R2020B_AdvancesFromCustomers(Paramet
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics, AdditionalAnalytics);
// Credit
- Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.RowData.Partner, Undefined);
+ Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.RowData.Partner,
+ Undefined,
+ Parameters.RowData.Currency);
+
If ValueIsFilled(Credit.AccountAdvancesCustomer) Then
AccountingAnalytics.Credit = Credit.AccountAdvancesCustomer;
EndIf;
diff --git a/IRP/src/Documents/JournalEntry/Forms/DocumentForm/Form.form b/IRP/src/Documents/JournalEntry/Forms/DocumentForm/Form.form
index ab5d5b7c53..7640aa6d68 100644
--- a/IRP/src/Documents/JournalEntry/Forms/DocumentForm/Form.form
+++ b/IRP/src/Documents/JournalEntry/Forms/DocumentForm/Form.form
@@ -2738,6 +2738,9 @@
true
Left
true
+
+ Object.Totals.TotalAmountCr
+
true
true
@@ -2788,6 +2791,9 @@
true
Left
true
+
+ Object.Totals.TotalAmountCr
+
true
true
@@ -2957,6 +2963,7 @@
MultiRow
1
+
1
AutoUse
AutoUse
diff --git a/IRP/src/Documents/ModernizationOfFixedAsset/ManagerModule.bsl b/IRP/src/Documents/ModernizationOfFixedAsset/ManagerModule.bsl
index acb8e57001..e8008c1482 100644
--- a/IRP/src/Documents/ModernizationOfFixedAsset/ManagerModule.bsl
+++ b/IRP/src/Documents/ModernizationOfFixedAsset/ManagerModule.bsl
@@ -15,7 +15,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/Documents/OpeningEntry/ManagerModule.bsl b/IRP/src/Documents/OpeningEntry/ManagerModule.bsl
index e6dbb67c32..ca3d693fc8 100644
--- a/IRP/src/Documents/OpeningEntry/ManagerModule.bsl
+++ b/IRP/src/Documents/OpeningEntry/ManagerModule.bsl
@@ -12,6 +12,59 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
+ Calculate_BatchKeysInfo(Ref, Parameters, AddInfo);
+
+ Tables = New Structure;
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
+
+ Return Tables;
+EndFunction
+
+Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ DataMapWithLockFields = New Map;
+ Return DataMapWithLockFields;
+EndFunction
+
+Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ Tables = Parameters.DocumentDataTables;
+ QueryArray = GetQueryTextsMasterTables();
+ PostingServer.SetRegisters(Tables, Ref);
+
+
+ Tables.R3010B_CashOnHand.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R1020B_AdvancesToVendors.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R1021B_VendorsTransactions.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R2020B_AdvancesFromCustomers.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R2021B_CustomersTransactions.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R8015T_ConsignorPrices.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R3027B_EmployeeCashAdvance.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R9510B_SalaryPayment.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R5015B_OtherPartnersTransactions.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R3021B_CashInTransitIncoming.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.R8510B_BookValueOfFixedAsset.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+ Tables.CashInTransit.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+
+ PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
+EndProcedure
+
+Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ PostingDataTables = New Map;
+ PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
+ Return PostingDataTables;
+EndFunction
+
+Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+EndProcedure
+
+Procedure Calculate_BatchKeysInfo(Ref, Parameters, AddInfo)
+
Query = New Query;
Query.Text =
"SELECT
@@ -63,108 +116,29 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
QueryResult = Query.Execute();
BatchKeysInfo = QueryResult.Unload();
-
CurrencyTable = Ref.Currencies.UnloadColumns();
CurrencyMovementType = Ref.Company.LandedCostCurrencyMovementType;
For Each Row In BatchKeysInfo Do
CurrenciesServer.AddRowToCurrencyTable(Ref.Date, CurrencyTable, Row.Key, Row.Currency, CurrencyMovementType);
EndDo;
-
- PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo,
- New Structure("RecordSet, WriteInTransaction", BatchKeysInfo, Parameters.IsReposting));
- Parameters.Insert("PostingDataTables", PostingDataTables);
+
+ T6020S_BatchKeysInfo = Metadata.InformationRegisters.T6020S_BatchKeysInfo;
+ T6020SSettings = PostingServer.PostingTableSettings(T6020S_BatchKeysInfo.Name, BatchKeysInfo, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo);
+ T6020SSettings.WriteInTransaction = Parameters.IsReposting;
+ Parameters.PostingDataTables.Insert(T6020S_BatchKeysInfo, T6020SSettings);
+
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
-
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, T6020S_BatchKeysInfo);
- BatchKeysInfo_DataTable = Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo).RecordSet;
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.CopyColumns();
- If BatchKeysInfo_DataTable.Count() Then
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.Copy(
- New Structure("CurrencyMovementType", CurrencyMovementType));
- BatchKeysInfo_DataTableGrouped.GroupBy(
- "Period, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SerialLotNumber, SourceOfOrigin",
- "Quantity, Amount, AmountTax");
- EndIf;
-
- Query = New Query;
- Query.TempTablesManager = Parameters.TempTablesManager;
- Query.Text =
- "SELECT
- | *
- |INTO BatchKeysInfo
- |FROM
- | &T1 AS T1";
- Query.SetParameter("T1", BatchKeysInfo_DataTableGrouped);
- Query.Execute();
-
- AccReg = Metadata.AccumulationRegisters;
- Tables = New Structure;
- Tables.Insert("RegCashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
-
- Query = New Query();
- Query.Text =
- "SELECT
- | VALUE(AccumulationRecordType.Receipt) AS RecordType,
- | OpeningEntryCashInTransit.Ref.Date AS Period,
- | OpeningEntryCashInTransit.Ref.Company,
- | OpeningEntryCashInTransit.Account AS FromAccount,
- | OpeningEntryCashInTransit.ReceiptingAccount AS ToAccount,
- | OpeningEntryCashInTransit.Currency,
- | OpeningEntryCashInTransit.Amount,
- | OpeningEntryCashInTransit.Key
- |FROM
- | Document.OpeningEntry.CashInTransit AS OpeningEntryCashInTransit
- |WHERE
- | OpeningEntryCashInTransit.Ref = &Ref";
- Query.SetParameter("Ref", Ref);
- QueryResult = Query.Execute();
- QueryTable = QueryResult.Unload();
- Tables.RegCashInTransit = QueryTable;
-
- Return Tables;
-EndFunction
-
-Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- DataMapWithLockFields = New Map;
- Return DataMapWithLockFields;
-EndFunction
-
-Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- Tables = Parameters.DocumentDataTables;
- QueryArray = GetQueryTextsMasterTables();
- PostingServer.SetRegisters(Tables, Ref);
-
- Tables.R3010B_CashOnHand.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R1020B_AdvancesToVendors.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R1021B_VendorsTransactions.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R2020B_AdvancesFromCustomers.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R2021B_CustomersTransactions.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R8015T_ConsignorPrices.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R3027B_EmployeeCashAdvance.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R9510B_SalaryPayment.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R5015B_OtherPartnersTransactions.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R3021B_CashInTransitIncoming.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
- Tables.R8510B_BookValueOfFixedAsset.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
-
- PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
-EndProcedure
-
-Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- PostingDataTables = New Map;
+ BatchKeysInfo_DataTable = Parameters.PostingDataTables[T6020S_BatchKeysInfo].PrepareTable;
- // CashInIransit
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit,
- New Structure("RecordType, RecordSet", AccumulationRecordType.Receipt, Parameters.DocumentDataTables.RegCashInTransit));
+ BatchKeysInfoSettings = PostingServer.GetBatchKeysInfoSettings();
+ BatchKeysInfoSettings.DataTable = BatchKeysInfo_DataTable;
+ BatchKeysInfoSettings.Dimensions = "Period, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SerialLotNumber, SourceOfOrigin";
+ BatchKeysInfoSettings.Totals = "Quantity, Amount, AmountTax";
+ BatchKeysInfoSettings.CurrencyMovementType = CurrencyMovementType;
- PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
- Return PostingDataTables;
-EndFunction
-
-Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+ PostingServer.SetBatchKeyInfoTable(Parameters, BatchKeysInfoSettings);
EndProcedure
#EndRegion
@@ -202,9 +176,16 @@ Procedure CheckAfterWrite(Ref, Cancel, Parameters, AddInfo = Undefined)
CheckAfterWrite_R4010B_R4011B(Ref, Cancel, Parameters, AddInfo);
- If Not Cancel And Not AccReg.R4014B_SerialLotNumber.CheckBalance(Ref, LineNumberAndItemKeyFromItemList,
- PostingServer.GetQueryTableByName("R4014B_SerialLotNumber", Parameters), PostingServer.GetQueryTableByName(
- "Exists_R4014B_SerialLotNumber", Parameters), AccumulationRecordType.Receipt, Unposting, AddInfo) Then
+ If Not Cancel
+ And Not AccReg.R4014B_SerialLotNumber.CheckBalance(
+ Ref,
+ LineNumberAndItemKeyFromItemList,
+ PostingServer.GetQueryTableByName("R4014B_SerialLotNumber", Parameters),
+ PostingServer.GetQueryTableByName("Exists_R4014B_SerialLotNumber", Parameters),
+ AccumulationRecordType.Receipt,
+ Unposting,
+ AddInfo
+ ) Then
Cancel = True;
EndIf;
EndProcedure
@@ -249,7 +230,7 @@ Function GetQueryTextsSecondaryTables()
QueryArray.Add(SalaryPayment());
QueryArray.Add(OtherVendorsTransactions());
QueryArray.Add(OtherCustomersTransactions());
- QueryArray.Add(CashInTransit());
+ QueryArray.Add(CashInTransitDoc());
QueryArray.Add(FixedAssets());
QueryArray.Add(PostingServer.Exists_R4010B_ActualStocks());
QueryArray.Add(PostingServer.Exists_R4011B_FreeStocks());
@@ -259,6 +240,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R1020B_AdvancesToVendors());
QueryArray.Add(R1021B_VendorsTransactions());
QueryArray.Add(R2020B_AdvancesFromCustomers());
@@ -662,21 +644,21 @@ Function SalaryPayment()
| SalaryPayment.Ref = &Ref";
EndFunction
-Function CashInTransit()
+Function CashInTransitDoc()
Return
"SELECT
- | CashInTransit.Key,
- | CashInTransit.Ref.Date AS Period,
- | CashInTransit.Ref.Company AS Company,
- | CashInTransit.ReceiptingBranch AS Branch,
- | CashInTransit.ReceiptingAccount,
- | CashInTransit.Currency,
- | CashInTransit.Amount
- |INTO CashInTransit
+ | CashInTransitDoc.Key,
+ | CashInTransitDoc.Ref.Date AS Period,
+ | CashInTransitDoc.Ref.Company AS Company,
+ | CashInTransitDoc.ReceiptingBranch AS Branch,
+ | CashInTransitDoc.ReceiptingAccount,
+ | CashInTransitDoc.Currency,
+ | CashInTransitDoc.Amount
+ |INTO CashInTransitDoc
|FROM
- | Document.OpeningEntry.CashInTransit AS CashInTransit
+ | Document.OpeningEntry.CashInTransit AS CashInTransitDoc
|WHERE
- | CashInTransit.Ref = &Ref";
+ | CashInTransitDoc.Ref = &Ref";
EndFunction
Function FixedAssets()
@@ -704,6 +686,24 @@ EndFunction
#Region Posting_MainTables
+Function CashInTransit()
+ Return
+ "SELECT
+ | VALUE(AccumulationRecordType.Receipt) AS RecordType,
+ | OpeningEntryCashInTransit.Ref.Date AS Period,
+ | OpeningEntryCashInTransit.Ref.Company,
+ | OpeningEntryCashInTransit.Account AS FromAccount,
+ | OpeningEntryCashInTransit.ReceiptingAccount AS ToAccount,
+ | OpeningEntryCashInTransit.Currency,
+ | OpeningEntryCashInTransit.Amount,
+ | OpeningEntryCashInTransit.Key
+ |INTO CashInTransit
+ |FROM
+ | Document.OpeningEntry.CashInTransit AS OpeningEntryCashInTransit
+ |WHERE
+ | OpeningEntryCashInTransit.Ref = &Ref";
+EndFunction
+
Function R1020B_AdvancesToVendors()
Return "SELECT
| VALUE(AccumulationRecordType.Receipt) AS RecordType,
@@ -949,16 +949,16 @@ Function R3021B_CashInTransitIncoming()
Return
"SELECT
| VALUE(AccumulationRecordType.Receipt) AS RecordType,
- | CashInTransit.Key,
- | CashInTransit.Period,
- | CashInTransit.Company,
- | CashInTransit.Branch,
- | CashInTransit.ReceiptingAccount AS Account,
- | CashInTransit.Currency,
- | CashInTransit.Amount
+ | CashInTransitDoc.Key,
+ | CashInTransitDoc.Period,
+ | CashInTransitDoc.Company,
+ | CashInTransitDoc.Branch,
+ | CashInTransitDoc.ReceiptingAccount AS Account,
+ | CashInTransitDoc.Currency,
+ | CashInTransitDoc.Amount
|INTO R3021B_CashInTransitIncoming
|FROM
- | CashInTransit AS CashInTransit
+ | CashInTransitDoc AS CashInTransitDoc
|WHERE
| TRUE";
EndFunction
@@ -1209,8 +1209,7 @@ Function T6010S_BatchesInfo()
EndFunction
Function T6020S_BatchKeysInfo()
- Return
- "SELECT
+ Return "SELECT
| ItemList.Period,
| ItemList.Company,
| ItemList.Store,
@@ -1397,6 +1396,7 @@ Function T6020S_BatchKeysInfo()
| tmp_T6020S_BatchKeysInfo AS Table
|WHERE
| Table.Quantity > 0"
+
EndFunction
Function R4050B_StockInventory()
diff --git a/IRP/src/Documents/ProductionPlanning/ManagerModule.bsl b/IRP/src/Documents/ProductionPlanning/ManagerModule.bsl
index 227252c416..c2852429c5 100644
--- a/IRP/src/Documents/ProductionPlanning/ManagerModule.bsl
+++ b/IRP/src/Documents/ProductionPlanning/ManagerModule.bsl
@@ -13,7 +13,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Tables = New Structure;
BillOfMaterialsTable = GetBillOfMaterials(Ref);
- MaterialPlanningEmptyTable = PostingServer.CreateTable(AccReg.R7020T_MaterialPlanning);
+ MaterialPlanningEmptyTable = CommonFunctionsServer.CreateTable(AccReg.R7020T_MaterialPlanning);
MaterialPlanningEmptyTable.Columns.Add("IsProduct", New TypeDescription("Boolean"));
MaterialPlanningEmptyTable.Columns.Add("IsSemiproduct", New TypeDescription("Boolean"));
MaterialPlanningEmptyTable.Columns.Add("IsMaterial", New TypeDescription("Boolean"));
diff --git a/IRP/src/Documents/ProductionPlanningCorrection/ManagerModule.bsl b/IRP/src/Documents/ProductionPlanningCorrection/ManagerModule.bsl
index d89942357a..067e587e42 100644
--- a/IRP/src/Documents/ProductionPlanningCorrection/ManagerModule.bsl
+++ b/IRP/src/Documents/ProductionPlanningCorrection/ManagerModule.bsl
@@ -12,10 +12,10 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
InfoReg = Metadata.InformationRegisters;
AccReg = Metadata.AccumulationRegisters;
Tables = New Structure;
- Tables.Insert("BillOfMaterials", PostingServer.CreateTable(InfoReg.T7010S_BillOfMaterials));
- Tables.Insert("ProductionPlanning", PostingServer.CreateTable(AccReg.R7030T_ProductionPlanning));
- Tables.Insert("MaterialPlanning", PostingServer.CreateTable(AccReg.R7020T_MaterialPlanning));
- Tables.Insert("DetailingSupplies", PostingServer.CreateTable(AccReg.R7010T_DetailingSupplies));
+ Tables.Insert("BillOfMaterials", CommonFunctionsServer.CreateTable(InfoReg.T7010S_BillOfMaterials));
+ Tables.Insert("ProductionPlanning", CommonFunctionsServer.CreateTable(AccReg.R7030T_ProductionPlanning));
+ Tables.Insert("MaterialPlanning", CommonFunctionsServer.CreateTable(AccReg.R7020T_MaterialPlanning));
+ Tables.Insert("DetailingSupplies", CommonFunctionsServer.CreateTable(AccReg.R7010T_DetailingSupplies));
ObjectStatusesServer.WriteStatusToRegister(Ref, Ref.Status, CurrentUniversalDate());
StatusInfo = ObjectStatusesServer.GetLastStatusInfo(Ref);
diff --git a/IRP/src/Documents/PurchaseInvoice/ManagerModule.bsl b/IRP/src/Documents/PurchaseInvoice/ManagerModule.bsl
index 128177713d..33b03b80e1 100644
--- a/IRP/src/Documents/PurchaseInvoice/ManagerModule.bsl
+++ b/IRP/src/Documents/PurchaseInvoice/ManagerModule.bsl
@@ -16,6 +16,42 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
Tables.Insert("VendorsTransactions", PostingServer.GetQueryTableByName("VendorsTransactions", Parameters));
+ Calculate_BatchKeysInfo(Ref, Parameters, AddInfo);
+
+ AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
+
+ Return Tables;
+EndFunction
+
+Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ DataMapWithLockFields = New Map;
+ Return DataMapWithLockFields;
+EndFunction
+
+Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ Tables = Parameters.DocumentDataTables;
+
+ IncomingStocksServer.ClosureIncomingStocks(Parameters);
+
+ QueryArray = GetQueryTextsMasterTables();
+ PostingServer.SetRegisters(Tables, Ref);
+
+ Tables.R8015T_ConsignorPrices.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
+
+ PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
+EndProcedure
+
+Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ PostingDataTables = New Map;
+ PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
+ Return PostingDataTables;
+EndFunction
+
+Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+EndProcedure
+
+Procedure Calculate_BatchKeysInfo(Ref, Parameters, AddInfo)
Query = New Query;
Query.Text =
"SELECT
@@ -27,7 +63,6 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| Document.PurchaseInvoice.RowIDInfo AS RowIDInfo
|WHERE
| RowIDInfo.Ref = &Ref
- |
|GROUP BY
| RowIDInfo.Ref,
| RowIDInfo.Key
@@ -35,17 +70,6 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
|
|////////////////////////////////////////////////////////////////////////////////
|SELECT
- | PurchaseInvoice.Ref AS Document,
- | PurchaseInvoice.Company AS Company,
- | PurchaseInvoice.Ref.Date AS Period
- |FROM
- | Document.PurchaseInvoice AS PurchaseInvoice
- |WHERE
- | PurchaseInvoice.Ref = &Ref
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
| SourceOfOrigins.Key AS Key,
| CASE
| WHEN SourceOfOrigins.SerialLotNumber.BatchBalanceDetail
@@ -63,7 +87,6 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| Document.PurchaseInvoice.SourceOfOrigins AS SourceOfOrigins
|WHERE
| SourceOfOrigins.Ref = &Ref
- |
|GROUP BY
| SourceOfOrigins.Key,
| CASE
@@ -96,12 +119,11 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| Document.PurchaseInvoice.ItemList AS ItemList
| INNER JOIN tmpRowIDInfo AS RowIDInfo
| ON ItemList.Key = RowIDInfo.Key
- | AND (RowIDInfo.Ref = &Ref)
+ | AND RowIDInfo.Ref = &Ref
|WHERE
| ItemList.Ref = &Ref
| AND ItemList.ItemKey.Item.ItemType.Type = VALUE(Enum.ItemTypes.Product)
| AND NOT ItemList.IsAdditionalItemCost
- |
|GROUP BY
| ItemList.ItemKey,
| ItemList.Store,
@@ -110,7 +132,8 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| ItemList.Key,
| ItemList.Ref.Currency,
| ItemList.IsAdditionalItemCost,
- | RowIDInfo.RowID
+ | RowIDInfo.RowID,
+ | VALUE(Enum.BatchDirection.Receipt)
|;
|
|////////////////////////////////////////////////////////////////////////////////
@@ -135,33 +158,24 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| CASE
| WHEN tmpItemList.Quantity <> 0
| THEN CASE
- | WHEN ISNULL(tmpSourceOfOrigins.Quantity, 0) <> 0
- | THEN tmpItemList.Amount / tmpItemList.Quantity * ISNULL(tmpSourceOfOrigins.Quantity, 0)
- | ELSE tmpItemList.Amount
- | END
+ | WHEN ISNULL(tmpSourceOfOrigins.Quantity, 0) <> 0
+ | THEN tmpItemList.Amount / tmpItemList.Quantity * ISNULL(tmpSourceOfOrigins.Quantity, 0)
+ | ELSE tmpItemList.Amount
+ | END
| ELSE 0
| END AS Amount,
| ISNULL(tmpSourceOfOrigins.SourceOfOrigin, VALUE(Catalog.SourceOfOrigins.EmptyRef)) AS SourceOfOrigin,
- | ISNULL(tmpSourceOfOrigins.SerialLotNumber, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumber
+ | ISNULL(tmpSourceOfOrigins.SerialLotNumber, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumber,
+ | TRUE AS CreateBatch
+ |INTO BatchKeysInfo
|FROM
| tmpItemList AS tmpItemList
| LEFT JOIN tmpSourceOfOrigins AS tmpSourceOfOrigins
- | ON tmpItemList.Key = tmpSourceOfOrigins.Key";
- Query.SetParameter("Ref", Ref);
-
- QueryResults = Query.ExecuteBatch();
-
- BatchesInfo = QueryResults[1].Unload();
- BatchKeysInfo = QueryResults[4].Unload();
-
- If Not BatchKeysInfo.Count() Then
- BatchesInfo.Clear();
- EndIf;
-
- // AmountTax to T6020S_BatchKeysInfo
- Query = New Query;
- Query.Text =
- "SELECT
+ | ON tmpItemList.Key = tmpSourceOfOrigins.Key
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
| Taxes.Key,
| Taxes.Ref.Company AS Company,
| &Vat AS Tax,
@@ -199,17 +213,6 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
|////////////////////////////////////////////////////////////////////////////////
|SELECT
| BatchKeysInfo.Key,
- | BatchKeysInfo.TotalQuantity,
- | BatchKeysInfo.Quantity,
- | *
- |INTO BatchKeysInfo
- |FROM
- | &BatchKeysInfo AS BatchKeysInfo
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | BatchKeysInfo.Key,
| case
| when BatchKeysInfo.TotalQuantity <> 0
| then (isnull(TaxesAmounts.AmountTax, 0) / BatchKeysInfo.TotalQuantity) * BatchKeysInfo.Quantity
@@ -219,14 +222,31 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
|FROM
| BatchKeysInfo AS BatchKeysInfo
| LEFT JOIN TaxesAmounts AS TaxesAmounts
- | ON BatchKeysInfo.Key = TaxesAmounts.Key";
+ | ON BatchKeysInfo.Key = TaxesAmounts.Key
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | PurchaseInvoice.Ref AS Document,
+ | PurchaseInvoice.Company AS Company,
+ | PurchaseInvoice.Ref.Date AS Period
+ |FROM
+ | Document.PurchaseInvoice AS PurchaseInvoice
+ |WHERE
+ | PurchaseInvoice.Ref = &Ref
+ | AND TRUE IN
+ | (SELECT
+ | CreateBatch
+ | FROM
+ | BatchKeysInfo)";
Query.SetParameter("Ref", Ref);
Query.SetParameter("Period", Ref.Date);
- Query.SetParameter("BatchKeysInfo", BatchKeysInfo);
Query.SetParameter("Vat", TaxesServer.GetVatRef());
- QueryResult = Query.Execute();
- BatchKeysInfo = QueryResult.Unload();
+
+ QueryResults = Query.ExecuteBatch();
+ BatchKeysInfo = QueryResults[6].Unload();
+ BatchesInfo = QueryResults[7].Unload();
CurrencyTable = Ref.Currencies.UnloadColumns();
CurrencyMovementType = Ref.Company.LandedCostCurrencyMovementType;
@@ -245,76 +265,35 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
ArrayOfFixedRates);
EndDo;
- PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo,
- New Structure("RecordSet, WriteInTransaction", BatchKeysInfo, Parameters.IsReposting));
- Parameters.Insert("PostingDataTables", PostingDataTables);
+ T6020S_BatchKeysInfo = Metadata.InformationRegisters.T6020S_BatchKeysInfo;
+ T6020SSettings = PostingServer.PostingTableSettings(T6020S_BatchKeysInfo.Name, BatchKeysInfo, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo);
+ T6020SSettings.WriteInTransaction = Parameters.IsReposting;
+ Parameters.PostingDataTables.Insert(T6020S_BatchKeysInfo, T6020SSettings);
+
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
-
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, T6020S_BatchKeysInfo);
+
+ BatchKeysInfo_DataTable = Parameters.PostingDataTables[T6020S_BatchKeysInfo].PrepareTable;
+
+ BatchKeysInfoSettings = PostingServer.GetBatchKeysInfoSettings();
+ BatchKeysInfoSettings.DataTable = BatchKeysInfo_DataTable;
+ BatchKeysInfoSettings.Dimensions = "Period, RowID, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SourceOfOrigin, SerialLotNumber";
+ BatchKeysInfoSettings.Totals = "Quantity, Amount, AmountTax";
+ BatchKeysInfoSettings.CurrencyMovementType = CurrencyMovementType;
+
+ PostingServer.SetBatchKeyInfoTable(Parameters, BatchKeysInfoSettings);
- BatchKeysInfo_DataTable = Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo).RecordSet;
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.CopyColumns();
- If BatchKeysInfo_DataTable.Count() Then
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.Copy(
- New Structure("CurrencyMovementType", CurrencyMovementType));
- BatchKeysInfo_DataTableGrouped.GroupBy(
- "Period, RowID, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SourceOfOrigin, SerialLotNumber",
- "Quantity, Amount, AmountTax");
- EndIf;
-
Query = New Query;
Query.TempTablesManager = Parameters.TempTablesManager;
Query.Text =
"SELECT
- | *
+ | BatchesInfo.*
|INTO BatchesInfo
|FROM
- | &T1 AS T1
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | *
- |INTO BatchKeysInfo
- |FROM
- | &T2 AS T2";
- Query.SetParameter("T1", BatchesInfo);
- Query.SetParameter("T2", BatchKeysInfo_DataTableGrouped);
- Query.Execute();
-
- AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
-
- Return Tables;
-EndFunction
-
-Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- DataMapWithLockFields = New Map;
- Return DataMapWithLockFields;
-EndFunction
-
-Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- Tables = Parameters.DocumentDataTables;
-
- IncomingStocksServer.ClosureIncomingStocks(Parameters);
-
- QueryArray = GetQueryTextsMasterTables();
- PostingServer.SetRegisters(Tables, Ref);
-
- Tables.R8015T_ConsignorPrices.Columns.Add("Key", Metadata.DefinedTypes.typeRowID.Type);
-
- PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
-EndProcedure
-
-Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- PostingDataTables = New Map;
- PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
- Return PostingDataTables;
-EndFunction
-
-Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+ | &BatchesInfo AS BatchesInfo";
+
+ Query.SetParameter("BatchesInfo", BatchesInfo);
+ Query.Execute();
EndProcedure
#EndRegion
@@ -1541,8 +1520,11 @@ Function GetAnalytics_ReceiptInventory(Parameters)
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics, AdditionalAnalytics);
// Credit
- Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.ObjectData.Partner,
- Parameters.ObjectData.Agreement);
+ Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.ObjectData.Partner,
+ Parameters.ObjectData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Credit.AccountTransactionsVendor) Then
AccountingAnalytics.Credit = Credit.AccountTransactionsVendor;
EndIf;
@@ -1557,8 +1539,11 @@ Function GetAnalytics_OffsetOfAdvances(Parameters)
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
// Debit
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.ObjectData.Partner,
- Parameters.ObjectData.Agreement);
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.ObjectData.Partner,
+ Parameters.ObjectData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Accounts.AccountTransactionsVendor) Then
AccountingAnalytics.Debit = Accounts.AccountTransactionsVendor;
EndIf;
@@ -1586,8 +1571,11 @@ Function GetAnalytics_VATIncoming(Parameters)
AccountingServer.SetDebitExtDimensions(Parameters, AccountingAnalytics, Parameters.RowData.TaxInfo);
// Credit
- Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.ObjectData.Partner,
- Parameters.ObjectData.Agreement);
+ Credit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.ObjectData.Partner,
+ Parameters.ObjectData.Agreement,
+ Parameters.ObjectData.Currency);
+
If ValueIsFilled(Credit.AccountTransactionsVendor) Then
AccountingAnalytics.Credit = Credit.AccountTransactionsVendor;
EndIf;
diff --git a/IRP/src/Documents/PurchaseReturn/ManagerModule.bsl b/IRP/src/Documents/PurchaseReturn/ManagerModule.bsl
index 8555da2909..57b84c6366 100644
--- a/IRP/src/Documents/PurchaseReturn/ManagerModule.bsl
+++ b/IRP/src/Documents/PurchaseReturn/ManagerModule.bsl
@@ -14,7 +14,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Parameters.Insert("QueryParameters", GetAdditionalQueryParameters(Ref));
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/Documents/RetailReturnReceipt/ManagerModule.bsl b/IRP/src/Documents/RetailReturnReceipt/ManagerModule.bsl
index 03bb80dcd3..81bf1f58cd 100644
--- a/IRP/src/Documents/RetailReturnReceipt/ManagerModule.bsl
+++ b/IRP/src/Documents/RetailReturnReceipt/ManagerModule.bsl
@@ -9,35 +9,51 @@ EndFunction
#Region Posting
Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- AccReg = Metadata.AccumulationRegisters;
- Tables = New Structure;
- Tables.Insert("CashInTransit", PostingServer.CreateTable(AccReg.CashInTransit));
- QueryPayments = New Query;
- QueryPayments.Text =
- "SELECT
- | Payments.Ref.Date AS Period,
- | Payments.Ref.Company AS Company,
- | Payments.Ref.Currency AS Currency,
- | Payments.Account AS FromAccount,
- | Payments.Ref AS BasisDocument,
- | Payments.Amount,
- | Payments.Commission
- |
- |FROM
- | Document.RetailReturnReceipt.Payments AS Payments
- |WHERE
- | Payments.Ref = &Ref AND Payments.PostponedPayment";
- QueryPayments.SetParameter("Ref", Ref);
- Tables.CashInTransit = QueryPayments.Execute().Unload();
-
- Parameters.IsReposting = False;
-
QueryArray = GetQueryTextsSecondaryTables();
Parameters.Insert("QueryParameters", GetAdditionalQueryParameters(Ref));
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
+ Parameters.IsReposting = False;
+
DocumentsServer.SalesBySerialLotNumbers(Parameters);
+ Calculate_BatchKeysInfo(Ref, Parameters, AddInfo);
+
+ Tables = New Structure;
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ Tables.Insert(CashInTransit.Name, CommonFunctionsServer.CreateTable(CashInTransit));
+
+ Return Tables;
+EndFunction
+
+Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ DataMapWithLockFields = New Map;
+ Return DataMapWithLockFields;
+EndFunction
+
+Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ Tables = Parameters.DocumentDataTables;
+ QueryArray = GetQueryTextsMasterTables();
+ PostingServer.SetRegisters(Tables, Ref);
+ PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
+EndProcedure
+
+Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ PostingDataTables = New Map;
+ PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
+
+ CashInTransit = Metadata.AccumulationRegisters.CashInTransit;
+ PostingServer.SetPostingDataTable(PostingDataTables, Parameters, CashInTransit.Name, Parameters.DocumentDataTables[CashInTransit.Name]);
+
+ Return PostingDataTables;
+EndFunction
+
+Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+EndProcedure
+
+Procedure Calculate_BatchKeysInfo(Ref, Parameters, AddInfo)
Query = New Query;
Query.Text =
"SELECT
@@ -77,7 +93,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
|;
|
|////////////////////////////////////////////////////////////////////////////////
- |SELECT // --[1]
+ |SELECT
| RetailReturnReceiptItemList.ItemKey AS ItemKey,
| RetailReturnReceiptItemList.Store AS Store,
| RetailReturnReceiptItemList.Ref.Company AS Company,
@@ -127,17 +143,6 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
|;
|
|////////////////////////////////////////////////////////////////////////////////
- |SELECT // --[0]
- | RetailReturnReceipt.Ref AS Document,
- | RetailReturnReceipt.Company AS Company,
- | RetailReturnReceipt.Ref.Date AS Period
- |FROM
- | Document.RetailReturnReceipt AS RetailReturnReceipt
- |WHERE
- | RetailReturnReceipt.Ref = &Ref
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
|SELECT
| tmpItemList.ItemKey,
| tmpItemList.Store,
@@ -178,59 +183,48 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| ISNULL(tmpSourceOfOrigins.SourceOfOrigin, VALUE(Catalog.SourceOfOrigins.EmptyRef)) AS SourceOfOrigin,
| ISNULL(tmpSourceOfOrigins.SerialLotNumber, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumber,
| ISNULL(tmpSourceOfOrigins.SourceOfOriginStock, VALUE(Catalog.SourceOfOrigins.EmptyRef)) AS SourceOfOriginStock,
- | ISNULL(tmpSourceOfOrigins.SerialLotNumberStock, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumberStock
+ | ISNULL(tmpSourceOfOrigins.SerialLotNumberStock, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumberStock,
+ | Not tmpItemList.SalesInvoiceIsFilled OR tmpItemList.Company <> tmpItemList.SalesInvoice_Company AS CreateBatch
+ |INTO tmpBatchKeysInfo
|FROM
| tmpItemList AS tmpItemList
| LEFT JOIN tmpSourceOfOrigins AS tmpSourceOfOrigins
- | ON tmpItemList.Key = tmpSourceOfOrigins.Key";
-
- Query.SetParameter("Ref", Ref);
- QueryResults = Query.ExecuteBatch();
-
- BatchesInfo = QueryResults[2].Unload();
- BatchKeysInfo = QueryResults[3].Unload();
-
- DontCreateBatch = True;
- For Each BatchKey In BatchKeysInfo Do
- If Not BatchKey.SalesInvoiceIsFilled Then
- DontCreateBatch = False; // need create batch, invoice is empty
- Break;
- EndIf;
- If BatchKey.Company <> BatchKey.SalesInvoice_Company Then
- DontCreateBatch = False; // need create batch, company in invoice and in return not match
- Break;
- EndIf;
- EndDo;
- If DontCreateBatch Then
- BatchesInfo.Clear();
- EndIf;
-
- // AmountTax to T6020S_BatchKeysInfo
- Query = New Query;
- Query.Text =
- "SELECT
- | BatchKeysInfo.Key,
- | BatchKeysInfo.TotalQuantity,
- | BatchKeysInfo.Quantity,
- | *
- |INTO BatchKeysInfo
+ | ON tmpItemList.Key = tmpSourceOfOrigins.Key
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | Ref AS Document,
+ | Company AS Company,
+ | Ref.Date AS Period
|FROM
- | &BatchKeysInfo AS BatchKeysInfo
+ | Document.RetailReturnReceipt
+ |WHERE
+ | Ref = &Ref
+ | AND TRUE IN
+ | (SELECT
+ | BatchKeys.CreateBatch
+ | FROM
+ | tmpBatchKeysInfo AS BatchKeys)
|;
|
|////////////////////////////////////////////////////////////////////////////////
|SELECT
| BatchKeysInfo.Key,
- | CASE WHEN NOT BatchKeysInfo.SalesInvoiceIsFilled THEN BatchKeysInfo.LandedCostTax ELSE 0 END AS AmountTax,
- |
+ | CASE
+ | WHEN NOT BatchKeysInfo.SalesInvoiceIsFilled
+ | THEN BatchKeysInfo.LandedCostTax
+ | ELSE 0
+ | END AS AmountTax,
| BatchKeysInfo.*
|FROM
- | BatchKeysInfo AS BatchKeysInfo";
+ | tmpBatchKeysInfo AS BatchKeysInfo";
Query.SetParameter("Ref", Ref);
Query.SetParameter("Period", Ref.Date);
- Query.SetParameter("BatchKeysInfo", BatchKeysInfo);
- QueryResult = Query.Execute();
- BatchKeysInfo = QueryResult.Unload();
+
+ QueryResult = Query.ExecuteBatch();
+ BatchesInfo = QueryResult[3].Unload();
+ BatchKeysInfo = QueryResult[4].Unload();
CurrencyTable = Ref.Currencies.UnloadColumns();
CurrencyMovementType = Ref.Company.LandedCostCurrencyMovementType;
@@ -238,75 +232,36 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
CurrenciesServer.AddRowToCurrencyTable(Ref.Date, CurrencyTable, Row.Key, Row.Currency, CurrencyMovementType);
EndDo;
- PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo,
- New Structure("RecordSet, WriteInTransaction", BatchKeysInfo, Parameters.IsReposting));
- Parameters.Insert("PostingDataTables", PostingDataTables);
+ T6020S_BatchKeysInfo = Metadata.InformationRegisters.T6020S_BatchKeysInfo;
+ T6020SSettings = PostingServer.PostingTableSettings(T6020S_BatchKeysInfo.Name, BatchKeysInfo, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo);
+ T6020SSettings.WriteInTransaction = Parameters.IsReposting;
+ Parameters.PostingDataTables.Insert(T6020S_BatchKeysInfo, T6020SSettings);
+
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
-
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, T6020S_BatchKeysInfo);
+
+ BatchKeysInfo_DataTable = Parameters.PostingDataTables[T6020S_BatchKeysInfo].PrepareTable;
+
+ BatchKeysInfoSettings = PostingServer.GetBatchKeysInfoSettings();
+ BatchKeysInfoSettings.DataTable = BatchKeysInfo_DataTable;
+ BatchKeysInfoSettings.Dimensions = "Period, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SalesInvoice, SourceOfOrigin, SerialLotNumber, SourceOfOriginStock, SerialLotNumberStock, Quantity, Amount, AmountTax";
+ BatchKeysInfoSettings.Totals = "";
+ BatchKeysInfoSettings.CurrencyMovementType = CurrencyMovementType;
+
+ PostingServer.SetBatchKeyInfoTable(Parameters, BatchKeysInfoSettings);
- BatchKeysInfo_DataTable = Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo).RecordSet;
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.CopyColumns();
- If BatchKeysInfo_DataTable.Count() Then
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.Copy(
- New Structure("CurrencyMovementType", CurrencyMovementType));
- BatchKeysInfo_DataTableGrouped.GroupBy("Period, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SalesInvoice, SourceOfOrigin, SerialLotNumber, SourceOfOriginStock, SerialLotNumberStock,
- |Quantity, Amount, AmountTax");
- Else
- BatchKeysInfo_DataTableGrouped.Columns.Add("CurrencyMovementType", New TypeDescription("ChartOfCharacteristicTypesRef.CurrencyMovementType"));
- EndIf;
-
Query = New Query;
Query.TempTablesManager = Parameters.TempTablesManager;
Query.Text =
"SELECT
- | *
+ | BatchesInfo.*
|INTO BatchesInfo
|FROM
- | &T1 AS T1
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | *
- |INTO BatchKeysInfo
- |FROM
- | &T2 AS T2";
- Query.SetParameter("T1", BatchesInfo);
- Query.SetParameter("T2", BatchKeysInfo_DataTableGrouped);
- Query.Execute();
-
- Return Tables;
-EndFunction
-
-Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- DataMapWithLockFields = New Map;
- Return DataMapWithLockFields;
-EndFunction
-
-Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- Tables = Parameters.DocumentDataTables;
- QueryArray = GetQueryTextsMasterTables();
- PostingServer.SetRegisters(Tables, Ref);
- PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
-EndProcedure
-
-Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- PostingDataTables = New Map;
+ | &BatchesInfo AS BatchesInfo";
+
+ Query.SetParameter("BatchesInfo", BatchesInfo);
+ Query.Execute();
- // CashInTransit
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.CashInTransit,
- New Structure("RecordType, RecordSet", AccumulationRecordType.Expense, Parameters.DocumentDataTables.CashInTransit));
-
- PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
-
- Return PostingDataTables;
-EndFunction
-
-Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
EndProcedure
#EndRegion
@@ -390,6 +345,7 @@ EndFunction
Function GetQueryTextsMasterTables()
QueryArray = New Array;
+ QueryArray.Add(CashInTransit());
QueryArray.Add(R2001T_Sales());
QueryArray.Add(R2002T_SalesReturns());
QueryArray.Add(R2005T_SalesSpecialOffers());
@@ -736,6 +692,23 @@ EndFunction
#Region Posting_MainTables
+Function CashInTransit()
+ Return "SELECT
+ | VALUE(AccumulationRecordType.Expense) AS RecordType,
+ | Payments.Ref.Date AS Period,
+ | Payments.Ref.Company AS Company,
+ | Payments.Ref.Currency AS Currency,
+ | Payments.Account AS FromAccount,
+ | Payments.Ref AS BasisDocument,
+ | Payments.Amount,
+ | Payments.Commission
+ |FROM
+ | Document.RetailReturnReceipt.Payments AS Payments
+ |WHERE
+ | Payments.Ref = &Ref
+ | AND Payments.PostponedPayment";
+EndFunction
+
Function R9010B_SourceOfOriginStock()
Return "SELECT
| VALUE(AccumulationRecordType.Receipt) AS RecordType,
diff --git a/IRP/src/Documents/RetailSalesReceipt/ManagerModule.bsl b/IRP/src/Documents/RetailSalesReceipt/ManagerModule.bsl
index d7eb780323..b97b04bdf0 100644
--- a/IRP/src/Documents/RetailSalesReceipt/ManagerModule.bsl
+++ b/IRP/src/Documents/RetailSalesReceipt/ManagerModule.bsl
@@ -16,7 +16,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
DocumentsServer.SalesBySerialLotNumbers(Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
Return Tables;
diff --git a/IRP/src/Documents/SalesInvoice/ManagerModule.bsl b/IRP/src/Documents/SalesInvoice/ManagerModule.bsl
index 96be3c14cf..fffdda7f64 100644
--- a/IRP/src/Documents/SalesInvoice/ManagerModule.bsl
+++ b/IRP/src/Documents/SalesInvoice/ManagerModule.bsl
@@ -18,7 +18,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Tables.Insert("CustomersTransactions", PostingServer.GetQueryTableByName("CustomersTransactions", Parameters));
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
AccountingServer.CreateAccountingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo);
Return Tables;
@@ -1371,7 +1371,11 @@ Function GetAnalytics_RevenueFromSales(Parameters)
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
// Debit
- Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.ObjectData.Partner, Parameters.ObjectData.Agreement);
+ Debit = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.ObjectData.Partner,
+ Parameters.ObjectData.Agreement,
+ Parameters.ObjectData.Currency);
+
AccountingAnalytics.Debit = Debit.AccountTransactionsCustomer;
// Debit - Analytics
AdditionalAnalytics = New Structure();
@@ -1413,7 +1417,11 @@ EndFunction
Function GetAnalytics_OffsetOfAdvances(Parameters)
AccountingAnalytics = AccountingServer.GetAccountingAnalyticsResult(Parameters);
AccountParameters = AccountingServer.GetAccountParameters(Parameters);
- Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters, Parameters.ObjectData.Partner, Parameters.ObjectData.Agreement);
+
+ Accounts = AccountingServer.GetT9012S_AccountsPartner(AccountParameters,
+ Parameters.ObjectData.Partner,
+ Parameters.ObjectData.Agreement,
+ Parameters.ObjectData.Currency);
// Debit
If ValueIsFilled(Accounts.AccountAdvancesCustomer) Then
diff --git a/IRP/src/Documents/SalesReportFromTradeAgent/ManagerModule.bsl b/IRP/src/Documents/SalesReportFromTradeAgent/ManagerModule.bsl
index 7f244beabc..afb3055574 100644
--- a/IRP/src/Documents/SalesReportFromTradeAgent/ManagerModule.bsl
+++ b/IRP/src/Documents/SalesReportFromTradeAgent/ManagerModule.bsl
@@ -18,7 +18,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Tables.Insert("CustomersTransactions", PostingServer.GetQueryTableByName("CustomersTransactions", Parameters));
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/Documents/SalesReturn/ManagerModule.bsl b/IRP/src/Documents/SalesReturn/ManagerModule.bsl
index 5b7e48dbb1..410e0d5720 100644
--- a/IRP/src/Documents/SalesReturn/ManagerModule.bsl
+++ b/IRP/src/Documents/SalesReturn/ManagerModule.bsl
@@ -17,6 +17,34 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
DocumentsServer.SalesBySerialLotNumbers(Parameters);
+ Calculate_BatchKeysInfo(Ref, Parameters, AddInfo);
+
+ Return Tables;
+EndFunction
+
+Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ DataMapWithLockFields = New Map;
+ Return DataMapWithLockFields;
+EndFunction
+
+Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ Tables = Parameters.DocumentDataTables;
+ QueryArray = GetQueryTextsMasterTables();
+ PostingServer.SetRegisters(Tables, Ref);
+ PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
+EndProcedure
+
+Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ PostingDataTables = New Map;
+ PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
+ Return PostingDataTables;
+EndFunction
+
+Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
+ CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+EndProcedure
+
+Procedure Calculate_BatchKeysInfo(Ref, Parameters, AddInfo)
Query = New Query;
Query.Text =
"SELECT
@@ -111,17 +139,6 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
|
|////////////////////////////////////////////////////////////////////////////////
|SELECT
- | SalesReturn.Ref AS Document,
- | SalesReturn.Company AS Company,
- | SalesReturn.Ref.Date AS Period
- |FROM
- | Document.SalesReturn AS SalesReturn
- |WHERE
- | SalesReturn.Ref = &Ref
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
| tmpItemList.ItemKey,
| tmpItemList.Store,
| tmpItemList.Company,
@@ -161,58 +178,43 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
| ISNULL(tmpSourceOfOrigins.SourceOfOrigin, VALUE(Catalog.SourceOfOrigins.EmptyRef)) AS SourceOfOrigin,
| ISNULL(tmpSourceOfOrigins.SerialLotNumber, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumber,
| ISNULL(tmpSourceOfOrigins.SourceOfOriginStock, VALUE(Catalog.SourceOfOrigins.EmptyRef)) AS SourceOfOriginStock,
- | ISNULL(tmpSourceOfOrigins.SerialLotNumberStock, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumberStock
+ | ISNULL(tmpSourceOfOrigins.SerialLotNumberStock, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumberStock,
+ | Not tmpItemList.SalesInvoiceIsFilled OR tmpItemList.Company <> tmpItemList.SalesInvoice_Company AS CreateBatch
+ |INTO BatchKeysInfo
|FROM
| tmpItemList AS tmpItemList
| LEFT JOIN tmpSourceOfOrigins AS tmpSourceOfOrigins
- | ON tmpItemList.Key = tmpSourceOfOrigins.Key";
-
- Query.SetParameter("Ref", Ref);
- QueryResults = Query.ExecuteBatch();
-
- BatchesInfo = QueryResults[2].Unload();
- BatchKeysInfo = QueryResults[3].Unload();
-
- DontCreateBatch = True;
- For Each BatchKey In BatchKeysInfo Do
- If Not BatchKey.SalesInvoiceIsFilled Then
- DontCreateBatch = False; // need create batch, invoice is empty
- Break;
- EndIf;
- If BatchKey.Company <> BatchKey.SalesInvoice_Company Then
- DontCreateBatch = False; // need create batch, company in invoice and in return not match
- Break;
- EndIf;
- EndDo;
- If DontCreateBatch Then
- BatchesInfo.Clear();
- EndIf;
-
- // AmountTax to T6020S_BatchKeysInfo
- Query = New Query;
- Query.Text =
- "SELECT
- | BatchKeysInfo.Key,
- | BatchKeysInfo.TotalQuantity,
- | BatchKeysInfo.Quantity,
- | *
- |INTO BatchKeysInfo
- |FROM
- | &BatchKeysInfo AS BatchKeysInfo
+ | ON tmpItemList.Key = tmpSourceOfOrigins.Key
|;
|
|////////////////////////////////////////////////////////////////////////////////
|SELECT
| BatchKeysInfo.Key,
- | CASE WHEN NOT BatchKeysInfo.SalesInvoiceIsFilled THEN BatchKeysInfo.LandedCostTax ELSE 0 END AS AmountTax,
+ | CASE
+ | WHEN NOT BatchKeysInfo.SalesInvoiceIsFilled
+ | THEN BatchKeysInfo.LandedCostTax
+ | ELSE 0
+ | END AS AmountTax,
| BatchKeysInfo.*
|FROM
- | BatchKeysInfo AS BatchKeysInfo";
+ | BatchKeysInfo AS BatchKeysInfo
+ |;
+ |
+ |////////////////////////////////////////////////////////////////////////////////
+ |SELECT
+ | SalesReturn.Ref AS Document,
+ | SalesReturn.Company AS Company,
+ | SalesReturn.Ref.Date AS Period
+ |FROM
+ | Document.SalesReturn AS SalesReturn
+ |WHERE
+ | SalesReturn.Ref = &Ref AND TRUE IN (SELECT CreateBatch FROM BatchKeysInfo)";
Query.SetParameter("Ref", Ref);
Query.SetParameter("Period", Ref.Date);
- Query.SetParameter("BatchKeysInfo", BatchKeysInfo);
- QueryResult = Query.Execute();
- BatchKeysInfo = QueryResult.Unload();
+
+ QueryResult = Query.ExecuteBatch();
+ BatchesInfo = QueryResult[4].Unload();
+ BatchKeysInfo = QueryResult[3].Unload();
CurrencyTable = Ref.Currencies.UnloadColumns();
CurrencyMovementType = Ref.Company.LandedCostCurrencyMovementType;
@@ -220,69 +222,35 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
CurrenciesServer.AddRowToCurrencyTable(Ref.Date, CurrencyTable, Row.Key, Row.Currency, CurrencyMovementType);
EndDo;
- PostingDataTables = New Map;
- PostingDataTables.Insert(Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo,
- New Structure("RecordSet, WriteInTransaction", BatchKeysInfo, Parameters.IsReposting));
- Parameters.Insert("PostingDataTables", PostingDataTables);
+ T6020S_BatchKeysInfo = Metadata.InformationRegisters.T6020S_BatchKeysInfo;
+ T6020SSettings = PostingServer.PostingTableSettings(T6020S_BatchKeysInfo.Name, BatchKeysInfo, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo);
+ T6020SSettings.WriteInTransaction = Parameters.IsReposting;
+ Parameters.PostingDataTables.Insert(T6020S_BatchKeysInfo, T6020SSettings);
+
CurrenciesServer.PreparePostingDataTables(Parameters, CurrencyTable, AddInfo);
-
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, T6020S_BatchKeysInfo);
+
+ BatchKeysInfo_DataTable = Parameters.PostingDataTables[T6020S_BatchKeysInfo].PrepareTable;
+
+ BatchKeysInfoSettings = PostingServer.GetBatchKeysInfoSettings();
+ BatchKeysInfoSettings.DataTable = BatchKeysInfo_DataTable;
+ BatchKeysInfoSettings.Dimensions = "Period, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SalesInvoice, SourceOfOrigin, SerialLotNumber, SourceOfOriginStock, SerialLotNumberStock, Quantity, Amount, AmountTax";
+ BatchKeysInfoSettings.Totals = "";
+ BatchKeysInfoSettings.CurrencyMovementType = CurrencyMovementType;
+
+ PostingServer.SetBatchKeyInfoTable(Parameters, BatchKeysInfoSettings);
- BatchKeysInfo_DataTable = Parameters.PostingDataTables.Get(
- Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo).RecordSet;
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.CopyColumns();
- If BatchKeysInfo_DataTable.Count() Then
- BatchKeysInfo_DataTableGrouped = BatchKeysInfo_DataTable.Copy(
- New Structure("CurrencyMovementType", CurrencyMovementType));
- BatchKeysInfo_DataTableGrouped.GroupBy("Period, Direction, Company, Store, ItemKey, Currency, CurrencyMovementType, SalesInvoice, SourceOfOrigin, SerialLotNumber, SourceOfOriginStock, SerialLotNumberStock,
- |Quantity, Amount, AmountTax");
- Else
- BatchKeysInfo_DataTableGrouped.Columns.Add("CurrencyMovementType", New TypeDescription("ChartOfCharacteristicTypesRef.CurrencyMovementType"));
- EndIf;
-
Query = New Query;
Query.TempTablesManager = Parameters.TempTablesManager;
Query.Text =
"SELECT
- | *
+ | BatchesInfo.*
|INTO BatchesInfo
|FROM
- | &T1 AS T1
- |;
- |
- |////////////////////////////////////////////////////////////////////////////////
- |SELECT
- | *
- |INTO BatchKeysInfo
- |FROM
- | &T2 AS T2";
- Query.SetParameter("T1", BatchesInfo);
- Query.SetParameter("T2", BatchKeysInfo_DataTableGrouped);
- Query.Execute();
-
- Return Tables;
-EndFunction
-
-Function PostingGetLockDataSource(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- DataMapWithLockFields = New Map;
- Return DataMapWithLockFields;
-EndFunction
-
-Procedure PostingCheckBeforeWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- Tables = Parameters.DocumentDataTables;
- QueryArray = GetQueryTextsMasterTables();
- PostingServer.SetRegisters(Tables, Ref);
- PostingServer.FillPostingTables(Tables, Ref, QueryArray, Parameters);
-EndProcedure
-
-Function PostingGetPostingDataTables(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- PostingDataTables = New Map;
- PostingServer.SetPostingDataTables(PostingDataTables, Parameters);
- Return PostingDataTables;
-EndFunction
-
-Procedure PostingCheckAfterWrite(Ref, Cancel, PostingMode, Parameters, AddInfo = Undefined) Export
- CheckAfterWrite(Ref, Cancel, Parameters, AddInfo);
+ | &BatchesInfo AS BatchesInfo";
+
+ Query.SetParameter("BatchesInfo", BatchesInfo);
+ Query.Execute();
EndProcedure
#EndRegion
diff --git a/IRP/src/Documents/StockAdjustmentAsSurplus/ManagerModule.bsl b/IRP/src/Documents/StockAdjustmentAsSurplus/ManagerModule.bsl
index e28ccc8f5f..5c6818488f 100644
--- a/IRP/src/Documents/StockAdjustmentAsSurplus/ManagerModule.bsl
+++ b/IRP/src/Documents/StockAdjustmentAsSurplus/ManagerModule.bsl
@@ -13,7 +13,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Parameters.IsReposting = False;
Return Tables;
diff --git a/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl b/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl
index ef388c5ea1..11364821d8 100644
--- a/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl
+++ b/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl
@@ -15,7 +15,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
QueryArray = GetQueryTextsSecondaryTables();
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/Documents/WorkSheet/ManagerModule.bsl b/IRP/src/Documents/WorkSheet/ManagerModule.bsl
index a711245549..1f14434afa 100644
--- a/IRP/src/Documents/WorkSheet/ManagerModule.bsl
+++ b/IRP/src/Documents/WorkSheet/ManagerModule.bsl
@@ -14,7 +14,7 @@ Function PostingGetDocumentDataTables(Ref, Cancel, PostingMode, Parameters, AddI
Parameters.Insert("QueryParameters", GetAdditionalQueryParameters(Ref));
PostingServer.ExecuteQuery(Ref, QueryArray, Parameters);
- CurrenciesServer.ExcludePostingDataTable(Parameters, Parameters.Object.RegisterRecords.T6020S_BatchKeysInfo.Metadata());
+ CurrenciesServer.ExcludePostingDataTable(Parameters, Metadata.InformationRegisters.T6020S_BatchKeysInfo);
Return Tables;
EndFunction
diff --git a/IRP/src/FunctionalOptions/UseAccounting/UseAccounting.mdo b/IRP/src/FunctionalOptions/UseAccounting/UseAccounting.mdo
index 5b760d0cea..cdce2a6be7 100644
--- a/IRP/src/FunctionalOptions/UseAccounting/UseAccounting.mdo
+++ b/IRP/src/FunctionalOptions/UseAccounting/UseAccounting.mdo
@@ -35,4 +35,8 @@
InformationRegister.T9014S_AccountsExpenseRevenue
Catalog.LedgerTypeVariants
Catalog.Companies.Attribute.LandedCostExpenseType
+ Report.TrialBalance
+ Report.TrialBalanceByAccount
+ Report.AccountCard
+ Report.AccountAnalysis
\ No newline at end of file
diff --git a/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Form.form b/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Form.form
index d470474287..fb494401ed 100644
--- a/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Form.form
+++ b/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Form.form
@@ -312,6 +312,56 @@
true
+
+ Currency
+ 57
+ true
+ true
+
+ true
+
+
+ Record.Currency
+
+
+ CurrencyExtendedTooltip
+ 59
+ true
+ true
+
+ true
+
+ Label
+ true
+ true
+
+ Left
+
+
+
+ CurrencyContextMenu
+ 58
+ true
+ true
+
+ true
+
+ true
+
+ InputField
+ Enter
+ true
+ Left
+ true
+
+ true
+ true
+ true
+ true
+ true
+ true
+
+
GroupPartnerType
46
diff --git a/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Module.bsl b/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Module.bsl
index e3962d3038..e66db8c668 100644
--- a/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Module.bsl
+++ b/IRP/src/InformationRegisters/T9012S_AccountsPartner/Forms/RecordForm/Module.bsl
@@ -1,15 +1,17 @@
-
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
ThisObject.Items.RecordType.ChoiceList.Add("All" , R().CLV_1);
ThisObject.Items.RecordType.ChoiceList.Add("Partner" , Metadata.Catalogs.Partners.ObjectPresentation);
ThisObject.Items.RecordType.ChoiceList.Add("Agreement" , Metadata.Catalogs.Agreements.ObjectPresentation);
+ ThisObject.Items.RecordType.ChoiceList.Add("Currency" , Metadata.Catalogs.Currencies.ObjectPresentation);
If ValueIsFilled(Record.Partner) Then
ThisObject.RecordType = "Partner";
ElsIf ValueIsFilled(Record.Agreement) Then
ThisObject.RecordType = "Agreement";
+ ElsIf ValueIsFilled(Record.Currency) Then
+ ThisObject.RecordType = "Currency";
Else
ThisObject.RecordType = "All";
EndIf;
@@ -57,6 +59,10 @@ Procedure BeforeWriteAtServer(Cancel, CurrentObject, WriteParameters)
CurrentObject.Agreement = Undefined;
EndIf;
+ If ThisObject.RecordType <> "Currency" Then
+ CurrentObject.Currency = Undefined;
+ EndIf;
+
If Not CurrentObject.Vendor Then
CurrentObject.AccountAdvancesVendor = Undefined;
CurrentObject.AccountTransactionsVendor = Undefined;
@@ -77,6 +83,7 @@ EndProcedure
Procedure SetVisible()
Items.Partner.Visible = ThisObject.RecordType = "Partner";
Items.Agreement.Visible = ThisObject.RecordType = "Agreement";
+ Items.Currency.Visible = ThisObject.RecordType = "Currency";
Items.GroupVendor.Visible = Record.Vendor;
Items.AccountAdvancesVendor.Visible = Record.Vendor;
diff --git a/IRP/src/InformationRegisters/T9012S_AccountsPartner/T9012S_AccountsPartner.mdo b/IRP/src/InformationRegisters/T9012S_AccountsPartner/T9012S_AccountsPartner.mdo
index 99aef1ac1a..c9fdd55459 100644
--- a/IRP/src/InformationRegisters/T9012S_AccountsPartner/T9012S_AccountsPartner.mdo
+++ b/IRP/src/InformationRegisters/T9012S_AccountsPartner/T9012S_AccountsPartner.mdo
@@ -377,6 +377,30 @@
true
+
+ Currency
+
+ en
+ Currency
+
+
+ ru
+ Валюта
+
+
+ tr
+ Döviz
+
+
+ CatalogRef.Currencies
+
+
+
+ Use
+ Use
+
+ true
+
RecordForm
diff --git a/IRP/src/Reports/AccountAnalysis/AccountAnalysis.mdo b/IRP/src/Reports/AccountAnalysis/AccountAnalysis.mdo
new file mode 100644
index 0000000000..727acd505d
--- /dev/null
+++ b/IRP/src/Reports/AccountAnalysis/AccountAnalysis.mdo
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ AccountAnalysis
+
+ en
+ Account analysis
+
+
+ ru
+ Анализ счета
+
+
+ tr
+ Account analysis
+
+ true
+ Report.AccountAnalysis.Template.MainDataCompositionSchema
+
+ MainDataCompositionSchema
+
+ en
+ Main data composition schema
+
+
+ ru
+ Основная схема компоновки
+
+
+ tr
+ Ana veri inşa edilme şeması
+
+ DataCompositionSchema
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/AccountAnalysis/ManagerModule.bsl b/IRP/src/Reports/AccountAnalysis/ManagerModule.bsl
new file mode 100644
index 0000000000..16846d4763
--- /dev/null
+++ b/IRP/src/Reports/AccountAnalysis/ManagerModule.bsl
@@ -0,0 +1,94 @@
+
+Function GetDetailsDataPaths() Export
+ Return "BalancedAccount, BalancedExtDimension1, BalancedExtDimension2, BalancedExtDimension3";
+EndFunction
+
+Function GetAdditionalDetailsActions(DetailValuesMap) Export
+ Result = New Structure();
+ Result.Insert("MenuList", New ValueList());
+ Result.Insert("OtherReportMapping", New Map());
+
+ Account = DetailValuesMap["BalancedAccount"];
+ If Not ValueIsFilled(Account) Then
+ Return Result;
+ EndIf;
+
+ Result.MenuList.Add(1, StrTemplate("%1: %2 = %3", Metadata.Reports.TrialBalanceByAccount.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.Report);
+
+ Result.MenuList.Add(1, StrTemplate("%1: %2 = %3", Metadata.Reports.AccountCard.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.DebitCredit);
+
+ Result.OtherReportMapping.Insert(1, "Report.TrialBalanceByAccount.ObjectForm");
+ Result.OtherReportMapping.Insert(2, "Report.AccountCard.ObjectForm");
+
+ Return Result;
+EndFunction
+
+Function GetApplyingFilters(SelectedAction, DetailValuesMap) Export
+ If SelectedAction = 1 Then
+ Return Details_AccountAnalisys(DetailValuesMap);
+ Else
+ Return Details_AccountCard(DetailValuesMap);
+ EndIf;
+EndFunction
+
+Function Details_AccountAnalisys(DetailValuesMap)
+ Result = New Structure();
+ Result.Insert("DataParameters", New Map());
+ Result.Insert("UserFilters", New Map());
+ Result.Insert("DetailsFilters", New Map());
+
+ Result.DataParameters.Insert("Period", "Period");
+
+ Result.UserFilters.Insert("Company", "Company");
+ Result.UserFilters.Insert("LedgerType", "LedgerType");
+
+ Result.DetailsFilters.Insert(DetailValuesMap["BalancedAccount"],
+ New Structure("FieldName, ComparisonType", "Account", DataCompositionComparisonType.InHierarchy));
+
+ Return Result;
+EndFunction
+
+
+Function Details_AccountCard(DetailValuesMap)
+ Result = New Structure();
+ Result.Insert("DataParameters", New Map());
+ Result.Insert("UserFilters", New Map());
+ Result.Insert("DetailsFilters", New Map());
+ Result.Insert("DetailsFiltersGroupOR", New Array());
+
+ Result.DataParameters.Insert("Period", "Period");
+
+ Result.UserFilters.Insert("Company", "Company");
+ Result.UserFilters.Insert("LedgerType", "LedgerType");
+
+ Result.DetailsFilters.Insert(DetailValuesMap["BalancedAccount"],
+ New Structure("FieldName, ComparisonType", "Account", DataCompositionComparisonType.InHierarchy));
+
+
+ FilterByExtDimension(1, DetailValuesMap, Result.DetailsFiltersGroupOR);
+ FilterByExtDimension(2, DetailValuesMap, Result.DetailsFiltersGroupOR);
+ FilterByExtDimension(3, DetailValuesMap, Result.DetailsFiltersGroupOR);
+
+ Return Result;
+EndFunction
+
+Procedure FilterByExtDimension(Number, DetailValuesMap, DetailsFiltersGroupOR)
+ ArrayOfFilters_ExtDimension = New Array();
+ If ValueIsFilled(DetailValuesMap["BalancedExtDimension"+Number]) Then
+ Filter_ExtDimensionDr = New Map();
+ Filter_ExtDimensionDr.Insert(DetailValuesMap["BalancedExtDimension"+Number],
+ New Structure("FieldName, ComparisonType", "ExtDimensionDr"+Number, DataCompositionComparisonType.Equal));
+ ArrayOfFilters_ExtDimension.Add(Filter_ExtDimensionDr);
+
+ Filter_ExtDimensionCr = New Map();
+ Filter_ExtDimensionCr.Insert(DetailValuesMap["BalancedExtDimension"+Number],
+ New Structure("FieldName, ComparisonType", "ExtDimensionCr"+Number, DataCompositionComparisonType.Equal));
+ ArrayOfFilters_ExtDimension.Add(Filter_ExtDimensionCr);
+ EndIf;
+ If ArrayOfFilters_ExtDimension.Count() Then
+ DetailsFiltersGroupOR.Add(ArrayOfFilters_ExtDimension);
+ EndIf;
+EndProcedure
+
diff --git a/IRP/src/Reports/AccountAnalysis/Templates/MainDataCompositionSchema/Template.dcs b/IRP/src/Reports/AccountAnalysis/Templates/MainDataCompositionSchema/Template.dcs
new file mode 100644
index 0000000000..e7a21a7fde
--- /dev/null
+++ b/IRP/src/Reports/AccountAnalysis/Templates/MainDataCompositionSchema/Template.dcs
@@ -0,0 +1,944 @@
+
+
+
+ DataSource1
+ Local
+
+
+ DataSet1
+
+ Account
+ Account
+
+ true
+
+
+ Account.Order
+ Asc
+ false
+
+
+
+
+
+ BalancedAccount
+ BalancedAccount
+
+
+ en
+ Account (balanced)
+
+
+ ru
+ Корр. счет
+
+
+ tr
+ Account (balanced)
+
+
+
+ true
+
+
+ BalancedAccount.Order
+ Asc
+ false
+
+
+
+
+
+ ExtDimension1
+ ExtDimension1
+
+
+ en
+ Extra dim.1
+
+
+ ru
+ Субконто 1
+
+
+ tr
+ Extra dim.1
+
+
+
+ true
+
+
+
+
+
+ ExtDimension2
+ ExtDimension2
+
+
+ en
+ Extra dim.2
+
+
+ ru
+ Субконто 2
+
+
+ tr
+ Extra dim.2
+
+
+
+ true
+
+
+
+
+
+ ExtDimension3
+ ExtDimension3
+
+
+ en
+ Extra dim.3
+
+
+ ru
+ Субконто 3
+
+
+ tr
+ Extra dim.3
+
+
+
+ true
+
+
+
+
+
+ BalancedExtDimension1
+ BalancedExtDimension1
+
+
+ en
+ Extra dim.1 (balanced)
+
+
+ ru
+ Корр. субконто 1
+
+
+ tr
+ Extra dim.1 (balanced)
+
+
+
+ true
+
+
+
+
+
+ BalancedExtDimension2
+ BalancedExtDimension2
+
+
+ en
+ Extra dim.2 (balanced)
+
+
+ ru
+ Корр. субконто 2
+
+
+ tr
+ Extra dim.2 (balanced)
+
+
+
+ true
+
+
+
+
+
+ BalancedExtDimension3
+ BalancedExtDimension3
+
+
+ en
+ Extra dim3 (balanced)
+
+
+ ru
+ Корр. субконто 3
+
+
+ tr
+ Extra dim3 (balanced)
+
+
+
+ true
+
+
+
+
+
+ AmountTurnoverDr
+ AmountTurnoverDr
+
+
+ en
+ From Cr (Amt.)
+
+
+ ru
+ Из Кт (Сум.)
+
+
+ tr
+ From Cr (Amt.)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+
+ AmountTurnoverCr
+ AmountTurnoverCr
+
+
+ en
+ To Dr (Amt.)
+
+
+ ru
+ В Дт (Сум.)
+
+
+ tr
+ To Dr (Amt.)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+
+ QuantityTurnoverDr
+ QuantityTurnoverDr
+
+
+ en
+ From Cr (Qty.)
+
+
+ ru
+ Из Кт (Колво.)
+
+
+ tr
+ From Cr (Qty.)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+
+ QuantityTurnoverCr
+ QuantityTurnoverCr
+
+
+ en
+ To Dr (Qty.)
+
+
+ ru
+ В Дт (Колво.)
+
+
+ tr
+ To Dr (Qty.)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+
+ CurrencyAmountTurnoverDr
+ CurrencyAmountTurnoverDr
+
+
+ en
+ From Cr (Curr.)
+
+
+ ru
+ Из Кт (Вал.)
+
+
+ tr
+ From Cr (Curr.)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+
+ CurrencyAmountTurnoverCr
+ CurrencyAmountTurnoverCr
+
+
+ en
+ To Dr (Curr.)
+
+
+ ru
+ В Дт (Вал.)
+
+
+ tr
+ To Dr (Curr.)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+
+ Company
+ Company
+
+ true
+
+
+
+
+ ChoiceParameters
+
+
+ Filter.OurCompany
+ true
+
+
+
+
+
+
+ LedgerType
+ LedgerType
+
+ true
+
+
+
+
+
+ Currency
+ Currency
+
+ true
+
+
+
+
+
+ CurrencyBalanced
+ CurrencyBalanced
+
+ true
+
+
+
+
+
+ Indicators
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+ DataSource1
+ SELECT ALLOWED
+ BasicTurnovers.Account AS Account,
+ BasicTurnovers.BalancedAccount AS BalancedAccount,
+ BasicTurnovers.ExtDimension1 AS ExtDimension1,
+ BasicTurnovers.ExtDimension2 AS ExtDimension2,
+ BasicTurnovers.ExtDimension3 AS ExtDimension3,
+ BasicTurnovers.BalancedExtDimension1 AS BalancedExtDimension1,
+ BasicTurnovers.BalancedExtDimension2 AS BalancedExtDimension2,
+ BasicTurnovers.BalancedExtDimension3 AS BalancedExtDimension3,
+ BasicTurnovers.AmountTurnoverDr AS AmountTurnoverDr,
+ BasicTurnovers.AmountTurnoverCr AS AmountTurnoverCr,
+ BasicTurnovers.QuantityTurnoverDr AS QuantityTurnoverDr,
+ BasicTurnovers.QuantityTurnoverCr AS QuantityTurnoverCr,
+ BasicTurnovers.CurrencyAmountTurnoverDr AS CurrencyAmountTurnoverDr,
+ BasicTurnovers.CurrencyAmountTurnoverCr AS CurrencyAmountTurnoverCr,
+ BasicTurnovers.Company AS Company,
+ BasicTurnovers.LedgerType AS LedgerType,
+ BasicTurnovers.Currency AS Currency,
+ BasicTurnovers.CurrencyBalanced AS CurrencyBalanced
+FROM
+ AccountingRegister.Basic.Turnovers({(&BeginPeriod)}, {(&EndPeriod)}, , , , {(Company).*, (LedgerType).*}, , ) AS BasicTurnovers
+
+
+ Indicators.Amount
+ "Amt."
+
+
+ en
+ Indicator Amt
+
+
+ ru
+ Идентификатор Сумма
+
+
+ tr
+ Indicator Amt
+
+
+
+
+
+
+ Indicators.CurrencyAmount
+ "Curr."
+
+
+ en
+ Indicator Curr
+
+
+ ru
+ Идентификатор Вал
+
+
+ tr
+ Indicator Curr
+
+
+
+
+
+
+ Indicators.Quantity
+ "Qty."
+
+
+ en
+ Indicator Qty
+
+
+ ru
+ Идентификатор Колво
+
+
+ tr
+ Indicator Qty
+
+
+
+
+
+
+ AmountTurnoverDr
+ Sum(AmountTurnoverDr)
+
+
+ AmountTurnoverCr
+ Sum(AmountTurnoverCr)
+
+
+ CurrencyAmountTurnoverDr
+ Sum(CurrencyAmountTurnoverDr)
+
+
+ CurrencyAmountTurnoverCr
+ Sum(CurrencyAmountTurnoverCr)
+
+
+ QuantityTurnoverDr
+ Sum(QuantityTurnoverDr)
+
+
+ QuantityTurnoverCr
+ Sum(QuantityTurnoverCr)
+
+
+ Indicators.Amount
+ Max(Indicators.Amount)
+
+
+ Indicators.CurrencyAmount
+ Max(Indicators.CurrencyAmount)
+
+
+ Indicators.Quantity
+ Max(Indicators.Quantity)
+
+
+ BeginPeriod
+
+
+ en
+ Begin period
+
+
+ ru
+ Начало периода
+
+
+ tr
+ Başlangıç tarihi
+
+
+
+ true
+ &Period.StartDate
+ false
+
+
+
+ EndPeriod
+
+
+ en
+ End period
+
+
+ ru
+ Конец периода
+
+
+ tr
+ Son tarih
+
+
+
+ true
+ &Period.EndDate
+ false
+
+
+
+ Period
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+ v8:StandardPeriod
+
+
+ Custom
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+ false
+
+
+
+ AccountAnalisys
+
+
+ en
+ Account analysis
+
+
+ ru
+ Анализ счета
+
+
+ tr
+ Account analysis
+
+
+
+
+
+
+
+ Indicators.Amount
+
+
+
+ Indicators.CurrencyAmount
+
+
+
+ Indicators.Quantity
+
+
+ Vertically
+
+
+ From Credit
+
+ AmountTurnoverDr
+
+
+
+ CurrencyAmountTurnoverDr
+
+
+
+ QuantityTurnoverDr
+
+
+ Vertically
+
+
+ To Debit
+
+ AmountTurnoverCr
+
+
+
+ CurrencyAmountTurnoverCr
+
+
+
+ QuantityTurnoverCr
+
+
+ Vertically
+
+
+
+
+ Company
+ Equal
+ Catalog.Companies.EmptyRef
+ ac6477ab-086f-43cb-87d7-c6ec608cc2c9
+
+
+ LedgerType
+ Equal
+ Catalog.LedgerTypes.EmptyRef
+ 64e5e0d2-055f-4a91-9949-4964dc575e31
+
+
+ Account
+ InHierarchy
+ ChartOfAccounts.Basic.EmptyRef
+ 151f876b-bcce-4af6-95ce-1ddf9dd70545
+
+
+
+
+ false
+ BeginPeriod
+
+
+
+ false
+ EndPeriod
+
+
+
+ false
+ Period
+
+ Custom
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+ 8be562df-1d14-4de5-974d-a88b0f6e7370
+
+
+
+
+
+
+ AmountTurnoverDr
+
+
+ AmountTurnoverCr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Bottom
+
+ None
+
+
+
+
+
+
+
+
+ CurrencyAmountTurnoverDr
+
+
+ CurrencyAmountTurnoverCr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Top
+
+ None
+
+
+
+ BorderStyle.Bottom
+
+ None
+
+
+
+
+
+
+
+
+ QuantityTurnoverDr
+
+
+ QuantityTurnoverCr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Top
+
+ None
+
+
+
+
+
+
+
+
+ AmountTurnoverDr
+
+
+ CurrencyAmountTurnoverDr
+
+
+ QuantityTurnoverDr
+
+
+ AmountTurnoverCr
+
+
+ CurrencyAmountTurnoverCr
+
+
+ QuantityTurnoverCr
+
+
+
+
+
+ MinimumWidth
+ 15
+
+
+
+
+
+
+ AppearanceTemplate
+ Sea
+
+
+
+
+
+ BalancedAccount
+ Hierarchy
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/AccountCard/AccountCard.mdo b/IRP/src/Reports/AccountCard/AccountCard.mdo
new file mode 100644
index 0000000000..1383a2e2c3
--- /dev/null
+++ b/IRP/src/Reports/AccountCard/AccountCard.mdo
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ AccountCard
+
+ en
+ Account card
+
+
+ ru
+ Карточка счета
+
+
+ tr
+ Account card
+
+ true
+ Report.AccountCard.Template.MainDataCompositionSchema
+
+ MainDataCompositionSchema
+
+ en
+ Main data composition schema
+
+
+ ru
+ Основная схема компоновки
+
+
+ tr
+ Ana veri inşa edilme şeması
+
+ DataCompositionSchema
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/AccountCard/Templates/MainDataCompositionSchema/Template.dcs b/IRP/src/Reports/AccountCard/Templates/MainDataCompositionSchema/Template.dcs
new file mode 100644
index 0000000000..3adfef83e1
--- /dev/null
+++ b/IRP/src/Reports/AccountCard/Templates/MainDataCompositionSchema/Template.dcs
@@ -0,0 +1,2396 @@
+
+
+
+ DataSource1
+ Local
+
+
+ DataSet1
+
+ Account
+ Account
+
+
+ en
+ Account
+
+
+ ru
+ Счет
+
+
+ tr
+ Hesap
+
+
+
+ true
+
+
+ Account.Order
+ Asc
+ false
+
+
+
+ Company
+ Company
+
+
+ en
+ Company
+
+
+ ru
+ Организация
+
+
+ tr
+ Şirket
+
+
+
+ true
+
+
+
+ ChoiceParameters
+
+
+ Filter.OurCompany
+ true
+
+
+
+
+
+
+ Currency
+ Currency
+
+
+ en
+ Currency
+
+
+ ru
+ Валюта
+
+
+ tr
+ Döviz
+
+
+
+ true
+
+
+
+ ExtDimension1
+ ExtDimension1
+
+
+ en
+ Ext dim.1
+
+
+ ru
+ Субконто 1
+
+
+ tr
+ Ext dim.1
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension1) Then "<...>" Else ExtDimension1 End)
+
+
+ ExtDimension2
+ ExtDimension2
+
+
+ en
+ Ext dim.2
+
+
+ ru
+ Субконто 2
+
+
+ tr
+ Ext dim.2
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension2) Then "<...>" Else ExtDimension2 End)
+
+
+ ExtDimension3
+ ExtDimension3
+
+
+ en
+ Ext dim.3
+
+
+ ru
+ Субконто 3
+
+
+ tr
+ Ext dim.3
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension3) Then "<...>" Else ExtDimension3 End)
+
+
+ Recorder
+ Recorder
+
+
+ en
+ Recorder
+
+
+ ru
+ Документ
+
+
+ tr
+ İşlem evrakı
+
+
+
+ 1
+ Main
+
+
+
+ LedgerType
+ LedgerType
+
+ true
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+ AmountOpeningBalanceDr
+
+
+ en
+ Amount Dr (opening balance)
+
+
+ ru
+ Сумма Дт (Начальный остаток)
+
+
+ tr
+ Amount Dr (opening balance)
+
+
+
+ true
+ AmountDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+ AmountOpeningBalanceCr
+
+
+ en
+ Amount Cr (opening balance)
+
+
+ ru
+ Сумма Кт (Начальный остаток)
+
+
+ tr
+ Amount Cr (opening balance)
+
+
+
+ true
+ AmountCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.AmountClosingBalanceDr
+ AmountClosingBalanceDr
+
+
+ en
+ Amount Dr (closing balance
+
+
+ ru
+ Сумма Дт (Конечный остаток)
+
+
+ tr
+ Amount Dr (closing balance
+
+
+
+ true
+ AmountDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.AmountClosingBalanceCr
+ AmountClosingBalanceCr
+
+
+ en
+ Amount Cr (closing balance)
+
+
+ ru
+ Сумма Кт (Конечный остаток)
+
+
+ tr
+ Amount Cr (closing balance)
+
+
+
+ true
+ AmountCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+ CurrencyAmountOpeningBalanceDr
+
+
+ en
+ Currency amt. Dr (opening balance)
+
+
+ ru
+ Валютнаы сумма Дт (Начальный остаток)
+
+
+ tr
+ Currency amt. Dr (opening balance)
+
+
+
+ true
+ CurrencyAmountDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+ CurrencyAmountOpeningBalanceCr
+
+
+ en
+ Currency amt. Cr (opening balance)
+
+
+ ru
+ Валютнаы сумма Кт (Начальный остаток)
+
+
+ tr
+ Currency amt. Cr (opening balance)
+
+
+
+ true
+ CurrencyAmountCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+ CurrencyAmountClosingBalanceDr
+
+
+ en
+ Currency amt. Dr (closing balance)
+
+
+ ru
+ Валютнаы сумма Дт (Конечный остаток)
+
+
+ tr
+ Currency amt. Dr (closing balance)
+
+
+
+ true
+ CurrencyAmountDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+ CurrencyAmountClosingBalanceCr
+
+
+ en
+ Currency amt. Cr (closing balance)
+
+
+ ru
+ Валютная сумма Кт (Конечный остаток)
+
+
+ tr
+ Currency amt. Cr (closing balance)
+
+
+
+ true
+ CurrencyAmountCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+ QuantityClosingBalanceDr
+
+
+ en
+ Quantity Dr (closing balance)
+
+
+ ru
+ Количество Дт (Конечный остаток)
+
+
+ tr
+ Quantity Dr (closing balance)
+
+
+
+ true
+ QuantityDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+ QuantityClosingBalanceCr
+
+
+ en
+ Quantity Cr (closing balance)
+
+
+ ru
+ Количество Кт (Начальный остаток)
+
+
+ tr
+ Quantity Cr (closing balance)
+
+
+
+ true
+ QuantityCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+ QuantityOpeningBalanceDr
+
+
+ en
+ Quantity Dr (opening balance)
+
+
+ ru
+ Количество Дт (Начальный остаток)
+
+
+ tr
+ Quantity Dr (opening balance)
+
+
+
+ true
+ QuantityDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+ QuantityOpeningBalanceCr
+
+
+ en
+ Quantity Cr (opening balance)
+
+
+ ru
+ Количество Кт (Начальный остаток)
+
+
+ tr
+ Quantity Cr (opening balance)
+
+
+
+ true
+ QuantityCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.AmountTurnoverCr
+ AmountTurnoverCr
+
+
+ en
+ Amount Cr (turnover)
+
+
+ ru
+ Сумма Кт (Оборот)
+
+
+ tr
+ Amount Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.AmountTurnoverDr
+ AmountTurnoverDr
+
+
+ en
+ Amount Dr (turnover)
+
+
+ ru
+ Сумма Дт (Оборот)
+
+
+ tr
+ Amount Dr (turnover)
+
+
+
+
+ MarkNegatives
+ true
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+
+
+ OpeningBalance
+
+
+ en
+ Opening balance
+
+
+ ru
+ Начальный остаток
+
+
+ tr
+ Açılış tutarı
+
+
+
+
+ ClosingBalance
+
+
+ en
+ Closing balance
+
+
+ ru
+ Конечный остаток
+
+
+ tr
+ Kapanış bakiyesi
+
+
+
+
+ Turnovers
+
+
+ en
+ Turnovers
+
+
+ ru
+ Обороты
+
+
+ tr
+ Turnovers
+
+
+
+
+ Turnovers.QuantityTurnoverDr
+ QuantityTurnoverDr
+
+
+ en
+ Quantity Dr (turnover)
+
+
+ ru
+ Количество Дт (Оборот)
+
+
+ tr
+ Quantity Dr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.QuantityTurnoverCr
+ QuantityTurnoverCr
+
+
+ en
+ Quantity Cr (turnover)
+
+
+ ru
+ Количество Кт (Оборот)
+
+
+ tr
+ Quantity Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+ CurrencyAmountTurnoverDr
+
+
+ en
+ Currency amt. Dr (turnover)
+
+
+ ru
+ Валютнаы сумма Дт (Оборот)
+
+
+ tr
+ Currency amt. Dr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+ CurrencyAmountTurnoverCr
+
+
+ en
+ Currency amt. Cr (turnover)
+
+
+ ru
+ Валютнаы сумма Кт (Оборот)
+
+
+ tr
+ Currency amt. Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Period
+ Period
+
+ 2
+ Main
+
+
+
+ ExtDimensionCr1
+ ExtDimensionCr1
+
+
+ en
+ Ext dim. Cr1
+
+
+ ru
+ Субконто Кт1
+
+
+ tr
+ Ext dim. Cr1
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimensionCr1) And ValueIsFilled(Recorder) Then "<...>" Else ExtDimensionCr1 End)
+
+
+ ExtDimensionCr2
+ ExtDimensionCr2
+
+
+ en
+ Ext dim. Cr2
+
+
+ ru
+ Субконто Кт2
+
+
+ tr
+ Ext dim. Cr2
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimensionCr2) And ValueIsFilled(Recorder) Then "<...>" Else ExtDimensionCr2 End)
+
+
+ ExtDimensionCr3
+ ExtDimensionCr3
+
+
+ en
+ Ext dim. Cr3
+
+
+ ru
+ Субконто Кт3
+
+
+ tr
+ Ext dim. Cr3
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimensionCr3) And ValueIsFilled(Recorder) Then "<...>" Else ExtDimensionCr3 End)
+
+
+ ExtDimensionDr1
+ ExtDimensionDr1
+
+
+ en
+ Ext dim. Dr1
+
+
+ ru
+ Субконто Дт1
+
+
+ tr
+ Ext dim. Dr1
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimensionDr1) And ValueIsFilled(Recorder) Then "<...>" Else ExtDimensionDr1 End)
+
+
+ ExtDimensionDr2
+ ExtDimensionDr2
+
+
+ en
+ Ext dim. Dr2
+
+
+ ru
+ Субконто Дт2
+
+
+ tr
+ Ext dim. Dr2
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimensionDr2) And ValueIsFilled(Recorder) Then "<...>" Else ExtDimensionDr2 End)
+
+
+ ExtDimensionDr3
+ ExtDimensionDr3
+
+
+ en
+ Ext dim. Dr3
+
+
+ ru
+ Субконто Дт3
+
+
+ tr
+ Ext dim. Dr3
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimensionDr3) And ValueIsFilled(Recorder) Then "<...>" Else ExtDimensionDr3 End)
+
+
+ AccountDr
+ AccountDr
+
+ true
+
+
+
+ AccountCr
+ AccountCr
+
+ true
+
+
+
+ CurrencyDr
+ CurrencyDr
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(Turnovers.CurrencyAmountTurnoverDr) Then UNDEFINED Else CurrencyDr End)
+
+
+ CurrencyCr
+ CurrencyCr
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(Turnovers.CurrencyAmountTurnoverCr) Then UNDEFINED Else CurrencyCr End)
+
+
+ Operation
+ Operation
+
+
+ BalancedAccount
+ BalancedAccount
+
+
+ BalancedExtDimension1
+ BalancedExtDimension1
+
+
+ BalancedExtDimension2
+ BalancedExtDimension2
+
+
+ BalancedExtDimension3
+ BalancedExtDimension3
+
+
+ CurrencyBalanced
+ CurrencyBalanced
+
+
+ Indicators
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+ DataSource1
+ SELECT ALLOWED
+ CASE
+ WHEN RecordsWithExtDimensions.Recorder = UNDEFINED
+ THEN NULL
+ ELSE RecordsWithExtDimensions.Recorder
+ END AS Recorder,
+ RecordsWithExtDimensions.Period AS Period,
+ RecordsWithExtDimensions.ExtDimensionCr1 AS ExtDimensionCr1,
+ RecordsWithExtDimensions.ExtDimensionCr2 AS ExtDimensionCr2,
+ RecordsWithExtDimensions.ExtDimensionCr3 AS ExtDimensionCr3,
+ RecordsWithExtDimensions.ExtDimensionDr1 AS ExtDimensionDr1,
+ RecordsWithExtDimensions.ExtDimensionDr2 AS ExtDimensionDr2,
+ RecordsWithExtDimensions.ExtDimensionDr3 AS ExtDimensionDr3,
+ RecordsWithExtDimensions.AccountDr AS AccountDr,
+ RecordsWithExtDimensions.AccountCr AS AccountCr,
+ RecordsWithExtDimensions.CurrencyDr AS CurrencyDr,
+ RecordsWithExtDimensions.CurrencyCr AS CurrencyCr,
+ RecordsWithExtDimensions.Operation AS Operation,
+ BalanceAndTurnovers.Company AS Company,
+ BalanceAndTurnovers.LedgerType AS LedgerType,
+// Amount
+ BalanceAndTurnovers.AmountOpeningBalanceDr,
+ BalanceAndTurnovers.AmountOpeningBalanceCr,
+ BalanceAndTurnovers.AmountClosingBalanceDr,
+ BalanceAndTurnovers.AmountClosingBalanceCr,
+ BalanceAndTurnovers.AmountTurnoverDr,
+ BalanceAndTurnovers.AmountTurnoverCr,
+// Currency amount
+ BalanceAndTurnovers.CurrencyAmountOpeningBalanceDr,
+ BalanceAndTurnovers.CurrencyAmountOpeningBalanceCr,
+ BalanceAndTurnovers.CurrencyAmountClosingBalanceDr,
+ BalanceAndTurnovers.CurrencyAmountClosingBalanceCr,
+ BalanceAndTurnovers.CurrencyAmountTurnoverDr,
+ BalanceAndTurnovers.CurrencyAmountTurnoverCr,
+// Quantity
+ BalanceAndTurnovers.QuantityClosingBalanceDr,
+ BalanceAndTurnovers.QuantityClosingBalanceCr,
+ BalanceAndTurnovers.QuantityOpeningBalanceDr,
+ BalanceAndTurnovers.QuantityOpeningBalanceCr,
+ BalanceAndTurnovers.QuantityTurnoverDr,
+ BalanceAndTurnovers.QuantityTurnoverCr
+FROM
+ AccountingRegister.Basic.BalanceAndTurnovers({&BeginOfPeriod}, {&EndOfPeriod}, Record,
+ RegisterRecordsAndPeriodBoundaries, {(Account).* AS Account},,
+ NOT LedgerType.DeletionMark {(LedgerType).* AS LedgerType} {(Company).* AS Company} {(Currency).* AS Currency}) AS
+ BalanceAndTurnovers
+ INNER JOIN AccountingRegister.Basic.RecordsWithExtDimensions AS RecordsWithExtDimensions
+ ON BalanceAndTurnovers.Recorder = RecordsWithExtDimensions.Recorder
+ AND BalanceAndTurnovers.LineNumber = RecordsWithExtDimensions.LineNumber
+
+
+ Indicators.IndicatorAmount
+ "Amt"
+
+
+ en
+ Indicator Amt
+
+
+ ru
+ Идентификатор Сумма
+
+
+ tr
+ Indicator Amt
+
+
+
+
+ Indicators.IndicatorQuantity
+ "Qty."
+
+
+ en
+ Indicator Qty
+
+
+ ru
+ Идентификатор Колво
+
+
+ tr
+ Indicator Qty
+
+
+
+
+ Indicators.IndicatorCurrencyAmount
+ "Curr."
+
+
+ en
+ Indicator Curr
+
+
+ ru
+ Идентификатор Вал
+
+
+ tr
+ Indicator Curr
+
+
+
+
+ Balance
+ Case
+ When ValueIsFilled(ClosingBalance.AmountClosingBalanceDr) Then ClosingBalance.AmountClosingBalanceDr
+ When ValueIsFilled(ClosingBalance.AmountClosingBalanceCr) Then ClosingBalance.AmountClosingBalanceCr
+End
+
+
+
+
+
+ en
+ Balance
+
+
+ ru
+ Остаток
+
+
+ tr
+ Bakiye
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+ Sum(OpeningBalance.AmountOpeningBalanceDr)
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+ Sum(OpeningBalance.AmountOpeningBalanceCr)
+
+
+ ClosingBalance.AmountClosingBalanceDr
+ Sum(ClosingBalance.AmountClosingBalanceDr)
+
+
+ ClosingBalance.AmountClosingBalanceCr
+ Sum(ClosingBalance.AmountClosingBalanceCr)
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+ Sum(OpeningBalance.QuantityOpeningBalanceCr)
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+ Sum(OpeningBalance.QuantityOpeningBalanceDr)
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+ Sum(ClosingBalance.QuantityClosingBalanceCr)
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+ Sum(ClosingBalance.QuantityClosingBalanceDr)
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+ Sum(OpeningBalance.CurrencyAmountOpeningBalanceCr)
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+ Sum(OpeningBalance.CurrencyAmountOpeningBalanceDr)
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+ Sum(ClosingBalance.CurrencyAmountClosingBalanceCr)
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+ Sum(ClosingBalance.CurrencyAmountClosingBalanceDr)
+
+
+ Balance
+ Sum(Balance)
+ Recorder
+
+
+ Turnovers.AmountTurnoverCr
+ Sum(Turnovers.AmountTurnoverCr)
+
+
+ Turnovers.AmountTurnoverDr
+ Sum(Turnovers.AmountTurnoverDr)
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+ Sum(Turnovers.CurrencyAmountTurnoverCr)
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+ Sum(Turnovers.CurrencyAmountTurnoverDr)
+
+
+ Turnovers.QuantityTurnoverCr
+ Sum(Turnovers.QuantityTurnoverCr)
+
+
+ Turnovers.QuantityTurnoverDr
+ Sum(Turnovers.QuantityTurnoverDr)
+
+
+ Period
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+ v8:StandardPeriod
+
+
+ false
+
+
+ BeginOfPeriod
+
+
+ en
+ Begin of period
+
+
+ ru
+ Начало периода
+
+
+ tr
+ Dönem başı
+
+
+
+ xs:dateTime
+
+ Date
+
+
+
+ true
+ &Period.StartDate
+ false
+
+
+ EndOfPeriod
+
+
+ en
+ End of period
+
+
+ ru
+ Конец периода
+
+
+ tr
+ Dönem sonu
+
+
+
+ xs:dateTime
+
+ Date
+
+
+
+ true
+ &Period.EndDate
+ false
+
+
+ Top
+
+
+ en
+ Top
+
+
+ ru
+ Верх
+
+
+ tr
+ Üst
+
+
+
+ xs:decimal
+
+ 15
+ 0
+ Nonnegative
+
+
+ false
+
+
+ Template3
+
+
+
+
+
+
+ en
+ Amt.
+
+
+ ru
+ Сум.
+
+
+ tr
+ Amt.
+
+
+
+
+
+
+
+
+ Template4
+
+
+
+
+
+
+ en
+ Qty.
+
+
+ ru
+ Колво
+
+
+ tr
+ Qty.
+
+
+
+
+
+
+
+
+ Template5
+
+
+
+
+
+
+ en
+ PC
+
+
+ ru
+ Ед
+
+
+ tr
+ PC
+
+
+
+
+
+
+
+
+ Template8
+
+
+
+
+
+
+ en
+ Opening balance Dr
+
+
+ ru
+ Начальный остаток Дт
+
+
+ tr
+ Opening balance Dr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template9
+
+
+
+
+
+
+ en
+ Dr turnovers
+
+
+ ru
+ Дт Обороты
+
+
+ tr
+ Dr turnovers
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template10
+
+
+
+
+
+
+ en
+ Cr turnovers
+
+
+ ru
+ Кт Обороты
+
+
+ tr
+ Cr turnovers
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template11
+
+
+
+
+
+
+ en
+ Closing balance Dr
+
+
+ ru
+ Конечный остаток Дт
+
+
+ tr
+ Closing balance Dr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template12
+
+
+
+
+
+
+ en
+ Closing balance Cr
+
+
+ ru
+ Конечный остаток Кт
+
+
+ tr
+ Closing balance Cr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template13
+
+
+
+
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template14
+
+
+
+
+ BalancedAccount
+
+
+
+
+
+ BalancedAccount
+ Presentation(BalancedAccount)
+
+
+
+ Template15
+
+
+
+ Template16
+
+
+
+
+
+
+ en
+ Opening balance Cr
+
+
+ ru
+ Начальный остаток Кт
+
+
+ tr
+ Opening balance Cr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template17
+
+
+
+
+ BalancedAccount
+
+
+
+
+
+ BalancedAccount
+ Presentation(BalancedAccount)
+
+
+
+ Template18
+
+
+
+
+
+
+ en
+ Qty
+
+
+ ru
+ Колв
+
+
+ tr
+ Qty
+
+
+
+
+
+
+
+
+ Template1
+
+
+
+ Template1
+
+
+
+ Макет1
+
+
+
+
+
+
+ en
+ Amt.
+
+
+ ru
+ Сум.
+
+
+ tr
+ Amt.
+
+
+
+
+
+
+
+
+ Макет1
+
+
+
+ Макет1
+
+
+
+ Макет2
+
+
+
+
+
+
+ en
+ Curr.
+
+
+ ru
+ Вал.
+
+
+ tr
+ Curr.
+
+
+
+
+
+
+
+
+ Макет3
+
+
+
+
+
+
+ en
+ Qty.
+
+
+ ru
+ Колво
+
+
+ tr
+ Qty.
+
+
+
+
+
+
+
+
+ Макет3
+
+
+
+ Макет4
+
+
+
+
+
+
+
+ Макет4
+
+
+
+ AccountCard
+
+
+ en
+ Account card
+
+
+ ru
+ Карточка счета
+
+
+ tr
+ Account card
+
+
+
+
+
+ Period
+
+
+ Recorder
+
+
+ AccountDr
+ Dr
+
+
+ Analytics Dr
+
+ ExtDimensionDr1
+
+
+
+ ExtDimensionDr2
+
+
+
+ ExtDimensionDr3
+
+
+ Vertically
+
+
+ CurrencyDr
+ Curr. Dr
+
+
+ AccountCr
+ Cr
+
+
+ Analytics Cr
+
+ ExtDimensionCr1
+
+
+
+ ExtDimensionCr2
+
+
+
+ ExtDimensionCr3
+
+
+ Vertically
+
+
+ CurrencyCr
+ Curr. Cr
+
+
+
+ Indicators.IndicatorAmount
+
+
+
+ Indicators.IndicatorCurrencyAmount
+
+
+
+ Indicators.IndicatorQuantity
+
+
+ Vertically
+
+
+ Amt. Dr
+
+ Turnovers.AmountTurnoverDr
+
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+
+
+
+ Turnovers.QuantityTurnoverDr
+
+
+ Vertically
+
+
+ Amt. Cr
+
+ Turnovers.AmountTurnoverCr
+
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+
+
+
+ Turnovers.QuantityTurnoverCr
+
+
+ Vertically
+
+
+ Balance
+
+
+
+
+ LedgerType
+ Equal
+ e0802907-c28c-4c7f-b3ab-e60b7dadc7f0
+
+
+ Company
+ Equal
+ 4397b60c-1023-4ede-8bf5-e8a7a40c102c
+
+
+ Account
+ InHierarchy
+ 8e5673f6-e80c-4fab-a996-cecfc9f8cef1
+
+
+
+
+ false
+ Period
+
+ eeaa5d18-5f96-486f-bd0c-6809263c9b58
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+
+
+
+ Period
+ Asc
+
+
+
+
+
+
+ ExtDimensionCr2
+
+
+ ExtDimensionDr2
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Top
+
+ None
+
+
+
+ BorderStyle.Right
+
+ None
+
+
+
+ BorderStyle.Bottom
+
+ None
+
+
+
+
+
+
+
+
+ ExtDimensionCr1
+
+
+ ExtDimensionDr1
+
+
+ Turnovers.AmountTurnoverCr
+
+
+ Turnovers.AmountTurnoverDr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Right
+
+ None
+
+
+
+ BorderStyle.Bottom
+
+ None
+
+
+
+
+
+
+
+
+ ExtDimensionCr3
+
+
+ ExtDimensionDr3
+
+
+ Turnovers.QuantityTurnoverCr
+
+
+ Turnovers.QuantityTurnoverDr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Top
+
+ None
+
+
+
+ BorderStyle.Right
+
+ None
+
+
+
+
+
+
+
+
+ Recorder
+
+
+
+
+
+ MaximumWidth
+ 25
+
+
+
+
+
+
+ Period
+
+
+
+
+
+ MaximumWidth
+ 10
+
+
+
+
+
+
+ Balance
+
+
+
+
+
+ VerticalAlign
+ Center
+
+
+
+
+
+
+ AppearanceTemplate
+ Sea
+
+
+ HorizontalOverallPlacement
+ None
+
+
+ false
+ VerticalOverallPlacement
+ None
+
+
+ false
+ FieldsTitleType
+ Short
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/AllRegistersMovement/Templates/Template/Template.dcs b/IRP/src/Reports/AllRegistersMovement/Templates/Template/Template.dcs
index 04b5b138c6..a5997c6fa4 100644
--- a/IRP/src/Reports/AllRegistersMovement/Templates/Template/Template.dcs
+++ b/IRP/src/Reports/AllRegistersMovement/Templates/Template/Template.dcs
@@ -178,7 +178,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/BatchBalance/Templates/MainDataCompositionSchema/Template.dcs b/IRP/src/Reports/BatchBalance/Templates/MainDataCompositionSchema/Template.dcs
index 9680dc72b6..1fdff58c87 100644
--- a/IRP/src/Reports/BatchBalance/Templates/MainDataCompositionSchema/Template.dcs
+++ b/IRP/src/Reports/BatchBalance/Templates/MainDataCompositionSchema/Template.dcs
@@ -176,7 +176,7 @@
ru
- Регистратор
+ Документ
tr
@@ -2354,7 +2354,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/BatchBalanceSimple/Templates/MainDataCompositionSchema/Template.dcs b/IRP/src/Reports/BatchBalanceSimple/Templates/MainDataCompositionSchema/Template.dcs
index 098b07a17d..071476f287 100644
--- a/IRP/src/Reports/BatchBalanceSimple/Templates/MainDataCompositionSchema/Template.dcs
+++ b/IRP/src/Reports/BatchBalanceSimple/Templates/MainDataCompositionSchema/Template.dcs
@@ -302,7 +302,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/D1001_Purchases/Templates/Template/Template.dcs b/IRP/src/Reports/D1001_Purchases/Templates/Template/Template.dcs
index 69ca23ffee..af119ef373 100644
--- a/IRP/src/Reports/D1001_Purchases/Templates/Template/Template.dcs
+++ b/IRP/src/Reports/D1001_Purchases/Templates/Template/Template.dcs
@@ -250,7 +250,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/D2001_Sales/Templates/Template/Template.dcs b/IRP/src/Reports/D2001_Sales/Templates/Template/Template.dcs
index 1f90ec3f6d..4e1003329e 100644
--- a/IRP/src/Reports/D2001_Sales/Templates/Template/Template.dcs
+++ b/IRP/src/Reports/D2001_Sales/Templates/Template/Template.dcs
@@ -250,7 +250,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/D4010_ActualStocks/Templates/Template/Template.dcs b/IRP/src/Reports/D4010_ActualStocks/Templates/Template/Template.dcs
index 7666686f88..b0f6e41c91 100644
--- a/IRP/src/Reports/D4010_ActualStocks/Templates/Template/Template.dcs
+++ b/IRP/src/Reports/D4010_ActualStocks/Templates/Template/Template.dcs
@@ -217,7 +217,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/D4011_FreeStocks/Templates/Template/Template.dcs b/IRP/src/Reports/D4011_FreeStocks/Templates/Template/Template.dcs
index d9cd298650..249d5e61e9 100644
--- a/IRP/src/Reports/D4011_FreeStocks/Templates/Template/Template.dcs
+++ b/IRP/src/Reports/D4011_FreeStocks/Templates/Template/Template.dcs
@@ -217,7 +217,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/D4012_StockReservation/Templates/Template/Template.dcs b/IRP/src/Reports/D4012_StockReservation/Templates/Template/Template.dcs
index 3ac5dbbdd0..3d9360d95c 100644
--- a/IRP/src/Reports/D4012_StockReservation/Templates/Template/Template.dcs
+++ b/IRP/src/Reports/D4012_StockReservation/Templates/Template/Template.dcs
@@ -217,7 +217,7 @@
ru
- Регистратор
+ Документ
tr
diff --git a/IRP/src/Reports/TrialBalance/ManagerModule.bsl b/IRP/src/Reports/TrialBalance/ManagerModule.bsl
new file mode 100644
index 0000000000..eb6e6979e3
--- /dev/null
+++ b/IRP/src/Reports/TrialBalance/ManagerModule.bsl
@@ -0,0 +1,51 @@
+
+Function GetDetailsDataPaths() Export
+ Return "Account";
+EndFunction
+
+Function GetAdditionalDetailsActions(DetailValuesMap) Export
+ Result = New Structure();
+ Result.Insert("MenuList", New ValueList());
+ Result.Insert("OtherReportMapping", New Map());
+
+ Account = DetailValuesMap["Account"];
+ If Not ValueIsFilled(Account) Then
+ Return Result;
+ EndIf;
+
+ Result.MenuList.Add(1, StrTemplate("%1: %2 = %3", Metadata.Reports.TrialBalanceByAccount.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.Report);
+
+ Result.MenuList.Add(2, StrTemplate("%1: %2 = %3", Metadata.Reports.AccountAnalysis.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.Report);
+
+ Result.MenuList.Add(3, StrTemplate("%1: %2 = %3", Metadata.Reports.AccountCard.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.DebitCredit);
+
+ Result.OtherReportMapping.Insert(1, "Report.TrialBalanceByAccount.ObjectForm");
+ Result.OtherReportMapping.Insert(2, "Report.AccountAnalysis.ObjectForm");
+ Result.OtherReportMapping.Insert(3, "Report.AccountCard.ObjectForm");
+
+ Return Result;
+EndFunction
+
+Function GetApplyingFilters(SelectedAction, DetailValuesMap) Export
+ Result = New Structure();
+ Result.Insert("DataParameters", New Map());
+ Result.Insert("UserFilters", New Map());
+ Result.Insert("DetailsFilters", New Map());
+
+
+ // Parameter [Period] from this report to parameter [Period] other report (trial balance by account)
+ Result.DataParameters.Insert("Period", "Period");
+
+ // Copying filter [Company] from this repot to other report
+ Result.UserFilters.Insert("Company", "Company");
+ Result.UserFilters.Insert("LedgerType", "LedgerType");
+
+ // New filter to other report Key=Value, FiledName= fild name in other report
+ Result.DetailsFilters.Insert(DetailValuesMap["Account"],
+ New Structure("FieldName, ComparisonType", "Account", DataCompositionComparisonType.InHierarchy));
+
+ Return Result;
+EndFunction
diff --git a/IRP/src/Reports/TrialBalance/Templates/MainDataCompositionSchema/Template.dcs b/IRP/src/Reports/TrialBalance/Templates/MainDataCompositionSchema/Template.dcs
new file mode 100644
index 0000000000..d4258b5a60
--- /dev/null
+++ b/IRP/src/Reports/TrialBalance/Templates/MainDataCompositionSchema/Template.dcs
@@ -0,0 +1,1965 @@
+
+
+
+ DataSource1
+ Local
+
+
+ DataSet1
+
+ Account
+ Account
+
+
+ en
+ Account
+
+
+ ru
+ Счет
+
+
+ tr
+ Hesap
+
+
+
+ true
+
+
+ Account.Order
+ Asc
+ false
+
+
+
+ Company
+ Company
+
+
+ en
+ Company
+
+
+ ru
+ Организация
+
+
+ tr
+ Şirket
+
+
+
+ true
+
+
+
+ ChoiceParameters
+
+
+ Filter.OurCompany
+ true
+
+
+
+
+
+
+ Currency
+ Currency
+
+
+ en
+ Currency
+
+
+ ru
+ Валюта
+
+
+ tr
+ Döviz
+
+
+
+ true
+
+
+
+ ExtDimension1
+ ExtDimension1
+
+
+ en
+ Ext dim.1
+
+
+ ru
+ Субконто 1
+
+
+ tr
+ Ext dim.1
+
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension1) Then "<...>" Else ExtDimension1 End)
+
+
+ ExtDimension2
+ ExtDimension2
+
+
+ en
+ Ext dim.2
+
+
+ ru
+ Субконто 2
+
+
+ tr
+ Ext dim.2
+
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension2) Then "<...>" Else ExtDimension2 End)
+
+
+ ExtDimension3
+ ExtDimension3
+
+
+ en
+ Ext dim.3
+
+
+ ru
+ Субконто 3
+
+
+ tr
+ Ext dim.3
+
+
+
+ true
+ true
+ true
+ true
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension3) Then "<...>" Else ExtDimension3 End)
+
+
+ Recorder
+ Recorder
+
+
+ en
+ Recorder
+
+
+ ru
+ Документ
+
+
+ tr
+ İşlem evrakı
+
+
+
+ true
+ true
+ true
+ true
+
+
+ 1
+ Main
+ true
+
+
+
+ SecondPeriod
+ SecondPeriod
+
+ 2
+ Main
+
+
+
+ LedgerType
+ LedgerType
+
+ true
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+ AmountOpeningBalanceDr
+
+
+ en
+ Amount Dr (opening balance)
+
+
+ ru
+ Сумма Дт (Начальный остаток)
+
+
+ tr
+ Amount Dr (opening balance)
+
+
+
+ true
+ AmountDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+ AmountOpeningBalanceCr
+
+
+ en
+ Amount Cr (opening balance)
+
+
+ ru
+ Сумма Кт (Начальный остаток)
+
+
+ tr
+ Amount Cr (opening balance)
+
+
+
+ true
+ AmountCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.AmountClosingBalanceDr
+ AmountClosingBalanceDr
+
+
+ en
+ Amount Dr (closing balance
+
+
+ ru
+ Сумма Дт (Конечный остаток)
+
+
+ tr
+ Amount Dr (closing balance
+
+
+
+ true
+ AmountDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.AmountClosingBalanceCr
+ AmountClosingBalanceCr
+
+
+ en
+ Amount Cr (closing balance)
+
+
+ ru
+ Сумма Кт (Конечный остаток)
+
+
+ tr
+ Amount Cr (closing balance)
+
+
+
+ true
+ AmountCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+ CurrencyAmountOpeningBalanceDr
+
+
+ en
+ Currency amt. Dr (opening balance)
+
+
+ ru
+ Валютнаы сумма Дт (Начальный остаток)
+
+
+ tr
+ Currency amt. Dr (opening balance)
+
+
+
+ true
+ CurrencyAmountDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+ CurrencyAmountOpeningBalanceCr
+
+
+ en
+ Currency amt. Cr (opening balance)
+
+
+ ru
+ Валютнаы сумма Кт (Начальный остаток)
+
+
+ tr
+ Currency amt. Cr (opening balance)
+
+
+
+ true
+ CurrencyAmountCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+ CurrencyAmountClosingBalanceDr
+
+
+ en
+ Currency amt. Dr (closing balance)
+
+
+ ru
+ Валютнаы сумма Дт (Конечный остаток)
+
+
+ tr
+ Currency amt. Dr (closing balance)
+
+
+
+ true
+ CurrencyAmountDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+ CurrencyAmountClosingBalanceCr
+
+
+ en
+ Currency amt. Cr (closing balance)
+
+
+ ru
+ Валютная сумма Кт (Конечный остаток)
+
+
+ tr
+ Currency amt. Cr (closing balance)
+
+
+
+ true
+ CurrencyAmountCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+ QuantityClosingBalanceDr
+
+
+ en
+ Quantity Dr (closing balance)
+
+
+ ru
+ Количество Дт (Конечный остаток)
+
+
+ tr
+ Quantity Dr (closing balance)
+
+
+
+ true
+ QuantityDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+ QuantityClosingBalanceCr
+
+
+ en
+ Quantity Cr (closing balance)
+
+
+ ru
+ Количество Кт (Начальный остаток)
+
+
+ tr
+ Quantity Cr (closing balance)
+
+
+
+ true
+ QuantityCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+ QuantityOpeningBalanceDr
+
+
+ en
+ Quantity Dr (opening balance)
+
+
+ ru
+ Количество Дт (Начальный остаток)
+
+
+ tr
+ Quantity Dr (opening balance)
+
+
+
+ true
+ QuantityDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+ QuantityOpeningBalanceCr
+
+
+ en
+ Quantity Cr (opening balance)
+
+
+ ru
+ Количество Кт (Начальный остаток)
+
+
+ tr
+ Quantity Cr (opening balance)
+
+
+
+ true
+ QuantityCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.AmountTurnoverCr
+ AmountTurnoverCr
+
+
+ en
+ Amount Cr (turnover)
+
+
+ ru
+ Сумма Кт (Оборот)
+
+
+ tr
+ Amount Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.AmountTurnoverDr
+ AmountTurnoverDr
+
+
+ en
+ Amount Dr (turnover)
+
+
+ ru
+ Сумма Дт (Оборот)
+
+
+ tr
+ Amount Dr (turnover)
+
+
+
+
+ MarkNegatives
+ true
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+
+
+ OpeningBalance
+
+
+ en
+ Opening balance
+
+
+ ru
+ Начальный остаток
+
+
+ tr
+ Açılış tutarı
+
+
+
+
+ ClosingBalance
+
+
+ en
+ Closing balance
+
+
+ ru
+ Конечный остаток
+
+
+ tr
+ Kapanış bakiyesi
+
+
+
+
+ Turnovers
+
+
+ en
+ Turnovers
+
+
+ ru
+ Обороты
+
+
+ tr
+ Turnovers
+
+
+
+
+ Turnovers.QuantityTurnoverDr
+ QuantityTurnoverDr
+
+
+ en
+ Quantity Dr (turnover)
+
+
+ ru
+ Количество Дт (Оборот)
+
+
+ tr
+ Quantity Dr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.QuantityTurnoverCr
+ QuantityTurnoverCr
+
+
+ en
+ Quantity Cr (turnover)
+
+
+ ru
+ Количество Кт (Оборот)
+
+
+ tr
+ Quantity Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+ CurrencyAmountTurnoverDr
+
+
+ en
+ Currency amt. Dr (turnover)
+
+
+ ru
+ Валютнаы сумма Дт (Оборот)
+
+
+ tr
+ Currency amt. Dr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+ CurrencyAmountTurnoverCr
+
+
+ en
+ Currency amt. Cr (turnover)
+
+
+ ru
+ Валютнаы сумма Кт (Оборот)
+
+
+ tr
+ Currency amt. Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Indicators
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+ DataSource1
+ SELECT ALLOWED
+ CASE
+ WHEN BalanceAndTurnovers.Recorder = UNDEFINED
+ THEN NULL
+ ELSE BalanceAndTurnovers.Recorder
+ END AS Recorder,
+ BalanceAndTurnovers.SecondPeriod AS SecondPeriod,
+ BalanceAndTurnovers.Account AS Account,
+ BalanceAndTurnovers.ExtDimension1 AS ExtDimension1,
+ BalanceAndTurnovers.ExtDimension2 AS ExtDimension2,
+ BalanceAndTurnovers.ExtDimension3 AS ExtDimension3,
+ BalanceAndTurnovers.Company AS Company,
+ BalanceAndTurnovers.LedgerType AS LedgerType,
+ BalanceAndTurnovers.Currency AS Currency,
+ // Amount
+ BalanceAndTurnovers.AmountOpeningBalanceDr,
+ BalanceAndTurnovers.AmountOpeningBalanceCr,
+ BalanceAndTurnovers.AmountClosingBalanceDr,
+ BalanceAndTurnovers.AmountClosingBalanceCr,
+ BalanceAndTurnovers.AmountTurnoverDr,
+ BalanceAndTurnovers.AmountTurnoverCr,
+ // Currency amount
+ BalanceAndTurnovers.CurrencyAmountOpeningBalanceDr,
+ BalanceAndTurnovers.CurrencyAmountOpeningBalanceCr,
+ BalanceAndTurnovers.CurrencyAmountClosingBalanceDr,
+ BalanceAndTurnovers.CurrencyAmountClosingBalanceCr,
+ BalanceAndTurnovers.CurrencyAmountTurnoverDr,
+ BalanceAndTurnovers.CurrencyAmountTurnoverCr,
+ // Quantity
+ BalanceAndTurnovers.QuantityClosingBalanceDr,
+ BalanceAndTurnovers.QuantityClosingBalanceCr,
+ BalanceAndTurnovers.QuantityOpeningBalanceDr,
+ BalanceAndTurnovers.QuantityOpeningBalanceCr,
+ BalanceAndTurnovers.QuantityTurnoverDr,
+ BalanceAndTurnovers.QuantityTurnoverCr
+FROM
+ AccountingRegister.Basic.BalanceAndTurnovers({(&BeginOfPeriod)}, {(&EndOfPeriod)}, Auto,
+ RegisterRecordsAndPeriodBoundaries, {(Account).* AS Account},,
+ NOT LedgerType.DeletionMark
+ {(LedgerType).* AS LedgerType, (Company).* AS Company, (Currency).* AS Currency, (ExtDimension1).* AS ExtDimension1,
+ (ExtDimension2).* AS ExtDimension2, (ExtDimension3).* AS ExtDimension3}) AS BalanceAndTurnovers
+
+
+ Indicators.IndicatorAmount
+ "Amt."
+
+
+ en
+ IndicatorAmt
+
+
+ ru
+ ИдентификаторСум
+
+
+ tr
+ IndicatorAmt
+
+
+
+
+ Indicators.IndicatorCurrencyAmount
+ "Curr."
+
+
+ en
+ IndicatorCurr
+
+
+ ru
+ ИдентификаторВал
+
+
+ tr
+ IndicatorCurr
+
+
+
+
+ Indicators.IndicatorQuantity
+ "Qty."
+
+
+ en
+ IndicatorQty
+
+
+ ru
+ ИдентификаторКолво
+
+
+ tr
+ IndicatorQty
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+ Sum(OpeningBalance.AmountOpeningBalanceDr)
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+ Sum(OpeningBalance.AmountOpeningBalanceCr)
+
+
+ Turnovers.AmountTurnoverDr
+ Sum(Turnovers.AmountTurnoverDr)
+
+
+ Turnovers.AmountTurnoverCr
+ Sum(Turnovers.AmountTurnoverCr)
+
+
+ ClosingBalance.AmountClosingBalanceDr
+ Sum(ClosingBalance.AmountClosingBalanceDr)
+
+
+ ClosingBalance.AmountClosingBalanceCr
+ Sum(ClosingBalance.AmountClosingBalanceCr)
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+ Sum(OpeningBalance.QuantityOpeningBalanceCr)
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+ Sum(OpeningBalance.QuantityOpeningBalanceDr)
+
+
+ Turnovers.QuantityTurnoverCr
+ Sum(Turnovers.QuantityTurnoverCr)
+
+
+ Turnovers.QuantityTurnoverDr
+ Sum(Turnovers.QuantityTurnoverDr)
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+ Sum(ClosingBalance.QuantityClosingBalanceCr)
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+ Sum(ClosingBalance.QuantityClosingBalanceDr)
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+ Sum(OpeningBalance.CurrencyAmountOpeningBalanceCr)
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+ Sum(OpeningBalance.CurrencyAmountOpeningBalanceDr)
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+ Sum(Turnovers.CurrencyAmountTurnoverCr)
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+ Sum(Turnovers.CurrencyAmountTurnoverDr)
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+ Sum(ClosingBalance.CurrencyAmountClosingBalanceCr)
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+ Sum(ClosingBalance.CurrencyAmountClosingBalanceDr)
+
+
+ Indicators.IndicatorAmount
+ Max(Indicators.IndicatorAmount)
+ ExtDimension1
+ ExtDimension2
+ ExtDimension3
+ Overall
+
+
+ Indicators.IndicatorCurrencyAmount
+ Max(Indicators.IndicatorCurrencyAmount)
+ ExtDimension1
+ ExtDimension2
+ ExtDimension3
+ Overall
+
+
+ Indicators.IndicatorQuantity
+ Max(Indicators.IndicatorQuantity)
+ ExtDimension1
+ ExtDimension2
+ ExtDimension3
+ Overall
+
+
+ Period
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+ v8:StandardPeriod
+
+
+ false
+
+
+ BeginOfPeriod
+
+
+ en
+ Begin of period
+
+
+ ru
+ Начало периода
+
+
+ tr
+ Dönem başı
+
+
+
+ xs:dateTime
+
+ Date
+
+
+
+ true
+ &Period.StartDate
+ false
+
+
+ EndOfPeriod
+
+
+ en
+ End of period
+
+
+ ru
+ Конец периода
+
+
+ tr
+ Dönem sonu
+
+
+
+ xs:dateTime
+
+ Date
+
+
+
+ true
+ &Period.EndDate
+ false
+
+
+ Template3
+
+
+
+
+
+
+ en
+ Amt.
+
+
+ ru
+ Сум.
+
+
+ tr
+ Amt.
+
+
+
+
+
+
+
+
+ Template4
+
+
+
+
+
+
+ en
+ Qty.
+
+
+ ru
+ Колво
+
+
+ tr
+ Qty.
+
+
+
+
+
+
+
+
+ Template5
+
+
+
+
+
+
+ en
+ PC
+
+
+ ru
+ Ед
+
+
+ tr
+ PC
+
+
+
+
+
+
+
+
+ Template8
+
+
+
+
+
+
+ en
+ Opening balance Dr
+
+
+ ru
+ Начальный остаток Дт
+
+
+ tr
+ Opening balance Dr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template9
+
+
+
+
+
+
+ en
+ Dr turnovers
+
+
+ ru
+ Дт Обороты
+
+
+ tr
+ Dr turnovers
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template10
+
+
+
+
+
+
+ en
+ Cr turnovers
+
+
+ ru
+ Кт Обороты
+
+
+ tr
+ Cr turnovers
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template11
+
+
+
+
+
+
+ en
+ Closing balance Dr
+
+
+ ru
+ Конечный остаток Дт
+
+
+ tr
+ Closing balance Dr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template12
+
+
+
+
+
+
+ en
+ Closing balance Cr
+
+
+ ru
+ Конечный остаток Кт
+
+
+ tr
+ Closing balance Cr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template13
+
+
+
+
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template14
+
+
+
+
+ BalancedAccount
+
+
+
+
+
+ BalancedAccount
+ Presentation(BalancedAccount)
+
+
+
+ Template15
+
+
+
+ Template16
+
+
+
+
+
+
+ en
+ Opening balance Cr
+
+
+ ru
+ Начальный остаток Кт
+
+
+ tr
+ Opening balance Cr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template17
+
+
+
+
+ BalancedAccount
+
+
+
+
+
+ BalancedAccount
+ Presentation(BalancedAccount)
+
+
+
+ Template18
+
+
+
+
+
+
+ en
+ Qty
+
+
+ ru
+ Колв
+
+
+ tr
+ Qty
+
+
+
+
+
+
+
+
+ Template1
+
+
+
+ Template1
+
+
+
+ Макет1
+
+
+
+
+
+
+ en
+ Amt.
+
+
+ ru
+ Сум.
+
+
+ tr
+ Amt.
+
+
+
+
+
+
+
+
+ Макет1
+
+
+
+ Макет1
+
+
+
+ Макет2
+
+
+
+
+
+
+ en
+ Curr.
+
+
+ ru
+ Вал.
+
+
+ tr
+ Curr.
+
+
+
+
+
+
+
+
+ Макет3
+
+
+
+
+
+
+ en
+ Qty.
+
+
+ ru
+ Колво
+
+
+ tr
+ Qty.
+
+
+
+
+
+
+
+
+ Макет3
+
+
+
+ Макет4
+
+
+
+
+
+
+
+ Макет4
+
+
+
+ TrialBalance
+
+
+ en
+ Trial balance
+
+
+ ru
+ Оборотно сальдовая ведомость
+
+
+ tr
+ Trial balance
+
+
+
+
+
+ OpeningBalance
+
+ Debit
+
+ OpeningBalance.AmountOpeningBalanceDr
+
+
+ Vertically
+
+
+ Credit
+
+ OpeningBalance.AmountOpeningBalanceCr
+
+
+ Vertically
+
+ Horizontally
+
+
+ Turnovers
+
+ Debit
+
+ Turnovers.AmountTurnoverDr
+
+
+ Vertically
+
+
+ Credit
+
+ Turnovers.AmountTurnoverCr
+
+
+ Vertically
+
+ Horizontally
+
+
+ ClosingBalance
+
+ Debit
+
+ ClosingBalance.AmountClosingBalanceDr
+
+
+ Vertically
+
+
+ Credit
+
+ ClosingBalance.AmountClosingBalanceCr
+
+
+ Vertically
+
+ Horizontally
+
+
+
+
+ LedgerType
+ Equal
+ c7ca5587-f03b-4884-98e4-6f8c1a71ef73
+
+
+ Company
+ Equal
+ 4397b60c-1023-4ede-8bf5-e8a7a40c102c
+
+
+
+
+ false
+ Period
+
+ eeaa5d18-5f96-486f-bd0c-6809263c9b58
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+
+
+
+ AppearanceTemplate
+ Sea
+
+
+ false
+ GroupFieldsPlacement
+
+
+
+ AttributePlacement
+
+
+
+
+
+
+ Account
+ Hierarchy
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+ Account.Description_en
+ Items
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/TrialBalance/TrialBalance.mdo b/IRP/src/Reports/TrialBalance/TrialBalance.mdo
new file mode 100644
index 0000000000..ae73e1d232
--- /dev/null
+++ b/IRP/src/Reports/TrialBalance/TrialBalance.mdo
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ TrialBalance
+
+ en
+ Trial balance
+
+
+ ru
+ Оборотно сальдовая ведомость
+
+
+ tr
+ Trial balance
+
+ true
+ Report.TrialBalance.Template.MainDataCompositionSchema
+
+ MainDataCompositionSchema
+
+ en
+ Main data composition schema
+
+
+ ru
+ Основная схема компоновки
+
+
+ tr
+ Ana veri inşa edilme şeması
+
+ DataCompositionSchema
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/TrialBalanceByAccount/ManagerModule.bsl b/IRP/src/Reports/TrialBalanceByAccount/ManagerModule.bsl
new file mode 100644
index 0000000000..cbe5192db3
--- /dev/null
+++ b/IRP/src/Reports/TrialBalanceByAccount/ManagerModule.bsl
@@ -0,0 +1,97 @@
+
+Function GetDetailsDataPaths() Export
+ Return "Account, ExtDimension1, ExtDimension2, ExtDimension3";
+EndFunction
+
+Function GetAdditionalDetailsActions(DetailValuesMap) Export
+ Result = New Structure();
+ Result.Insert("MenuList", New ValueList());
+ Result.Insert("OtherReportMapping", New Map());
+
+ Account = DetailValuesMap["Account"];
+ If Not ValueIsFilled(Account) Then
+ Return Result;
+ EndIf;
+
+ Result.MenuList.Add(1, StrTemplate("%1: %2 = %3", Metadata.Reports.AccountAnalysis.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.Report);
+
+ Result.MenuList.Add(2, StrTemplate("%1: %2 = %3", Metadata.Reports.AccountCard.Synonym,
+ String(TypeOf(Account)), Account),, PictureLib.DebitCredit);
+
+ Result.OtherReportMapping.Insert(1, "Report.AccountAnalysis.ObjectForm");
+ Result.OtherReportMapping.Insert(2, "Report.AccountCard.ObjectForm");
+
+ Return Result;
+EndFunction
+
+Function GetApplyingFilters(SelectedAction, DetailValuesMap) Export
+ If SelectedAction = 1 Then
+ Return Details_AccountAnalisys(DetailValuesMap);
+ Else
+ Return Details_AccountCard(DetailValuesMap);
+ EndIf;
+EndFunction
+
+Function Details_AccountAnalisys(DetailValuesMap)
+ Result = New Structure();
+ Result.Insert("DataParameters", New Map());
+ Result.Insert("UserFilters", New Map());
+ Result.Insert("DetailsFilters", New Map());
+
+ Result.DataParameters.Insert("Period", "Period");
+
+ Result.UserFilters.Insert("Company", "Company");
+ Result.UserFilters.Insert("LedgerType", "LedgerType");
+
+ Result.DetailsFilters.Insert(DetailValuesMap["Account"],
+ New Structure("FieldName, ComparisonType", "Account", DataCompositionComparisonType.InHierarchy));
+
+ Return Result;
+EndFunction
+
+
+Function Details_AccountCard(DetailValuesMap)
+ Result = New Structure();
+ Result.Insert("DataParameters", New Map());
+ Result.Insert("UserFilters", New Map());
+ Result.Insert("DetailsFilters", New Map());
+ Result.Insert("DetailsFiltersGroupOR", New Array());
+
+ // Parameter [Period] from this report to parameter [Period] other report (trial balance by account)
+ Result.DataParameters.Insert("Period", "Period");
+
+ // Copying filter [Company] from this repot to other report
+ Result.UserFilters.Insert("Company", "Company");
+ Result.UserFilters.Insert("LedgerType", "LedgerType");
+
+ // New filter to other report Key=Value, FiledName= fild name in other report
+ Result.DetailsFilters.Insert(DetailValuesMap["Account"],
+ New Structure("FieldName, ComparisonType", "Account", DataCompositionComparisonType.InHierarchy));
+
+
+ FilterByExtDimension(1, DetailValuesMap, Result.DetailsFiltersGroupOR);
+ FilterByExtDimension(2, DetailValuesMap, Result.DetailsFiltersGroupOR);
+ FilterByExtDimension(3, DetailValuesMap, Result.DetailsFiltersGroupOR);
+
+ Return Result;
+EndFunction
+
+Procedure FilterByExtDimension(Number, DetailValuesMap, DetailsFiltersGroupOR)
+ ArrayOfFilters_ExtDimension = New Array();
+ If ValueIsFilled(DetailValuesMap["ExtDimension"+Number]) Then
+ Filter_ExtDimensionDr = New Map();
+ Filter_ExtDimensionDr.Insert(DetailValuesMap["ExtDimension"+Number],
+ New Structure("FieldName, ComparisonType", "ExtDimensionDr"+Number, DataCompositionComparisonType.Equal));
+ ArrayOfFilters_ExtDimension.Add(Filter_ExtDimensionDr);
+
+ Filter_ExtDimensionCr = New Map();
+ Filter_ExtDimensionCr.Insert(DetailValuesMap["ExtDimension"+Number],
+ New Structure("FieldName, ComparisonType", "ExtDimensionCr"+Number, DataCompositionComparisonType.Equal));
+ ArrayOfFilters_ExtDimension.Add(Filter_ExtDimensionCr);
+ EndIf;
+ If ArrayOfFilters_ExtDimension.Count() Then
+ DetailsFiltersGroupOR.Add(ArrayOfFilters_ExtDimension);
+ EndIf;
+EndProcedure
+
diff --git a/IRP/src/Reports/TrialBalanceByAccount/Templates/MainDataCompositionSchema/Template.dcs b/IRP/src/Reports/TrialBalanceByAccount/Templates/MainDataCompositionSchema/Template.dcs
new file mode 100644
index 0000000000..6f80a1d1a6
--- /dev/null
+++ b/IRP/src/Reports/TrialBalanceByAccount/Templates/MainDataCompositionSchema/Template.dcs
@@ -0,0 +1,2192 @@
+
+
+
+ DataSource1
+ Local
+
+
+ DataSet1
+
+ Account
+ Account
+
+
+ en
+ Account
+
+
+ ru
+ Счет
+
+
+ tr
+ Hesap
+
+
+
+ true
+
+
+ Account.Order
+ Asc
+ false
+
+
+
+ Company
+ Company
+
+
+ en
+ Company
+
+
+ ru
+ Организация
+
+
+ tr
+ Şirket
+
+
+
+ true
+
+
+
+ ChoiceParameters
+
+
+ Filter.OurCompany
+ true
+
+
+
+
+
+
+ Currency
+ Currency
+
+
+ en
+ Currency
+
+
+ ru
+ Валюта
+
+
+ tr
+ Döviz
+
+
+
+ true
+
+
+
+ ExtDimension1
+ ExtDimension1
+
+
+ en
+ Ext dim.1
+
+
+ ru
+ Субконто 1
+
+
+ tr
+ Ext dim.1
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension1) Then "<...>" Else ExtDimension1 End)
+
+
+ ExtDimension2
+ ExtDimension2
+
+
+ en
+ Ext dim.2
+
+
+ ru
+ Субконто 2
+
+
+ tr
+ Ext dim.2
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension2) Then "<...>" Else ExtDimension2 End)
+
+
+ ExtDimension3
+ ExtDimension3
+
+
+ en
+ Ext dim.3
+
+
+ ru
+ Субконто 3
+
+
+ tr
+ Ext dim.3
+
+
+
+ true
+
+ Presentation(Case When Not ValueIsFilled(ExtDimension3) Then "<...>" Else ExtDimension3 End)
+
+
+ Recorder
+ Recorder
+
+
+ en
+ Recorder
+
+
+ ru
+ Документ
+
+
+ tr
+ İşlem evrakı
+
+
+
+ 1
+ Main
+ true
+
+
+
+ SecondPeriod
+ SecondPeriod
+
+ 2
+ Main
+
+
+
+ LedgerType
+ LedgerType
+
+ true
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+ AmountOpeningBalanceDr
+
+
+ en
+ Amount Dr (opening balance)
+
+
+ ru
+ Сумма Дт (Начальный остаток)
+
+
+ tr
+ Amount Dr (opening balance)
+
+
+
+ true
+ AmountDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+ AmountOpeningBalanceCr
+
+
+ en
+ Amount Cr (opening balance)
+
+
+ ru
+ Сумма Кт (Начальный остаток)
+
+
+ tr
+ Amount Cr (opening balance)
+
+
+
+ true
+ AmountCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.AmountClosingBalanceDr
+ AmountClosingBalanceDr
+
+
+ en
+ Amount Dr (closing balance
+
+
+ ru
+ Сумма Дт (Конечный остаток)
+
+
+ tr
+ Amount Dr (closing balance
+
+
+
+ true
+ AmountDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.AmountClosingBalanceCr
+ AmountClosingBalanceCr
+
+
+ en
+ Amount Cr (closing balance)
+
+
+ ru
+ Сумма Кт (Конечный остаток)
+
+
+ tr
+ Amount Cr (closing balance)
+
+
+
+ true
+ AmountCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+ CurrencyAmountOpeningBalanceDr
+
+
+ en
+ Currency amt. Dr (opening balance)
+
+
+ ru
+ Валютнаы сумма Дт (Начальный остаток)
+
+
+ tr
+ Currency amt. Dr (opening balance)
+
+
+
+ true
+ CurrencyAmountDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+ CurrencyAmountOpeningBalanceCr
+
+
+ en
+ Currency amt. Cr (opening balance)
+
+
+ ru
+ Валютнаы сумма Кт (Начальный остаток)
+
+
+ tr
+ Currency amt. Cr (opening balance)
+
+
+
+ true
+ CurrencyAmountCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+ CurrencyAmountClosingBalanceDr
+
+
+ en
+ Currency amt. Dr (closing balance)
+
+
+ ru
+ Валютнаы сумма Дт (Конечный остаток)
+
+
+ tr
+ Currency amt. Dr (closing balance)
+
+
+
+ true
+ CurrencyAmountDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+ CurrencyAmountClosingBalanceCr
+
+
+ en
+ Currency amt. Cr (closing balance)
+
+
+ ru
+ Валютная сумма Кт (Конечный остаток)
+
+
+ tr
+ Currency amt. Cr (closing balance)
+
+
+
+ true
+ CurrencyAmountCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+ QuantityClosingBalanceDr
+
+
+ en
+ Quantity Dr (closing balance)
+
+
+ ru
+ Количество Дт (Конечный остаток)
+
+
+ tr
+ Quantity Dr (closing balance)
+
+
+
+ true
+ QuantityDr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+ QuantityClosingBalanceCr
+
+
+ en
+ Quantity Cr (closing balance)
+
+
+ ru
+ Количество Кт (Начальный остаток)
+
+
+ tr
+ Quantity Cr (closing balance)
+
+
+
+ true
+ QuantityCr
+ ClosingBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+ QuantityOpeningBalanceDr
+
+
+ en
+ Quantity Dr (opening balance)
+
+
+ ru
+ Количество Дт (Начальный остаток)
+
+
+ tr
+ Quantity Dr (opening balance)
+
+
+
+ true
+ QuantityDr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+ QuantityOpeningBalanceCr
+
+
+ en
+ Quantity Cr (opening balance)
+
+
+ ru
+ Количество Кт (Начальный остаток)
+
+
+ tr
+ Quantity Cr (opening balance)
+
+
+
+ true
+ QuantityCr
+ OpeningBalance
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.AmountTurnoverCr
+ AmountTurnoverCr
+
+
+ en
+ Amount Cr (turnover)
+
+
+ ru
+ Сумма Кт (Оборот)
+
+
+ tr
+ Amount Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.AmountTurnoverDr
+ AmountTurnoverDr
+
+
+ en
+ Amount Dr (turnover)
+
+
+ ru
+ Сумма Дт (Оборот)
+
+
+ tr
+ Amount Dr (turnover)
+
+
+
+
+ MarkNegatives
+ true
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+
+
+ OpeningBalance
+
+
+ en
+ Opening balance
+
+
+ ru
+ Начальный остаток
+
+
+ tr
+ Açılış tutarı
+
+
+
+
+ ClosingBalance
+
+
+ en
+ Closing balance
+
+
+ ru
+ Конечный остаток
+
+
+ tr
+ Kapanış bakiyesi
+
+
+
+
+ Turnovers
+
+
+ en
+ Turnovers
+
+
+ ru
+ Обороты
+
+
+ tr
+ Turnovers
+
+
+
+
+ Turnovers.QuantityTurnoverDr
+ QuantityTurnoverDr
+
+
+ en
+ Quantity Dr (turnover)
+
+
+ ru
+ Количество Дт (Оборот)
+
+
+ tr
+ Quantity Dr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.QuantityTurnoverCr
+ QuantityTurnoverCr
+
+
+ en
+ Quantity Cr (turnover)
+
+
+ ru
+ Количество Кт (Оборот)
+
+
+ tr
+ Quantity Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=3
+
+
+ ru
+ NFD=3
+
+
+ tr
+ NFD=3
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+ CurrencyAmountTurnoverDr
+
+
+ en
+ Currency amt. Dr (turnover)
+
+
+ ru
+ Валютнаы сумма Дт (Оборот)
+
+
+ tr
+ Currency amt. Dr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+ CurrencyAmountTurnoverCr
+
+
+ en
+ Currency amt. Cr (turnover)
+
+
+ ru
+ Валютнаы сумма Кт (Оборот)
+
+
+ tr
+ Currency amt. Cr (turnover)
+
+
+
+
+ Format
+
+
+ en
+ NFD=2
+
+
+ ru
+ NFD=2
+
+
+ tr
+ NFD=2
+
+
+
+
+ MarkNegatives
+ true
+
+
+
+
+ Indicators
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+ DataSource1
+ SELECT ALLOWED
+ CASE
+ WHEN BalanceAndTurnovers.Recorder = UNDEFINED
+ THEN NULL
+ ELSE BalanceAndTurnovers.Recorder
+ END AS Recorder,
+ BalanceAndTurnovers.SecondPeriod AS SecondPeriod,
+ BalanceAndTurnovers.Account AS Account,
+ BalanceAndTurnovers.ExtDimension1 AS ExtDimension1,
+ BalanceAndTurnovers.ExtDimension2 AS ExtDimension2,
+ BalanceAndTurnovers.ExtDimension3 AS ExtDimension3,
+ BalanceAndTurnovers.Company AS Company,
+ BalanceAndTurnovers.LedgerType AS LedgerType,
+ BalanceAndTurnovers.Currency AS Currency,
+ // Amount
+ BalanceAndTurnovers.AmountOpeningBalanceDr,
+ BalanceAndTurnovers.AmountOpeningBalanceCr,
+ BalanceAndTurnovers.AmountClosingBalanceDr,
+ BalanceAndTurnovers.AmountClosingBalanceCr,
+ BalanceAndTurnovers.AmountTurnoverDr,
+ BalanceAndTurnovers.AmountTurnoverCr,
+ // Currency amount
+ BalanceAndTurnovers.CurrencyAmountOpeningBalanceDr,
+ BalanceAndTurnovers.CurrencyAmountOpeningBalanceCr,
+ BalanceAndTurnovers.CurrencyAmountClosingBalanceDr,
+ BalanceAndTurnovers.CurrencyAmountClosingBalanceCr,
+ BalanceAndTurnovers.CurrencyAmountTurnoverDr,
+ BalanceAndTurnovers.CurrencyAmountTurnoverCr,
+ // Quantity
+ BalanceAndTurnovers.QuantityClosingBalanceDr,
+ BalanceAndTurnovers.QuantityClosingBalanceCr,
+ BalanceAndTurnovers.QuantityOpeningBalanceDr,
+ BalanceAndTurnovers.QuantityOpeningBalanceCr,
+ BalanceAndTurnovers.QuantityTurnoverDr,
+ BalanceAndTurnovers.QuantityTurnoverCr
+FROM
+ AccountingRegister.Basic.BalanceAndTurnovers({(&BeginOfPeriod)}, {(&EndOfPeriod)}, Auto,
+ RegisterRecordsAndPeriodBoundaries, {(Account).* AS Account},,
+ NOT LedgerType.DeletionMark
+ {(LedgerType).* AS LedgerType, (Company).* AS Company, (Currency).* AS Currency, (ExtDimension1).* AS ExtDimension1,
+ (ExtDimension2).* AS ExtDimension2, (ExtDimension3).* AS ExtDimension3}) AS BalanceAndTurnovers
+
+
+ Indicators.IndicatorAmount
+ "Amt."
+
+
+ en
+ IndicatorAmt
+
+
+ ru
+ ИдентификаторСум
+
+
+ tr
+ IndicatorAmt
+
+
+
+
+ Indicators.IndicatorCurrencyAmount
+ "Curr."
+
+
+ en
+ IndicatorCurr
+
+
+ ru
+ ИдентификаторВал
+
+
+ tr
+ IndicatorCurr
+
+
+
+
+ Indicators.IndicatorQuantity
+ "Qty."
+
+
+ en
+ IndicatorQty
+
+
+ ru
+ ИдентификаторКолво
+
+
+ tr
+ IndicatorQty
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+ Sum(OpeningBalance.AmountOpeningBalanceDr)
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+ Sum(OpeningBalance.AmountOpeningBalanceCr)
+
+
+ Turnovers.AmountTurnoverDr
+ Sum(Turnovers.AmountTurnoverDr)
+
+
+ Turnovers.AmountTurnoverCr
+ Sum(Turnovers.AmountTurnoverCr)
+
+
+ ClosingBalance.AmountClosingBalanceDr
+ Sum(ClosingBalance.AmountClosingBalanceDr)
+
+
+ ClosingBalance.AmountClosingBalanceCr
+ Sum(ClosingBalance.AmountClosingBalanceCr)
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+ Sum(OpeningBalance.QuantityOpeningBalanceCr)
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+ Sum(OpeningBalance.QuantityOpeningBalanceDr)
+
+
+ Turnovers.QuantityTurnoverCr
+ Sum(Turnovers.QuantityTurnoverCr)
+
+
+ Turnovers.QuantityTurnoverDr
+ Sum(Turnovers.QuantityTurnoverDr)
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+ Sum(ClosingBalance.QuantityClosingBalanceCr)
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+ Sum(ClosingBalance.QuantityClosingBalanceDr)
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+ Sum(OpeningBalance.CurrencyAmountOpeningBalanceCr)
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+ Sum(OpeningBalance.CurrencyAmountOpeningBalanceDr)
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+ Sum(Turnovers.CurrencyAmountTurnoverCr)
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+ Sum(Turnovers.CurrencyAmountTurnoverDr)
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+ Sum(ClosingBalance.CurrencyAmountClosingBalanceCr)
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+ Sum(ClosingBalance.CurrencyAmountClosingBalanceDr)
+
+
+ Indicators.IndicatorAmount
+ Max(Indicators.IndicatorAmount)
+ ExtDimension1
+ ExtDimension2
+ ExtDimension3
+ Overall
+
+
+ Indicators.IndicatorCurrencyAmount
+ Max(Indicators.IndicatorCurrencyAmount)
+ ExtDimension1
+ ExtDimension2
+ ExtDimension3
+ Overall
+
+
+ Indicators.IndicatorQuantity
+ Max(Indicators.IndicatorQuantity)
+ ExtDimension1
+ ExtDimension2
+ ExtDimension3
+ Overall
+
+
+ Period
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+ v8:StandardPeriod
+
+
+ false
+
+
+ BeginOfPeriod
+
+
+ en
+ Begin of period
+
+
+ ru
+ Начало периода
+
+
+ tr
+ Dönem başı
+
+
+
+ xs:dateTime
+
+ Date
+
+
+
+ true
+ &Period.StartDate
+ false
+
+
+ EndOfPeriod
+
+
+ en
+ End of period
+
+
+ ru
+ Конец периода
+
+
+ tr
+ Dönem sonu
+
+
+
+ xs:dateTime
+
+ Date
+
+
+
+ true
+ &Period.EndDate
+ false
+
+
+ Template3
+
+
+
+
+
+
+ en
+ Amt.
+
+
+ ru
+ Сум.
+
+
+ tr
+ Amt.
+
+
+
+
+
+
+
+
+ Template4
+
+
+
+
+
+
+ en
+ Qty.
+
+
+ ru
+ Колво
+
+
+ tr
+ Qty.
+
+
+
+
+
+
+
+
+ Template5
+
+
+
+
+
+
+ en
+ PC
+
+
+ ru
+ Ед
+
+
+ tr
+ PC
+
+
+
+
+
+
+
+
+ Template8
+
+
+
+
+
+
+ en
+ Opening balance Dr
+
+
+ ru
+ Начальный остаток Дт
+
+
+ tr
+ Opening balance Dr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template9
+
+
+
+
+
+
+ en
+ Dr turnovers
+
+
+ ru
+ Дт Обороты
+
+
+ tr
+ Dr turnovers
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template10
+
+
+
+
+
+
+ en
+ Cr turnovers
+
+
+ ru
+ Кт Обороты
+
+
+ tr
+ Cr turnovers
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template11
+
+
+
+
+
+
+ en
+ Closing balance Dr
+
+
+ ru
+ Конечный остаток Дт
+
+
+ tr
+ Closing balance Dr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template12
+
+
+
+
+
+
+ en
+ Closing balance Cr
+
+
+ ru
+ Конечный остаток Кт
+
+
+ tr
+ Closing balance Cr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template13
+
+
+
+
+
+
+ en
+ Indicators
+
+
+ ru
+ Идентификаторы
+
+
+ tr
+ Indicators
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template14
+
+
+
+
+ BalancedAccount
+
+
+
+
+
+ BalancedAccount
+ Presentation(BalancedAccount)
+
+
+
+ Template15
+
+
+
+ Template16
+
+
+
+
+
+
+ en
+ Opening balance Cr
+
+
+ ru
+ Начальный остаток Кт
+
+
+ tr
+ Opening balance Cr
+
+
+
+
+
+ Placement
+ Wrap
+
+
+
+
+
+
+
+ Template17
+
+
+
+
+ BalancedAccount
+
+
+
+
+
+ BalancedAccount
+ Presentation(BalancedAccount)
+
+
+
+ Template18
+
+
+
+
+
+
+ en
+ Qty
+
+
+ ru
+ Колв
+
+
+ tr
+ Qty
+
+
+
+
+
+
+
+
+ Template1
+
+
+
+ Template1
+
+
+
+ Макет1
+
+
+
+
+
+
+ en
+ Amt.
+
+
+ ru
+ Сум.
+
+
+ tr
+ Amt.
+
+
+
+
+
+
+
+
+ Макет1
+
+
+
+ Макет1
+
+
+
+ Макет2
+
+
+
+
+
+
+ en
+ Curr.
+
+
+ ru
+ Вал.
+
+
+ tr
+ Curr.
+
+
+
+
+
+
+
+
+ Макет3
+
+
+
+
+
+
+ en
+ Qty.
+
+
+ ru
+ Колво
+
+
+ tr
+ Qty.
+
+
+
+
+
+
+
+
+ Макет3
+
+
+
+ Макет4
+
+
+
+
+
+
+
+ Макет4
+
+
+
+ TrialBalanceByAccount
+
+
+ en
+ Trial balance by account
+
+
+ ru
+ Оборотно сальдовая ведомость по счету
+
+
+ tr
+ Trial balance by account
+
+
+
+
+
+ Indicators
+
+
+ Indicators.IndicatorAmount
+
+
+
+ Indicators.IndicatorCurrencyAmount
+
+
+
+ Indicators.IndicatorQuantity
+
+
+ Vertically
+
+
+ OpeningBalance
+
+ Debit
+
+ OpeningBalance.AmountOpeningBalanceDr
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+
+
+ Vertically
+
+
+ Credit
+
+ OpeningBalance.AmountOpeningBalanceCr
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+
+
+ Vertically
+
+ Horizontally
+
+
+ Turnovers
+
+ Debit
+
+ Turnovers.AmountTurnoverDr
+
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+
+
+
+ Turnovers.QuantityTurnoverDr
+
+
+ Vertically
+
+
+ Credit
+
+ Turnovers.AmountTurnoverCr
+
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+
+
+
+ Turnovers.QuantityTurnoverCr
+
+
+ Vertically
+
+ Horizontally
+
+
+ ClosingBalance
+
+ Debit
+
+ ClosingBalance.AmountClosingBalanceDr
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+
+
+ Vertically
+
+
+ Credit
+
+ ClosingBalance.AmountClosingBalanceCr
+
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+
+
+ Vertically
+
+ Horizontally
+
+
+
+
+ LedgerType
+ Equal
+ e0802907-c28c-4c7f-b3ab-e60b7dadc7f0
+
+
+ Company
+ Equal
+ 4397b60c-1023-4ede-8bf5-e8a7a40c102c
+
+
+ Account
+ InHierarchy
+ ChartOfAccounts.Basic.EmptyRef
+ 7dc6dcc1-43a6-4353-8a2f-fde50945fb63
+
+
+
+
+ false
+ Period
+
+ eeaa5d18-5f96-486f-bd0c-6809263c9b58
+
+
+ en
+ Period
+
+
+ ru
+ Период
+
+
+ tr
+ Dönem
+
+
+
+
+
+
+
+
+ OpeningBalance.AmountOpeningBalanceDr
+
+
+ OpeningBalance.AmountOpeningBalanceCr
+
+
+ ClosingBalance.AmountClosingBalanceDr
+
+
+ ClosingBalance.AmountClosingBalanceCr
+
+
+ Turnovers.AmountTurnoverDr
+
+
+ Turnovers.AmountTurnoverCr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Bottom
+
+ None
+
+
+
+
+
+
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceDr
+
+
+ OpeningBalance.CurrencyAmountOpeningBalanceCr
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceDr
+
+
+ ClosingBalance.CurrencyAmountClosingBalanceCr
+
+
+ Turnovers.CurrencyAmountTurnoverDr
+
+
+ Turnovers.CurrencyAmountTurnoverCr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Top
+
+ None
+
+
+
+ BorderStyle.Bottom
+
+ None
+
+
+
+
+
+
+
+
+ OpeningBalance.QuantityOpeningBalanceDr
+
+
+ OpeningBalance.QuantityOpeningBalanceCr
+
+
+ ClosingBalance.QuantityClosingBalanceDr
+
+
+ ClosingBalance.QuantityClosingBalanceCr
+
+
+ Turnovers.QuantityTurnoverDr
+
+
+ Turnovers.QuantityTurnoverCr
+
+
+
+
+
+ false
+ BorderStyle
+
+ None
+
+
+ BorderStyle.Top
+
+ None
+
+
+
+
+
+
+
+
+ ExtDimension1
+
+
+ ExtDimension2
+
+
+ ExtDimension3
+
+
+
+
+
+ MaximumWidth
+ 20
+
+
+
+
+
+
+ AppearanceTemplate
+ Sea
+
+
+ false
+ GroupFieldsPlacement
+
+
+
+ AttributePlacement
+
+
+
+
+
+
+ Account
+ Hierarchy
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+ Account.Description_en
+ Items
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+
+
+
+
+
+ ExtDimension1
+ Items
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+ ExtDimension2
+ Items
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+ ExtDimension3
+ Items
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+ Currency
+ Items
+ None
+ 0001-01-01T00:00:00
+ 0001-01-01T00:00:00
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IRP/src/Reports/TrialBalanceByAccount/TrialBalanceByAccount.mdo b/IRP/src/Reports/TrialBalanceByAccount/TrialBalanceByAccount.mdo
new file mode 100644
index 0000000000..e764476177
--- /dev/null
+++ b/IRP/src/Reports/TrialBalanceByAccount/TrialBalanceByAccount.mdo
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ TrialBalanceByAccount
+
+ en
+ Trial balance (by account)
+
+
+ ru
+ Оборотно сальдовая ведомость (по счету)
+
+
+ tr
+ Trial balance (by account)
+
+ true
+ Report.TrialBalanceByAccount.Template.MainDataCompositionSchema
+
+ MainDataCompositionSchema
+
+ en
+ Main data composition schema
+
+
+ ru
+ Основная схема компоновки
+
+
+ tr
+ Ana veri inşa edilme şeması
+
+ DataCompositionSchema
+
+
\ No newline at end of file
diff --git a/IRP/src/Subsystems/Accounting/Accounting.mdo b/IRP/src/Subsystems/Accounting/Accounting.mdo
index 0bc535a83a..4c993cbff2 100644
--- a/IRP/src/Subsystems/Accounting/Accounting.mdo
+++ b/IRP/src/Subsystems/Accounting/Accounting.mdo
@@ -26,6 +26,10 @@
Catalog.AccountingOperations
AccountingRegister.Basic
CommonCommand.OpenAccountingRecords
+ Report.TrialBalance
+ Report.TrialBalanceByAccount
+ Report.AccountCard
+ Report.AccountAnalysis
Accounts
LedgerTypes
Other
diff --git a/features/External/TestDataBase.feature b/features/External/TestDataBase.feature
index bfa39de649..053fb022dd 100644
--- a/features/External/TestDataBase.feature
+++ b/features/External/TestDataBase.feature
@@ -179,20 +179,20 @@ Scenario: Create catalog CashAccounts objects (test data base)
Scenario: Create catalog Companies objects (test data base)
And I check or create for catalog "Companies" objects with Data Exchange Load parameter set to true:
- | 'Ref' | 'DeletionMark' | 'Code' | 'Country' | 'MainCompany' | 'Partner' | 'Type' | 'OurCompany' | 'LandedCostCurrencyMovementType' | 'LandedCostExpenseType' | 'LandedCostFillEmptyAmount' | 'LandedCostPriceTypeForEmptyAmount' | 'TradeAgentStore' | 'TaxID' | 'MainPhoneNumber' | 'SalaryAccrualVacation' | 'SalaryMaxDaysVacation' | 'SalaryAccrualSickLeave' | 'SalaryMaxDaysSickLeave' | 'SalaryBasicPayroll' | 'Description_en' | 'Description_hash' | 'Description_ru' | 'Description_tr' | 'LocalFullDescription' | 'ForeignFullDescription' | 'SourceNodeID' |
- | 'e1cib/data/Catalog.Companies?refName=Default' | 'False' | 1 | '' | '' | '' | '' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | '' | '' | '' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | 'False' | 2 | 'e1cib/data/Catalog.Countries?ref=b762b13668d0905011eb7663e35d7963' | '' | 'e1cib/data/Catalog.Partners?ref=b78ce657999bd69311ed70b441cf07f8' | 'Enum.CompanyLegalType.Company' | 'True' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Own company 1' | '' | 'Собственная компания 1' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb76684b9f685b' | 'False' | 3 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b78ce657999bd69311ed70b441cf07fc' | 'Enum.CompanyLegalType.Company' | 'True' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Own company 2' | '' | 'Собственная компания 2' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb766bf96b276f' | 'False' | 4 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794d' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Vendor 1' | '' | 'Поставщик 1' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb766bf96b2771' | 'False' | 5 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794e' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Vendor 2' | '' | 'Поставщик 2' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7674324a4a2a' | 'False' | 6 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794b' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Client 1' | '' | 'Клиент 1' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7674324a4a2c' | 'False' | 7 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794c' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Client 2' | '' | 'Клиент 2' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb767f10805e27' | 'False' | 8 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794f' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Client and vendor' | '' | 'Клиент и поставщик' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb767f10805e28' | 'False' | 9 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d7951' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Main partner' | '' | 'Главный партнер' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb767f10805e29' | 'False' | 10 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d7954' | 'Enum.CompanyLegalType.Individual' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Retail customer 1' | '' | 'Розничный покупатель' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b76cbacb2511e57d11ebeab0dfce2249' | 'False' | 11 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b76cbacb2511e57d11ebeab0dfce2248' | 'Enum.CompanyLegalType.Individual' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'Retail customer 2' | '' | 'Розничный клиент 1' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b7b2a899784f0a1411ee9829ad9789b6' | 'False' | 12 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b7b2a899784f0a1411ee9829ad9789b5' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '1111111111' | '32345678908' | '' | | '' | | '' | 'Consignor 1' | '' | '' | '' | '' | '' | '' |
- | 'e1cib/data/Catalog.Companies?ref=b7b2a899784f0a1411ee9829ad9789b8' | 'False' | 13 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b7b2a899784f0a1411ee9829ad9789b7' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '2222222222' | '32345678909' | '' | | '' | | '' | 'Consignor 2' | '' | '' | '' | '' | '' | '' |
+ | 'Ref' | 'DeletionMark' | 'Code' | 'Country' | 'MainCompany' | 'Partner' | 'Type' | 'OurCompany' | 'LandedCostCurrencyMovementType' | 'LandedCostExpenseType' | 'LandedCostFillEmptyAmount' | 'LandedCostPriceTypeForEmptyAmount' | 'TradeAgentStore' | 'TaxID' | 'MainPhoneNumber' | 'SalaryAccrualVacation' | 'SalaryMaxDaysVacation' | 'SalaryAccrualSickLeave' | 'SalaryMaxDaysSickLeave' | 'SalaryBasicPayroll' | 'Author' | 'Description_en' | 'Description_hash' | 'Description_ru' | 'Description_tr' | 'LocalFullDescription' | 'ForeignFullDescription' | 'SourceNodeID' | 'Editor' | 'CreateDate' | 'ModifyDate' |
+ | 'e1cib/data/Catalog.Companies?refName=Default' | 'False' | 1 | '' | '' | '' | '' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | '' | '' | '' | '' | '' | '' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | '05.01.2024 10:42:29' | '05.01.2024 10:42:29' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | 'False' | 2 | 'e1cib/data/Catalog.Countries?ref=b762b13668d0905011eb7663e35d7963' | '' | 'e1cib/data/Catalog.Partners?ref=b78ce657999bd69311ed70b441cf07f8' | 'Enum.CompanyLegalType.Company' | 'True' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | 'e1cib/data/Catalog.ExpenseAndRevenueTypes?ref=b762b13668d0905011eb76684b9f6860' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Own company 1' | '' | 'Собственная компания 1' | '' | '' | '' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | '05.01.2024 10:42:29' | '05.01.2024 13:33:30' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb76684b9f685b' | 'False' | 3 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b78ce657999bd69311ed70b441cf07fc' | 'Enum.CompanyLegalType.Company' | 'True' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Own company 2' | '' | 'Собственная компания 2' | '' | '' | '' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | '05.01.2024 10:42:29' | '05.01.2024 10:42:29' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb766bf96b276f' | 'False' | 4 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794d' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Vendor 1' | '' | 'Поставщик 1' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb766bf96b2771' | 'False' | 5 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794e' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Vendor 2' | '' | 'Поставщик 2' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7674324a4a2a' | 'False' | 6 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794b' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Client 1' | '' | 'Клиент 1' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7674324a4a2c' | 'False' | 7 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794c' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Client 2' | '' | 'Клиент 2' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb767f10805e27' | 'False' | 8 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794f' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Client and vendor' | '' | 'Клиент и поставщик' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb767f10805e28' | 'False' | 9 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d7951' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Main partner' | '' | 'Главный партнер' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb767f10805e29' | 'False' | 10 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d7954' | 'Enum.CompanyLegalType.Individual' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Retail customer 1' | '' | 'Розничный покупатель' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b76cbacb2511e57d11ebeab0dfce2249' | 'False' | 11 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b76cbacb2511e57d11ebeab0dfce2248' | 'Enum.CompanyLegalType.Individual' | 'False' | '' | '' | 'False' | '' | '' | '' | '' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Retail customer 2' | '' | 'Розничный клиент 1' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b7b2a899784f0a1411ee9829ad9789b6' | 'False' | 12 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b7b2a899784f0a1411ee9829ad9789b5' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '1111111111' | '32345678908' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Consignor 1' | '' | '' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
+ | 'e1cib/data/Catalog.Companies?ref=b7b2a899784f0a1411ee9829ad9789b8' | 'False' | 13 | '' | '' | 'e1cib/data/Catalog.Partners?ref=b7b2a899784f0a1411ee9829ad9789b7' | 'Enum.CompanyLegalType.Company' | 'False' | '' | '' | 'False' | '' | '' | '2222222222' | '32345678909' | '' | | '' | | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'Consignor 2' | '' | '' | '' | '' | '' | '' | '' | '05.01.2024 10:42:29' | '01.01.0001 00:00:00' |
And I refill object tabular section "Currencies":
| 'Ref' | 'MovementType' |
@@ -202,6 +202,7 @@ Scenario: Create catalog Companies objects (test data base)
| 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb76684b9f685b' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' |
+
Scenario: Create catalog ConfigurationMetadata objects (test data base)
And I check or create catalog "ConfigurationMetadata" objects:
@@ -908,9 +909,9 @@ Scenario: Create document BankPayment objects (test data base)
| 'e1cib/data/Document.BankPayment?ref=b76cbacb2511e57d11ebeab0dfce2244' | 'False' | '2' | '24.02.2022 11:00:05' | 'False' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb7663e35d7960' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 'Enum.OutgoingPaymentTransactionTypes.CurrencyExchange' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb76684b9f685e' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' | '50' |
And I refill object tabular section "PaymentList":
- | 'Ref' | 'Key' | 'BasisDocument' | 'Agreement' | 'Partner' | 'TotalAmount' | 'NetAmount' | 'Payee' | 'PlaningTransactionBasis' | 'Commission' | 'ProfitLossCenter' | 'ExpenseType' | 'AdditionalAnalytic' | 'FinancialMovementType' |
- | 'e1cib/data/Document.BankPayment?ref=b76cbacb2511e57d11ebeab0dfce2243' | '52caf960-4c84-413d-ad48-deb8ba1f8138' | '' | 'e1cib/data/Catalog.Agreements?ref=b762b13668d0905011eb76684b9f6871' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794e' | '700' | '700' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb766bf96b2771' | '' | '0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' | '' | '' |
- | 'e1cib/data/Document.BankPayment?ref=b76cbacb2511e57d11ebeab0dfce2244' | '0a87c634-8957-4048-a9c5-75f8073a166e' | '' | '' | '' | '50' | '50' | '' | 'e1cib/data/Document.CashTransferOrder?ref=b762b13668d0905011eb7674324a4a55' | '0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' | '' | 'e1cib/data/Catalog.ExpenseAndRevenueTypes?ref=aa78120ed98fbced11eaf114c59ef02b' |
+ | 'Ref' | 'Key' | 'BasisDocument' | 'Agreement' | 'Partner' | 'TotalAmount' | 'NetAmount' | 'Payee' | 'PlaningTransactionBasis' | 'Commission' | 'ProfitLossCenter' | 'ExpenseType' | 'AdditionalAnalytic' | 'FinancialMovementType' |
+ | 'e1cib/data/Document.BankPayment?ref=b76cbacb2511e57d11ebeab0dfce2243' | '52caf960-4c84-413d-ad48-deb8ba1f8138' | '' | 'e1cib/data/Catalog.Agreements?ref=b762b13668d0905011eb76684b9f6871' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794e' | '700' | '700' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb766bf96b2771' | '' | '0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | 'e1cib/data/Catalog.ExpenseAndRevenueTypes?ref=b762b13668d0905011eb76684b9f6860' | '' | '' |
+ | 'e1cib/data/Document.BankPayment?ref=b76cbacb2511e57d11ebeab0dfce2244' | '0a87c634-8957-4048-a9c5-75f8073a166e' | '' | '' | '' | '50' | '50' | '' | 'e1cib/data/Document.CashTransferOrder?ref=b762b13668d0905011eb7674324a4a55' | '0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' | '' | 'e1cib/data/Catalog.ExpenseAndRevenueTypes?ref=aa78120ed98fbced11eaf114c59ef02b' |
And I refill object tabular section "Currencies":
| 'Ref' | 'Key' | 'CurrencyFrom' | 'Rate' | 'ReverseRate' | 'ShowReverseRate' | 'Multiplicity' | 'MovementType' | 'Amount' |
@@ -930,9 +931,9 @@ Scenario: Create document BankReceipt objects (test data base)
| 'e1cib/data/Document.BankReceipt?ref=b76cbacb2511e57d11ebeab0dfce2246' | 'False' | '2' | '24.02.2022 11:01:13' | 'False' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb7663e35d7960' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 'Enum.IncomingPaymentTransactionType.CashTransferOrder' | '' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' | '150' |
And I refill object tabular section "PaymentList":
- | 'Ref' | 'Key' | 'BasisDocument' | 'Agreement' | 'Partner' | 'TotalAmount' | 'NetAmount' | 'Payer' | 'PlaningTransactionBasis' | 'AmountExchange' | 'POSAccount' | 'Commission' | 'ExpenseType' | 'AdditionalAnalytic' | 'FinancialMovementType' |
- | 'e1cib/data/Document.BankReceipt?ref=b76cbacb2511e57d11ebeab0dfce2245' | '07832e98-1713-47ea-a7b2-e13661ff0ae1' | '' | 'e1cib/data/Catalog.Agreements?ref=b762b13668d0905011eb76684b9f6868' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794c' | '1 000' | '1 000' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7674324a4a2c' | '' | '0' | '' | '0' | '' | '' | '' |
- | 'e1cib/data/Document.BankReceipt?ref=b76cbacb2511e57d11ebeab0dfce2246' | '8b644aaf-80ad-46f3-bc8f-bba07a339f93' | '' | '' | '' | '150' | '150' | '' | 'e1cib/data/Document.CashTransferOrder?ref=b762b13668d0905011eb7674324a4a58' | '0' | '' | '0' | '' | '' | 'e1cib/data/Catalog.ExpenseAndRevenueTypes?ref=b76bafe8d8921be311ebc458232c5aae' |
+ | 'Ref' | 'Key' | 'BasisDocument' | 'Agreement' | 'Partner' | 'TotalAmount' | 'NetAmount' | 'Payer' | 'PlaningTransactionBasis' | 'AmountExchange' | 'POSAccount' | 'Commission' | 'ExpenseType' | 'AdditionalAnalytic' | 'FinancialMovementType' | 'ProfitLossCenter' |
+ | 'e1cib/data/Document.BankReceipt?ref=b76cbacb2511e57d11ebeab0dfce2245' | '07832e98-1713-47ea-a7b2-e13661ff0ae1' | '' | 'e1cib/data/Catalog.Agreements?ref=b762b13668d0905011eb76684b9f6868' | 'e1cib/data/Catalog.Partners?ref=b762b13668d0905011eb7663e35d794c' | '1 000' | '1 000' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7674324a4a2c' | '' | '0' | '' | '0' | '' | '' | '' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' |
+ | 'e1cib/data/Document.BankReceipt?ref=b76cbacb2511e57d11ebeab0dfce2246' | '8b644aaf-80ad-46f3-bc8f-bba07a339f93' | '' | '' | '' | '150' | '150' | '' | 'e1cib/data/Document.CashTransferOrder?ref=b762b13668d0905011eb7674324a4a58' | '0' | '' | '0' | '' | '' | 'e1cib/data/Catalog.ExpenseAndRevenueTypes?ref=b76bafe8d8921be311ebc458232c5aae' | '' |
And I refill object tabular section "Currencies":
| 'Ref' | 'Key' | 'CurrencyFrom' | 'Rate' | 'ReverseRate' | 'ShowReverseRate' | 'Multiplicity' | 'MovementType' | 'Amount' |
@@ -1253,41 +1254,42 @@ Scenario: Create document ItemStockAdjustment objects (test data base)
Scenario: Create document OpeningEntry objects (test data base)
And I check or create document "OpeningEntry" objects:
- | 'Ref' | 'DeletionMark' | 'Number' | 'Date' | 'Posted' | 'Company' | 'Author' | 'Branch' | 'Description' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'False' | '1' | '01.02.2022 10:30:29' | 'False' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' |
+ | 'Ref' | 'DeletionMark' | 'Number' | 'Date' | 'Posted' | 'Company' | 'PartnerTradeAgent' | 'AgreementTradeAgent' | 'LegalNameTradeAgent' | 'PartnerConsignor' | 'AgreementConsignor' | 'LegalNameConsignor' | 'Author' | 'Branch' | 'Description' | 'SourceNodeID' | 'Editor' | 'CreateDate' | 'ModifyDate' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'False' | 1 | '01.02.2022 10:30:29' | 'False' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | '' | '' | '' | '' | '' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | 'e1cib/data/Catalog.BusinessUnits?ref=b762b13668d0905011eb7663e35d7958' | '' | '' | 'e1cib/data/Catalog.Users?ref=aa7f120ed92fbced11eb13d7279770c0' | '05.01.2024 10:42:49' | '05.01.2024 13:38:46' |
And I refill object tabular section "AccountBalance":
- | 'Ref' | 'Key' | 'Account' | 'Currency' | 'Amount' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb76684b9f685c' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '1 800' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb76684b9f685d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '200' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb7663e35d7960' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '2 000' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb7663e35d7961' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '2 500' |
+ | 'Ref' | 'Key' | 'Account' | 'Currency' | 'Amount' | 'IsFixedCurrency' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb76684b9f685c' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 1800 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb76684b9f685d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | 200 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb7663e35d7960' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 2000 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.CashAccounts?ref=b762b13668d0905011eb7663e35d7961' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | 2500 | 'False' |
And I refill object tabular section "Inventory":
- | 'Ref' | 'Key' | 'Item' | 'ItemKey' | 'Store' | 'Quantity' | 'SerialLotNumber' | 'Amount' | 'UseSerialLotNumber' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7bcddcfb-84f4-41d4-9b3e-fc247256b327' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb76684b9f687d' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb76684b9f687e' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 350 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '2c0b476c-fde3-4029-91b3-e804f0b2586f' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb76684b9f687d' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b274f' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '83dbe9a0-38e1-4217-b0a5-6bcc0ec13676' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2750' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2751' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'e32bf546-1162-4b79-98cb-131adf9610db' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2754' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2757' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'f2b08bf8-082a-4e86-b648-39917948f1cd' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2754' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2758' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'a63d0743-22a3-4663-b39c-140473010f0c' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2754' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2759' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '672dea4d-1972-4633-96af-93038d95ec5e' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b275a' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b275c' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | | 'False' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '672dea4d-1972-4633-96af-93038d95ec6e' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b275a' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb7674324a4a4b' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 50 | '' | | 'False' |
+ | 'Ref' | 'Key' | 'Item' | 'ItemKey' | 'Store' | 'Quantity' | 'SerialLotNumber' | 'Price' | 'Amount' | 'AmountTax' | 'UseSerialLotNumber' | 'SourceOfOrigin' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7bcddcfb-84f4-41d4-9b3e-fc247256b327' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb76684b9f687d' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb76684b9f687e' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 350 | '' | 50 | 17500 | 2916.67 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '2c0b476c-fde3-4029-91b3-e804f0b2586f' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb76684b9f687d' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b274f' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | 50 | 15000 | 2500 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '83dbe9a0-38e1-4217-b0a5-6bcc0ec13676' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2750' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2751' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | 50 | 15000 | 2500 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'e32bf546-1162-4b79-98cb-131adf9610db' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2754' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2757' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | 50 | 15000 | 2500 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'f2b08bf8-082a-4e86-b648-39917948f1cd' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2754' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2758' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | 50 | 15000 | 2500 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | 'a63d0743-22a3-4663-b39c-140473010f0c' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b2754' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b2759' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | 50 | 15000 | 2500 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '672dea4d-1972-4633-96af-93038d95ec5e' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b275a' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb766bf96b275c' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 300 | '' | 100 | 30000 | 5000 | 'False' | '' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '672dea4d-1972-4633-96af-93038d95ec6e' | 'e1cib/data/Catalog.Items?ref=b762b13668d0905011eb766bf96b275a' | 'e1cib/data/Catalog.ItemKeys?ref=b762b13668d0905011eb7674324a4a4b' | 'e1cib/data/Catalog.Stores?ref=b762b13668d0905011eb76684b9f6861' | 50 | '' | 100 | 5000 | 833.37 | 'False' | '' |
And I refill object tabular section "Currencies":
- | 'Ref' | 'Key' | 'CurrencyFrom' | 'Rate' | 'ReverseRate' | 'ShowReverseRate' | 'Multiplicity' | 'MovementType' | 'Amount' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '0,859' | '1,1641' | 'False' | '1' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | '1 546,2' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '1' | '1' | 'False' | '1' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | '1 800' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '0' | '0' | 'False' | '0' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | '0' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '1' | '1' | 'False' | '1' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | '200' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '0' | '0' | 'False' | '0' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | '0' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '0' | '0' | 'False' | '0' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | '0' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '0,859' | '1,1641' | 'False' | '1' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | '1 718' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '1' | '1' | 'False' | '1' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | '2 000' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | '0' | '0' | 'False' | '0' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | '0' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '1' | '1' | 'False' | '1' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | '2 500' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '0' | '0' | 'False' | '0' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | '0' |
- | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | '0' | '0' | 'False' | '0' | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | '0' |
+ | 'Ref' | 'Key' | 'CurrencyFrom' | 'Rate' | 'ReverseRate' | 'ShowReverseRate' | 'Multiplicity' | 'MovementType' | 'Amount' | 'IsFixed' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 0.859 | 1.164144 | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | 1546.2 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 1 | 1 | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | 1800 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '282be07f-bb58-4f14-8026-ee258579e4e0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | | | 'False' | | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | 1 | 1 | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | 200 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | | | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '5166bf4e-b159-42c0-b6d1-acfbdb63874d' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | | | 'False' | | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 0.859 | 1.164144 | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | 1718 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | 1 | 1 | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | 2000 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '6ae0ce54-0e61-4cb6-a7d8-a2e9ea0c97f0' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795e' | | | 'False' | | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | 1 | 1 | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d796a' | 2500 | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | | | 'False' | 1 | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7968' | | 'False' |
+ | 'e1cib/data/Document.OpeningEntry?ref=b762b13668d0905011eb7674324a4a43' | '7237ba99-ca61-42ec-a997-8070b2ef337b' | 'e1cib/data/Catalog.Currencies?ref=b762b13668d0905011eb7663e35d795f' | | | 'False' | | 'e1cib/data/ChartOfCharacteristicTypes.CurrencyMovementType?ref=b762b13668d0905011eb7663e35d7969' | | 'False' |
+
Scenario: Create document OutgoingPaymentOrder objects (test data base)
@@ -2373,3 +2375,9 @@ Scenario: Create catalog PartnerItems objects (test data base)
+Scenario: Create document CalculationMovementCosts objects (test data base)
+
+ And I check or create document "CalculationMovementCosts" objects:
+ | 'Ref' | 'DeletionMark' | 'Number' | 'Date' | 'Posted' | 'Company' | 'BeginDate' | 'EndDate' | 'CalculationMode' | 'RaiseOnCalculationError' | 'Description' | 'SourceNodeID' |
+ | 'e1cib/data/Document.CalculationMovementCosts?ref=b7b3f42485a6975311eeaba66534e455' | 'False' | 1 | '05.01.2024 10:53:25' | 'False' | 'e1cib/data/Catalog.Companies?ref=b762b13668d0905011eb7663e35d7964' | '01.01.2021 00:00:00' | '01.01.2024 00:00:00' | 'Enum.CalculationMode.LandedCostBatchReallocate' | 'False' | '' | '' |
+
diff --git a/features/Internal/_9910 Accounting/_9910AccountingSettings.feature b/features/Internal/_9910 Accounting/_9910AccountingSettings.feature
index fecd050bac..c3adf087af 100644
--- a/features/Internal/_9910 Accounting/_9910AccountingSettings.feature
+++ b/features/Internal/_9910 Accounting/_9910AccountingSettings.feature
@@ -120,6 +120,7 @@ Scenario: _099100 preparation
When Create document Unbundling objects (test data base)
When Create document ItemStockAdjustment objects (test data base)
When Create document PurchaseReturnOrder objects (test data base)
+ When Create document CalculationMovementCosts objects (test data base)
When Create chart of characteristic types AddAttributeAndProperty objects (test data base)
When Create chart of characteristic types IDInfoTypes objects (test data base)
When Create chart of characteristic types CustomUserSettings objects (test data base)
@@ -141,6 +142,11 @@ Scenario: _099100 preparation
When Create information register T9010S_AccountsItemKey records (Basic LTV)
When Create information register T9012S_AccountsPartner records (Basic LTV)
When Create information register T9013S_AccountsTax records (Basic LTV)
+ * Post OE
+ Given I open hyperlink "e1cib/list/Document.OpeningEntry"
+ Then I select all lines of "List" table
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And Delay "3"
* Post PI
Given I open hyperlink "e1cib/list/Document.PurchaseInvoice"
Then I select all lines of "List" table
@@ -151,9 +157,22 @@ Scenario: _099100 preparation
Then I select all lines of "List" table
And in the table "List" I click the button named "ListContextMenuPost"
And Delay "3"
+ * Post RSR
+ Given I open hyperlink "e1cib/list/Document.RetailSalesReceipt"
+ Then I select all lines of "List" table
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And Delay "3"
+ * Post RRR
+ Given I open hyperlink "e1cib/list/Document.RetailReturnReceipt"
+ Then I select all lines of "List" table
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And Delay "3"
+ * Post CalculationMovementCosts
+ Given I open hyperlink "e1cib/list/Document.CalculationMovementCosts"
+ Then I select all lines of "List" table
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And Delay "3"
And I close all client application windows
-
-
Scenario: _0991001 check preparation
@@ -468,13 +487,13 @@ Scenario: _0991008 create Account charts (Basic) - group and assets account
And I set checkbox named "Quantity"
And I click "Save" button
Then the form attribute named "SearchCode" became equal to "405"
- Then the form attribute named "Order" became equal to "405"
+ Then the form attribute named "Order" became equal to "10"
And I click "Save and close" button
* Check creation
And "List" table contains lines
| 'Code' | 'Order' | 'Description' | 'Type' | 'Ext. Dim 2' | 'Q.' | 'Ext. Dim 3' | 'C.' | 'Ledger type variant' | 'Ext. Dim 1' | 'Off-balance' |
| 'Account charts (Basic)' | '' | '' | '' | '' | '' | '' | '' | '' | '' | '' |
- | '405' | '405' | 'Group Assets acccount' | 'AP' | '' | 'Yes' | '' | 'No' | 'LTV with account charts code mask' | '' | 'No' |
+ | '405' | '10' | 'Group Assets acccount' | 'AP' | '' | 'Yes' | '' | 'No' | 'LTV with account charts code mask' | '' | 'No' |
* Create first account (assets)
And I click the button named "FormCreate"
And I input "40501" text in the field named "Code"
@@ -515,7 +534,7 @@ Scenario: _0991008 create Account charts (Basic) - group and assets account
And "List" table contains lines
| 'Code' | 'Order' | 'Description' | 'Type' | 'Ext. Dim 2' | 'Q.' | 'Ext. Dim 3' | 'C.' | 'Ledger type variant' | 'Ext. Dim 1' | 'Off-balance' |
| 'Account charts (Basic)' | '' | '' | '' | '' | '' | '' | '' | '' | '' | '' |
- | '405' | '405' | 'Group Assets acccount' | 'AP' | '' | 'Yes' | '' | 'No' | 'LTV with account charts code mask' | '' | 'No' |
+ | '405' | '10' | 'Group Assets acccount' | 'AP' | '' | 'Yes' | '' | 'No' | 'LTV with account charts code mask' | '' | 'No' |
| '405.01' | '40501' | 'Assets acccount' | 'A' | 'Item key' | 'Yes' | 'Store' | 'No' | 'LTV with account charts code mask' | 'Item' | 'No' |
Scenario: _0991009 create Account charts (Basic) - liabilities account without group
@@ -1658,5 +1677,194 @@ Scenario: _0991059 create journal entry for two PI
+Scenario: _0991070 check Bank receipt accounting movements (Payment from customer)
+ And I close all client application windows
+ * Select BR
+ Given I open hyperlink "e1cib/list/Document.BankReceipt"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Cash/Bank account' | 'Company' | 'Business unit' | 'Partner' | 'Credit' | 'Partner term' | 'Operation' |
+ | '3250' | 'Bank account, USD' | 'Client 2' | 'Business unit 1' | 'Customer 2 (2 partner term)' | '4010' | 'Individual partner term 1 (by partner term)' | 'BankReceipt DR (R3010B_CashOnHand) CR (R2020B_AdvancesFromCustomers_R2021B_CustomersTransactions)' |
+ | '4010' | 'Customer 2 (2 partner term)' | 'Individual partner term 1 (by partner term)' | 'Business unit 1' | 'Customer 2 (2 partner term)' | '4020' | 'Individual partner term 1 (by partner term)' | 'BankReceipt DR (R2021B_CustomersTransactions) CR (R2020B_AdvancesFromCustomers)' |
+ And I close all client application windows
+
+Scenario: _0991071 check Bank payment accounting movements (Payment to the vendor)
+ And I close all client application windows
+ * Select BP
+ Given I open hyperlink "e1cib/list/Document.BankPayment"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Company' | 'Partner term' | 'Credit' | 'Cash/Bank account' | 'Operation' |
+ | '5201' | 'Vendor 2 (1 partner term)' | 'Business unit 1' | 'Vendor 2' | 'Partner term with vendor 2' | '3250' | 'Bank account, USD' | 'BankPayment DR (R1020B_AdvancesToVendors R1021B_VendorsTransactions) CR (R3010B_CashOnHand)' |
+ | '420.2' | 'Vendor 2 (1 partner term)' | 'Business unit 1' | 'Vendor 2' | 'Business unit 1' | '3250' | 'Bank account, USD' | 'BankPayment DR (R5022T_Expenses) CR (R3010B_CashOnHand)' |
+ | '5201' | 'Vendor 2 (1 partner term)' | 'Business unit 1' | 'Partner term with vendor 2' | 'Partner term with vendor 2' | '5202' | 'Vendor 2 (1 partner term)' | 'BankPayment DR (R1021B_VendorsTransactions) CR (R1020B_AdvancesToVendors)' |
+ And I close all client application windows
+
+
+Scenario: _0991072 check Bank payment accounting movements (Payment to the vendor)
+ And I close all client application windows
+ * Select BP
+ Given I open hyperlink "e1cib/list/Document.BankPayment"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Company' | 'Partner term' | 'Credit' | 'Cash/Bank account' | 'Operation' |
+ | '5201' | 'Vendor 2 (1 partner term)' | 'Business unit 1' | 'Vendor 2' | 'Partner term with vendor 2' | '3250' | 'Bank account, USD' | 'BankPayment DR (R1020B_AdvancesToVendors R1021B_VendorsTransactions) CR (R3010B_CashOnHand)' |
+ | '420.2' | 'Vendor 2 (1 partner term)' | 'Business unit 1' | 'Vendor 2' | 'Business unit 1' | '3250' | 'Bank account, USD' | 'BankPayment DR (R5022T_Expenses) CR (R3010B_CashOnHand)' |
+ | '5201' | 'Vendor 2 (1 partner term)' | 'Business unit 1' | 'Partner term with vendor 2' | 'Partner term with vendor 2' | '5202' | 'Vendor 2 (1 partner term)' | 'BankPayment DR (R1021B_VendorsTransactions) CR (R1020B_AdvancesToVendors)' |
+ And I close all client application windows
+
+Scenario: _0991080 check Purchase invoice accounting movements
+ And I close all client application windows
+ * Select PI
+ Given I open hyperlink "e1cib/list/Document.PurchaseInvoice"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "ItemList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Partner term' | 'Credit' | 'Operation' |
+ | '5201' | 'Vendor 1 (1 partner term)' | '' | 'Partner term with vendor 1' | '5202' | 'PurchaseInvoice DR (R1021B_VendorsTransactions) CR (R1020B_AdvancesToVendors)' |
+ | '5201' | 'Vendor 1 (1 partner term)' | '' | 'Partner term with vendor 1' | '5202' | 'PurchaseInvoice DR (R1021B_VendorsTransactions) CR (R1020B_AdvancesToVendors_CurrencyRevaluation)' |
+ | '3540' | 'Vendor 1 (1 partner term)' | '' | 'Partner term with vendor 1' | '5201' | 'PurchaseInvoice DR (R4050B_StockInventory_R5022T_Expenses) CR (R1021B_VendorsTransactions)' |
+ | '5301' | 'Vendor 1 (1 partner term)' | '' | 'Partner term with vendor 1' | '5201' | 'PurchaseInvoice DR (R1040B_TaxesOutgoing) CR (R1021B_VendorsTransactions)' |
+ | '3540' | 'Vendor 1 (1 partner term)' | '' | 'Partner term with vendor 1' | '5201' | 'PurchaseInvoice DR (R4050B_StockInventory_R5022T_Expenses) CR (R1021B_VendorsTransactions_CurrencyRevaluation)' |
+ And I close all client application windows
+
+Scenario: _0991100 check Cash payment accounting movements
+ And I close all client application windows
+ * Select CP
+ Given I open hyperlink "e1cib/list/Document.CashPayment"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Company' | 'Partner term' | 'Credit' | 'Cash/Bank account' | 'Operation' |
+ | '5201' | 'Vendor 1 (1 partner term)' | '' | 'Vendor 1' | 'Partner term with vendor 1' | '3240' | 'Cash, USD' | 'CashPayment DR (R1020B_AdvancesToVendors_R1021B_VendorsTransactions) CR (R3010B_CashOnHand)' |
+ | '5201' | '' | '' | 'Partner term with vendor 1' | 'Partner term with vendor 1' | '5202' | 'Vendor 1 (1 partner term)' | 'CashPayment DR (R1021B_VendorsTransactions) CR (R1020B_AdvancesToVendors)' |
+ And I close all client application windows
+Scenario: _0991110 check Cash receipt accounting movements
+ And I close all client application windows
+ * Select CR
+ Given I open hyperlink "e1cib/list/Document.CashReceipt"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Cash/Bank account' | 'Company' | 'Partner' | 'Business unit' | 'Credit' | 'Partner term' | 'Operation' |
+ | '3240' | 'Cash, USD' | 'Client 1' | 'Customer 1 (1 partner term)' | '' | '4010' | 'Partner term with customer (by document + credit limit)' | 'CashReceipt DR (R3010B_CashOnHand) CR (R2020B_AdvancesFromCustomers_R2021B_CustomersTransactions)' |
+ | '4010' | 'Customer 1 (1 partner term)' | 'Partner term with customer (by document + credit limit)' | 'Customer 1 (1 partner term)' | '' | '4020' | 'Partner term with customer (by document + credit limit)' | 'CashReceipt DR (R2021B_CustomersTransactions) CR (R2020B_AdvancesFromCustomers)' |
+ And I close all client application windows
+
+Scenario: _0991120 check Cash expense accounting movements
+ And I close all client application windows
+ * Select CE
+ Given I open hyperlink "e1cib/list/Document.CashExpense"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Company' | 'Expense and revenue type' | 'Credit' | 'Cash/Bank account' | 'Operation' |
+ | '420.2' | '' | 'Business unit 1' | 'Own company 1' | 'Expence 1' | '3240' | 'Cash, USD' | 'CashExpense DR (R5022T_Expenses) CR (R3010B_CashOnHand)' |
+ And I close all client application windows
+
+Scenario: _0991130 check Cash revenue accounting movements
+ And I close all client application windows
+ * Select CR
+ Given I open hyperlink "e1cib/list/Document.CashRevenue"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "PaymentList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Cash/Bank account' | 'Company' | 'Partner' | 'Business unit' | 'Credit' | ' ' | 'Operation' |
+ | '3240' | 'Cash, USD' | 'Own company 1' | '' | 'Business unit 1' | '650' | '' | 'CashRevenue DR (R3010B_CashOnHand) CR (R5021_Revenues)' |
+ And I close all client application windows
+
+Scenario: _0991140 check Debit note accounting movements
+ And I close all client application windows
+ * Select Debit note
+ Given I open hyperlink "e1cib/list/Document.DebitNote"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "Transactions" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Company' | 'Partner term' | 'Credit' | ' ' | 'Operation' |
+ | '5202' | 'Vendor 1 (1 partner term)' | 'Business unit 1' | 'Vendor 1' | 'Partner term with vendor 1' | '650' | '' | 'DebitNote DR (R1020B_AdvancesToVendors) CR (R5021_Revenues)' |
+ | '5201' | 'Vendor 1 (1 partner term)' | 'Vendor 1 (1 partner term)' | 'Partner term with vendor 1' | 'Partner term with vendor 1' | '5202' | 'Business unit 1' | 'DebitNote DR (R1021B_VendorsTransactions) CR (R1020B_AdvancesToVendors)' |
+ | '4010' | 'Vendor 1 (1 partner term)' | 'Business unit 1' | 'Vendor 1' | 'Partner term with vendor 1' | '650' | '' | 'DebitNote DR (R2021B_CustomersTransactions) CR (R5021_Revenues)' |
+ And I close all client application windows
+
+Scenario: _0991145 check Credit note accounting movements
+ And I close all client application windows
+ * Select Credit note
+ Given I open hyperlink "e1cib/list/Document.CreditNote"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And in the table "List" I click the button named "ListContextMenuPost"
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "Transactions" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Partner term' | 'Expense and revenue type' | 'Credit' | 'Operation' |
+ | '4020' | 'Customer 2 (2 partner term)' | 'Business unit 1' | 'Individual partner term 1 (by partner term)' | 'Expence 1' | '420.2' | 'CreditNote DR (R2020B_AdvancesFromCustomers) CR (R5022T_Expenses)' |
+ | '4010' | 'Customer 2 (2 partner term)' | 'Individual partner term 1 (by partner term)' | 'Individual partner term 1 (by partner term)' | 'Business unit 1' | '4020' | 'CreditNote DR (R2021B_CustomersTransactions) CR (R2020B_AdvancesFromCustomers)' |
+ | '5201' | 'Customer 2 (2 partner term)' | 'Business unit 1' | 'Individual partner term 1 (by partner term)' | 'Expence 1' | '420.2' | 'CreditNote DR (R1021B_VendorsTransactions CR (R5022T_Expenses)' |
+ And I close all client application windows
+
+Scenario: _0991150 check Retail sales receipt accounting movements
+ And I close all client application windows
+ * Select RSR
+ Given I open hyperlink "e1cib/list/Document.RetailSalesReceipt"
+ And I go to line in "List" table
+ | 'Number' |
+ | '1' |
+ And I select current line in "List" table
+ * Check accounting movements
+ And in the table "ItemList" I click "Edit accounting" button
+ And "AccountingAnalytics" table became equal
+ | 'Debit' | 'Partner' | 'Business unit' | 'Expense and revenue type' | 'Credit' | 'Item' | 'Item key' | 'Operation' |
+ | '420.2' | '' | 'Business unit 3' | 'Expence 1' | '3540' | 'Item with item key' | 'XS/Color 2' | 'RetailSalesReceipt DR (R5022T_Expenses) CR (R4050B_StockInventory)' |
+ And I close all client application windows
\ No newline at end of file