Skip to content

Commit

Permalink
Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
DitriXNew committed Jul 10, 2023
1 parent b166a8e commit 1209e0a
Show file tree
Hide file tree
Showing 14 changed files with 559 additions and 255 deletions.
2 changes: 1 addition & 1 deletion IRP/src/CommonModules/BuilderAPI/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ EndFunction
// ** Key - String - Table name
// ** Value - ValueTable - Table
// * DefaultTable - Undefined, String - Default table name
Function CreateWrapper(DefaultTable = Undefined)
Function CreateWrapper(DefaultTable = Undefined) Export
Wrapper = New Structure("Object", New Structure());
Wrapper.Insert("Attr" , New Structure());
Wrapper.Insert("Tables" , New Structure());
Expand Down
34 changes: 33 additions & 1 deletion IRP/src/CommonModules/CommonFunctionsServer/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -1001,4 +1001,36 @@ Procedure DeleteFormArrayIfPresent(Array, Value) Export
Array.Delete(Index);
EndIf;
EndProcedure


// Is metadata available by current functional options.
//
// Parameters:
// ValidatedMetadata - MetadataObjectAttribute - Validated metadata
// hasType - Boolean - has type
//
// Returns:
// Boolean - Is metadata available by current functional options
Function isMetadataAvailableByCurrentFunctionalOptions(ValidatedMetadata, hasType = False) Export

MetadataByType = Undefined;
If hasType And ValidatedMetadata.Type.Types().Count() = 1 Then
MetadataByType = Metadata.FindByType(ValidatedMetadata.Type.Types()[0]);
EndIf;
If MetadataByType = Undefined Then
MetadataByType = ValidatedMetadata;
EndIf;

UsedInFunctionalOptions = False;

For Each FunctionalOption In Metadata.FunctionalOptions Do
If FunctionalOption.Content.Contains(ValidatedMetadata) Or FunctionalOption.Content.Contains(MetadataByType) Then
UsedInFunctionalOptions = True;
If GetFunctionalOption(FunctionalOption.Name) = True Then
Return True;
EndIf;
EndIf;
EndDo;

Return Not UsedInFunctionalOptions;

EndFunction
9 changes: 6 additions & 3 deletions IRP/src/CommonModules/RowIDInfoServer/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -4387,7 +4387,7 @@ Function ExtractData_FromRSR(BasisesTable, DataReceiver, AddInfo = Undefined)
Query = New Query(GetQueryText_BasisesTable());
Query.Text = Query.Text +
"SELECT ALLOWED
| ""SalesInvoice"" AS BasedOn,
| ""RetailSalesReceipt"" AS BasedOn,
| UNDEFINED AS Ref,
| ItemList.Ref AS RetailSalesReceipt,
| ItemList.Ref.Partner AS Partner,
Expand Down Expand Up @@ -4423,7 +4423,8 @@ Function ExtractData_FromRSR(BasisesTable, DataReceiver, AddInfo = Undefined)
| BasisesTable.Unit AS Unit,
| BasisesTable.BasisUnit AS BasisUnit,
| BasisesTable.QuantityInBaseUnit AS QuantityInBaseUnit,
| ItemList.SalesPerson
| ItemList.SalesPerson,
| ISNULL(ItemList.isControlCodeString, False) AS isControlCodeString
|FROM
| BasisesTable AS BasisesTable
| LEFT JOIN Document.RetailSalesReceipt.ItemList AS ItemList
Expand Down Expand Up @@ -10687,7 +10688,9 @@ Function GetColumnNames_ItemList()
|TransactionTypePurchases,
|TransactionTypePR,
|InventoryOrigin,
|TransactionTypeRGR";
|TransactionTypeRGR,
|isControlCodeString";

EndFunction

Function GetEmptyTable_ItemList()
Expand Down
Loading

0 comments on commit 1209e0a

Please sign in to comment.