Skip to content

Commit

Permalink
Инициализация
Browse files Browse the repository at this point in the history
  • Loading branch information
Nullarity committed Apr 9, 2021
0 parents commit baaa78f
Show file tree
Hide file tree
Showing 192 changed files with 2,542 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bsl-language-server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "language": "ru", "diagnosticLanguage": "ru", "diagnostics": { "computeTrigger": "onType", "parameters": { "CanonicalSpellingKeywords": false, "IfElseIfEndsWithElse": false, "UsingSynchronousCalls": false, "BeginTransactionBeforeTryCatch": false, "CommitTransactionOutsideTryCatch":false, "DeprecatedMessage": false, "MagicNumber": false, "MethodSize": false, "SpaceAtStartComment": false, "TimeoutsInExternalResources": false, "UnreachableCode": false, "UsingFindElementByString": false, "UsingHardcodeNetworkAddress": false, "UsingHardcodePath": false, "UsingHardcodeSecretInformation": false, "UsingModalWindows": false, "UsingObjectNotAvailableUnix": false, "YoLetterUsage": false, "MissingCodeTryCatchEx": false, "CodeBlockBeforeSub": false, "CommentedCode": false } }
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.tester/
.vscode/
Trash/
1 change: 1 addition & 0 deletions BusinessProcesses/BusinessProcesses.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions BusinessProcesses/BusinessProcesses.dir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Folder",
"Tree": true,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
1 change: 1 addition & 0 deletions CalculationTypes/CalculationTypes.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions CalculationTypes/CalculationTypes.dir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Folder",
"Tree": true,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
1 change: 1 addition & 0 deletions Catalogs/Catalogs.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions Catalogs/Catalogs.dir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Folder",
"Tree": true,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
1 change: 1 addition & 0 deletions ChartsOfAccounts/ChartsOfAccounts.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions ChartsOfAccounts/ChartsOfAccounts.dir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Folder",
"Tree": true,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
1 change: 1 addition & 0 deletions Common/AppIsCont.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return AppName = "Cont5";
10 changes: 10 additions & 0 deletions Common/AppIsCont.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
19 changes: 19 additions & 0 deletions Common/ChangeSession.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Disconnect from current session and connect to another

StandardProcessing = false;

userName = _;
ports = __.Ports;

if ( userName = undefined ) then
port = AppData.Port;
else
port = ports [ userName ];
endif;

if ( port = undefined ) then
Stop ( "Can't define user's port" );
endif;

Disconnect ( true );
Connect ( , port );
10 changes: 10 additions & 0 deletions Common/ChangeSession.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
26 changes: 26 additions & 0 deletions Common/CheckCurrency.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
form = _;

localCurrency = __.LocalCurrency;

Check ( "#Currency", localCurrency );
Check ( "#Rate", "1" );
Check ( "#Factor", "1" );
CheckState ( "#Rate, #Factor", "Enable", false );

// ***********************************
// Change Currency and check again
// ***********************************

Set ( "#Currency", "CAD" );
form.GotoNextItem ();

Activate ( "#Rate" );
CheckState ( "#Rate, #Factor", "Enable" );

cadRate = Fetch ( "#Rate" );
if ( cadRate = "1" ) then
Stop ( "CAD currency rate should not be 1. Check CurrencyOnChange event handler and currency rates" );
endif;

Set ( "#Currency", localCurrency );
form.GotoNextItem ();
10 changes: 10 additions & 0 deletions Common/CheckCurrency.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
9 changes: 9 additions & 0 deletions Common/CheckLogic.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
StandardProcessing = false;

if ( not __.CheckLogic ) then
return;
endif;

stack = Debug.Stack [ Debug.Level - 1 ];
t = RuntimeSrv.GetSpreadsheet ( stack.Module, stack.IsVersion );
CheckTemplate ( _, , , t );
10 changes: 10 additions & 0 deletions Common/CheckLogic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
9 changes: 9 additions & 0 deletions Common/CheckPostingError.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
StandardProcessing = false;

