Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#IRP-331 #IRP-335 set filter in currency rates list for From and To , add date filter to select basic doc #2495

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions IRP/src/CommonModules/JorDocumentsServer/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,28 @@ Procedure OnCreateAtServer(Cancel, StandardProcessing, Form, Parameters) Export
If Parameters.Property("CustomFilter") Then
AdditionalParameters.Insert("Ref", Parameters.CustomFilter.QueryParameters.Ref);
EndIf;

If Parameters.Property("DocumentDate") Then
AdditionalParameters.Insert("DocumentDate", Parameters.DocumentDate);

DateFilter = Undefined;
CurrentDate = CommonFunctionsServer.GetCurrentSessionDate();
DateValueFilter =
?(BegOfDay(Parameters.DocumentDate) = BegOfDay(CurrentDate),
EndOfDay(CurrentDate), Parameters.DocumentDate);
DateField = New DataCompositionField("Ref.Date");
For Each FilterItem In Form.List.Filter.Items Do
If FilterItem.LeftValue = DateField Then
DateFilter = FilterItem;
EndIf;
EndDo;
If DateFilter = Undefined Then
DateFilter = Form.List.Filter.Items.Add(Type("DataCompositionFilterItem"));
DateFilter.LeftValue = DateField;
EndIf;
DateFilter.ComparisonType = DataCompositionComparisonType.LessOrEqual;
DateFilter.RightValue = DateValueFilter;
DateFilter.Use = True;
EndIf;

AdditionalProperties.Insert("AdditionalParameters", AdditionalParameters);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

&AtClient
Procedure CommandProcessing(CommandParameter, CommandExecuteParameters)
FormParameters = New Structure("Currency", CommandParameter);
OpenForm("InformationRegister.CurrencyRates.ListForm", FormParameters, CommandExecuteParameters.Source, CommandExecuteParameters.Uniqueness, CommandExecuteParameters.Window, CommandExecuteParameters.URL);

Check warning on line 5 in IRP/src/InformationRegisters/CurrencyRates/Commands/CurrencyRates/CommandModule.bsl

View check run for this annotation

SonarIRPeam / IRP Sonarqube Results

IRP/src/InformationRegisters/CurrencyRates/Commands/CurrencyRates/CommandModule.bsl#L5

String length 205 exceeded maximum 160
EndProcedure
23 changes: 22 additions & 1 deletion IRP/src/InformationRegisters/CurrencyRates/CurrencyRates.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<value>Currency rates</value>
</synonym>
<useStandardCommands>true</useStandardCommands>
<defaultListForm>InformationRegister.CurrencyRates.Form.ListForm</defaultListForm>
<informationRegisterPeriodicity>Second</informationRegisterPeriodicity>
<mainFilterOnPeriod>true</mainFilterOnPeriod>
<dataLockControlMode>Managed</dataLockControlMode>
Expand Down Expand Up @@ -76,7 +77,6 @@
<dataHistory>Use</dataHistory>
<fillFromFillingValue>true</fillFromFillingValue>
<fillValue xsi:type="core:UndefinedValue"/>
<master>true</master>
<mainFilter>true</mainFilter>
</dimensions>
<dimensions uuid="846f0ce7-3734-45ed-a4b8-d829224173b4">
Expand Down Expand Up @@ -119,4 +119,25 @@
<fillValue xsi:type="core:UndefinedValue"/>
<mainFilter>true</mainFilter>
</dimensions>
<forms uuid="0cf1ccae-45c0-4e6c-bcc5-d15e68bf89a1">
<name>ListForm</name>
<synonym>
<key>en</key>
<value>List form</value>
</synonym>
<usePurposes>PersonalComputer</usePurposes>
<usePurposes>MobileDevice</usePurposes>
</forms>
<commands uuid="051859f2-425e-4f35-9eda-1150d1602b51">
<name>CurrencyRates</name>
<synonym>
<key>en</key>
<value>Currency rates</value>
</synonym>
<group>FormNavigationPanelGoTo</group>
<commandParameterType>
<types>CatalogRef.Currencies</types>
</commandParameterType>
<representation>Auto</representation>
</commands>
</mdclass:InformationRegister>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings xmlns="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core">
<filter>
<viewMode>Normal</viewMode>
<userSettingID>7ad917ea-4be9-409d-a2d9-22daf3612ce5</userSettingID>
</filter>
<order>
<viewMode>Normal</viewMode>
<userSettingID>a0bd294f-b58e-4255-a5fb-ad0995f7311e</userSettingID>
</order>
<conditionalAppearance>
<viewMode>Normal</viewMode>
<userSettingID>90d5078f-6ef2-4f69-8d00-46409275cb49</userSettingID>
</conditionalAppearance>
<itemsViewMode>Normal</itemsViewMode>
<itemsUserSettingID>13dae5ad-33da-4659-b917-f1126f5a2698</itemsUserSettingID>
</Settings>
Loading