diff --git a/IRP/src/CommonModules/JorDocumentsServer/Module.bsl b/IRP/src/CommonModules/JorDocumentsServer/Module.bsl index e4eabf3c7c..9efe803202 100644 --- a/IRP/src/CommonModules/JorDocumentsServer/Module.bsl +++ b/IRP/src/CommonModules/JorDocumentsServer/Module.bsl @@ -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); diff --git a/IRP/src/InformationRegisters/CurrencyRates/Commands/CurrencyRates/CommandModule.bsl b/IRP/src/InformationRegisters/CurrencyRates/Commands/CurrencyRates/CommandModule.bsl new file mode 100644 index 0000000000..755e1b3eaa --- /dev/null +++ b/IRP/src/InformationRegisters/CurrencyRates/Commands/CurrencyRates/CommandModule.bsl @@ -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); +EndProcedure diff --git a/IRP/src/InformationRegisters/CurrencyRates/CurrencyRates.mdo b/IRP/src/InformationRegisters/CurrencyRates/CurrencyRates.mdo index a758276c58..54c03d298f 100644 --- a/IRP/src/InformationRegisters/CurrencyRates/CurrencyRates.mdo +++ b/IRP/src/InformationRegisters/CurrencyRates/CurrencyRates.mdo @@ -15,6 +15,7 @@ Currency rates true + InformationRegister.CurrencyRates.Form.ListForm Second true Managed @@ -76,7 +77,6 @@ Use true - true true @@ -119,4 +119,25 @@ true + + ListForm + + en + List form + + PersonalComputer + MobileDevice + + + CurrencyRates + + en + Currency rates + + FormNavigationPanelGoTo + + CatalogRef.Currencies + + Auto + diff --git a/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Attributes/List/ExtInfo/ListSettings.dcss b/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Attributes/List/ExtInfo/ListSettings.dcss new file mode 100644 index 0000000000..80043487a3 --- /dev/null +++ b/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Attributes/List/ExtInfo/ListSettings.dcss @@ -0,0 +1,17 @@ + + + + Normal + 7ad917ea-4be9-409d-a2d9-22daf3612ce5 + + + Normal + a0bd294f-b58e-4255-a5fb-ad0995f7311e + + + Normal + 90d5078f-6ef2-4f69-8d00-46409275cb49 + + Normal + 13dae5ad-33da-4659-b917-f1126f5a2698 + diff --git a/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Form.form b/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Form.form new file mode 100644 index 0000000000..a65c2bd6d1 --- /dev/null +++ b/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Form.form @@ -0,0 +1,570 @@ + + + + ListSettingsComposerUserSettings + 1 + true + true + + true + + + <key>en</key> + <value>User settings group</value> + + false + + ListSettingsComposerUserSettingsExtendedTooltip + 2 + true + true + + true + + Label + true + true + + Left + + + UsualGroup + + Vertical + Auto + WeakSeparation + true + true + Auto + Auto + + + + List + 3 + true + true + + true + + + List + + true + None + + Period + 16 + true + true + + true + + + List.Period + + true + + PeriodExtendedTooltip + 18 + true + true + + true + + Label + true + true + + Left + + + + PeriodContextMenu + 17 + true + true + + true + + true + + LabelField + Enter + true + Left + true + + true + true + + + + CurrencyFrom + 19 + true + true + + true + + + List.CurrencyFrom + + + CurrencyFromExtendedTooltip + 21 + true + true + + true + + Label + true + true + + Left + + + + CurrencyFromContextMenu + 20 + true + true + + true + + true + + LabelField + Enter + true + Left + true + + true + true + + + + CurrencyTo + 22 + true + true + + true + + + List.CurrencyTo + + + CurrencyToExtendedTooltip + 24 + true + true + + true + + Label + true + true + + Left + + + + CurrencyToContextMenu + 23 + true + true + + true + + true + + LabelField + Enter + true + Left + true + + true + true + + + + Multiplicity + 28 + true + true + + true + + + List.Multiplicity + + + MultiplicityExtendedTooltip + 30 + true + true + + true + + Label + true + true + + Left + + + + MultiplicityContextMenu + 29 + true + true + + true + + true + + LabelField + Enter + true + Left + true + + true + true + + + + Rate + 31 + true + true + + true + + + List.Rate + + + RateExtendedTooltip + 33 + true + true + + true + + Label + true + true + + Left + + + + RateContextMenu + 32 + true + true + + true + + true + + LabelField + Enter + true + Left + true + + true + true + + + + Source + 25 + true + true + + true + + + List.Source + + + SourceExtendedTooltip + 27 + true + true + + true + + Label + true + true + + Left + + + + SourceContextMenu + 26 + true + true + + true + + true + + LabelField + Enter + true + Left + true + + true + true + + + None + + ListCommandBar + 5 + true + true + + true + + Left + + + true + true + + true + + ListSearchString + 7 + + ListSearchStringExtendedTooltip + 9 + true + true + + true + + Label + true + true + + Left + + + + ListSearchStringContextMenu + 8 + true + true + + true + + true + + ListSearchString + + true + + + + true + true + + true + + ListViewStatus + 10 + + ListViewStatusExtendedTooltip + 12 + true + true + + true + + Label + true + true + + Left + + + + ListViewStatusContextMenu + 11 + true + true + + true + + true + + ViewStatusAddition + ListViewStatus + + true + + + + true + true + + true + + ListSearchControl + 13 + + ListSearchControlExtendedTooltip + 15 + true + true + + true + + Label + true + true + + Left + + + + ListSearchControlContextMenu + 14 + true + true + + true + + true + + SearchControlAddition + ListSearchControl + + true + + + + ListExtendedTooltip + 6 + true + true + + true + + Label + true + true + + Left + + + + ListContextMenu + 4 + true + true + + true + + true + + true + true + true + true + true + MultiRow +
true
+ 1 + 1 + AutoUse + AutoUse + true + true + true + Auto + Auto + ExpandTopLevel + true + true + true + true + AsFileRef + + List.DefaultPicture + + + 60 + + 0001-01-01T00:00:00 + 0001-01-01T00:00:00 + + + true + true + ListSettingsComposerUserSettings + +
+ + FormCommandBar + -1 + true + true + + true + + Left + true + + + OnCreateAtServer + OnCreateAtServer + + true + true + Vertical + true + true + true + true + true + + List + 1 + + DynamicList + + + true + + + true + +
true
+ + InformationRegister.CurrencyRates + true + true + true + true + +
+ + + + + +
diff --git a/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Module.bsl b/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Module.bsl new file mode 100644 index 0000000000..63554f4140 --- /dev/null +++ b/IRP/src/InformationRegisters/CurrencyRates/Forms/ListForm/Module.bsl @@ -0,0 +1,19 @@ + +&AtServer +Procedure OnCreateAtServer(Cancel, StandardProcessing) + If Parameters.Property("Currency") Then + GroupOr = List.Filter.Items.Add(Type("DataCompositionFilterItemGroup")); + GroupOr.GroupType = DataCompositionFilterItemsGroupType.OrGroup; + GroupOr.Use = True; + + FilterFrom = GroupOr.Items.Add(Type("DataCompositionFilterItem")); + FilterFrom.LeftValue = New DataCompositionField("CurrencyFrom"); + FilterFrom.RightValue = Parameters.Currency; + FilterFrom.Use = True; + + FilterTo = GroupOr.Items.Add(Type("DataCompositionFilterItem")); + FilterTo.LeftValue = New DataCompositionField("CurrencyTo"); + FilterTo.RightValue = Parameters.Currency; + FilterTo.Use = True; + EndIf; +EndProcedure diff --git a/features/Internal/_0500 Cash management/_0500PostingCashReciept.feature b/features/Internal/_0500 Cash management/_0500PostingCashReciept.feature index 35c02f8743..184a432e53 100644 --- a/features/Internal/_0500 Cash management/_0500PostingCashReciept.feature +++ b/features/Internal/_0500 Cash management/_0500PostingCashReciept.feature @@ -516,9 +516,21 @@ Scenario: _0500012 check form for select basis document And I change "Status" radio button value to "By document date" Then the number of "List" table lines is "равно" 0 And I change "Status" radio button value to "Current time" + Then the number of "List" table lines is "равно" 0 + And I close current window + * Check forms DocumentsForIncomingPayment by time + And I input "{CurrentDate()}" text in the field named "Date" + And I move to "Payments" tab + And I go to line in "PaymentList" table + | '#' | 'Partner' | 'Partner term' | 'Payer' | + | '2' | 'Ferron BP' | 'Basic Partner terms, TRY' | 'Company Ferron BP' | + And I finish line editing in "PaymentList" table + And I activate "Basis document" field in "PaymentList" table + And I select current line in "PaymentList" table And "List" table contains lines | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | | 'Sales invoice 1*' | 'Main Company' | 'Ferron BP' | '4 150,00' | 'Company Ferron BP' | 'Basic Partner terms, TRY' | 'TRY' | + And I close current window And I close all client application windows diff --git a/features/Internal/_0500 Cash management/_0510PostingCashPayment.feature b/features/Internal/_0500 Cash management/_0510PostingCashPayment.feature index 9ef43a32de..81a1446b72 100644 --- a/features/Internal/_0500 Cash management/_0510PostingCashPayment.feature +++ b/features/Internal/_0500 Cash management/_0510PostingCashPayment.feature @@ -402,101 +402,108 @@ Scenario: _0510011 create Cash payment (independently) | 'Number' | | '$$NumberCashPayment0510013$$' | -# Scenario: _0510012 check form for select basis document -# And I close all client application windows -# * Create Cash payment in lire for Ferron BP (Purchase invoice in lire) -# Given I open hyperlink "e1cib/list/Document.CashPayment" -# And I click the button named "FormCreate" -# * Filling in the details of the document -# And I select "Payment to the vendor" exact value from "Transaction type" drop-down list -# And I click Select button of "Company" field -# And I go to line in "List" table -# | Description | -# | Main Company | -# And I select current line in "List" table -# And I click Select button of "Currency" field -# And I activate "Description" field in "List" table -# And I go to line in "List" table -# | Code | Description | -# | TRY | Turkish lira | -# And I select current line in "List" table -# And I click Select button of "Cash account" field -# And I go to line in "List" table -# | Description | -# | Cash desk №1 | -# And I select current line in "List" table -# And in the table "PaymentList" I click the button named "PaymentListAdd" -# * Filling in a partner in a tabular part -# And I activate "Partner" field in "PaymentList" table -# And I click choice button of "Partner" attribute in "PaymentList" table -# And I go to line in "List" table -# | Description | -# | Ferron BP | -# And I select current line in "List" table -# And I click choice button of "Payee" attribute in "PaymentList" table -# And I go to line in "List" table -# | Description | -# | Company Ferron BP | -# And I select current line in "List" table -# * Filling in an Partner term -# And I click choice button of "Partner term" attribute in "PaymentList" table -# And I go to line in "List" table -# | 'Description' | -# | 'Vendor Ferron, TRY' | -# And I select current line in "List" table -# * Check forms DocumentsForOutgoingPayment (current time) -# And I finish line editing in "PaymentList" table -# And I activate "Basis document" field in "PaymentList" table -# And I select current line in "PaymentList" table -# And "List" table contains lines -# | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | -# | 'Purchase invoice 1*' | 'Main Company' | 'Ferron BP' | '136 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | -# | 'Purchase invoice 2*' | 'Main Company' | 'Ferron BP' | '13 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | -# And I go to line in "List" table -# | 'Amount' | -# | '136 000,00' | -# And I click "Select" button -# And I activate field named "PaymentListTotalAmount" in "PaymentList" table -# And I input "100,00" text in the field named "PaymentListTotalAmount" of "PaymentList" table -# And I finish line editing in "PaymentList" table -# And in the table "PaymentList" I click the button named "PaymentListAdd" -# And I activate "Partner" field in "PaymentList" table -# And I click choice button of "Partner" attribute in "PaymentList" table -# And I go to line in "List" table -# | 'Code' | 'Description' | -# | '50' | 'Ferron BP' | -# And I select current line in "List" table -# And I activate "Partner term" field in "PaymentList" table -# And I click choice button of "Partner term" attribute in "PaymentList" table -# And I go to line in "List" table -# | 'Description' | -# | 'Vendor Ferron, TRY' | -# And I select current line in "List" table -# And I finish line editing in "PaymentList" table -# And I activate "Basis document" field in "PaymentList" table -# And I select current line in "PaymentList" table -# And "List" table contains lines -# | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | -# | 'Purchase invoice 1*' | 'Main Company' | 'Ferron BP' | '135 900,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | -# | 'Purchase invoice 2*' | 'Main Company' | 'Ferron BP' | '13 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | -# And I close current window -# * Check forms DocumentsForIncomingPayment (by document date) -# And I input "{CurrentDate() - 86401}" text in the field named "Date" -# And I move to "Payments" tab -# And I go to line in "PaymentList" table -# | '#' | 'Partner' | 'Partner term' | 'Payee' | -# | '2' | 'Ferron BP' | 'Vendor Ferron, TRY' | 'Company Ferron BP' | -# And I finish line editing in "PaymentList" table -# And I activate "Basis document" field in "PaymentList" table -# And I select current line in "PaymentList" table -# And I change "Status" radio button value to "By document date" -# Then the number of "List" table lines is "равно" 0 -# And I change "Status" radio button value to "Current time" -# And "List" table contains lines -# | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | -# | 'Purchase invoice 1*' | 'Main Company' | 'Ferron BP' | '135 900,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | -# | 'Purchase invoice 2*' | 'Main Company' | 'Ferron BP' | '13 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | -# And I close all client application windows +Scenario: _0510012 check form for select basis document + And I close all client application windows + * Create Cash payment in lire for Ferron BP (Purchase invoice in lire) + Given I open hyperlink "e1cib/list/Document.CashPayment" + And I click the button named "FormCreate" + * Filling in the details of the document + And I select "Payment to the vendor" exact value from "Transaction type" drop-down list + And I click Select button of "Company" field + And I go to line in "List" table + | Description | + | Main Company | + And I select current line in "List" table + And I click Select button of "Currency" field + And I activate "Description" field in "List" table + And I go to line in "List" table + | Code | Description | + | TRY | Turkish lira | + And I select current line in "List" table + And I click Select button of "Cash account" field + And I go to line in "List" table + | Description | + | Cash desk №1 | + And I select current line in "List" table + And in the table "PaymentList" I click the button named "PaymentListAdd" + * Filling in a partner in a tabular part + And I activate "Partner" field in "PaymentList" table + And I click choice button of "Partner" attribute in "PaymentList" table + And I go to line in "List" table + | Description | + | Ferron BP | + And I select current line in "List" table + And I click choice button of "Payee" attribute in "PaymentList" table + And I go to line in "List" table + | Description | + | Company Ferron BP | + And I select current line in "List" table + * Filling in an Partner term + And I click choice button of "Partner term" attribute in "PaymentList" table + And I go to line in "List" table + | 'Description' | + | 'Vendor Ferron, TRY' | + And I select current line in "List" table + * Check forms DocumentsForOutgoingPayment (current time) + And I finish line editing in "PaymentList" table + And I activate "Basis document" field in "PaymentList" table + And I select current line in "PaymentList" table + And "List" table contains lines + | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | + | 'Purchase invoice 1*' | 'Main Company' | 'Ferron BP' | '136 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | + | 'Purchase invoice 2*' | 'Main Company' | 'Ferron BP' | '13 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | + And I go to line in "List" table + | 'Amount' | + | '136 000,00' | + And I click "Select" button + And I activate field named "PaymentListTotalAmount" in "PaymentList" table + And I input "100,00" text in the field named "PaymentListTotalAmount" of "PaymentList" table + And I finish line editing in "PaymentList" table + And in the table "PaymentList" I click the button named "PaymentListAdd" + And I activate "Partner" field in "PaymentList" table + And I click choice button of "Partner" attribute in "PaymentList" table + And I go to line in "List" table + | 'Code' | 'Description' | + | '50' | 'Ferron BP' | + And I select current line in "List" table + And I activate "Partner term" field in "PaymentList" table + And I click choice button of "Partner term" attribute in "PaymentList" table + And I go to line in "List" table + | 'Description' | + | 'Vendor Ferron, TRY' | + And I select current line in "List" table + And I finish line editing in "PaymentList" table + And I activate "Basis document" field in "PaymentList" table + And I select current line in "PaymentList" table + And "List" table contains lines + | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | + | 'Purchase invoice 1*' | 'Main Company' | 'Ferron BP' | '135 900,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | + | 'Purchase invoice 2*' | 'Main Company' | 'Ferron BP' | '13 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | + And I close current window + * Check forms DocumentsForIncomingPayment + And I input "{CurrentDate()}" text in the field named "Date" + And I move to "Payments" tab + And I go to line in "PaymentList" table + | '#' | 'Partner' | 'Partner term' | 'Payee' | + | '2' | 'Ferron BP' | 'Vendor Ferron, TRY' | 'Company Ferron BP' | + And I finish line editing in "PaymentList" table + And I activate "Basis document" field in "PaymentList" table + And I select current line in "PaymentList" table + And "List" table contains lines + | 'Document' | 'Company' | 'Partner' | 'Amount' | 'Legal name' | 'Partner term' | 'Currency' | + | 'Purchase invoice 1*' | 'Main Company' | 'Ferron BP' | '135 900,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | + | 'Purchase invoice 2*' | 'Main Company' | 'Ferron BP' | '13 000,00' | 'Company Ferron BP' | 'Vendor Ferron, TRY' | 'TRY' | + And I close current window + And I input "{CurrentDate() - 86401}" text in the field named "Date" + And I move to "Payments" tab + And I go to line in "PaymentList" table + | '#' | 'Partner' | 'Partner term' | 'Payee' | + | '2' | 'Ferron BP' | 'Vendor Ferron, TRY' | 'Company Ferron BP' | + And I finish line editing in "PaymentList" table + And I activate "Basis document" field in "PaymentList" table + And I select current line in "PaymentList" table + Then the number of "List" table lines is "равно" 0 + And I close all client application windows # Filters