if ( FindMessages ( "Failed to post*" ).Count () = 0 ) then
Stop ( "<Failed to post> dialog box must be shown" );
endif;
Click ( "OK", Forms.Get1C () ); // Closes 1C standard dialog
if ( FindMessages ( _ ).Count () <> 1 ) then
Stop ( "<" + _ + "> error messages must be shown one time" );
endif;
10 changes: 10 additions & 0 deletions Common/CheckPostingError.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
10 changes: 10 additions & 0 deletions Common/CheckWritingError.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
StandardProcessing = false;

if ( FindMessages ( "Failed to save*" ).Count () = 0
and FindMessages ( "Не удалось записать*" ).Count () = 0 ) then
Stop ( "<Failed to save> dialog box must be shown" );
endif;
Click ( "OK", Forms.Get1C () ); // Closes 1C standard dialog
if ( FindMessages ( _ ).Count () <> 1 ) then
Stop ( "<" + _ + "> error messages must be shown one time" );
endif;
10 changes: 10 additions & 0 deletions Common/CheckWritingError.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
1 change: 1 addition & 0 deletions Common/Common.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions Common/Common.dir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Library",
"Tree": true,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
55 changes: 55 additions & 0 deletions Common/CreateIfNew/CreateIfNew.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
StandardProcessing = false;

oldForm = CurrentSource;

object = _.Object;
value = _.Description;
creationParams = _.CreationParams;

form = Call ( "Common.OpenList", object );

if ( object.Name = "Addresses" ) then
p = Call ( "Common.Find.Params" );
p.Where = "Description";
p.What = value;
Call ( "Common.Find", p );

With ( form );

try
Fetch ( "Description", Get ( "#List" ) );
found = true;
except
found = false;
endtry;
else
list = Activate ( "#List" );
search = new Map ();
if ( object.Name = "Organizations" ) then
column = "Name";
else
column = "Description";
endif;
if ( object.Name = "Items" ) then
Clear ( "#WarehouseFilter" );
endif;
search.Insert ( column, value );
list.GotoFirstRow ();
try
found = list.GotoRow ( search, RowGotoDirection.Down );
except
found = false;
endtry;
endif;

if ( not found ) then
if ( _.CreateScenario = undefined ) then
Call ( "" + object.Type + "." + object.Name + ".Create", creationParams );
else
Call ( _.CreateScenario, creationParams );
endif;
With ( form );
endif;

Close ();
With ( oldForm );
10 changes: 10 additions & 0 deletions Common/CreateIfNew/CreateIfNew.dir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": true,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
8 changes: 8 additions & 0 deletions Common/CreateIfNew/Params.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
StandardProcessing = false;

p = new Structure ();
p.Insert ( "Object" );
p.Insert ( "Description" );
p.Insert ( "CreateScenario" );
p.Insert ( "CreationParams" );
return p;
10 changes: 10 additions & 0 deletions Common/CreateIfNew/Params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
18 changes: 18 additions & 0 deletions Common/DataCreated.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Description:
// You can use this method for defining if testing environment was created.
//
// Parameters:
// String, data ID
//
// Returns:
// True if data created

Commando ( "e1cib/list/Task.UserTask" );
With ( "User Tasks" );
try
created = GotoRow ( "#List", "Memo", _ );
except
created = false;
endtry;
Close ();
return created;
10 changes: 10 additions & 0 deletions Common/DataCreated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
5 changes: 5 additions & 0 deletions Common/FillCheckError.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
StandardProcessing = false;

if ( FindMessages ( _ ).Count () <> 1 ) then
Stop ( "<" + _ + "> error messages must be shown one time" );
endif;
10 changes: 10 additions & 0 deletions Common/FillCheckError.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"Version": "1.3.4.6",
"Type": "Method",
"Tree": false,
"Severity": "",
"Creator": "Tester",
"LastCreator": "Tester",
"Memo": "",
"Tags": []
}
Expand Down
14 changes: 14 additions & 0 deletions Common/Find/Find.dir.bsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Description:
// Filters list using standard Find window
//
// Parameters:
// Where: column name. For example: Code, Description, Subject and etc.
// What: searching value. For example: 023, John and etc
// Button (default: "#FormFind"): name of button that opens Search dialog.

Click ( _.Button );
With ( "Find" );
Pick ( "#FieldSelector", _.Where );
Set ( "#Pattern", _.What );
Set ( "#CompareType", _.CompareType );
Click ( "#Find" );
Loading

0 comments on commit baaa78f

Please sign in to comment.