Compare commits

...

3 Commits

Author SHA1 Message Date
Stefan c8a4d18f1a added legacy code for reference
Playwright Tests / test (push) Has been cancelled
2026-06-04 14:56:43 +02:00
Stefan dbe6cd8653 Add structured logging to IntranetController actions
Extensive structured logging was added throughout IntranetController and all invoice/account handlers to improve traceability and debugging. Logging now covers action entry/exit, error conditions, and key parameters (user IDs, invoice IDs, etc.). Handlers log warnings for missing/invalid input and info/debug for significant events. Minor refactoring extracts form values for better logging. The jQuery `rwText` plugin was hardened against null input. Updated minified JS, font assets, and OCORE submodule. No functional changes to `tools.js`.
2026-06-04 14:21:14 +02:00
Stefan 8f8d462045 Update IdentityModel and test dependencies to latest
Bump Microsoft.IdentityModel.* packages to 8.19.1 in MFR_RESTClient and OCORE. Update Microsoft.NET.Test.Sdk and coverlet.collector in Fuchs.Tests. Refresh OCORE submodule reference. No functional changes; dependency updates only.
2026-06-03 20:37:43 +02:00
107 changed files with 18399 additions and 92 deletions
Binary file not shown.
+131
View File
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="fds.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="fuchs_ConnectionString" connectionString="Data Source=MSSQL4.NBG4.DOMAINXYZ.DE,10439;Initial Catalog=site_fuchs;Persist Security Info=False;TrustServerCertificate=true;Encrypt=true;User ID=fuchs_web;password='Bt5pL/cJg9oxb5';Connect Timeout=60;Load Balance Timeout=240;Max Pool Size=500;" providerName="System.Data.SqlClient" />
<add name="fuchs_fds_ConnectionString" connectionString="Data Source=MSSQL4.NBG4.DOMAINXYZ.DE,10439;Initial Catalog=site_fuchs;Persist Security Info=False;TrustServerCertificate=true;Encrypt=true;User ID=fuchs_fds;password='!Po@cGZ5bUn37khO';Connect Timeout=60;Load Balance Timeout=240;Max Pool Size=500;" providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<applicationSettings>
<fds.My.MySettings>
<setting name="ExecutionFrequency_Minutes" serializeAs="String">
<value>15</value>
</setting>
<setting name="DebugDetails" serializeAs="String">
<value>True</value>
</setting>
<setting name="MFR_UserName" serializeAs="String">
<value>system@sebastian-fuchs---bad-und-heizung-gmbh-und-co-kg.com</value>
</setting>
<setting name="MFR_Password" serializeAs="String">
<value>0oT4G3H2</value>
</setting>
<setting name="MFR_host" serializeAs="String">
<value>portal.mobilefieldreport.com</value>
</setting>
</fds.My.MySettings>
</applicationSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.2" newVersion="7.0.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Azure.Services.AppAuthentication" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.6.2.0" newVersion="1.6.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.2.0" newVersion="7.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.3.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.2.0" newVersion="7.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.11.0.0" newVersion="6.11.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.JsonWebTokens" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.11.0.0" newVersion="6.11.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IO.RecyclableMemoryStream" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.3.2.0" newVersion="2.3.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.9.0.0" newVersion="1.9.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MimeKit" publicKeyToken="bede1c8a46c66814" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.3" newVersion="7.0.0.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Web.Infrastructure" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+186
View File
@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7A56E271-A6BE-4C34-A859-DADEBC4C7A54}</ProjectGuid>
<OutputType>Exe</OutputType>
<StartupObject>Sub Main</StartupObject>
<RootNamespace>fds</RootNamespace>
<AssemblyName>Fuchs_DataService</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Console</MyType>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>Fuchs_DataService.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>Fuchs_DataService.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Web.Infrastructure, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\NugetPackages\Microsoft.Web.Infrastructure.2.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\NugetPackages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SevenZipSharp, Version=1.6.1.23, Culture=neutral, PublicKeyToken=c8ff6ba0184838bb, processorArchitecture=MSIL">
<HintPath>..\..\..\NugetPackages\Squid-Box.SevenZipSharp.1.6.1.23\lib\net472\SevenZipSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\..\NugetPackages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\NugetPackages\Microsoft.AspNet.Razor.3.2.9\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="Topshelf, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b800c4cfcdeea87b, processorArchitecture=MSIL">
<HintPath>..\..\..\NugetPackages\Topshelf.4.3.0\lib\net452\Topshelf.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="fds_zip.vb" />
<Compile Include="fds_debug.vb" />
<Compile Include="fds_mfr.vb" />
<Compile Include="fds_shared.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="fds_main.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="install.bat" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config" />
<None Include="packages.config" />
<Content Include="un-install.bat" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\WebProjectComponents\OCMS\OCMS.vbproj">
<Project>{ac8cba60-d786-48fd-a9f0-8b045a7bd505}</Project>
<Name>OCMS</Name>
</ProjectReference>
<ProjectReference Include="..\MFR_RESTClient\MFR_RESTClient.vbproj">
<Project>{00c70b53-516d-4d56-ad25-6757094b4335}</Project>
<Name>MFR_RESTClient</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="7z.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>
+13
View File
@@ -0,0 +1,13 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>2</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>
@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("Fuchs_DataService")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Fuchs_DataService")>
<Assembly: AssemblyCopyright("Copyright © 2021")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("b4650e09-34ae-4c0f-b973-63439b8a22f0")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
+63
View File
@@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Imports System
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("fds.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
End Module
End Namespace
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+118
View File
@@ -0,0 +1,118 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("15")> _
Public ReadOnly Property ExecutionFrequency_Minutes() As String
Get
Return CType(Me("ExecutionFrequency_Minutes"),String)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("True")> _
Public ReadOnly Property DebugDetails() As Boolean
Get
Return CType(Me("DebugDetails"),Boolean)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("system@sebastian-fuchs---bad-und-heizung-gmbh-und-co-kg.com")> _
Public ReadOnly Property MFR_UserName() As String
Get
Return CType(Me("MFR_UserName"),String)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("0oT4G3H2")> _
Public ReadOnly Property MFR_Password() As String
Get
Return CType(Me("MFR_Password"),String)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("portal.mobilefieldreport.com")> _
Public ReadOnly Property MFR_host() As String
Get
Return CType(Me("MFR_host"),String)
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.fds.My.MySettings
Get
Return Global.fds.My.MySettings.Default
End Get
End Property
End Module
End Namespace
@@ -0,0 +1,21 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="ExecutionFrequency_Minutes" Type="System.String" Scope="Application">
<Value Profile="(Default)">15</Value>
</Setting>
<Setting Name="DebugDetails" Type="System.Boolean" Scope="Application">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="MFR_UserName" Type="System.String" Scope="Application">
<Value Profile="(Default)">system@sebastian-fuchs---bad-und-heizung-gmbh-und-co-kg.com</Value>
</Setting>
<Setting Name="MFR_Password" Type="System.String" Scope="Application">
<Value Profile="(Default)">0oT4G3H2</Value>
</Setting>
<Setting Name="MFR_host" Type="System.String" Scope="Application">
<Value Profile="(Default)">portal.mobilefieldreport.com</Value>
</Setting>
</Settings>
</SettingsFile>
+134
View File
@@ -0,0 +1,134 @@
Option Explicit On
Partial Friend Module fds_debug
<Diagnostics.DebuggerStepThrough>
Public Function LogFile(FileName As String) As IO.FileInfo
Return New IO.FileInfo(AppBaseDirectory().FullName & FileName)
End Function
<Diagnostics.DebuggerStepThrough>
Public Function AppBaseDirectory() As IO.DirectoryInfo
Dim path As String = AppDomain.CurrentDomain.BaseDirectory + "tmp\"
Dim di As New IO.DirectoryInfo(path)
If di.Exists = True Then
Return di
ElseIf My.Computer.FileSystem.DirectoryExists(AppDomain.CurrentDomain.BaseDirectory) = True Then
di.Create()
Return di
Else : Return Nothing
End If
End Function
<Diagnostics.DebuggerStepThrough>
Public Sub DebugLog_async(CodeReference As String, SQLConnectionString As String, Optional exc As Exception = Nothing, Optional data As String = "", Optional context As Object = Nothing)
If CodeReference = "" OrElse SQLConnectionString = "" Then Exit Sub
Try
Threading.Tasks.Task.Run(Sub() Call DebugLog_sync(CodeReference:=CodeReference, SQLConnectionString:=SQLConnectionString, exc:=exc, data:=data, context:=context))
Catch ex As Exception
Call DebugLog_sync(CodeReference:="fds_debug DebugLog_async", SQLConnectionString:=SQLConnectionString, exc:=ex, data:="", context:=Nothing)
End Try
End Sub
<Diagnostics.DebuggerStepThrough>
Public Sub DebugLog_sync(CodeReference As String, SQLConnectionString As String, Optional exc As Exception = Nothing, Optional data As String = "", Optional context As Object = Nothing)
If CodeReference = "" OrElse SQLConnectionString = "" Then Exit Sub
Using con As New SqlClient.SqlConnection(SQLConnectionString)
Call DebugLog(CodeReference:=CodeReference, SQLConnection:=con, exc:=exc, data:=data, context:=context)
End Using
End Sub
<Diagnostics.DebuggerStepThrough>
Public Sub DebugLog(CodeReference As String, SQLConnection As SqlClient.SqlConnection, Optional exc As Exception = Nothing, Optional data As String = "", Optional context As Object = Nothing)
If CodeReference = "" OrElse IsNothing(SQLConnection) = True Then Exit Sub
Dim note As String = Now.ToString("yyyy.MM.dd HH:mm:ss") & " - " & CodeReference
Try
Try
If IsNothing(SQLConnection) = False Then
Dim pl As New List(Of SqlClient.SqlParameter) From {
New SqlClient.SqlParameter("@CodeReference", CodeReference),
New SqlClient.SqlParameter("@ExceptionMessage", If(IsNothing(exc), DBNull.Value, exc.Message)),
New SqlClient.SqlParameter("@StackTrace", If(IsNothing(exc), DBNull.Value, exc.StackTrace.ToString)),
New SqlClient.SqlParameter("@data", If(data, DBNull.Value))
}
Try
Dim w As Integer = 0
If SQLConnection.State = ConnectionState.Broken Then SQLConnection.Close()
If SQLConnection.State = ConnectionState.Connecting Then
w = 0
While SQLConnection.State = ConnectionState.Connecting And w < 10
System.Threading.Thread.Sleep(100)
w += 1
End While
ElseIf Not SQLConnection.State = ConnectionState.Open Then
SQLConnection.Open()
End If
w = 0
While Not SQLConnection.State = ConnectionState.Open And w < 10
System.Threading.Thread.Sleep(100)
w += 1
End While
Dim cmd As New SqlClient.SqlCommand("EXECUTE [dbo].[fds__admin_logdebug] @CodeReference,@ExceptionMessage,@StackTrace,@Data;", SQLConnection)
cmd.Parameters.AddRange(pl.ToArray)
Call cmd.ExecuteNonQuery()
'SQLConnection.Close()
cmd.Parameters.Clear()
Catch sqlex As Exception
End Try
End If
Catch dbex As Exception
End Try
If IsNothing(exc) = False Then
note &= (vbCrLf & "Exception:" & exc.Message & vbCrLf & "Stack:" & exc.StackTrace.ToString).Replace(vbLf, vbLf & " ")
End If
If data <> "" Then
note &= (vbCrLf & "Data:" & data).Replace(vbLf, vbLf & " ")
End If
note &= vbCrLf
Dim DebugLogfile As IO.FileInfo = LogFile("DebugLog.txt")
If DebugLogfile.Directory.Exists = True Then
IO.File.AppendAllText(DebugLogfile.FullName, note)
End If
Catch logex As Exception
Finally
Console.Write(note)
Debug.Print(note)
End Try
End Sub
Public Sub DebugToFile(note As String, Optional filename As String = "DebugLog.txt")
Try
Dim DebugLogfile As IO.FileInfo = LogFile(filename)
If DebugLogfile.Directory.Exists = True Then
IO.File.AppendAllText(DebugLogfile.FullName, Now.ToString & ": " & note & vbCrLf)
End If
Catch ex As Exception
End Try
End Sub
Public Sub DebugToFile(CodeReference As String, exc As Exception, data As String, Optional filename As String = "DebugLog.txt")
Dim note As String = CodeReference
If IsNothing(exc) = False Then
note &= (vbCrLf & "Exception:" & exc.Message & vbCrLf & "Stack:" & exc.StackTrace.ToString).Replace(vbLf, vbLf & " ")
End If
If data <> "" Then
note &= (vbCrLf & "Data:" & data).Replace(vbLf, vbLf & " ")
End If
Call DebugToFile(note, filename:=filename)
End Sub
End Module
+146
View File
@@ -0,0 +1,146 @@
Imports Topshelf
Imports json = Newtonsoft.Json.JsonConvert
Public Class fds_service
Implements Topshelf.ServiceControl
Dim WithEvents _timer As System.Timers.Timer
Public Sub New()
Me._timer = New System.Timers.Timer(My.Settings.ExecutionFrequency_Minutes * 60 * 1000) With {.AutoReset = True}
End Sub
Public Function Start(hostControl As HostControl) As Boolean Implements ServiceControl.Start
Me._timer.Start()
Return True
End Function
Public Function StartImmediately(hostControl As HostControl) As Boolean
Me._timer.Start()
System.Threading.Tasks.Task.Run(Sub()
If My.Settings.DebugDetails = True Then Call DebugToFile("fds__data_service - timer started with interval " & _timer.Interval.ToString, filename:="DebugDetail.txt")
Call update_mfr() 'start right away and do not wait until first intervall period is over
End Sub)
'do not wait and immediately return
Return True
End Function
Public Function [Stop](hostControl As HostControl) As Boolean Implements ServiceControl.Stop
Me._timer.Stop()
If My.Settings.DebugDetails = True Then System.Threading.Tasks.Task.Run(Sub() Call DebugToFile("fds__data_service - timer stopped", filename:="DebugDetail.txt"))
Return True
End Function
Public Sub timerElapsed() Handles _timer.Elapsed
Call update_mfr()
End Sub
Friend Shared Sub update_mfr()
If My.Settings.DebugDetails = True Then Call DebugToFile("fds__data_service update_mfr UpdateIfNecessary - timer elapsed", filename:="DebugDetail.txt")
'call update to data if necessary
Try
Dim t As Threading.Tasks.Task = Threading.Tasks.Task.Run(Async Function()
'Await UpdateIfNecessary_Single_async(et:=MFR_RESTClient.generic._generic.EntityTypes.Report, DebugDetails:=My.Settings.DebugDetails)
Await UpdateIfNecessary_async(DebugDetails:=My.Settings.DebugDetails)
Await UpdateRequested_async(DebugDetails:=My.Settings.DebugDetails)
Await GetInvoiceFiles_async(DebugDetails:=My.Settings.DebugDetails)
'Await getDatevZip()
End Function)
t.Wait()
Catch ex As Exception
Call DebugLog("fds__data_service update_mfr UpdateIfNecessary", SQLConnection:=Nothing, exc:=ex)
If My.Settings.DebugDetails = True Then Call DebugToFile("fds__data_service update_mfr UpdateIfNecessary", exc:=ex, data:="", filename:="DebugDetail.txt")
End Try
End Sub
End Class
Public Module fds_main
Sub Main()
Dim clArgs() As String = Environment.GetCommandLineArgs()
If (New String() {"digital-pc", "digital-dpc"}).Contains(Environment.MachineName.ToLower) = False Then
HostFactory.Run(Sub(x)
x.Service(Of fds_service)(AddressOf ServiceConfiguratorCallback)
x.EnablePauseAndContinue()
x.StartAutomatically()
x.RunAsLocalSystem()
x.SetDescription("MFR Data Sync")
x.SetDisplayName("MFR Data Sync")
x.SetServiceName("MFR Data Sync")
End Sub)
Else
Call fds_service.update_mfr()
'Call DEv()
End If
End Sub
Private Sub ServiceConfiguratorCallback(s As ServiceConfigurators.ServiceConfigurator(Of fds_service))
s.ConstructUsing(Function(name) New fds_service())
s.WhenStarted(Function(tc, Host)
Return tc.Start(Host)
End Function)
s.WhenStopped(Function(tc, Host)
Return tc.Stop(Host)
End Function)
s.BeforeStoppingService(Sub(HostStopContext)
If My.Settings.DebugDetails = True Then System.Threading.Tasks.Task.Run(Sub() Call DebugToFile("fds__data_service - beforestop", filename:="DebugDetail.txt"))
End Sub)
s.WhenPaused(Function(tc, Host)
Return tc.Stop(Host)
End Function)
s.WhenContinued(Function(tc, Host)
Return tc.StartImmediately(Host)
End Function)
End Sub
Public Sub DEv()
Using MFR As New fds_MFR_Client()
'Diagnostics.Debug.Print(MFR.ReadAnything(address:="https://portal.mobilefieldreport.com/odata/$metadata"))
'Diagnostics.Debug.Print(MFR.ReadAnything(address:="https://portal.mobilefieldreport.com/odata/Companies?$top=5&$expand=Contacts,Tags,ServiceObjects,MainContact"))
'Diagnostics.Debug.Print(MFR.ReadAnything(address:="https://portal.mobilefieldreport.com/odata/ServiceObjects?$expand=WarehouseManager,CustomValueSteps,Company,Product,Tags,ChildServiceObject,Contacts,Items"))
'Diagnostics.Debug.Print(MFR.ReadAnything(address:="https://portal.mobilefieldreport.com/odata/Contacts/$count"))
'Diagnostics.Debug.Print(MFR.getEntities())
Dim fle As Byte()
Try
fle = MFR.GetFile("https://portal.mobilefieldreport.com/mfr/Report/19584712737/Content/")
System.IO.File.WriteAllBytes("C:\Users\sailo\Desktop\Test.pdf", fle)
Catch ex As Exception
End Try
End Using
End Sub
End Module
Partial Friend Module fds_debug
Public Sub DebugLog(CodeReference As String, Optional exc As Exception = Nothing, Optional data As String = "", Optional context As Object = Nothing, Optional execute_async As Boolean = True)
If execute_async = True Then
Call DebugLog_async(CodeReference:=CodeReference, SQLConnectionString:=FDSConnectionString(), exc:=exc, data:=data, context:=context)
Else
Call DebugLog_sync(CodeReference:=CodeReference, SQLConnectionString:=FDSConnectionString(), exc:=exc, data:=data, context:=context)
End If
End Sub
End Module
File diff suppressed because it is too large Load Diff
+226
View File
@@ -0,0 +1,226 @@
Friend Module fds_shared
Friend Function SQLConnectionString() As String
Return Configuration.ConfigurationManager.ConnectionStrings("fuchs_ConnectionString").ConnectionString
End Function
Friend Function FDSConnectionString() As String
Return Configuration.ConfigurationManager.ConnectionStrings("fuchs_fds_ConnectionString").ConnectionString
End Function
Friend Function SqlCon() As SqlClient.SqlConnection
Return New SqlClient.SqlConnection(Configuration.ConfigurationManager.ConnectionStrings("fuchs_ConnectionString").ConnectionString)
End Function
Public Function RandomString(rs_length As Byte) As String
Dim r As New Random()
Dim s As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
Dim sb As New Text.StringBuilder
For i As Byte = 1 To rs_length
Dim idx As Integer = r.Next(0, s.Length)
sb.Append(s.Substring(idx, 1))
Next
Return sb.ToString()
End Function
'''' <summary>
'''' Returns a delimited <see cref="String" /> containing the field values from a <see cref="DataRow" />.
'''' </summary>
'''' <param name="source">
'''' The input <see cref="DataRow" />.
'''' </param>
'''' <param name="delimiter">
'''' The delimiter placed between field values. the default value is a comma.
'''' </param>
'''' <returns>
'''' A <see cref="String"/> containing the field values from the row separated by the specified delimiter.
'''' </returns>
'<Runtime.CompilerServices.Extension>
'Public Function ToCsv(source As DataRow,
' Optional delimiter As String = ",") As String
' Return String.Join(delimiter, source.ItemArray)
'End Function
''' <summary>
''' Returns a delimited <see cref="String" /> containing the field values from a <see cref="DataRow" />.
''' </summary>
''' <param name="source">
''' The input <see cref="DataRow" />.
''' </param>
''' <param name="quoteStrings">
''' <b>True</b> to wrap <see cref="String"/> values in double-quotes; otherwise, <b>False</b>.
''' If double-quotes are added, double-quotes within text are escaped with another double-quote.
''' </param>
''' <param name="delimiter">
''' The delimiter placed between field values. the default value is a comma.
''' </param>
''' <returns>
''' A <see cref="String"/> containing the field values from the row separated by the specified delimiter.
''' </returns>
<Runtime.CompilerServices.Extension>
Public Function ToCsv(source As DataRow,
quoteStrings As Boolean,
cultureinfo As Globalization.CultureInfo,
Optional delimiter As String = ",") As String
Dim fieldValues = source.ItemArray
Dim rx As New Text.RegularExpressions.Regex("(\"")")
'Wrap any String values in double-quotes and also escape any double-quotes in the String with another double-quote.
'replace array by converted array
fieldValues = fieldValues.Select(Function(o)
If IsNothing(o) OrElse IsDBNull(o) Then
Return ""
ElseIf o.GetType = GetType(String) Then
If quoteStrings = True Then
Return Microsoft.VisualBasic.ChrW(34) & rx.Replace(o.ToString, Microsoft.VisualBasic.ChrW(34) & Microsoft.VisualBasic.ChrW(34)) & Microsoft.VisualBasic.ChrW(34)
Else
Return o.ToString
End If
Else
Select Case o.GetType
Case GetType(Decimal)
Return DirectCast(o, Decimal).ToString(cultureinfo)
Case GetType(Single)
Return DirectCast(o, Single).ToString(cultureinfo)
Case GetType(Double)
Return DirectCast(o, Double).ToString(cultureinfo)
Case GetType(Boolean)
Return DirectCast(o, Boolean).ToString(cultureinfo)
Case GetType(System.DateTime)
Return DirectCast(o, DateTime).ToUniversalTime.ToString("U")
Case Else
Return o.ToString()
End Select
End If
End Function).ToArray()
Return String.Join(delimiter, fieldValues)
End Function
''' <summary>
''' Returns a delimited <see cref="String" /> containing the field values from the rows a <see cref="DataTable" />.
''' </summary>
''' <param name="source">The input <see cref="DataTable" />.</param>
''' <param name="includeHeaders"><b>True</b> to include a row of column headers; otherwise, <b>False</b></param>
''' <param name="quoteStrings"><b>True</b> to wrap <see cref="String"/> values in double-quotes; otherwise, <b>False</b>.
''' If double-quotes are added, double-quotes within text are escaped with another double-quote.</param>
''' <param name="rowDelimiter">The delimiter placed between rows. the default value is a line break comprising a carriage return and a line feed.</param>
''' <param name="fieldDelimiter">The delimiter placed between field values. the default value is a comma.</param>
''' <param name="cultureinfo">The culture that is used to convert float-point numbers like <see cref="Decimal" /> or <see cref="Double"/> to string. <br/>This falls back to InvariantCulture, if not provided.</param>
''' <param name="quoteHeader"><b>True</b> to wrap <see cref="String"/> column header names in double-quotes; otherwise, <b>False</b>.<br />
''' If no value is provided, the settings falls back to <b>quoteStrings</b> parameter.</param>
''' <returns>A <see cref="String"/> containing the field values from the rows of the table separated by the specified delimiters.</returns>
<Runtime.CompilerServices.Extension>
Public Function ToCsv(source As DataTable,
includeHeaders As Boolean,
quoteStrings As Boolean,
Optional rowDelimiter As String = ControlChars.CrLf,
Optional fieldDelimiter As String = ",",
Optional cultureinfo As Globalization.CultureInfo = Nothing,
Optional quoteHeader As Boolean? = Nothing) As String
If quoteHeader.HasValue = False Then quoteHeader = quoteStrings
cultureinfo = If(cultureinfo, Globalization.CultureInfo.InvariantCulture) 'fallback if not provided
Dim rows = source.Rows.
Cast(Of DataRow)().
Select(Function(row) row.ToCsv(quoteStrings:=quoteStrings, cultureinfo:=cultureinfo, delimiter:=fieldDelimiter))
If includeHeaders = True Then
Dim rx As New Text.RegularExpressions.Regex("(\"")")
Dim headers = String.Join(fieldDelimiter,
source.Columns.
Cast(Of DataColumn)().
Select(Function(column) If(quoteHeader.Value,
Microsoft.VisualBasic.ChrW(34) & rx.Replace(column.ColumnName.ToString, Microsoft.VisualBasic.ChrW(34) & Microsoft.VisualBasic.ChrW(34)) & Microsoft.VisualBasic.ChrW(34),
column.ColumnName)))
rows = {headers}.Concat(rows)
End If
Return String.Join(rowDelimiter, rows)
End Function
''' <summary>
''' Returns a text-file containing the string, created by streamwriter.
''' </summary>
''' <param name="input">The input <see cref="String"/>.</param>
''' <param name="encoding">The encoding used with streamwriter for the textfile. This falls back to <see cref="System.Text.Encoding.utf8"/>, if not provided.</param>
''' <returns>A file as byte-array.</returns>
<Runtime.CompilerServices.Extension>
Public Function ToByteArray(input As String, Optional encoding As System.Text.Encoding = Nothing) As Byte()
Dim content As Byte() = Nothing
Using ms As New IO.MemoryStream
Using sw As New IO.StreamWriter(ms, encoding:=If(encoding, System.Text.Encoding.UTF8))
sw.Write(input)
sw.Flush()
ms.Position = 0
content = ms.ToArray()
End Using
End Using
Return content
End Function
Public Function WriteStreamToDisk(ByVal StreamToWrite As IO.Stream, ByVal FilePath As String) As Boolean
'Dim tmpFilePath As String = Left(FilePath, Len(FilePath) - 4) & ".tmp"
Dim cnt = 0
restart:
Try
If My.Computer.FileSystem.FileExists(FilePath) Then My.Computer.FileSystem.DeleteFile(FilePath)
Using FleStream As System.IO.FileStream = New System.IO.FileStream(FilePath, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.Delete)
ReadWriteStream(StreamToWrite, FleStream, True)
End Using
Catch ex As Exception
System.Diagnostics.Debug.WriteLine($"{"WriteStreamToDisk - " & ex.Message}")
cnt += 1
If cnt = 6 Then
Return False
Exit Function
Else
Threading.Thread.Sleep(500)
GoTo restart
End If
End Try
Return True
End Function
Public Function ReadWriteStream(ByVal readStream As IO.Stream, ByVal writeStream As IO.Stream, ByVal closeWriteStream As Boolean) As Boolean
Try
Dim Length As Integer = 256
Dim buffer(Length - 1) As Byte
readStream.Seek(0, System.IO.SeekOrigin.Begin)
Dim bytesRead As Integer = readStream.Read(buffer, 0, Length)
'write the required bytes
While (bytesRead > 0)
writeStream.Write(buffer, 0, bytesRead)
bytesRead = readStream.Read(buffer, 0, Length)
End While
readStream.Close()
If closeWriteStream = True Then writeStream.Close()
Return True
Catch ex As Exception
System.Diagnostics.Debug.WriteLine($"{"ReadWriteStream - " & ex.Message}")
Call OCMS.debug_log("files_folders ReadWriteStream", ex)
Return False
End Try
End Function
<System.Diagnostics.DebuggerStepThrough()>
<Runtime.CompilerServices.Extension()>
Public Function NameBase(ByVal FI As System.IO.FileInfo) As String
Return FI.Name.Substring(startIndex:=0, length:=FI.Name.Length - FI.Extension.Length)
End Function
<System.Diagnostics.DebuggerStepThrough()>
<Runtime.CompilerServices.Extension()>
Public Function MimeType(ByVal FI As System.IO.FileInfo) As String
Return System.Web.MimeMapping.GetMimeMapping(FI.Name)
End Function
End Module
+500
View File
@@ -0,0 +1,500 @@
Imports SevenZip 'Squid-Box.SevenZipSharp
Imports System.IO
Namespace Global.fds
Public Class Archive
Implements IDisposable
'Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
'Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'Public Enum Timeunit As Long
' Milliseconds = 0
' Seconds = 1000
' Minutes = 60000
'End Enum
'Public Sub Wait(ByVal No As Integer, ByVal unit As Timeunit)
' Dim tme As Long = CLng(No * unit)
' Sleep(tme)
'End Sub
Public Event Saving()
Public Event FileSaved()
Public Event FileStreamCreated()
Private _ArchiveFile As FileInfo
Private _ArchivePassword As String
Private _ArchiveFormat As OutArchiveFormat
Public TempPath As String = System.AppDomain.CurrentDomain.BaseDirectory
Public Property ArchiveFileStream As IO.Stream
Private ZipOut As SevenZipExtractor
Private ZipIn As SevenZipCompressor
Public ZipAppend As Boolean = True
Public ExitOK As Boolean = False
Public ZipInOK As Boolean = False
Public Sub New(ByVal ArchiveFile As FileInfo, Optional ByVal ArchivePassword As String = "", Optional ByVal INIT As Boolean = True, Optional ByVal Type As OutArchiveFormat = OutArchiveFormat.SevenZip)
Me._ArchiveFormat = Type
Me._ArchiveFile = New FileInfo(ArchiveFile.FullName.Replace(ArchiveFile.Extension, If(Type = OutArchiveFormat.SevenZip, ".7z", ArchiveFile.Extension)))
Me._ArchivePassword = ArchivePassword
If INIT = True Then Call InitZipIn(Type)
End Sub
Private Sub InitZipIn(ByVal Type As OutArchiveFormat)
Dim assemblydirectory As IO.DirectoryInfo
If Zipping.SevenZipPath = "" Then
Try
assemblydirectory = New IO.DirectoryInfo(New Uri(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)).LocalPath)
Dim zip As IO.FileInfo = assemblydirectory.GetFiles("7z.dll", SearchOption.AllDirectories).FirstOrDefault
Zipping.SevenZipPath = If(IsNothing(zip), "", zip.FullName)
Finally
If Zipping.SevenZipPath = "" Then
assemblydirectory = New IO.DirectoryInfo(System.AppDomain.CurrentDomain.BaseDirectory)
Dim zip As IO.FileInfo = assemblydirectory.GetFiles("7z.dll", SearchOption.AllDirectories).FirstOrDefault
Zipping.SevenZipPath = If(IsNothing(zip), "", zip.FullName)
End If
End Try
If Zipping.SevenZipPath = "" Then
OCMS.debug_log("DDA.intranet.Zipping Archive InitZipIn", error:="SevenZipPath not found")
End If
End If
SevenZipCompressor.SetLibraryPath(SevenZipPath)
Me.ZipIn = New SevenZipCompressor
With Me.ZipIn
If Type = OutArchiveFormat.SevenZip AndAlso Me._ArchiveFile.Extension.ToLower.Contains("7z") = True Then
.ArchiveFormat = OutArchiveFormat.SevenZip
Else
.ArchiveFormat = Type
End If
.CompressionLevel = SevenZip.CompressionLevel.Ultra
Select Case .ArchiveFormat
Case OutArchiveFormat.SevenZip
.CompressionMethod = SevenZip.CompressionMethod.Lzma2
Case OutArchiveFormat.Zip, OutArchiveFormat.GZip
.CompressionMethod = CompressionMethod.Deflate
Case Else
.CompressionMethod = CompressionMethod.Default
End Select
If ZipAppend = True Then
.CompressionMode = SevenZip.CompressionMode.Append
Else
.CompressionMode = SevenZip.CompressionMode.Create
End If
.DirectoryStructure = False
End With
Me.ZipInOK = True
End Sub
Public Sub Extract(ByVal DataArchiveFilePath As FileInfo, ByVal TgtDirectory As DirectoryInfo, Optional ByVal Type As OutArchiveFormat = Nothing)
If DataArchiveFilePath.Exists Then
If IsNothing(Type) = True AndAlso DataArchiveFilePath.Extension.ToLower.Contains("7z") = True Then
Type = OutArchiveFormat.SevenZip
ElseIf IsNothing(Type) = True Then
Type = OutArchiveFormat.Zip
End If
If Me.ZipInOK = False Then Call InitZipIn(Type)
If Me._ArchivePassword = "" Then
Me.ZipOut = New SevenZipExtractor(DataArchiveFilePath.FullName)
Else
Me.ZipOut = New SevenZipExtractor(DataArchiveFilePath.FullName, Me._ArchivePassword)
End If
Try
If Me.ZipOut.ArchiveFileData(0).Encrypted = False And Not Me._ArchivePassword = "" Then
Me._ArchivePassword = ""
End If
Catch ex As Exception
System.Diagnostics.Debug.WriteLine($"{"zip Extract - " & ex.Message}")
OCMS.debug_log("DDA.intranet.Zipping Archive InitZipIn", ex:=ex, data:=New With {.DataArchiveFilePath = DataArchiveFilePath.FullName, .TgtDirectory = TgtDirectory.FullName})
Exit Sub
End Try
If Not ZipOut Is Nothing Then
Me.ZipOut.ExtractArchive(TgtDirectory.FullName)
Me.ZipOut.Dispose()
End If
End If
End Sub
Public Function FileInfo_to_Filepaths_Converter() As Converter(Of FileInfo, String)
Return New Converter(Of FileInfo, String)(Function(filepath As FileInfo) filepath.FullName())
End Function
Public Function Filepaths_to_FileInfo_Converter() As Converter(Of String, FileInfo)
Return New Converter(Of String, FileInfo)(Function(filepath As String) New FileInfo(filepath))
End Function
Public Function Compress(ByVal FilePaths As List(Of String), Optional ByVal ArchiveFilePath As String = Nothing, Optional ByVal ArchivePass As String = Nothing, Optional ByVal Type As OutArchiveFormat = OutArchiveFormat.SevenZip) As Boolean
Return Compress(Files:=FilePaths.ConvertAll(Filepaths_to_FileInfo_Converter()), ArchiveFile:=If(IsNothing(ArchiveFilePath), Nothing, New FileInfo(ArchiveFilePath)), ArchivePass:=ArchivePass, Type:=Type)
End Function
Public Function Compress(ByVal Files As List(Of FileInfo), Optional ByVal ArchiveFile As FileInfo = Nothing, Optional ByVal ArchivePass As String = Nothing, Optional ByVal Type As OutArchiveFormat = OutArchiveFormat.SevenZip) As Boolean
If Files.Count = 0 Then Return True
If Me.ZipInOK = False Then Call InitZipIn(Type)
If IsNothing(ArchiveFile) = True Then ArchiveFile = Me._ArchiveFile
If If(IsNothing(ArchivePass), "", ArchivePass) = "" Then ArchivePass = Me._ArchivePassword
If ArchiveFile.Exists() AndAlso Me.ZipAppend = True Then
Me.ZipIn.CompressionMode = CompressionMode.Append
Else
If ArchiveFile.Exists = True Then ArchiveFile.Delete()
Me.ZipIn.CompressionMode = CompressionMode.Create
End If
Try
Dim FilesVerified As FileInfo() = Files.Where(Function(f As FileInfo) f.Exists).ToArray()
Dim FilePaths As String() = Array.ConvertAll(Of FileInfo, String)(FilesVerified, FileInfo_to_Filepaths_Converter())
If ArchivePass = "" Then
Me.ZipIn.CompressFiles(ArchiveFile.FullName, FilePaths)
Else
Me.ZipIn.EncryptHeaders = True
Me.ZipIn.ZipEncryptionMethod = ZipEncryptionMethod.Aes256
Me.ZipIn.CompressFilesEncrypted(ArchiveFile.FullName, ArchivePass, FilePaths)
End If
RaiseEvent FileSaved()
'Debug.Print("Saved: " & Now().ToString)
Me.ExitOK = True
'Disposing...
Me.ZipIn = Nothing
Me.ZipInOK = False
Catch ex As Exception
'Debug.Print("NOT Saved: " & Now().ToString)
Me.ExitOK = False
End Try
Return Me.ExitOK AndAlso ArchiveFile.Exists
End Function
Public Function Compress(ByVal FilePath As String) As Boolean
Dim FL As New List(Of String) From {
FilePath
}
Call Compress(FL)
Return True
End Function
Public Function CompressToStream(ByVal FilePath As String) As Boolean
Dim FL As New List(Of String) From {
FilePath
}
Call CompressToStream(FL)
Return True
End Function
Public Function CompressToStream(ByVal FilePaths As List(Of String)) As Boolean
Return CompressToStream(Files:=FilePaths.ConvertAll(Filepaths_to_FileInfo_Converter()))
End Function
Public Function CompressToStream(ByVal Files As List(Of FileInfo)) As Boolean
If Files.Count = 0 Then Return True
If Me.ZipInOK = False Then Call InitZipIn(Me._ArchiveFormat)
If IsNothing(_ArchiveFileStream) Then 'nur wenn der interne leer ist...
Me.ZipIn.CompressionMode = CompressionMode.Create
Me._ArchiveFileStream = New MemoryStream
Else
Me.ZipIn.CompressionMode = CompressionMode.Append
End If
Try
Dim FilesVerified As FileInfo() = Files.Where(Function(f As FileInfo) f.Exists).ToArray()
Dim FilePaths As String() = Array.ConvertAll(Of FileInfo, String)(FilesVerified, FileInfo_to_Filepaths_Converter())
If Me._ArchivePassword = "" Then
Me.ZipIn.CompressFiles(Me._ArchiveFileStream, FilePaths)
Else
Me.ZipIn.EncryptHeaders = True
Me.ZipIn.ZipEncryptionMethod = ZipEncryptionMethod.Aes256
Me.ZipIn.CompressFilesEncrypted(Me._ArchiveFileStream, Me._ArchivePassword, FilePaths)
End If
Me._ArchiveFileStream.Seek(0, SeekOrigin.Begin)
RaiseEvent FileStreamCreated()
'Debug.Print("Saved: " & Now().ToString)
Me.ExitOK = True
'Disposing...
Me.ZipIn = Nothing
Me.ZipInOK = False
Catch ex As Exception
'Debug.Print("NOT Saved: " & Now().ToString)
Me.ExitOK = False
End Try
Return Me.ExitOK
End Function
Public Function CompressToStream(ByVal Files As List(Of FileInfo), ByRef TargetStream As IO.Stream) As Boolean
If Files.Count = 0 Then Return True
If Me.ZipInOK = False Then Call InitZipIn(Me._ArchiveFormat)
If IsNothing(TargetStream) = True Then
TargetStream = New MemoryStream
End If
Me.ZipIn.CompressionMode = CompressionMode.Create
Dim FilePaths As String() = New String() {}
Try
Dim FilesVerified As FileInfo() = Files.Where(Function(f As FileInfo) f.Exists).ToArray()
FilePaths = Array.ConvertAll(Of FileInfo, String)(FilesVerified, FileInfo_to_Filepaths_Converter())
If Me._ArchivePassword = "" Then
Me.ZipIn.CompressFiles(TargetStream, FilePaths)
Else
Me.ZipIn.EncryptHeaders = True
Me.ZipIn.ZipEncryptionMethod = ZipEncryptionMethod.Aes256
Me.ZipIn.CompressFilesEncrypted(TargetStream, Me._ArchivePassword, FilePaths)
End If
TargetStream.Seek(0, SeekOrigin.Begin)
'Debug.Print("Saved: " & Now().ToString)
Me.ExitOK = True
'Disposing...
Me.ZipIn = Nothing
Me.ZipInOK = False
Catch ex As Exception
'Debug.Print("NOT Saved: " & Now().ToString)
OCMS.debug_log("IntranetController zip", ex, data:=New With {.filepaths = FilePaths})
Me.ExitOK = False
End Try
Return Me.ExitOK
End Function
Public Function CompressToStream(ByVal Files As Dictionary(Of String, IO.Stream)) As Boolean
If Files.Count = 0 Then Return True
If Me.ZipInOK = False Then Call InitZipIn(Me._ArchiveFormat)
If IsNothing(_ArchiveFileStream) Then 'nur wenn der interne leer ist...
Me.ZipIn.CompressionMode = CompressionMode.Create
Me._ArchiveFileStream = New MemoryStream
Else
Me.ZipIn.CompressionMode = CompressionMode.Append
End If
Try
If Me._ArchivePassword = "" Then
Me.ZipIn.CompressStreamDictionary(streamDictionary:=Files, Me._ArchiveFileStream)
Else
Me.ZipIn.EncryptHeaders = True
Me.ZipIn.ZipEncryptionMethod = ZipEncryptionMethod.Aes256
Me.ZipIn.CompressStreamDictionary(streamDictionary:=Files, Me._ArchiveFileStream, password:=Me._ArchivePassword)
End If
Me._ArchiveFileStream.Seek(0, SeekOrigin.Begin)
RaiseEvent FileStreamCreated()
'Debug.Print("Saved: " & Now().ToString)
Me.ExitOK = True
'Disposing...
Me.ZipIn = Nothing
Me.ZipInOK = False
Catch ex As Exception
'Debug.Print("NOT Saved: " & Now().ToString)
Me.ExitOK = False
End Try
Return Me.ExitOK
End Function
Public Function CompressToStream(ByVal Files As Dictionary(Of String, Byte()), Optional targetstream As IO.Stream = Nothing) As Boolean
If Files.Count = 0 Then Return True
If Me.ZipInOK = False Then Call InitZipIn(Me._ArchiveFormat)
If IsNothing(_ArchiveFileStream) Then 'nur wenn der interne leer ist...
Me.ZipIn.CompressionMode = CompressionMode.Create
Me._ArchiveFileStream = New MemoryStream
Else
Me.ZipIn.CompressionMode = CompressionMode.Append
End If
Try
Dim FilesStreams As New Dictionary(Of String, IO.Stream)
For Each fy As String In Files.Keys
FilesStreams.Add(fy, New IO.MemoryStream(Files(fy)))
Next
If Me._ArchivePassword = "" Then
Me.ZipIn.CompressStreamDictionary(streamDictionary:=FilesStreams, If(IsNothing(targetstream), Me._ArchiveFileStream, targetstream))
Else
Me.ZipIn.EncryptHeaders = True
Me.ZipIn.ZipEncryptionMethod = ZipEncryptionMethod.Aes256
Me.ZipIn.CompressStreamDictionary(streamDictionary:=FilesStreams, If(IsNothing(targetstream), Me._ArchiveFileStream, targetstream), password:=Me._ArchivePassword)
End If
Me._ArchiveFileStream.Seek(0, SeekOrigin.Begin)
RaiseEvent FileStreamCreated()
'Debug.Print("Saved: " & Now().ToString)
Me.ExitOK = True
'Disposing...
Me.ZipIn = Nothing
Me.ZipInOK = False
Catch ex As Exception
'Debug.Print("NOT Saved: " & Now().ToString)
Me.ExitOK = False
End Try
Return Me.ExitOK
End Function
Public Function WriteArchiveStreamToDisk(Optional ByVal ArchiveFile As IO.FileInfo = Nothing) As Boolean
Try
If Me._ArchiveFile.Exists() Then Me._ArchiveFile.Delete()
Catch ex As Exception
End Try
If IsNothing(ArchiveFile) = False Then 'Wenn ein DateiPfad hier übergeben wurde...
WriteStreamToDisk(Me._ArchiveFileStream, ArchiveFile.FullName)
Else ' sonst wird der interne genommen
WriteStreamToDisk(Me._ArchiveFileStream, Me._ArchiveFile.FullName)
End If
Return Me._ArchiveFile.Exists
End Function
'Private ArchiveMail As EMail = Nothing
'Public Function SendZip(Optional ByVal Subject As String = Nothing, Optional ByVal BodyText As String = Nothing) As Boolean
' Try
' If ArchiveMail Is Nothing Then Exit Function
' If Not Subject = Nothing Then
' ArchiveMail.Subject = Subject
' End If
' If Not BodyText = Nothing Then
' ArchiveMail.Body = BodyText
' End If
' 'Send with archive as attachment
' Return ArchiveMail.Send(_ArchivePath.Path)
' Catch ex As Exception
' Return False
' End Try
'End Function
'Public Function SendZipStream(Optional ByVal Subject As String = Nothing, Optional ByVal BodyText As String = Nothing) As Boolean
' Try
' If ArchiveMail Is Nothing Then Exit Function
' If Not Subject = Nothing Then
' ArchiveMail.Subject = Subject
' End If
' If Not BodyText = Nothing Then
' ArchiveMail.Body = BodyText
' End If
' 'Send with archive as attachment
' Return ArchiveMail.Send(_ArchivePath.Name, _ArchiveFileStream)
' Catch ex As Exception
' Return False
' End Try
'End Function
'Public Sub SetMailSettings(ByVal SMTP As MailServer_Settings, ByVal MAIL As Mail_Settings)
' ArchiveMail = New EMail(SMTP, MAIL)
'End Sub
#Region "IDisposable Support"
Private disposedValue As Boolean ' To detect redundant calls
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
Try
If IsNothing(Me._ArchiveFileStream) = False Then Me._ArchiveFileStream.Dispose()
If IsNothing(Me.ZipOut) = False Then Me.ZipOut.Dispose()
Me.ZipIn = Nothing
Catch ex As Exception
End Try
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
' TODO: set large fields to null.
End If
disposedValue = True
End Sub
' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources.
'Protected Overrides Sub Finalize()
' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
' Dispose(False)
' MyBase.Finalize()
'End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
Dispose(True)
' TODO: uncomment the following line if Finalize() is overridden above.
' GC.SuppressFinalize(Me)
End Sub
#End Region
End Class
Public Module Zipping
Public SevenZipPath As String = ""
Public Sub FastAppend(ByVal FileToZip As FileInfo, ByVal ArchiveFile As FileInfo)
If FileToZip.Exists AndAlso IsNothing(ArchiveFile) = False AndAlso ArchiveFile.Exists Then
Dim Zip As New Archive(ArchiveFile) With {
.ZipAppend = True
}
Dim FL As New List(Of String) From {
FileToZip.FullName
}
Zip.Compress(FL)
End If
End Sub
Public Sub FastAppend(ByVal FileToZip As FileInfo, ByVal TgtArchiveDirectory As DirectoryInfo, ByVal ArchiveName As String)
Dim ArchiveFile As New FileInfo(TgtArchiveDirectory.FullName & If(Strings.Right(TgtArchiveDirectory.FullName, 1) = "\", "", "\") & ArchiveName)
If ArchiveFile.Exists Then Call FastAppend(FileToZip, ArchiveFile:=ArchiveFile)
End Sub
Public Sub FastAppend(ByVal FileToZip As FileInfo, ByVal TgtArchiveDirectoryPath As String, ByVal ArchiveName As String)
Dim ArchiveFile As New FileInfo(TgtArchiveDirectoryPath & If(Strings.Right(TgtArchiveDirectoryPath, 1) = "\", "", "\") & ArchiveName)
If ArchiveFile.Exists Then Call FastAppend(FileToZip, ArchiveFile:=ArchiveFile)
End Sub
Public Function FastZip(ByVal DirectoryToZip As DirectoryInfo, Optional ByVal Append As Boolean = True) As IO.FileInfo
If DirectoryToZip.Exists Then
Dim ZipFile As New FileInfo(DirectoryToZip.Name + ".7z"), cnt As Integer = 0
If Append = False Then
Do Until ZipFile.Exists = False
cnt += 1
ZipFile = New FileInfo(DirectoryToZip.Name & "_" & CStr(cnt) & ".7z")
Loop
End If
Dim Zip As New Archive(ZipFile) With {
.ZipAppend = Append
}
Zip.Compress(New List(Of FileInfo)(DirectoryToZip.GetFiles))
Return If(ZipFile.Exists, ZipFile, Nothing)
Else
Return Nothing
End If
End Function
Public Function FastZip(ByVal FileToZip As IO.FileInfo, Optional ByVal Append As Boolean = True) As IO.FileInfo
If FileToZip.Exists Then
Dim ZipFile As New FileInfo(FileToZip.Name.Replace("." & FileToZip.Extension, "") + ".7z"), cnt As Integer = 0
If Append = False Then
Do Until ZipFile.Exists = False
cnt += 1
ZipFile = New FileInfo(FileToZip.Name.Replace("." & FileToZip.Extension, "") & "_" & CStr(cnt) & ".7z")
Loop
End If
Dim Zip As New Archive(ZipFile) With {
.ZipAppend = Append
}
Dim FL As New List(Of FileInfo) From {
FileToZip
}
Zip.Compress(FL)
Return If(ZipFile.Exists, ZipFile, Nothing)
Else
Return Nothing
End If
End Function
Public Function FastZip(ByVal TgtDirectory As String, ByVal Filename As String, Optional ByVal Append As Boolean = True) As IO.FileInfo
Return FastZip(New FileInfo(TgtDirectory & If(Strings.Right(TgtDirectory, 1) = "\", "", "\") & Filename), Append)
End Function
End Module
End Namespace
+1
View File
@@ -0,0 +1 @@
Fuchs_Dataservice.exe install --autostart
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Razor" version="3.2.9" targetFramework="net48" />
<package id="Microsoft.Web.Infrastructure" version="2.0.0" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
<package id="Squid-Box.SevenZipSharp" version="1.6.1.23" targetFramework="net48" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
<package id="Topshelf" version="4.3.0" targetFramework="net48" />
</packages>
+1
View File
@@ -0,0 +1 @@
Fuchs_Dataservice.exe uninstall
+2 -2
View File
@@ -9,14 +9,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="coverlet.collector" Version="10.0.0">
<PackageReference Include="coverlet.collector" Version="10.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
@@ -17,34 +17,51 @@ public partial class IntranetController
{
private async Task<IActionResult> Do_Process_Invoices(string fn, string id, string code)
{
_logger.LogDebug("Do_Process_Invoices called: fn={Fn} id={Id} code={Code} user={User}", fn, id, code, UserAccountID);
switch (id.ToLower())
{
case "auth":
_logger.LogDebug("Invoice auth check for user {User}", UserAccountID);
return await JSONAsync(new { manage = 1 });
case "setpyd":
if (!HasForm("id")) return BadRequest400();
return await setSQLValue_async(
"EXECUTE [dbo].[fds__setInvoicePayed] @Id, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@Id", Form("id"))),
Security: DbSec, options: SqlOpt(fn, id, code))
? Ok() : StatusCode(500);
if (!HasForm("id")) { _logger.LogWarning("setpyd: missing form field 'id', user={User}", UserAccountID); return BadRequest400(); }
{
var invoiceId = Form("id");
_logger.LogInformation("setpyd: marking invoice {InvoiceId} as paid, user={User}", invoiceId, UserAccountID);
var ok = await setSQLValue_async(
"EXECUTE [dbo].[fds__setInvoicePayed] @Id, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@Id", invoiceId)),
Security: DbSec, options: SqlOpt(fn, id, code));
if (!ok) _logger.LogError("setpyd: SQL failed for invoice {InvoiceId}, user={User}", invoiceId, UserAccountID);
return ok ? Ok() : StatusCode(500);
}
case "setupd":
if (!HasForm("id")) return BadRequest400();
return await setSQLValue_async(
"EXECUTE [dbo].[fds__setInvoiceUNPayed] @Id, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@Id", Form("id"))),
Security: DbSec, options: SqlOpt(fn, id, code))
? Ok() : StatusCode(500);
if (!HasForm("id")) { _logger.LogWarning("setupd: missing form field 'id', user={User}", UserAccountID); return BadRequest400(); }
{
var invoiceId = Form("id");
_logger.LogInformation("setupd: marking invoice {InvoiceId} as unpaid, user={User}", invoiceId, UserAccountID);
var ok = await setSQLValue_async(
"EXECUTE [dbo].[fds__setInvoiceUNPayed] @Id, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@Id", invoiceId)),
Security: DbSec, options: SqlOpt(fn, id, code));
if (!ok) _logger.LogError("setupd: SQL failed for invoice {InvoiceId}, user={User}", invoiceId, UserAccountID);
return ok ? Ok() : StatusCode(500);
}
case "setvat":
if (!float.TryParse(Form("val").Replace("%", "").Replace(",", ".").Trim(),
NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out float vatVal))
return BadRequest400();
{
_logger.LogWarning("setvat: invalid VAT value '{Val}', user={User}", Form("val"), UserAccountID);
return BadRequest400();
}
{
_logger.LogInformation("setvat: setting VAT {Vat} on report {ReportId}, user={User}", vatVal, Form("id"), UserAccountID);
var pl = StdParamlist(
SQL_BigInt("@id", Form("id")),
SQL_VarChar("@entitytype", "report"),
@@ -53,42 +70,90 @@ public partial class IntranetController
string sqlEx = ""; int? sqlCode = null;
setSQLValue("EXECUTE [dbo].[fds__setReportVAT] @id, @entitytype, @vat, @authuser;",
_intranet.Intranet_SqlCon(), ref sqlEx, ref sqlCode, pl, Security: DbSec);
if (!string.IsNullOrEmpty(sqlEx))
_logger.LogError("setvat: SQL error for report {ReportId}: {SqlError}, user={User}", Form("id"), sqlEx, UserAccountID);
return string.IsNullOrEmpty(sqlEx) ? Ok() : StatusCode(500, new { error = sqlEx });
}
case "sis":
if (!HasForm("id")) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("sis: missing form field 'id', user={User}", UserAccountID); return BadRequest400(); }
{
var pl = StdParamlist(SQL_VarChar("@Id", Form("id")), SQL_Bit("@auto", false));
var invoiceId = Form("id");
_logger.LogInformation("sis: marking invoice {InvoiceId} as sent, user={User}", invoiceId, UserAccountID);
var pl = StdParamlist(SQL_VarChar("@Id", invoiceId), SQL_Bit("@auto", false));
var dt2 = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__setInvoiceSent] @Id, @auto, @authuser;",
_intranet.Intranet__SQLConnectionString, pl,
Security: DbSec, options: SqlOpt(fn, id, code));
if (!string.IsNullOrEmpty(dt2.Exception))
_logger.LogError("sis: SQL error for invoice {InvoiceId}: {SqlError}, user={User}", invoiceId, dt2.Exception, UserAccountID);
return string.IsNullOrEmpty(dt2.Exception) ? Ok() : StatusCode(500);
}
case "pget": return await HandleInvoicePget(fn, id, code);
case "get": return await HandleInvoiceGet(fn, id, code);
case "icget": return await HandleInvoiceIcGet(fn, id, code);
case "pget":
_logger.LogDebug("pget: invoice PDF get, user={User}", UserAccountID);
return await HandleInvoicePget(fn, id, code);
case "get":
_logger.LogDebug("get: invoice get, user={User}", UserAccountID);
return await HandleInvoiceGet(fn, id, code);
case "icget":
_logger.LogDebug("icget: invoice IC get, user={User}", UserAccountID);
return await HandleInvoiceIcGet(fn, id, code);
case "storno":
case "credit": return await HandleInvoiceStornoCredit(fn, id, code);
case "invl": return await HandleInvoiceList(fn, id, code);
case "rqi": return await HandleInvoiceRequestItems(fn, id, code);
case "pyi": return await HandleInvoicePayments(fn, id, code);
case "datev": return await HandleDatev(fn, id, code);
case "rdoc": return await HandleReportDoc(fn, id, code, Form("id"));
case "rdocn": return await HandleReportDocByName(fn, id, code);
case "datevzip": return await HandleDatevZip(fn, id, code);
case "getrem": return await HandleGetReminder(fn, id, code);
case "credit":
_logger.LogInformation("{Action}: invoice storno/credit, user={User}", id, UserAccountID);
return await HandleInvoiceStornoCredit(fn, id, code);
case "invl":
_logger.LogDebug("invl: invoice list, user={User}", UserAccountID);
return await HandleInvoiceList(fn, id, code);
case "rqi":
_logger.LogDebug("rqi: invoice request items, user={User}", UserAccountID);
return await HandleInvoiceRequestItems(fn, id, code);
case "pyi":
_logger.LogDebug("pyi: invoice payments, user={User}", UserAccountID);
return await HandleInvoicePayments(fn, id, code);
case "datev":
_logger.LogDebug("datev: DATEV export, user={User}", UserAccountID);
return await HandleDatev(fn, id, code);
case "rdoc":
_logger.LogDebug("rdoc: report document get id={DocId}, user={User}", Form("id"), UserAccountID);
return await HandleReportDoc(fn, id, code, Form("id"));
case "rdocn":
_logger.LogDebug("rdocn: report document get by name, user={User}", UserAccountID);
return await HandleReportDocByName(fn, id, code);
case "datevzip":
_logger.LogDebug("datevzip: DATEV ZIP export, user={User}", UserAccountID);
return await HandleDatevZip(fn, id, code);
case "getrem":
_logger.LogDebug("getrem: get reminder for invoice, user={User}", UserAccountID);
return await HandleGetReminder(fn, id, code);
case "mfrrel":
if (!HasForm("id") || !long.TryParse(Form("id"), out long relId)) return BadRequest400();
if (!HasForm("id") || !long.TryParse(Form("id"), out long relId))
{
_logger.LogWarning("mfrrel: missing or invalid form field 'id', user={User}", UserAccountID);
return BadRequest400();
}
_logger.LogInformation("mfrrel: resetting MFR relation for invoice {InvoiceId}, user={User}", relId, UserAccountID);
using (var mfr = new fds.FdsMfrClient())
await mfr.Update__entitytable(EntityTypes.Invoice,
fds.FdsMfr.UpdateNeed.Reset, new[] { relId });
return Ok();
default: return Ok();
default:
_logger.LogWarning("Do_Process_Invoices: unhandled action id={Id}, user={User}", id, UserAccountID);
return Ok();
}
}
}
+131 -33
View File
@@ -18,11 +18,16 @@ public partial class IntranetController
{
private async Task<IActionResult> HandleInvoicePget(string fn, string id, string code)
{
if (!HasForm("id")) return BadRequest400();
if (!long.TryParse(Form("id"), out long tgtid)) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("HandleInvoicePget: missing 'id' form field user={User}", UserAccountID); return BadRequest400(); }
if (!long.TryParse(Form("id"), out long tgtid)) { _logger.LogWarning("HandleInvoicePget: invalid 'id' value='{Value}' user={User}", Form("id"), UserAccountID); return BadRequest400(); }
_logger.LogDebug("HandleInvoicePget tgtid={TgtId} user={User}", tgtid, UserAccountID);
using (var mfr = new fds.FdsMfrClient())
{
_logger.LogDebug("HandleInvoicePget resetting invoice entity tgtid={TgtId}", tgtid);
await mfr.Update__entitytable(EntityTypes.Invoice,
fds.FdsMfr.UpdateNeed.Reset, new[] { tgtid });
}
var dt = await getSQLDatatable_async(
"SELECT * FROM [dbo].[fds__getInvoiceTreeIds](@srqid);",
@@ -30,6 +35,7 @@ public partial class IntranetController
StdParamlist(SQL_BigInt("@srqid", tgtid)),
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("HandleInvoicePget tree query returned {Count} rows for tgtid={TgtId}", dt.Count, tgtid);
if (dt.Count > 0)
{
var invIds = new List<long>();
@@ -43,11 +49,14 @@ public partial class IntranetController
case "servicerequest": if (iid > 0 && !srqIds.Contains(iid)) srqIds.Add(iid); break;
}
}
_logger.LogDebug("HandleInvoicePget resetting {InvCount} invoices and {SrqCount} service requests", invIds.Count, srqIds.Count);
using var mfr2 = new fds.FdsMfrClient();
foreach (var iid in invIds)
await mfr2.Update__entitytable(EntityTypes.Invoice, fds.FdsMfr.UpdateNeed.Reset, new[] { iid });
foreach (var iid in srqIds)
await mfr2.Update__entitytable(EntityTypes.ServiceRequest, fds.FdsMfr.UpdateNeed.Reset, new[] { iid });
_logger.LogInformation("HandleInvoicePget reset complete for tgtid={TgtId} invoices={InvCount} serviceRequests={SrqCount} user={User}",
tgtid, invIds.Count, srqIds.Count, UserAccountID);
}
return Ok();
}
@@ -56,35 +65,48 @@ public partial class IntranetController
{
try
{
if (!HasForm("id")) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("HandleInvoiceGet: missing 'id' form field user={User}", UserAccountID); return BadRequest400(); }
string invoiceId = Form("id");
_logger.LogDebug("HandleInvoiceGet invoiceId={InvoiceId} user={User}", invoiceId, UserAccountID);
var sqldset = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__getInvoice] @Id, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@Id", Form("id"))),
StdParamlist(SQL_VarChar("@Id", invoiceId)),
tablenames: new[] { "admin", "inv", "req", "itm" },
Security: DbSec, options: SqlOpt(fn, id, code));
var ldic = BuildInvoiceRequestList(sqldset);
var adminDic = sqldset.Table("admin").FirstRow.toObjectDictionary();
var invDic = sqldset.Table("inv").FirstRow.toObjectDictionary();
if (invDic.nz("InvoiceOptions", "").Split(',').Contains("§13b"))
bool has13b = invDic.nz("InvoiceOptions", "").Split(',').Contains("§13b");
if (has13b)
adminDic["p13b"] = true;
_logger.LogDebug("HandleInvoiceGet invoiceId={InvoiceId} requestCount={ReqCount} has13b={Has13b} user={User}",
invoiceId, ldic.Count, has13b, UserAccountID);
return await JSONAsync(new { admin = adminDic, inv = invDic, req = ldic });
}
catch { return StatusCode(500); }
catch (Exception ex)
{
_logger.LogError(ex, "HandleInvoiceGet failed for id={InvoiceId} user={User}", Form("id"), UserAccountID);
return StatusCode(500);
}
}
private async Task<IActionResult> HandleInvoiceIcGet(string fn, string id, string code)
{
if (!HasForm("id")) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("HandleInvoiceIcGet: missing 'id' form field user={User}", UserAccountID); return BadRequest400(); }
string invoiceId = Form("id");
_logger.LogDebug("HandleInvoiceIcGet (storno/recreate prep) invoiceId={InvoiceId} user={User}", invoiceId, UserAccountID);
var sqldset = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__prepStorno_recreate] @InvId, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@InvId", Form("id"))),
StdParamlist(SQL_VarChar("@InvId", invoiceId)),
tablenames: new[] { "admin", "requests", "items", "steps", "companies", "locations" },
Security: DbSec, options: SqlOpt(fn, id, code));
var ldic = BuildRequestItemList(sqldset);
_logger.LogDebug("HandleInvoiceIcGet invoiceId={InvoiceId} requestCount={ReqCount} user={User}",
invoiceId, ldic.Count, UserAccountID);
return await JSONAsync(new
{
admin = sqldset.Table("admin").FirstRow.toObjectDictionary(),
@@ -96,34 +118,47 @@ public partial class IntranetController
private async Task<IActionResult> HandleInvoiceStornoCredit(string fn, string id, string code)
{
if (!HasForm("id", "mode")) return BadRequest400();
string sqlcmd = Form("mode") switch
if (!HasForm("id", "mode")) { _logger.LogWarning("HandleInvoiceStornoCredit: missing required form fields user={User}", UserAccountID); return BadRequest400(); }
string invoiceId = Form("id");
string mode = Form("mode");
_logger.LogDebug("HandleInvoiceStornoCredit invoiceId={InvoiceId} mode={Mode} user={User}", invoiceId, mode, UserAccountID);
string sqlcmd = mode switch
{
"credit" => "EXECUTE [dbo].[fds__createCredit_simple] @Id, @authuser;",
"simple" => "EXECUTE [dbo].[fds__createStorno_simple] @Id, @authuser;",
"copy" => "EXECUTE [dbo].[fds__createStorno_copy] @Id, @authuser;",
_ => ""
};
if (string.IsNullOrEmpty(sqlcmd)) return StatusCode(500, new { error = "function not allowed" });
if (string.IsNullOrEmpty(sqlcmd))
{
_logger.LogWarning("HandleInvoiceStornoCredit: unknown mode={Mode} invoiceId={InvoiceId} user={User}", mode, invoiceId, UserAccountID);
return StatusCode(500, new { error = "function not allowed" });
}
_logger.LogInformation("HandleInvoiceStornoCredit executing mode={Mode} invoiceId={InvoiceId} user={User}", mode, invoiceId, UserAccountID);
var sqldset = await getSQLDataSet_async(sqlcmd,
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@Id", Form("id"))),
StdParamlist(SQL_VarChar("@Id", invoiceId)),
tablenames: new[] { "admin", "inv", "req", "itm" },
Security: DbSec, options: SqlOpt(fn, id, code));
var reqList = BuildInvoiceRequestList(sqldset);
_logger.LogDebug("HandleInvoiceStornoCredit complete mode={Mode} invoiceId={InvoiceId} requestCount={ReqCount} user={User}",
mode, invoiceId, reqList.Count, UserAccountID);
return await JSONAsync(new
{
admin = sqldset.Table("admin").FirstRow.toObjectDictionary(),
inv = sqldset.Table("inv").FirstRow.toObjectDictionary(),
req = BuildInvoiceRequestList(sqldset)
req = reqList
});
}
private async Task<IActionResult> HandleInvoiceList(string fn, string id, string code)
{
if (!HasForm("mode")) return BadRequest400();
if (!HasForm("mode")) { _logger.LogWarning("HandleInvoiceList: missing 'mode' form field user={User}", UserAccountID); return BadRequest400(); }
string mode = Form("mode").ToLower();
_logger.LogDebug("HandleInvoiceList mode={Mode} tgt={Tgt} user={User}", mode, Form("tgt"), UserAccountID);
if (mode == "s" && Form("tgt").Contains(':'))
{
_logger.LogDebug("HandleInvoiceList using search path mode={Mode} search={Search} user={User}", mode, Form("tgt"), UserAccountID);
var pl = StdParamlist(
SQL_Date("@tgtdate", DBNull.Value),
SQL_VarChar("@mode", Form("mode").ne("m")),
@@ -134,6 +169,8 @@ public partial class IntranetController
_intranet.Intranet__SQLConnectionString, pl,
tablenames: new[] { "admin", "invoices" },
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("HandleInvoiceList search returned {Count} invoices user={User}",
dset.Tables("invoices").Rows.Count, UserAccountID);
return await JSONAsync(new
{
admin = dset.Table("admin").FirstRow.toObjectDictionary(),
@@ -142,17 +179,25 @@ public partial class IntranetController
}
if (!DateTime.TryParseExact(Form("tgt"), "yy-MM-dd",
CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var tgtdate))
return BadRequest400();
{
_logger.LogWarning("HandleInvoiceList: invalid date format tgt='{Tgt}' user={User}", Form("tgt"), UserAccountID);
return BadRequest400();
}
{
string includes = Form("includes").ne(Form("all") == "true" ? "all" : "");
_logger.LogDebug("HandleInvoiceList date-based tgtdate={TgtDate} mode={Mode} includes={Includes} user={User}",
tgtdate.ToString("yy-MM-dd"), mode, includes, UserAccountID);
var pl = StdParamlist(
SQL_Date("@tgtdate", tgtdate),
SQL_VarChar("@mode", Form("mode").ne("m")),
SQL_VarChar("@includes", Form("includes").ne(Form("all") == "true" ? "all" : "")));
SQL_VarChar("@includes", includes));
var dset = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__getInvoices_list_vario] @tgtdate, @mode, @includes, @authuser;",
_intranet.Intranet__SQLConnectionString, pl,
tablenames: new[] { "admin", "invoices" },
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("HandleInvoiceList date-based returned {Count} invoices user={User}",
dset.Tables("invoices").Rows.Count, UserAccountID);
return await JSONAsync(new
{
admin = dset.Table("admin").FirstRow.toObjectDictionary(),
@@ -163,11 +208,13 @@ public partial class IntranetController
private async Task<IActionResult> HandleInvoiceRequestItems(string fn, string id, string code)
{
if (!HasForm("id")) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("HandleInvoiceRequestItems: missing 'id' form field user={User}", UserAccountID); return BadRequest400(); }
string invoiceId = Form("id");
_logger.LogDebug("HandleInvoiceRequestItems invoiceId={InvoiceId} user={User}", invoiceId, UserAccountID);
var sqldt = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__getInvRequestItems] @invoiceid, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@invoiceid", Form("id"))),
StdParamlist(SQL_VarChar("@invoiceid", invoiceId)),
tablenames: new[] { "requests", "items" },
Security: DbSec, options: SqlOpt(fn, id, code));
var ldic = new List<Dictionary<string, object?>>();
@@ -180,18 +227,25 @@ public partial class IntranetController
.Select(r => r.toObjectDictionary()).ToList();
ldic.Add(sdic!);
}
_logger.LogDebug("HandleInvoiceRequestItems invoiceId={InvoiceId} requestCount={ReqCount} user={User}",
invoiceId, ldic.Count, UserAccountID);
return await JSONAsync(new { requests = ldic });
}
private async Task<IActionResult> HandleInvoicePayments(string fn, string id, string code)
{
if (!HasForm("id")) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("HandleInvoicePayments: missing 'id' form field user={User}", UserAccountID); return BadRequest400(); }
string invoiceId = Form("id");
_logger.LogDebug("HandleInvoicePayments invoiceId={InvoiceId} user={User}", invoiceId, UserAccountID);
var sqldt = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__getInvPayments] @invoiceid, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@invoiceid", Form("id"))),
StdParamlist(SQL_VarChar("@invoiceid", invoiceId)),
tablenames: new[] { "items" },
Security: DbSec, options: SqlOpt(fn, id, code));
int paymentCount = sqldt.Tables("items").Rows.Count;
_logger.LogDebug("HandleInvoicePayments invoiceId={InvoiceId} paymentCount={PaymentCount} user={User}",
invoiceId, paymentCount, UserAccountID);
return await JSONAsync(new { payments = sqldt.Tables("items").toArrayofObjectDictionaries() });
}
@@ -199,13 +253,20 @@ public partial class IntranetController
{
if (!DateTime.TryParseExact(Form("tgt"), "yy-MM-dd",
CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var tgtdate))
{
_logger.LogWarning("HandleDatev: invalid date format tgt='{Tgt}' user={User}", Form("tgt"), UserAccountID);
return BadRequest400();
}
string mode = Form("mode").ne("m");
_logger.LogDebug("HandleDatev tgtdate={TgtDate} mode={Mode} user={User}", tgtdate.ToString("yy-MM-dd"), mode, UserAccountID);
var dset = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__getDatevExports] @tgtdate, @mode, @authuser;",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_Date("@tgtdate", tgtdate), SQL_VarChar("@mode", Form("mode").ne("m"))),
StdParamlist(SQL_Date("@tgtdate", tgtdate), SQL_VarChar("@mode", mode)),
tablenames: new[] { "files", "invoices", "debits" },
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("HandleDatev tgtdate={TgtDate} files={FileCount} invoices={InvCount} user={User}",
tgtdate.ToString("yy-MM-dd"), dset.Tables("files").Rows.Count, dset.Tables("invoices").Rows.Count, UserAccountID);
return await JSONAsync(new
{
files = dset.Tables("files").toArrayofObjectDictionaries(),
@@ -215,9 +276,16 @@ public partial class IntranetController
private async Task<IActionResult> HandleReportDoc(string fn, string id, string code, string reportid)
{
_logger.LogDebug("HandleReportDoc reportid={ReportId} typ={Typ} user={User}", reportid, Form("typ"), UserAccountID);
byte[]? content = null;
var file = _mfr.GetReportDoc(ref content, reportid);
if (file == null) return StatusCode(404, new { error = "Dokument wurde nicht gefunden" });
if (file == null)
{
_logger.LogWarning("HandleReportDoc: document not found reportid={ReportId} user={User}", reportid, UserAccountID);
return StatusCode(404, new { error = "Dokument wurde nicht gefunden" });
}
_logger.LogDebug("HandleReportDoc found reportid={ReportId} fileName={FileName} mimeType={MimeType} size={Size} user={User}",
reportid, file.Name, file.MimeType(), content?.Length ?? 0, UserAccountID);
return Form("typ") != "img"
? await FileContentResultAsync(content!, file.MimeType(), file.Name)
: await JSONAsync(new { id = reportid, img = await BuildPdfImageArray(content!) });
@@ -225,46 +293,76 @@ public partial class IntranetController
private async Task<IActionResult> HandleReportDocByName(string fn, string id, string code)
{
if (!HasForm("name")) return BadRequest400();
if (!HasForm("name")) { _logger.LogWarning("HandleReportDocByName: missing 'name' form field user={User}", UserAccountID); return BadRequest400(); }
string nme = Form("name").LeftToFirst("(").Trim();
if (string.IsNullOrEmpty(nme)) return StatusCode(404);
_logger.LogDebug("HandleReportDocByName name='{Name}' user={User}", nme, UserAccountID);
if (string.IsNullOrEmpty(nme))
{
_logger.LogWarning("HandleReportDocByName: empty name after trim user={User}", UserAccountID);
return StatusCode(404);
}
var so = await getSQLValue_async(
"SELECT [dbo].[fds__fn_InvoiceIdByName](@nme);",
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@nme", nme)),
Security: DbSec, options: SqlOpt(fn, id, code));
string reportid = so.Result?.ToString() ?? "";
return string.IsNullOrEmpty(reportid)
? StatusCode(404)
: await HandleReportDoc(fn, id, code, reportid);
if (string.IsNullOrEmpty(reportid))
{
_logger.LogWarning("HandleReportDocByName: no invoice found for name='{Name}' user={User}", nme, UserAccountID);
return StatusCode(404);
}
_logger.LogDebug("HandleReportDocByName resolved name='{Name}' to reportid={ReportId} user={User}", nme, reportid, UserAccountID);
return await HandleReportDoc(fn, id, code, reportid);
}
private async Task<IActionResult> HandleDatevZip(string fn, string id, string code)
{
if (!DateTime.TryParseExact(Form("tgt"), "yy-MM-dd",
CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var tgtdate))
{
_logger.LogWarning("HandleDatevZip: invalid date format tgt='{Tgt}' user={User}", Form("tgt"), UserAccountID);
return BadRequest400();
}
string mode = Form("mode").ne("m");
bool includeFiles = Form("files", "1") != "0";
_logger.LogDebug("HandleDatevZip tgtdate={TgtDate} mode={Mode} includeFiles={IncludeFiles} user={User}",
tgtdate.ToString("yy-MM-dd"), mode, includeFiles, UserAccountID);
Stream? ms = new MemoryStream();
var file = _mfr.GetDatevZip(ref ms, tgtdate,
mode: Form("mode").ne("m"),
mode: mode,
authUser: UserAccountID,
includeFiles: Form("files", "1") != "0");
if (file == null) return BadRequest400();
includeFiles: includeFiles);
if (file == null)
{
_logger.LogWarning("HandleDatevZip: zip generation returned null for tgtdate={TgtDate} mode={Mode} user={User}",
tgtdate.ToString("yy-MM-dd"), mode, UserAccountID);
return BadRequest400();
}
_logger.LogInformation("HandleDatevZip sending file='{FileName}' tgtdate={TgtDate} user={User}",
file.Name, tgtdate.ToString("yy-MM-dd"), UserAccountID);
ms!.Position = 0;
return await FileStreamResultAsync(ms, file.MimeType(), file.Name);
}
private async Task<IActionResult> HandleGetReminder(string fn, string id, string code)
{
if (!HasForm("id")) return BadRequest400();
if (!HasForm("id")) { _logger.LogWarning("HandleGetReminder: missing 'id' form field user={User}", UserAccountID); return BadRequest400(); }
string invoiceId = Form("id");
string includeDrafts = Form("drafts");
_logger.LogDebug("HandleGetReminder invoiceId={InvoiceId} includeDrafts={IncludeDrafts} user={User}",
invoiceId, includeDrafts, UserAccountID);
var pl = StdParamlist(
SQL_VarChar("@InvId", Form("id")),
SQL_Bit("@include_drafts", Form("drafts")));
SQL_VarChar("@InvId", invoiceId),
SQL_Bit("@include_drafts", includeDrafts));
var sqldt = await getSQLDataSet_async(
"EXECUTE [dbo].[fds__getInvoiceReminder] @InvId, @include_drafts, @authuser;",
_intranet.Intranet__SQLConnectionString, pl,
tablenames: new[] { "reminder" },
Security: DbSec, options: SqlOpt(fn, id, code));
int reminderCount = sqldt.Table("reminder").DataTable.Rows.Count;
_logger.LogDebug("HandleGetReminder invoiceId={InvoiceId} reminderCount={ReminderCount} user={User}",
invoiceId, reminderCount, UserAccountID);
return await JSONAsync(sqldt.Table("reminder").DataTable.toArrayofObjectDictionaries());
}
+95 -15
View File
@@ -76,23 +76,27 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
// ── Index (GET /) ─────────────────────────────────────────────────────────
[AllowAnonymous]
public IActionResult Index(string? fn, string? id, string? code) =>
public IActionResult Index([FromRoute] string? fn, [FromRoute] string? id, [FromRoute] string? code) =>
View("intranet");
// ── Do (POST+GET /do/{fn}/{id}/{code}) ─────────────────────────────────
[AllowAnonymous]
public async Task<IActionResult> Do(string? fn, string? id, string? code)
public async Task<IActionResult> Do([FromRoute] string? fn, [FromRoute] string? id, [FromRoute] string? code)
{
fn = (fn ?? "").ToLower();
id ??= "";
code ??= "";
bool isGet = HttpContext.Request.Method.Equals("GET", StringComparison.OrdinalIgnoreCase);
_logger.LogDebug("Do dispatching {Fn}/{Id}/{Code} [{Method}] user={User}",
fn, id, code, HttpContext.Request.Method, UserAccountID);
if (!UserIdent.IsAuthenticated && !(new string[] { "login","logout" }).Contains(fn.ToLower()) && !_allowedNonAuth.Contains(fn.ToLower()))
{
if (!_allowedGet.Contains(fn.ToLower()) && !_allowedGet.Contains($"{fn.ToLower()}|{id.ToLower()}"))
{
_logger.LogInformation($"rejected function on do {fn}");
_logger.LogWarning("Rejected unauthenticated request for fn={Fn} id={Id} ip={IP}",
fn, id, HttpContext.Connection.RemoteIpAddress);
return Unauthorized401();
}
}
@@ -121,12 +125,16 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
"logout" => await HandleLogout(),
_ => null
};
if (result == null)
_logger.LogWarning("No handler matched fn={Fn}", fn);
else
_logger.LogDebug("Do completed fn={Fn}/{Id} result={ResultType}", fn, id, result.GetType().Name);
return result ?? Ok();
}
catch (Exception ex)
{
_intranet.debug_log("IntranetController.Do", ex, UserAccountID,
data: new { fn, id, code });
_logger.LogError(ex, "Unhandled exception in Do fn={Fn} id={Id} code={Code} user={User}",
fn, id, code, UserAccountID);
return ServerError();
}
}
@@ -134,8 +142,14 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
// ── Auth helper ───────────────────────────────────────────────────────────
private async Task<IActionResult> HandleAuth(string fn, string id, string code)
{
if (!Request.Form.ContainsKey("module")) return BadRequest400();
if (!Request.Form.ContainsKey("module"))
{
_logger.LogWarning("HandleAuth called without 'module' form field by user={User}", UserAccountID);
return BadRequest400();
}
string module = Request.Form["module"].ToString();
_logger.LogDebug("HandleAuth module={Module} array={Array} user={User}",
module, Request.Form["array"].ToString(), UserAccountID);
if (Request.Form["array"] == "1")
{
var dt = await getSQLDatatable_async(
@@ -143,6 +157,8 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
_intranet.Intranet__SQLConnectionString,
StdParamlist(SQL_VarChar("@module", module)),
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("HandleAuth returned {Count} module auth entries for user={User}",
dt.DataTable.Rows.Count, UserAccountID);
return await JSONAsync(dt.DataTable.ToDictionary(KeyColumn: "module", ValueColumn: "auth"));
}
else
@@ -152,6 +168,8 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
_intranet.Intranet__SQLConnectionString, -1,
StdParamlist(SQL_VarChar("@module", module)),
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("HandleAuth module={Module} auth={Auth} user={User}",
module, val.Result, UserAccountID);
return await JSONAsync(new { auth = val.Result });
}
}
@@ -162,13 +180,13 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
{
string email = Request.Form["userinfo"].ToString();
string password = Request.Form["userpass"].ToString();
_logger.LogDebug("HandleLogin attempt for email={Email} ip={IP}",
email, HttpContext.Connection.RemoteIpAddress);
var row = await _intranet.AuthenticateAsync(email, password);
if (row == null)
{
_logger.LogWarning("Login failed for '{Email}' from {IP}",
_logger.LogWarning("Login failed for email={Email} ip={IP}",
email, HttpContext.Connection.RemoteIpAddress);
_intranet.debug_log("HandleLogin: failed",
data: new { email, ip = HttpContext.Connection.RemoteIpAddress?.ToString() });
return Unauthorized401();
}
@@ -179,6 +197,8 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
var identity = FuchsUserIdentity.BuildIdentity(userId, userEmail, auth, Fuchs_intranet.AuthScheme);
var principal = new System.Security.Claims.ClaimsPrincipal(identity);
await HttpContext.SignInAsync(Fuchs_intranet.AuthScheme, principal);
_logger.LogInformation("Login succeeded for userId={UserId} email={Email} authorization={Auth} ip={IP}",
userId, userEmail, auth, HttpContext.Connection.RemoteIpAddress);
return await JSONAsync(new
{
login = userEmail,
@@ -192,7 +212,10 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
private async Task<IActionResult> HandleLogout()
{
_logger.LogInformation("Logout user={User} ip={IP}",
UserAccountID, HttpContext.Connection.RemoteIpAddress);
await HttpContext.SignOutAsync(Fuchs_intranet.AuthScheme);
_logger.LogDebug("Logout sign-out complete for user={User}", UserAccountID);
return Ok();
}
@@ -201,16 +224,27 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
{
string? lastname = Request.Form["lastname"];
string? email = Request.Form["email"];
if (string.IsNullOrEmpty(lastname) || string.IsNullOrEmpty(email)) return BadRequest400();
_logger.LogDebug("HandleSendPasswordCode called for email={Email}", email);
if (string.IsNullOrEmpty(lastname) || string.IsNullOrEmpty(email))
{
_logger.LogWarning("HandleSendPasswordCode missing lastname or email");
return BadRequest400();
}
var row = await _intranet.GetUserAccountByEmailAsync(email);
if (row != null && row.nz("email").Length > 5 &&
row.nz("name").ToLower().Trim() == lastname.ToLower().Trim() &&
row.nz("mobile").Length > 5 && !Request.Host.Host.ToLower().Contains("localhost"))
{
_logger.LogInformation("Sending password code SMS to mobile for email={Email}", email);
string totp = OCORE.security.TFA.generateTotp_12h(_intranet.Intranet__TOTPsharedsecret_base);
await _comService.SendSmsAsync(row.nz("mobile"),
"Zur Bestätigung des Passwortversands auf sanitarfuchs.de, verwenden Sie bitte folgenden Code:" + totp);
_logger.LogDebug("Password code SMS sent for email={Email}", email);
}
else
{
_logger.LogDebug("HandleSendPasswordCode: no SMS sent for email={Email} (user not found, name mismatch, no mobile, or localhost)", email);
}
return Ok(); // always OK to prevent enumeration
}
@@ -220,34 +254,57 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
string? lastname = Request.Form["lastname"];
string? email = Request.Form["email"];
string? totpCode = Request.Form["code"];
_logger.LogDebug("HandleSendPassword called for email={Email}", email);
if (string.IsNullOrEmpty(lastname) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(totpCode))
return BadRequest400();
if (OCORE.security.TFA.validateTotp_12h(_intranet.Intranet__TOTPsharedsecret_base, totpCode).isVerifiedInTime)
{
_logger.LogWarning("HandleSendPassword missing required fields (lastname, email or code)");
return BadRequest400();
}
var totpResult = OCORE.security.TFA.validateTotp_12h(_intranet.Intranet__TOTPsharedsecret_base, totpCode);
if (totpResult.isVerifiedInTime)
{
_logger.LogDebug("HandleSendPassword TOTP verified for email={Email}", email);
var row = await _intranet.GetUserAccountByEmailAsync(email, includePassword: true);
if (row != null && row.nz("email").Length > 5)
{
_logger.LogInformation("Sending password email to email={Email}", email);
await _comService.SendEmailAsync("pw_" + row.nz("email"),
"sanitaerfuchs.de Intranet Passwort",
$"<p>Guten Tag {row.nz("firstname")} {row.nz("name")},<br/>Ihr Passwort: {HttpUtility.HtmlEncode(row.nz("password"))}</p>",
row.nz("email"), $"{row.nz("firstname")} {row.nz("name")}", null);
_logger.LogDebug("Password email sent for email={Email}", email);
}
else
{
_logger.LogWarning("HandleSendPassword: user not found for email={Email}", email);
}
}
else
{
_logger.LogWarning("HandleSendPassword: TOTP verification failed for email={Email}", email);
}
return Ok();
}
private async Task<IActionResult> HandleAccount(string fn, string id, string code)
{
_logger.LogDebug("HandleAccount action={Action} user={User}", id, UserAccountID);
switch (id.ToLower())
{
case "sms":
var row = await _intranet.GetUserAccountByEmailAsync(UserIdent.Email, includePassword: true);
if (row != null && row.nz("mobile").Length > 5 && !Request.Host.Host.Contains("localhost"))
{
_logger.LogInformation("Sending change-password confirmation SMS to user={User}", UserAccountID);
string totp2 = OCORE.security.TFA.generateTotp_3h(_intranet.Intranet__TOTPsharedsecret_base + "3MDR");
await _comService.SendSmsAsync(row.nz("mobile"),
"Zur Bestätigung der Passwortänderung auf sanitarfuchs.de: " + totp2);
_logger.LogDebug("Change-password SMS sent for user={User}", UserAccountID);
}
else
{
_logger.LogDebug("HandleAccount sms: no SMS sent for user={User} (no mobile or localhost)", UserAccountID);
}
return Ok();
@@ -256,9 +313,16 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
string? npwc = Request.Form["npwc"];
string? totpCode = Request.Form["code"];
if (string.IsNullOrEmpty(npw) || string.IsNullOrEmpty(npwc) || string.IsNullOrEmpty(totpCode))
{
_logger.LogWarning("HandleAccount changepassword: missing required fields for user={User}", UserAccountID);
return BadRequest400();
}
if (!OCORE.security.TFA.validateTotp_3h(_intranet.Intranet__TOTPsharedsecret_base + "3MDR", totpCode).isVerifiedInTime)
{
_logger.LogWarning("HandleAccount changepassword: TOTP verification failed for user={User}", UserAccountID);
return StatusCode(409, new { error = "sms" });
}
_logger.LogInformation("Changing password for user={User}", UserAccountID);
await setSQLValue_async(
"EXECUTE [dbo].[fis_admin_setNewPassword] @useraccount_id, @oldpassword, @newpassword, @enc_key;",
_intranet.Intranet__SQLConnectionString,
@@ -269,39 +333,55 @@ public partial class IntranetController : Microsoft.AspNetCore.Mvc.Controller
SQL_VarChar("@newpassword", npw)
},
Security: DbSec, options: SqlOpt(fn, id, code));
_logger.LogDebug("Password changed successfully for user={User}", UserAccountID);
return Ok();
}
_logger.LogWarning("HandleAccount unknown action={Action} user={User}", id, UserAccountID);
return Ok();
}
private async Task<IActionResult> HandleMfr(string fn, string id, string code)
{
_logger.LogDebug("HandleMfr id={Id} code={Code} user={User} auth={Auth}",
id, code, UserAccountID, UserIdent.Authorization);
if (!string.IsNullOrEmpty(UserAccountID) && UserIdent.Authorization > 3)
{
string path = id + (!string.IsNullOrEmpty(code) ? "/" + code : HttpUtility.UrlDecode(Request.QueryString.Value ?? ""));
_logger.LogDebug("HandleMfr reading OData path={Path} user={User}", path, UserAccountID);
using var mfrRead = new fds.FdsMfrClient();
var result = await mfrRead.ReadOData(path, throwErrorIfNotOk: false);
_logger.LogDebug("HandleMfr OData read complete for path={Path} user={User}", path, UserAccountID);
return Content(JsonConvert.SerializeObject(result), "application/json");
}
_logger.LogWarning("HandleMfr access denied for user={User} authorization={Auth}",
UserAccountID, UserIdent.Authorization);
return Ok();
}
private async Task<IActionResult> HandleMfrUpdate(string fn, string id, string code)
{
var et = EntityHelper.EntityValue(Request.Form["type"].ToString());
string typeParam = Request.Form["type"].ToString();
string needParam = Request.Form["need"].ToString();
var et = EntityHelper.EntityValue(typeParam);
_logger.LogDebug("HandleMfrUpdate type={Type} need={Need} user={User}", typeParam, needParam, UserAccountID);
if (et != EntityTypes.none && string.IsNullOrEmpty(Request.Form["need"]))
{
_logger.LogInformation("MfrUpdate entity={EntityType} need=Short user={User}", et, UserAccountID);
using var mfrSingle = new fds.FdsMfrClient();
await mfrSingle.Update__entitytable(et, fds.FdsMfr.UpdateNeed.Short);
_logger.LogDebug("MfrUpdate Short completed for entity={EntityType}", et);
return Ok();
}
if (et != EntityTypes.none && !string.IsNullOrEmpty(Request.Form["need"]))
{
var need = fds.FdsMfr.UpdateNeedValue(Request.Form["need"].ToString());
var need = fds.FdsMfr.UpdateNeedValue(needParam);
_logger.LogInformation("MfrUpdate entity={EntityType} need={Need} user={User}", et, need, UserAccountID);
using var mfr = new fds.FdsMfrClient();
await mfr.Update__entitytable(et, updateNeed: need, debugDetails: false);
_logger.LogDebug("MfrUpdate completed for entity={EntityType} need={Need}", et, need);
return Ok();
}
_logger.LogWarning("HandleMfrUpdate bad request: unknown type={Type} user={User}", typeParam, UserAccountID);
return BadRequest400();
}
}
+1 -1
View File
@@ -224,7 +224,7 @@ function getMonday(d) {
$.fn.rwText = function (text, addtitle, options) {
var tgt = $(this).empty();
options = $.extend({ wrap: true }, options);
var sa = Array.isArray(text) === true ? text : (text || '').split('\n');
var sa = Array.isArray(text) === true ? text : (text == null ? '' : String(text)).split('\n');
$.each(sa, function (ti, tx) {
if ((tx || '') !== '') {
if (ti > 0) {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1317,7 +1317,7 @@ function getMonday(d) {
$.fn.rwText = function (text, addtitle, options) {
var tgt = $(this).empty();
options = $.extend({ wrap: true }, options);
var sa = Array.isArray(text) === true ? text : (text || '').split('\n');
var sa = Array.isArray(text) === true ? text : (text == null ? '' : String(text)).split('\n');
$.each(sa, function (ti, tx) {
if ((tx || '') !== '') {
if (ti > 0) {
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+351
View File
@@ -0,0 +1,351 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
a:link
{color:#0563C1;
text-decoration:underline;
text-underline:single;
}
.auto-style1 {
text-indent: -18.0pt;
line-height: 107%;
font-size: 11.0pt;
font-family: Calibri, sans-serif;
margin-left: 36.0pt;
margin-right: 0cm;
margin-top: 0cm;
margin-bottom: 0cm;
}
.auto-style2 {
text-indent: -18.0pt;
line-height: 107%;
font-size: 11.0pt;
font-family: Calibri, sans-serif;
margin-left: 36.0pt;
margin-right: 0cm;
margin-top: 0cm;
margin-bottom: 8.0pt;
}
</style>
</head>
<body>
<div style="display: block;padding:1rem;">
<h1 style="margin-bottom:1rem;">Projekt ToDos und Ideen</h1>
</div>
<p>
&nbsp;</p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Rechnungseditor<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:
Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Opt. Textfeld oberhalb der Tabelle<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:
Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Opt. Textfeld unterhalb der Tabelle<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Textbausteine<o:p></o:p></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#9CC2E5;
mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153">Eigene Rechnung hochladen (nicht autom/online erzeugt)<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Anlegen eines Datensatzes (zur Nummernvergabe) <o:p></o:p></span>
</p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Upload des pdf-Dokuments<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Rechnungen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>UTC -&gt; local<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]>Rechnungs-Nummernkreis für FDS<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>(<span style="mso-spacerun:yes">&nbsp; </span><s>ab R2021-1196<span style="mso-spacerun:yes">&nbsp; </span>)<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Storno-Rechnung<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">„Freigabe“ des Auftrags/der Aufträge<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level4 lfo1">
<![if !supportLists]><span style="font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">wahlweise ohne Freigabe der Aufträge<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Storno als neue Rechnung mit neg. Betrag<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Storno als Kopie der stornierten Rechnung mit Berücksichtigung des stornierten Betrages<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Fortsetzen von Rechnungsentwürfen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family: &quot;Courier New&quot;; mso-fareast-font-family: &quot;Courier New&quot;; color: #70AD47; mso-themecolor: accent6; background: yellow; mso-highlight: yellow"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color: #70AD47; mso-themecolor: accent6; background: yellow; mso-highlight: yellow">Löschen von Rechnungsentwürfen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Abschlags-Rechnungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Abschlagsrechnungen erstellen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">„Offen lassen“ von Aufträgen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Berücksichtigung von Abschlagsrechnungen in abschließende Rechnungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Angepasste Texte für A.Rechnungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Nummerierte Abschlagsrechnungen je „Hauptauftrag“</span><o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Anzeige der Abschlagsrechnungen unterhalb aller Aufträge und Zwischensummen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Zahlungs-Status anzeigen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Zahlungs-Summe anzeigen<span style="mso-spacerun:yes">&nbsp; </span>(eingegangene Beträge)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Zugeordnete Buchungen anzeigen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Manuelles Abschließen<span style="mso-spacerun:yes">&nbsp; </span>(Bezahlt markieren = ist bezahlt)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Manuelles Abschließen<span style="mso-spacerun:yes">&nbsp; </span>(Bezahlt markieren = ist nicht (vollst.) bezahlt)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#92D050"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Seitenzahlen in das Layout<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#92D050"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">GoDB-Konforme elektronische Rechnungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>ZUGFeRD<span style="mso-spacerun:yes">&nbsp; </span>Meta-Daten für E-Invoicing<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>GiroCode<span style="mso-spacerun:yes">&nbsp; </span>(EPC-QR-Code mit Rechnungsdaten;<span style="mso-spacerun:yes">&nbsp; </span>Banking Apps können das lesen)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#92D050"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#92D050">Auf der Rechnung<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Auf der Mahnung <span style="mso-spacerun:yes">&nbsp;&nbsp;</span>(nur offener Betrag)<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]>In den Emails<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#92D050"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Emails individualisiert<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family: &quot;Courier New&quot;; mso-fareast-font-family: &quot;Courier New&quot;; background: yellow; mso-highlight: yellow"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="background: yellow; mso-highlight: yellow">Hinweis wenn keine Email-Adresse<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level2 lfo2">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153">Post-Versand über „</span><a href="https://emailbrief.de/"><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Emailbrief</span></a><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">.de“<span style="mso-spacerun:yes">&nbsp; </span>(Die pdfs werden direkt über einen Online-Dienst postalisch versandt)<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level2 lfo2">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Änderungen Rechnung 09.06.2021<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Auftragsname veränderbar<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Anstatt Auftragsnamen -&gt; Ausgeführte Arbeiten aus der Checkliste<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Positionsnummern aktualisieren bei gelöschten Zeilen,<span style="mso-spacerun:yes">&nbsp; </span>wenn da gewesen.<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Keine Zwischensumme wenn nur ein Auftrag<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Default<span style="mso-spacerun:yes">&nbsp; </span>UsT<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">USt pro Auftrag „zusammen“ verändern<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Finanzamtshinweis<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>„Als Privathaushalt<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>….. von dieser Rechnung<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Rechnungsnummer = nicht auswählbar in der Liste<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Datum des Auftrags<span style="mso-spacerun:yes">&nbsp; </span>bei jedem Auftrag<span style="mso-spacerun:yes">&nbsp; </span>„01.01.21: “ <o:p></o:p></span>
</p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Formular :<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>Anzahl verändern -&gt; Gesamtbetrag verändern<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Doppelung der Hinweistexte<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Zeitraum<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level2 lfo2">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Auftragsliste<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#70AD47;
mso-themecolor:accent6"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Kunden in Liste<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Kunde in Detail-Ansicht<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#70AD47;
mso-themecolor:accent6"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Einsatzorte korrigieren<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l1 level1 lfo2">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#9CC2E5;
mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153"><o:p>&nbsp;</o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Datev-Export:<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Rechnungskopie im Zip<span style="mso-spacerun:yes">&nbsp; </span>(für nicht-MFR-Rechnungen (fds))<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Download von Rechnungen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Aktualisierung des Button in der Rechnungsliste für fds-Dokumente<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Übersicht je Kunde<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Rechnungen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Aufträge<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Kontobewegungen<o:p></o:p></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153">Unterschiedliche Rechte für Rechnungen mit und ohne Preisanpassungen</span><o:p></o:p></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Verarbeitung von Kontobewegungen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Zuordnungsliste<span style="mso-spacerun:yes">&nbsp; </span>(alle Buchungen mit autom. + manuellen Zuordnungen)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Manuelle Zuordnung<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Manuelle Bestätigung erforderlich<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Autom. Zuordnung zu Rechnungen<span style="mso-spacerun:yes">&nbsp; </span>(Abgleich mit Kunden- und Rechnungsinfos)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Überlauf<span style="mso-spacerun:yes">&nbsp; </span>(Eingänge nicht zuordenbar)<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Zuordnung löschen<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level2 lfo2">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153">Anbindung ein Banking-API System (bspw </span><a href="https://banksapi.de/api/"><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153;text-decoration:none;text-underline:none">https://banksapi.de/api/</span></a><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">) zur autom. Abfrage von Buchungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Mahnungs-Modul<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>Mahnungsvorschläge<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s>Mahnsperre ?<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Mahnungserstellung <o:p></o:p></span>
</p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">3 Mahn-Stufen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Online-Editor<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#70AD47;mso-themecolor:accent6"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#70AD47;mso-themecolor:accent6">Autom. Versand<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#B4C7E7;mso-themecolor:accent1;mso-themetint:102;mso-style-textfill-fill-color:
#B4C7E7;mso-style-textfill-fill-themecolor:accent1;mso-style-textfill-fill-alpha:
100.0%;mso-style-textfill-fill-colortransforms:&quot;lumm=40000 lumo=60000&quot;"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#B4C7E7;mso-themecolor:accent1;mso-themetint:102;mso-style-textfill-fill-color:
#B4C7E7;mso-style-textfill-fill-themecolor:accent1;mso-style-textfill-fill-alpha:
100.0%;mso-style-textfill-fill-colortransforms:&quot;lumm=40000 lumo=60000&quot;">Postversand<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l1 level2 lfo2">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s><span style="color:#9CC2E5;mso-themecolor:
accent5;mso-themetint:153">Unterschiedliche Texte/Vorlagen für unterschiedliche Kunden-Typen<o:p></o:p></span></s></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#9CC2E5;
mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;
mso-themetint:153">Tageszusammenfassungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:
Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Neue fertige Aufträge<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>(für Rechnungen)<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:
Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Neue überfällige Rechnungen<span style="mso-spacerun:yes">&nbsp; </span>(für Mahnungen)<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153"><span style="mso-list:
Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#9CC2E5;mso-themecolor:accent5;mso-themetint:153">Auffällige Kontobuchungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><s><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></s><![endif]><s>Adressbuch<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s>Matching zu MFR-Kunden<span style="mso-spacerun:yes">&nbsp; </span>(CustomerID)<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s>Kontaktpersonen<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s>„Liefer“-Adressen<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s>Administrative Standardadressen<span style="mso-spacerun:yes">&nbsp; </span>(Post und Email) für best. Zwecke (z.B. Rechnungen, Mahnungen, Ansprechpartner)<o:p></o:p></s></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><s><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span></s><![endif]><s>Auswahlmöglichkeit im Rechnungs- und Mahnungs-Editor<o:p></o:p></s></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri;color:#92D050"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#92D050">Email-Log<o:p></o:p></span></p>
<p class="auto-style1" style="mso-list: l0 level1 lfo1">
<![if !supportLists]><span style="mso-ascii-font-family:Calibri;mso-fareast-font-family:Calibri;
mso-hansi-font-family:Calibri;mso-bidi-font-family:Calibri"><span style="mso-list:Ignore">-<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Sicherheit<o:p></o:p></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#5B9BD5;mso-themecolor:accent5"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#5B9BD5;mso-themecolor:accent5">Verschlüsselung der Datenbank<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;;
color:#5B9BD5;mso-themecolor:accent5"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]><span style="color:#5B9BD5;mso-themecolor:accent5">Modul-Autorisierungen<o:p></o:p></span></p>
<p class="auto-style1" style="mso-add-space: auto; mso-list: l0 level3 lfo1">
<![if !supportLists]><span style="font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#5B9BD5;mso-themecolor:accent5"><span style="mso-list:Ignore">§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><![endif]><span style="color:#5B9BD5;mso-themecolor:accent5">Unterschiedliche Rechte für Rechnungen mit und ohne Preisanpassungen<o:p></o:p></span></p>
<p class="auto-style2" style="mso-add-space: auto; mso-list: l0 level2 lfo1">
<![if !supportLists]><span style="font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Courier New&quot;"><span style="mso-list:Ignore">o<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp; </span></span></span><![endif]>S/MIME-Signatur der ausgehenden Emails<o:p></o:p></p>
<p class="MsoNormal">
<o:p>&nbsp;</o:p></p>
<p class="MsoNormal">
<o:p>&nbsp;</o:p></p>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

@@ -0,0 +1,116 @@
@imports OCMS
@ModelType Global.OCMS.intranet.intranet_model
@code
Dim Ctrl As Global.OCMS.intranet.Controllers.IntranetController_base = If(GetType(Global.OCMS.intranet.Controllers.IntranetController_base).IsAssignableFrom(Me.ViewContext.Controller.GetType()), DirectCast(Me.ViewContext.Controller, Global.OCMS.intranet.Controllers.IntranetController_base), Nothing)
Dim AccountName As String = "" 'Ctrl.AccountInfo.AccountName
Dim RequestedAccount As String = "" 'Ctrl.RequestedAccount
Dim isIE As Boolean = Global.OCMS.intranet.OCMS_intranet.isUNSupportedBrowser(Ctrl)
Dim textsdic As New LanguageTextDic("de")
With textsdic
.Add("noie", "Dieser Browser wird leider nicht unterstützt. Bitte verwenden Sie Edge, Firefox oder Chrome.", "This browser is unfortunately not supported. Please use Edge, Firefox, or Chrome instead.")
.Add("dph", "Datenschutz", "Data Protection & Privacy")
.Add("dps", "Diese Webseite ist ein nicht-öffentliches Online-Portal. Der Zugang ist ausschließlich für autorisierte Personen der jeweiligen Organisation vorbehalten." & vbNewLine & vbNewLine & "Bei Besuch dieser Anmeldeseite werden keine personenbezogen Daten erfasst und gespeichert, die Sie nicht selbst übermitteln. Übermittelte Daten werden ohne Ihre ausdrückliche Zustimmung generell nicht an Dritte weitergegeben." & vbNewLine &
"Zur Verminderung grundsätzlicher Sicherheitsrisiken bei der Datenübertragung im Internet findet die Kommunikation mit dem Server in beiden Richtungen grundsätzlich über eine gesicherte Verbindung statt." & vbNewLine & vbNewLine &
"Für die Nutzung der Seite als angemeldeter Benutzer beachten Sie bitte die ausführliche Datenschutzerklärung.",
"This website is a private online portal. Access have only members and authorized persons of the respective organisation." & vbNewLine & vbNewLine & "At visit of this login page, no individual-related data will be captured and stored, that you did not submit yourself. Sent data will generally not be distributed to third parties without your explicit consent." & vbNewLine &
"To reduce general security risks of transmitting data over the internet is the communication with the server in both directions generally via a secured connection." & vbNewLine & vbNewLine &
"For the use of this website as registered and logged-on user, please take note of the detailed data protection statements.")
.Add("ccc", "Ich stimme der Nutzung von Cookies zur Authentifizierung im internen Bereich zu.", "I consent to the use of cookies for authenticating in the internal area.")
End With
End Code
<div class="modal">
<div id="oci_login" class="modal-dialog in">
@If isIE = False Then
@<div class="modal-content" novalidate="true">
<div Class="modal-header">
@If AccountName <> "" Then
@<h2>@(AccountName)</h2>
End If
<h3>@(Ctrl.AppName)</h3>
</div>
</div>
@<div class="modal-content" novalidate="true">
<form id="loginform" role="form" action="javascript:void(0);">
<div class="modal-header"><h3 class="modal-title">Anmeldung</h3></div>
<div class="modal-body">
<div class="form-body">
@If ctrl.Intranet.isAccountRequired = True AndAlso RequestedAccount = "" Then
@<div class="form-group">
<div class="form-itm">
<label for="dlg_loginaccount">Account<span class="ind_required">*</span></label>
</div>
<div class="form-itm">
<input id="dlg_loginaccount" name="loginaccount" required placeholder="Account" class="form-control" value="@(RequestedAccount)" />
</div>
</div>
@<div class="form-group"><div class="form-sep"></div><div class="form-sep"></div></div>
End If
<div class="form-group">
<div class="form-itm">
<label for="dlg_userinfo">Email / Anmeldename<span class="ind_required" vm-nvnote="Bitte tragen Sie hier Ihren Anmeldenamen oder Ihre Email-Adresse ein.">*</span></label>
</div>
<div class="form-itm">
<input id="dlg_userinfo" name="userinfo" required placeholder="Email-Adresse / Anmeldename" class="form-control" @(If(Ctrl.Intranet.isExtendedUserlookup, " onchange=""$ocms.login.uichange.call(this);""", "").raw()) />
</div>
</div>
@If Ctrl.Intranet.isExtendedUserlookup = True Then
@<div class="form-group hd">
<input id="dlg_userlogin" name="userlogin" required class="form-control" type="hidden" />
</div>
@<div class="form-group">
<div class="form-itm">
<label for="dlg_username">Benutzer<span class="ind_required">*</span></label>
</div>
<div class="form-itm">
<input id="dlg_username" name="username" required placeholder="Wird vom System ermittelt..." readonly="readonly" class="form-control" />
</div>
</div>
End If
<div class="form-group">
<div class="form-itm">
<label for="dlg_userpass">Passwort<span class="ind_required">*</span></label>
</div>
<div class="form-itm">
<input id="dlg_userpass" name="userpass" required placeholder="Passwort" class="form-control" type="password" />
</div>
</div>
</div>
</div>
@If Ctrl.Intranet.isCookieConfirmationOnLogin = True Then
@<div class="modal-footer">
<div style="display: block;">
<table>
<tbody><tr>
<td>
<input type="checkbox" class="custom-control-input" id="login-cookie" name="cookieconfirmed" autocomplete="off" value="true" required="" data-note="Zum Anmelden müssen Sie zustimmen.">
</td>
<td>
<label class="custom-control-label" for="login-cookie">@textsdic("ccc")</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
End If
<div class="modal-footer">
<div class="note_required"><span class="ind_required">*</span><span>Eingabe erforderlich.</span></div>
<div id="dbtn-forgotpw" class="btn btn-sm" onclick="$ocms.login.sendpassword.call(this, event);">Passwort vergessen?</div>
<Button id="dbtn-confirm" type="submit" class="btn btn-primary">Anmelden</button>
</div>
<div id="dataprivacy" class="modal-note"><h3>@textsdic("dph")</h3><p>@textsdic.rwMVC("dps")</p></div>
</form>
</div>
Else
@<div class="modal-content"><div class="modal-body alert">@textsdic("noie")</div></div>
End If
</div>
</div>
@@ -0,0 +1,6 @@
@imports OCMS
@ModelType Global.OCMS.intranet.intranet_model
@code
End Code
+19
View File
@@ -0,0 +1,19 @@
@imports OCMS
@ModelType Global.OCMS.intranet.intranet_model
@Code
ViewData("Title") = "Fuchs Intranet"
Dim Ctrl As Global.OCMS.intranet.Controllers.IntranetController_base = If(GetType(Global.OCMS.intranet.Controllers.IntranetController_base).IsAssignableFrom(Me.ViewContext.Controller.GetType()), DirectCast(Me.ViewContext.Controller, Global.OCMS.intranet.Controllers.IntranetController_base), Nothing)
Dim userident As Global.OCMS.ocms_UserIdentity = If(IsNothing(Ctrl) = False, Ctrl.UserIdent_base, Nothing)
Dim isAuth As Boolean = If(IsNothing(userident), False, userident.isAuthenticated())
End Code
@Section CustomHeader
@Me.Context.MvcLink("web/fuchs.css", MinIfNotDebug:=True, appendDateSuffix:=True)
@Me.Context.MvcLink("web/fuchs.js", MinIfNotDebug:=True, appendDateSuffix:=True)
End Section
@If isAuth = True Then
End If
+109
View File
@@ -0,0 +1,109 @@
@imports OCMS
@imports json = Newtonsoft.Json.JsonConvert
@ModelType Global.OCMS.intranet.intranet_model
@code
Dim Ctrl As Global.OCMS.intranet.Controllers.IntranetController_base = If(GetType(Global.OCMS.intranet.Controllers.IntranetController_base).IsAssignableFrom(Me.ViewContext.Controller.GetType()), DirectCast(Me.ViewContext.Controller, Global.OCMS.intranet.Controllers.IntranetController_base), Nothing)
Dim userident As Global.OCMS.ocms_UserIdentity = If(IsNothing(Ctrl) = False, Ctrl.UserIdent_base, Nothing)
Dim isAuth As Boolean = If(IsNothing(userident), False, userident.isAuthenticated())
Dim isIE As Boolean = Global.OCMS.intranet.OCMS_intranet.isUNSupportedBrowser(Ctrl)
Dim UserDic As New Global.OCMS.GenericObjectDictionary(If(IsNothing(userident) = False, userident.toDictionary, New Dictionary(Of String, Object)))
Dim authinfo As New Dictionary(Of String, Object)
If isAuth = True Then
UserDic.CopyTo(authinfo)
End If
authinfo.set("requestedaccount", Ctrl.RequestedAccount)
authinfo.set("accountrequired", Ctrl.isAccountRequired)
Dim textsdic As New LanguageTextDic("de")
With textsdic
.Add("lgo", "abmelden", "log out")
.Add("rsp", "Passwort ändern", "Change Password")
.Add("po", "Übersicht", "Overview")
End With
End Code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@(If(If(Me.ViewData("Title"), "") <> "", Me.ViewData("Title"), "Intranet"))</title>
@Me.Context.MvcLink("/web/tools.min.css", appendDateSuffix:=True)
@Me.Context.MvcLink("/web/tools.js", appendDateSuffix:=True)
@If isAuth = True AndAlso isIE = False Then
@Me.Context.MvcLink("/Scripts/tinymce/tinymce.js")
@Me.Context.MvcLink("/web/fis.css", appendDateSuffix:=True)
@Me.Context.MvcLink("/web/fis.js", appendDateSuffix:=True)
Else
@Me.Context.MvcLink("/web/fisb.css", appendDateSuffix:=True)
@Me.Context.MvcLink("/web/fisb.js", appendDateSuffix:=True)
End If
@RenderSection("CustomHeader", False)
@*<!--[if IE]>
<link rel="stylesheet" type="text/css" href="/web/ie_compatibility.min.css" />
<![endif]-->*@
<script type="text/javascript">
//$(document).ready(function () { $('body').removeClass('ldng'); if ($.isFunction(w13.init)) { w13.init.call(this); } });
$ocms.auth = @(json.SerializeObject(authinfo).raw());
</script>
</head>
<body Class="ldng">
<div id = "bgimg" ></div>
@If isAuth = True AndAlso isIE = False Then
@<div class="pgb inactive">
@*style="transform: translate3d(100%, 0px, 0px);" data-progress-text="100%" data-progress="99"*@
<div class="pgb-progress">
<div class="inner"></div>
</div>
</div>
@<header>
<nav id="mainmenu">
<div class="nav-header">
<div id="logo">&nbsp;</div>
<button id="mmmb" class="nav-btn" data-toggle="vis" data-target="#mainmenu"><span class="glyphicon glyphicon-menu-hamburger"></span></button>
<div id="brand" class="brand" title="Account: rcgd">@(Ctrl.AppName)</div>
<div id="activemodule" class="activemodule">@textsdic("po")</div>
</div>
<ul class="nav-right">
<li class="dropdown">
<a class="dds dropdown-toggle" role="button" aria-expanded="false"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span><span class="caret dd"></span></a>
<ul id="vm_menu_auth" class="dropdown-menu right" role="menu">
<li class="dropdown submenu">
<a class="dds dropdown-toggle" role="button" aria-expanded="false">@UserDic("fullname_rev")<span class="caret dd"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a onclick="$ocms.logout.call(this);">@textsdic("lgo")</a></li>
<li><a onclick="$fis.resetPass.call(this);">@textsdic("rsp")</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
@RenderSection("BodyHeader", False)
</header>
@<main>
@*<div id="sidebar"></div>*@
<div id="topbar"></div>
<div id="listframe"></div>
<div id="contentframe">
@RenderBody()
</div>
</main>
@<footer>
@RenderSection("BodyFooter", False)
</footer>
Else
Try
@Html.Partial(partialViewName:="~/Areas/intranet/Views/Partials/vpart__ocms_login.vbhtml", model:=Me.Model, viewData:=ViewData)
Catch ex As Exception
System.Diagnostics.Debug.WriteLine("partial: vpart__ocms_login" & Microsoft.VisualBasic.vbNewLine & ex.Message)
End Try
@RenderBody()
End If
<div class="timer"></div>
</body>
</html>
@@ -0,0 +1,17 @@
@imports OCMS
@ModelType Global.OCMS.intranet.intranet_model
@Code
ViewData("Title") = "Fuchs Intranet"
Dim Ctrl As Global.OCMS.intranet.Controllers.IntranetController_base = If(GetType(Global.OCMS.intranet.Controllers.IntranetController_base).IsAssignableFrom(Me.ViewContext.Controller.GetType()), DirectCast(Me.ViewContext.Controller, Global.OCMS.intranet.Controllers.IntranetController_base), Nothing)
Dim userident As Global.OCMS.ocms_UserIdentity = If(IsNothing(Ctrl) = False, Ctrl.UserIdent_base, Nothing)
Dim isAuth As Boolean = If(IsNothing(userident), False, userident.isAuthenticated())
End Code
@Section CustomHeader
End Section
@If isAuth = True Then
End If
+3
View File
@@ -0,0 +1,3 @@
@Code
Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.Optimization" />
<add namespace="Wilde13" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
Binary file not shown.
+141
View File
@@ -0,0 +1,141 @@
Option Explicit On
Imports json = Newtonsoft.Json.JsonConvert
Imports vbs = Microsoft.VisualBasic.Strings
Imports OCMS
Imports OCMS.SQLHandling
Imports programmersdigest.MT940Parser
Namespace Global.Fuchs.intranet.banking
Module _banking
Public Function DebitCreditMark_Abb(Mark As DebitCreditMark) As String
Select Case Mark
Case programmersdigest.MT940Parser.DebitCreditMark.Credit
Return "C"
Case programmersdigest.MT940Parser.DebitCreditMark.Debit
Return "D"
Case programmersdigest.MT940Parser.DebitCreditMark.ReverseCredit
Return "RC"
Case programmersdigest.MT940Parser.DebitCreditMark.ReverseDebit
Return "RD"
Case Else : Return ""
End Select
End Function
Public Function parseToDatatable(ByVal stream As IO.Stream, Optional ByVal SchemaDatatable As DataTable = Nothing) As DataTable
Dim tbl As DataTable
If IsNothing(SchemaDatatable) Then
tbl = New DataTable()
With tbl.Columns
.Add("AccountIdentification", type:=GetType(String))
.Add("Amount", type:=GetType(Decimal))
.Add("BankReference", type:=GetType(String))
'.Add("CustomerReference", type:=GetType(String))
.Add("EntryDate", type:=GetType(Date))
.Add("FundsCode", type:=GetType(String))
.Add("AccountNumberOfPayer", type:=GetType(String))
.Add("BankCodeOfPayer", type:=GetType(String))
.Add("CompensationAmount", type:=GetType(String))
.Add("CreditorReference", type:=GetType(String))
.Add("CreditorsReferenceParty", type:=GetType(String))
.Add("CustomerReference", type:=GetType(String))
.Add("EndToEndReference", type:=GetType(String))
.Add("JournalNumber", type:=GetType(String))
.Add("MandateReference", type:=GetType(String))
.Add("NameOfPayer", type:=GetType(String))
.Add("OriginalAmount", type:=GetType(String))
.Add("OriginatorsIdentificationCode", type:=GetType(String))
.Add("PayersReferenceParty", type:=GetType(String))
.Add("PostingText", type:=GetType(String))
.Add("SepaRemittanceInformation", type:=GetType(String))
.Add("TextKeyAddition", type:=GetType(Integer))
.Add("TransactionCode", type:=GetType(Integer))
.Add("IsUnstructuredData", type:=GetType(Boolean))
.Add("UnstructuredData", type:=GetType(String))
.Add("UnstructuredRemittanceInformation", type:=GetType(String))
.Add("DebitCreditMark", type:=GetType(String))
.Add("SupplementaryDetails", type:=GetType(String))
.Add("TransactionTypeIdCode", type:=GetType(String))
.Add("ValueDate", type:=GetType(Date))
End With
Else
tbl = SchemaDatatable.Clone
End If
Using ps As New Parser(stream:=stream)
Try
Dim stl As New List(Of Statement)(ps.Parse)
For Each statement As Statement In stl
Try
If statement.AccountIdentification <> "" Then
For Each line As StatementLine In statement.Lines
Dim nr As DataRow = tbl.NewRow
Dim setnfo As New Action(Of String, Object)(Sub(key As String, info As Object)
If tbl.Columns.Contains(key) Then
nr.Item(key) = info
End If
End Sub)
setnfo("AccountIdentification", statement.AccountIdentification)
If line.Amount.HasValue = True Then setnfo("Amount", line.Amount)
setnfo("BankReference", line.BankReference)
'setnfo("CustomerReference", line.CustomerReference)
If line.EntryDate.HasValue = True Then setnfo("EntryDate", line.EntryDate)
If line.FundsCode.HasValue = True Then setnfo("FundsCode", line.FundsCode)
With line.InformationToOwner
setnfo("AccountNumberOfPayer", .AccountNumberOfPayer)
setnfo("BankCodeOfPayer", .BankCodeOfPayer)
setnfo("CompensationAmount", .CompensationAmount)
setnfo("CreditorReference", .CreditorReference)
setnfo("CreditorsReferenceParty", .CreditorsReferenceParty)
setnfo("CustomerReference", .CustomerReference)
setnfo("EndToEndReference", .EndToEndReference)
setnfo("JournalNumber", .JournalNumber)
setnfo("MandateReference", .MandateReference)
setnfo("NameOfPayer", .NameOfPayer)
setnfo("OriginalAmount", .OriginalAmount)
setnfo("OriginatorsIdentificationCode", .OriginatorsIdentificationCode)
setnfo("PayersReferenceParty", .PayersReferenceParty)
setnfo("PostingText", .PostingText)
setnfo("SepaRemittanceInformation", .SepaRemittanceInformation)
If .TextKeyAddition.HasValue Then setnfo("TextKeyAddition", .TextKeyAddition)
setnfo("TransactionCode", .TransactionCode)
setnfo("IsUnstructuredData", .IsUnstructuredData)
setnfo("UnstructuredData", .UnstructuredData)
setnfo("UnstructuredRemittanceInformation", .UnstructuredRemittanceInformation)
End With
setnfo("DebitCreditMark", DebitCreditMark_Abb(line.Mark))
setnfo("SupplementaryDetails", line.SupplementaryDetails)
setnfo("TransactionTypeIdCode", line.TransactionTypeIdCode)
setnfo("ValueDate", line.ValueDate)
tbl.Rows.Add(nr)
Next
End If
Catch ex2 As Exception
Diagnostics.Debug.Print(ex2.Message)
End Try
Next
Catch ex As Exception
Diagnostics.Debug.Print(ex.Message)
End Try
End Using
tbl.AcceptChanges()
Return tbl
End Function
End Module
End Namespace
+102
View File
@@ -0,0 +1,102 @@
Option Explicit On
Imports OCMS.SQLHandling
Imports json = Newtonsoft.Json.JsonConvert
Imports vb = Microsoft.VisualBasic
Imports oEmail = OCMS.ocms_email
Namespace Global.Fuchs.intranet
Module fuchs_fds_email
Private _FDS_EmailSettings As oEmail.EmailSettings = Nothing
Private Function EmailSettings() As oEmail.EmailSettings
If IsNothing(_FDS_EmailSettings) = True AndAlso My.Settings.FDS_EmailSettings <> "" Then
_FDS_EmailSettings = New oEmail.EmailSettings(My.Settings.FDS_EmailSettings)
End If
Return _FDS_EmailSettings
End Function
Public Async Function SendEmail(ByVal Ref As String, ByVal Subject As String, ByVal html As String, Email As String, Name As String, files As Dictionary(Of String, Byte()), Fuchs_intranet As Fuchs_intranet) As Threading.Tasks.Task(Of Boolean)
Dim ErrorMessage As New List(Of String), msgguid As String = "", msgsenttimestamp As Date, msgconfig As String = ""
If IsValidEmail(Email) = False Then ErrorMessage.Add("Die Email-Adresse ist nicht gültig.")
'If Name = "" Then ErrorMessage.Add("Bitte geben Sie Ihren Namen an.")
If html = "" Then ErrorMessage.Add("Bitte geben Sie eine Nachricht ein.")
If ErrorMessage.Count = 0 Then
Try
Dim signaturehtml As String = ""
Try
Dim signaturefile As New IO.FileInfo(OCMS.ocms_commons.ApplicationBase.FullName & "\Fuchs\email_signature\sanitaerfuchs_email_signature.txt")
If signaturefile.Exists Then
signaturehtml = "<p>&nbsp;</p><p style=""margin: 24px 0 16px 0;line-height:140%;"">Herzliche Grüße aus Düsseldorf-Bilk<br/>Ihr Team der Firma Sebastian Fuchs</p>"
signaturehtml &= IO.File.ReadAllText(signaturefile.FullName)
End If
Catch sfex As Exception
OCMS.debug_log("fuchs_fds_email.SendEmail(bool) signaturefile", ex:=sfex)
End Try
Dim msg As New oEmail.Email(Mode:=oEmail.EmailMode.DirectMode)
With msg
.EmailSettings = EmailSettings()
.AddTo(Email, Name)
.AddReplyTo(New MimeKit.MailboxAddress("Sebastian Fuchs - Bad und Heizung", "info@sanitaerfuchs.de"))
.Subject = Subject
.SetBody(html & signaturehtml)
End With
If IsNothing(files) = False Then
For Each filename As String In files.Keys
Dim file As Byte() = files(filename)
msg.AttachFile(file, filename)
Next
End If
Dim ESR As oEmail.EmailSendingResult = Await msg.SendAsync(Sub(dref As String, ex As Exception)
OCMS.debug_log("fuchs_fds_email.SendEmail(bool) " & dref, ex:=ex)
End Sub)
msgguid = msg.MessageId()
msgconfig = msg.EmailConfig_serialized()
msgsenttimestamp = ESR.Timestamp
ErrorMessage.AddRange(ESR.ErrorMessages.ToArray)
Catch smex As Exception
ErrorMessage.Add("Beim Versenden ist ein Fehler aufgetreten.")
OCMS.debug_log("fuchs_fds_email.SendEmail(bool) inner", ex:=smex, data:=ErrorMessage)
End Try
End If
If ErrorMessage.Count > 0 Then
OCMS.debug_log("fuchs_fds_email.SendEmail(bool) finally", ex:=Nothing, data:=ErrorMessage)
Else
Try
Dim pl As New ParamList() From {
SQL_VarChar("Ref", Ref),
SQL_VarChar("guid", msgguid),
SQL_datetime("DateSent", msgsenttimestamp),
SQL_NVarChar("config", msgconfig),
SQL_bit("success", ErrorMessage.Count = 0),
SQL_NVarChar("log", json.SerializeObject(ErrorMessage))
}
Await setSQLValue_async("EXECUTE [dbo].[fds__logEmail] @Ref, @guid, @DateSent, @config, @success, @log;", Fuchs_intranet.Intranet__SQLConnectionString, pl, ApplySymmetricKey:=Fuchs_intranet.Intranet__sql_symmetric_key)
Catch logex As Exception
OCMS.debug_log("fuchs_fds_email.SendEmail(bool) log", ex:=logex)
End Try
End If
Return If(ErrorMessage.Count > 0, False, True)
End Function
End Module
End Namespace
File diff suppressed because it is too large Load Diff
+390
View File
@@ -0,0 +1,390 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Imports System.IO
Imports System.Web.Mvc
Imports OCMS.intranet.Controllers
Imports SO_Tools.SO
Imports vbs = Microsoft.VisualBasic.Strings
Namespace Global.Fuchs.intranet
Public Module fuchs_fds_widgets
Public Async Function intranet_wdg(Ctrl As IntranetController, fn As String) As Threading.Tasks.Task(Of ActionResult)
Try
Select Case fn
Case "my"
Dim wdglist As New List(Of String)
Dim wdg_dt As SQLDataTable = Await getSQLDatatable_async("SELECT * FROM [dbo].[fis_getONEPersonWidgets] (@authuser);", Ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Ctrl.StdParamlist("@account", "fis"), ApplySymmetricKey:=Ctrl.Intranet.Intranet__sql_symmetric_key)
Dim wdg_rws As DataRow() = wdg_dt.Select("", If(wdg_dt.DataTable.Columns.Contains("order"), "order", ""))
Dim w As New List(Of String)
For Each wdg_rw As DataRow In wdg_rws
w.Add(wdg_rw.nz("short_name"))
'jsonstring_list.Add(VM_WDG_OneWDG(wdg_rw, PDic))
Next
Return Await JSONAsync(w.ToArray)
Case "one"
Dim wdg_dt As SQLDataTable = Await getSQLDatatable_async("SELECT * FROM [dbo].[fis_getONEPersonWidgets] (@authuser) WHERE [short_name] = @shortname;", Ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Ctrl.StdParamlist(SQL_VarChar("@shortname", Ctrl.Form("short_name")), SQL_VarChar("@account", "fis")), ApplySymmetricKey:=Ctrl.Intranet.Intranet__sql_symmetric_key)
If wdg_dt.Count = 1 Then
Return Await JSONAsync(Await Fuchs_WDG_OneWDG(wdg_dt.FirstRow(), Ctrl.StdParamlist(), constring:=Ctrl.Intranet.Intranet__SQLConnectionString, server_path:=Ctrl.Request.Url.BaseUrl.AppendIf("/") & "intranet/", authlogin:=Ctrl.UserIdent.useraccount_id))
Else
Return New ExceptionResult("", InternalCode:=OCMS_StatusCodes.exception)
End If
Case "one_chart"
Dim objectdic As New Dictionary(Of String, Object), ShortName As String = Ctrl.Form("short_name")
Dim wdg_dt As SQLDataTable = Await getSQLDatatable_async("SELECT TOP(1) * FROM [dbo].fis_widgets] WHERE [short_name] = @shortname;", Ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Ctrl.StdParamlist("@shortname", ShortName), ApplySymmetricKey:=Ctrl.Intranet.Intranet__sql_symmetric_key)
'Dim wdg_rws As DataRow() = wdg_dt.Select("", If(dt.Columns.Contains("order"), "order", ""))
If wdg_dt.Count = 1 Then
Return Await ImgAsync(img_b64:=(Await Fuchs_WDG_OneWDG(wdg_dt.FirstRow(), Ctrl.StdParamlist(), constring:=Ctrl.Intranet.Intranet__SQLConnectionString, server_path:=Ctrl.Request.Url.BaseUrl.AppendIf("/") & "intranet/", authlogin:=Ctrl.UserIdent.useraccount_id)).Item(ShortName), format:=Drawing.Imaging.ImageFormat.Png, FileDownloadName:=ShortName & ".png")
Else
Return New ExceptionResult("", InternalCode:=OCMS_StatusCodes.exception)
End If
End Select
Catch ex As Exception
debug_log("Global.Fuchs.intranet.fuchs_fds_widgets", ex:=ex, authuser:=Ctrl.UserAccountID, data:=Ctrl.Form)
Return New ExceptionResult("", InternalCode:=OCMS_StatusCodes.exception)
End Try
End Function
Public Async Function Fuchs_WDG_OneWDG_HTML(ByVal wdg_rw As DataRow, ByVal fuchs_plist As ParamList, constring As String) As Threading.Tasks.Task(Of String)
Dim Type As String = wdg_rw.nz("type").ToLower
Dim CacheData As String = "", ReturnString As String = ""
Dim DayCache As Boolean = False 'wdg_rw.NRw("daycache", True, False)
Dim Short_Name As String = wdg_rw.nz("short_name")
If left(Type, 3) = "sql" Then
Dim SQL As String = wdg_rw.nz("sql")
If Not SQL = "" Then
If Type = "sql_table" Then
Dim dt As SQLDataTable = Await getSQLDatatable_async(SQL, constring, fuchs_plist.Clone())
Dim dtrws As DataRow() = dt.Select("", If(dt.DataTable.Columns.Contains("order"), "order", ""))
Dim admincols As New List(Of String)
admincols.AddRange(wdg_rw.nz("sql_admin_columns").ToLower.Split(","))
Dim DTC As New Dictionary(Of String, String)
For Each dti As String In wdg_rw.nz("sql_datatypes").Split(",")
If Not dti = "" Then
Dim dtx As String() = dti.Split(":")
DTC.Add(dtx(0), dtx(1))
End If
Next
Dim wdgdiv As SOC = New SOC("div").style("background-color: #fff;border: 1px solid #ccc;border-radius: 6px;box-shadow: 1px 1px 3px 0 rgba(0,0,0,.17);height: 300px;margin-bottom: 10px;position: relative;width: 300px;margin-right: 15px;")
Dim wdg_hd As SOC = New SOC("div").style("border-top-left-radius: 4px;border-top-right-radius: 4px;height: 20px;position: relative;background-color: #8396bd;color: #ecf0f1;text-align: center;font-size: 12px;font-weight: bold;").text(wdg_rw.nz("name")).appendTo(wdgdiv)
Dim tbl As SOC = New SOC("table").style("border-collapse: collapse;width: 100%;background-color:transparent;border-spacing: 0;").appendTo(wdgdiv)
Dim tbl_bdy As SOC = New SOC("tbody").appendTo(tbl)
Dim thr As SOC = New SOC("tr").style("border: none;").appendTo(tbl_bdy)
Dim cols As New List(Of String)
For Each col As DataColumn In dt.DataTable.Columns
If Not admincols.Contains(col.ColumnName.ToLower) Then
cols.Add(col.ColumnName)
Dim th As SOC = New SOC("th").style("background-color: #ccc; padding: 2px 4px; font-size: 11px; border: 1px solid transparent;").text(col.ColumnName).appendTo(thr)
End If
Next
For Each drw As DataRow In dtrws
Dim tdr As SOC = New SOC("tr").appendTo(tbl_bdy)
'tdr.Attributes.Add("style", "border: none;")
For Each col In cols
Dim td As SOC = New SOC("th").style("padding: 2px 4px;font-size: 12px;border: 1px solid #ccc;").appendTo(tdr) 'border-right: none;
If dt.DataTable.Columns(col).DataType = GetType(Date) Then
Try
td.InnerText = drw.ndt_string(col, format:="dd.MM.yyyy", New Globalization.CultureInfo("de"))
Catch ex As Exception
End Try
Else
td.InnerText = drw.nz(col)
End If
Next
Next
Return Await wdgdiv.outerHtml_async()
End If
End If
End If
Return ""
End Function
Public Async Function Fuchs_WDG_OneWDG(ByVal wdg_rw As DataRow, ByVal fuchs_plist As ParamList, constring As String, server_path As String, authlogin As String, Optional parameter As Dictionary(Of String, String) = Nothing) As Threading.Tasks.Task(Of Dictionary(Of String, Object))
Dim Type As String = wdg_rw.nz("type").ToLower
Dim CacheData As Dictionary(Of String, Object) = Nothing
Dim DayCache As Boolean = False 'wdg_rw.nbool("daycache", alternative:=False)
Dim Short_Name As String = wdg_rw.nz("short_name")
If DayCache = True Then
Try
Dim pl As New ParamList(fuchs_plist)
pl.AddParameter("short_name", Short_Name)
Dim cachesql As SQLObjectTyped(Of Object) = Await getSQLValue_async(Of Object)("EXECUTE [dbo].[vm__widgets_getCache] @account, @short_name, @login_guid;", Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet.Intranet__SQLConnectionString, pl)
Dim cachestr As String = cachesql.nz()
If cachestr <> "" Then
CacheData = New Dictionary(Of String, Object) From {{Short_Name, If(cachestr.StartsWith(Short_Name), Newtonsoft.Json.JsonConvert.DeserializeObject("{ " & cachestr & " }"), Newtonsoft.Json.JsonConvert.DeserializeObject(cachestr))}}
End If
Catch ex As Exception
CacheData = Nothing
End Try
Else CacheData = Nothing
End If
If left(Type, 3) = "sql" Then
Dim SQL As String = wdg_rw.nz("sql")
If Not SQL = "" Then
If Type = "sql_table" Then
If Information.IsNothing(CacheData) = True Then
Dim plist As New ParamList(fuchs_plist)
Dim dt As SQLDataTable = Await getSQLDatatable_async(SQL, constring, plist)
Dim dtrws As DataRow() = dt.Select("", If(dt.DataTable.Columns.Contains("order"), "order", ""))
Dim admincols As New List(Of String)
admincols.AddRange(wdg_rw.nz("sql_admin_columns").ToLower.Split(","))
Dim DTC As New Dictionary(Of String, String)
For Each dti As String In wdg_rw.nz("sql_datatypes").Split(",")
If Not dti = "" Then
Dim dtx As String() = dti.Split(":")
DTC.Add(dtx(0), dtx(1))
End If
Next
Dim cols As New List(Of String)
For Each col As DataColumn In dt.DataTable.Columns
If Not admincols.Contains(col.ColumnName.ToLower) Then cols.Add(col.ColumnName)
Next
Dim wdg_kvp As New Dictionary(Of String, Object) From {{Short_Name, New With {.name = wdg_rw.nz("name"), .description = wdg_rw.nz("description"), .type = "table", .columns = cols.ToArray(), .data = dt.DataTable.toArrayofObjectDictionaries(), .rendering_options = wdg_rw.nz("rendering_options").Split(";")}}}
If DayCache Then
Try
Dim cpl As New ParamList(fuchs_plist)
cpl.AddParameter("short_name", Short_Name)
cpl.AddParameter("data", Newtonsoft.Json.JsonConvert.SerializeObject(wdg_kvp.Item(Short_Name)))
Await setSQLValue_async("EXECUTE [dbo].[vm__widgets_setCache] @account, @short_name, @login_guid, @data;", SQLConnectionString:=constring, SqlParameterList:=cpl)
Catch ex As Exception
End Try
End If
Return wdg_kvp
Else
Return CacheData
End If
ElseIf Type = "sql_indicator" Then
If Information.IsNothing(CacheData) = True Then
Dim plist As New ParamList(fuchs_plist)
Dim dt As SQLDataTable = Await getSQLDatatable_async(SQL, constring, plist)
Dim dtrws As DataRow = dt.FirstRow()
Dim wdg_kvp As New Dictionary(Of String, Object) From {{Short_Name, New With {.name = wdg_rw.nz("name"), .description = wdg_rw.nz("description"), .type = "ind", .columns = Nothing, .data = dtrws.toDictionary, .rendering_options = wdg_rw.nz("rendering_options").Split(";")}}}
If DayCache Then
Try
Dim cpl As New ParamList(fuchs_plist)
cpl.AddParameter("short_name", Short_Name)
cpl.AddParameter("data", Newtonsoft.Json.JsonConvert.SerializeObject(wdg_kvp.Item(Short_Name)))
Await setSQLValue_async("EXECUTE [dbo].[vm__widgets_setCache] @account, @short_name, @login_guid, @data;", SQLConnectionString:=constring, SqlParameterList:=cpl)
Catch ex As Exception
End Try
End If
Return wdg_kvp
Else
Return CacheData
End If
ElseIf Type = "sql_chart" Then
Dim chartsettings As ChartSettingsDic = Nothing
'the new was json
If wdg_rw.nz("server_options").StartsWith("{") Then
chartsettings = New ChartSettingsDic(wdg_rw.nz("server_options"))
Else
chartsettings = New ChartSettingsDic()
'the old way, 2-dimensionally separated string
Dim ServerOptions As Dictionary(Of String, String) = StringToDic(wdg_rw.nz("server_options"), ":", "|")
With chartsettings
If ServerOptions.ContainsKey("Title") Then .Add("title", ServerOptions("Title"))
.Add("series_column", If(ServerOptions.ContainsKey("series_column"), ServerOptions("series_column"), "series"))
.Add("x1_column", If(ServerOptions.ContainsKey("x1_column"), ServerOptions("x1_column"), "x"))
.Add("y1_column", If(ServerOptions.ContainsKey("y1_column"), ServerOptions("y1_column"), "y"))
If ServerOptions.ContainsKey("x1_title") Then .Add("x1_title", ServerOptions("x1_title"))
If ServerOptions.ContainsKey("x1_interval") Then .Add("x1_interval", ServerOptions("x1_interval"))
If ServerOptions.ContainsKey("x1_fontsize") Then .Add("x1_fontsize", ServerOptions("x1_fontsize"))
If ServerOptions.ContainsKey("x1_label_angle") Then .Add("x1_label_angle", ServerOptions("x1_label_angle"))
If ServerOptions.ContainsKey("y1_title") Then .Add("y1_title", ServerOptions("y1_title"))
If ServerOptions.ContainsKey("y1_min") Then
If ServerOptions("y1_min").StartsWith("sql(") Then
.Add("y1_min", Await getSQLValue_async(FindFramedPart(ServerOptions("y1_min"), "sql(", ")"), constring, fuchs_plist.Clone()))
Else
.Add("y1_min", ServerOptions("y1_min"))
End If
End If
If ServerOptions.ContainsKey("y1_max") Then
If ServerOptions("y1_max").StartsWith("sql(") Then
.Add("y1_max", Await getSQLValue_async(FindFramedPart(ServerOptions("y1_max"), "sql(", ")"), constring, fuchs_plist.Clone()))
Else
.Add("y1_max", ServerOptions("y1_max"))
End If
End If
If ServerOptions.ContainsKey("y1_interval") Then
If left(ServerOptions("y1_interval"), 4) = "sql(" Then
.Add("y1_interval", Await getSQLValue_async(FindFramedPart(ServerOptions("y1_interval"), "sql(", ")"), constring, fuchs_plist.Clone()))
Else
.Add("y1_interval", ServerOptions("y1_interval"))
End If
End If
If ServerOptions.ContainsKey("y1_fontsize") Then .Add("y1_fontsize", ServerOptions("y1_fontsize"))
If ServerOptions.ContainsKey("series_colors") Then .Add("series_colors", ServerOptions("series_colors"))
If ServerOptions.ContainsKey("showdate") Then .Add("showdate", ServerOptions("showdate").ToLower = "true" OrElse ServerOptions("showdate") = "1")
If ServerOptions.ContainsKey("showlegend") Then .Add("showlegend", ServerOptions("showlegend").ToLower = "true" OrElse ServerOptions("showlegend") = "1")
If ServerOptions.ContainsKey("barwidth") Then .Add("barwidth", ServerOptions("barwidth"))
If ServerOptions.ContainsKey("charttype") Then .Add("charttype", ServerOptions("charttype"))
End With
End If
chartsettings.Add("width", If(wdg_rw.nz("rendering_options").Contains("dblwidth"), 292 + 315, 292))
chartsettings.Add("height", 252)
Dim Chart As New GenericCharts.Chart(SQLCommand:=SQL, SqlConnectionString:=Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet.Intranet__SQLConnectionString, Auth:="", SQLParameterList:=fuchs_plist.Clone, DateSQLCommand:="SELECT GETDATE()") With {
.Series_Colors_SeriesSplit = ";",
.Series_Colors_ValueSplit = "-",
.Series_Colors_ParameterSplit = ""
}
Chart.Init(chartsettings:=chartsettings, VDic:=New GenericCharts.VariablesDic(wdg_rw.nz("variables"), parameter, authlogin))
Dim wddic As New Dictionary(Of String, Object) From {
{"name", wdg_rw.nz("name")},
{"description", wdg_rw.nz("description")},
{"type", "image_base64"},
{"rendering_options", vbs.Split(wdg_rw.nz("rendering_options"), ";")},
{"image", Chart.ToBase64string()}
}
Return New Dictionary(Of String, Object) From {{Short_Name, wddic}}
Else
Return Nothing
End If
Else
Return Nothing
End If
ElseIf left(Type, 3) = "url" Then
If Type = "url_chart" Then
Dim wddic As New Dictionary(Of String, Object) From {
{"name", wdg_rw.nz("name")},
{"description", wdg_rw.nz("description")},
{"type", "image_url"},
{"rendering_options", wdg_rw.nz("rendering_options").Split(";")},
{"url", Global.OCMS.intranet.proxy.OCMS_Proxy(wdg_rw.nz("url"))}
}
Return New Dictionary(Of String, Object) From {{Short_Name, wddic}}
Else
Return Nothing
End If
ElseIf Type = "method" Then
Dim wddic As New Dictionary(Of String, Object) From {
{"name", wdg_rw.nz("name")},
{"description", wdg_rw.nz("description")},
{"type", "html"},
{"rendering_options", wdg_rw.nz("rendering_options").Split(";")}
} '{"html", CallByName(New VM_Widgets,LeftToFirst(wdg_rw.nz("url"), ";", False) , CallType.Get, Strings.Split(RightFromFirst(wdg_rw.nz("url"), ";", True, False), ",")))}
Dim Method As String() = wdg_rw.nz("url").Split(";")
If Method.Length > 0 Then
Select Case wdg_rw.nz("url").LeftToFirst(";", emptyIfNotFound:=False).ToLower()
Case "weather"
If Method.Length > 1 Then
wddic.Add("html", Await Weather(Method(1), servername:=server_path))
End If
End Select
If wddic.ContainsKey("html") Then
Return New Dictionary(Of String, Object) From {{Short_Name, wddic}}
Else
Return Nothing
End If
Else
Return Nothing
End If
ElseIf Type = "html" Then
Dim wddic As New Dictionary(Of String, Object) From {{"name", wdg_rw.nz("name")}, {"description", wdg_rw.nz("description")}, {"type", "html"}}
wddic.Add("rendering_options", wdg_rw.nz("rendering_options").Split(";"))
If Not wdg_rw.nz("url") = "" Then
Dim html = ""
Try
Dim turib As New System.UriBuilder()
If left(wdg_rw.nz("url"), 4).ToLower = "http" Then
turib = New System.UriBuilder(wdg_rw.nz("url"))
Else
turib = New System.UriBuilder("http://" & server_path & "/" & wdg_rw.nz("url"))
End If
Dim wqrequest As Net.HttpWebRequest = Net.WebRequest.Create(turib.ToString)
Dim wqResponse As Net.HttpWebResponse
wqResponse = wqrequest.GetResponse
Dim reader As New StreamReader(wqResponse.GetResponseStream())
html = reader.ReadToEnd()
Catch exwrq As Exception
End Try
wddic.Add("html", Global.OCMS.intranet.proxy.OCMS_Proxyfy(path:=server_path, Input:=wdg_rw.nz("html"), safemode:=wdg_rw.nbool("safemode", alternative:=False)))
Return New Dictionary(Of String, Object) From {{Short_Name, wddic}}
Else
wddic.Add("html", Global.OCMS.intranet.proxy.OCMS_Proxyfy(path:=server_path, Input:=wdg_rw.nz("html"), safemode:=wdg_rw.nbool("safemode", alternative:=False)))
Return New Dictionary(Of String, Object) From {{Short_Name, wddic}}
End If
Else
Return Nothing
End If
End Function
Public Async Function Weather(CityCode As String, Optional servername As String = Nothing) As Threading.Tasks.Task(Of String)
Try
Dim Proxyhost As String = If(servername, "")
Dim WeatherNfo As SortedDictionary(Of Date, GenericStringDictionary) = (Await Global.Fuchs.intranet.services.GetWeather(CityCode:=CityCode)).getNextValid(Now(), 5)
Dim f As SOC = New SOC("div").style("width: 100%; height: 100%; padding: 0.5rem; overflow: hidden;")
Dim d As SOC = New SOC("div").style("width: 100%; height:270px; position:relative; font-family: Verdana,Geneva,sans-serif; font-size:12px;margin: 4px;display: grid;grid-template-rows: 90px 130px auto;grid-template-columns: 25% 25% 25% 25%;").appendTo(f)
Dim first As Boolean = True
For Each ky As Date In WeatherNfo.Keys
Dim itm As GenericStringDictionary = WeatherNfo.Item(ky)
Dim c As SOC = New SOC("div").appendTo(d)
If first Then
With c
.style("width:100%; grid-column-start: 1; grid-column-end: 5; overflow: hidden;")
.InnerHtml = "<div style=""width:100px;height:70px;position:relative;float:left;background:transparent url('" & Global.OCMS.intranet.proxy.OCMS_ProxyParseUrl(Proxyhost, itm.Item("icon_url_m")) & "') no-repeat center top;""></div>" &
"<div style=""font-weight: bolder; font-size: 14px; line-height: 26px;"">" & Format(ky, "ddd, dd.MM. HH") & " Uhr</div>" &
"<div style=""font-size:15px;line-height:22px;"">" & itm("t_min_rw") & " - " & itm("t_max_rw") & "&deg;C</div>" &
"<div style="""">" & itm("status_txt") & "</div>"
End With
Else
With c
.style("display:block; overflow: hidden; width: 100%; position: relative;" & If(ky <> WeatherNfo.Last.Key, "border-right: 1px solid #CCCCCC;", ""))
.InnerHtml = "<div style=""line-height:18px;font-weight:bolder;font-size:11px;text-align:center;"">" & If(Format(ky, "yyMMdd") = Format(Now(), "yyMMdd"), "Heute", Format(ky, "dddd")) & "</div>" &
"<div style=""font-weight: normal; font-size: 12px; text-align: center; margin-bottom: 5px;"">" & Format(ky, "HH") & " Uhr</div>" &
"<div style=""width: 100%; height: 42px; position: relative; display: block; background: transparent url('" & Global.OCMS.intranet.proxy.OCMS_ProxyParseUrl(Proxyhost, itm.Item("icon_url_s")) & "') no-repeat center top;""></div>" &
"<div style=""text-align: center; margin-top: 2px; font-size: 12px;"">" & itm("t_min_rw") & " / " & itm("t_max_rw") & "&deg;C</div>" &
"<div style=""text-align: center; font-size: 9px; margin-top: 4px;"">" & itm("status_txt") & "</div>"
End With
End If
first = False
Next
Dim cr As SOC = New SOC("div").style("width: 100%; display: block; grid-column-start: 1; grid-column-end: 5; overflow: hidden; margin-top: 10px;").appendTo(d)
cr.InnerHtml = "<div style=""width: 100%; display: block; font-size: 10px; font-style: italic; text-align: center;"">" & WeatherNfo.First.Value("credit_text") & "</div>" &
"<div style=""width: 100%; text-align: center;""><a href=""" & WeatherNfo.First.Value("credit_link") & """ target=""_blank""><img style=""border: 0"" title=""wetter.com"" alt=""wetter.com"" src=""" & Global.OCMS.intranet.proxy.OCMS_ProxyParseUrl(Proxyhost, "http://static1.wetter.com/woys/5/images/wetter.com_60x12.png") & """></a></div>"
Return Await f.outerHtml_async()
Catch ex12 As Exception
Debug.Print("fuchs_fds_widgets.weather", ex12, Nothing, False)
Return ""
End Try
End Function
End Module
End Namespace
+928
View File
@@ -0,0 +1,928 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.Fuchs.intranet
Module fuchs_ocms_intranet
Public Intranet As Global.Fuchs.intranet.Fuchs_intranet
Public Function getIntranet() As OCMS_intranet
If IsNothing(Global.Fuchs.intranet.Intranet) Then
Global.Fuchs.intranet.Intranet = New Global.Fuchs.intranet.Fuchs_intranet("Fuchs.intranet")
End If
Return Global.Fuchs.intranet.Intranet
End Function
Public Function getFuchsIntranet() As Global.Fuchs.intranet.Fuchs_intranet
If IsNothing(Global.Fuchs.intranet.Intranet) Then
Global.Fuchs.intranet.Intranet = New Global.Fuchs.intranet.Fuchs_intranet("Fuchs.intranet")
End If
Return Global.Fuchs.intranet.Intranet
End Function
End Module
Public Class fds__reminder_data
Dim base As Newtonsoft.Json.Linq.JObject
Public ReadOnly Property newvalues As GenericObjectDictionary
Public ReadOnly Property [rem] As GenericObjectDictionary
Public ReadOnly Property ReminderRegistration As GenericObjectDictionary
Public ReadOnly Property Id As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.Item("Id", ReturnAlternative:=""))
End Get
End Property
Public ReadOnly Property IsDraft As Boolean
#Region "props"
Public ReadOnly Property raw_InvoiceAddress As String()
Get
'Me.newvalues("invoiceaddress")
If IsNothing(Me.newvalues) = True OrElse Me.newvalues("invoiceaddress", ReturnAlternative:="") = "" Then
Return New String() {}
Else
Return Me.newvalues.nz("invoiceaddress").Replace("<br>", vbLf).Replace("<br/>", vbLf).Replace("<br />", vbLf).Replace(vbCrLf, vbLf).Replace(vbLf & vbLf, vbLf).Split(vbLf).Convert(Of String)(Function(t As String) HttpUtility.HtmlDecode(t.Trim())).Where(Function(t As String) t <> "").ToArray
End If
End Get
End Property
Public ReadOnly Property raw_InvoiceEmail As String
Get
Return If(IsNothing(Me.newvalues) = True, "", Me.newvalues.nz("invoiceemail").Trim())
End Get
End Property
Public ReadOnly Property raw_InvId As String
Get
Return If(IsNothing(Me.[rem]) = True, "", Me.[rem].nz("invid").ne(Me.[rem].nz("InvId")).Trim())
End Get
End Property
Public ReadOnly Property raw_CustomValues As String
Get
Return If(IsNothing(Me.newvalues) = True, "", Me.newvalues.nz("CustomValues").Trim())
End Get
End Property
Public ReadOnly Property DateCreated As Date?
Get
Return If(IsNothing(Me.ReminderRegistration) = True, Nothing, Me.ReminderRegistration.nz("DateCreated"))
End Get
End Property
Public ReadOnly Property ReminderType As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.nz("type").Substr(0, 1))
End Get
End Property
Public ReadOnly Property UserNameFinalized As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.nz("UserNameFinalized"))
End Get
End Property
Public ReadOnly Property UserEmailFinalized As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.nz("UserEmailFinalized"))
End Get
End Property
Public ReadOnly Property InvoiceId As String
Get
Return If(IsNothing(Me.ReminderRegistration), "", Me.ReminderRegistration("InvoiceId", ReturnAlternative:=""))
End Get
End Property
Public ReadOnly Property InvoiceAddress As String()
Get
Return If(IsNothing(Me.ReminderRegistration) = True, New String() {}, Me.ReminderRegistration.nz("SendToAddress").Replace("<br>", vbLf).Replace("<br/>", vbLf).Replace("<br />", vbLf).Replace(vbCrLf, vbLf).Replace(vbLf & vbLf, vbLf).Split(vbLf).ForEach(Function(t As String) t.Trim()))
End Get
End Property
Public ReadOnly Property InvoiceEmail As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.nz("SendToEmail"))
End Get
End Property
Public ReadOnly Property ReminderTitle As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.nz("subject"))
End Get
End Property
Public ReadOnly Property Subject As String
Get
Return If(IsNothing(Me.ReminderRegistration) = True, "", Me.ReminderRegistration.nz("subject"))
End Get
End Property
#End Region
Public Sub New(ctd As Newtonsoft.Json.Linq.JObject)
Me.base = ctd
Me._IsDraft = True
If IsNothing(ctd) = False Then
If Me.base.ContainsKey("new") Then Me._newvalues = New GenericObjectDictionary(Me.base("new").ToObject(Of Dictionary(Of String, Object)))
If Me.base.ContainsKey("rem") Then Me._rem = New GenericObjectDictionary(Me.base("rem").ToObject(Of Dictionary(Of String, Object)))
End If
End Sub
Public Sub New(ID As String, ctrl As Global.OCMS.intranet.Controllers.IntranetController)
Me.RegisterReminder(ID:=ID, ctrl:=ctrl)
End Sub
Private _letter As MigraDoc.DocumentObjectModel.Document
Friend ReadOnly Property ReminderPDF(ctrl As Global.OCMS.intranet.Controllers.IntranetController) As MigraDoc.DocumentObjectModel.Document
Get
If IsNothing(Me._letter) = True Then
If IsNothing(Me.ReminderRegistration) = True Then Call RegisterReminder(Me.Id, ctrl)
Dim tb As New pdf.FDS__TextBlocks() With {
.Admin_Ref = "",'Me.ReminderId,
.address = Me.InvoiceAddress,
.Admin_User = Me.UserNameFinalized,
.Admin_User_Email = Me.UserEmailFinalized,
.Admin_Datum_Value = Me.DateCreated
}
If Me.raw_CustomValues <> "" Then
Dim o As New GenericObjectDictionary(Me.raw_CustomValues)
If o("contactEmail") <> "" OrElse o("contactName") <> "" Then
tb.Admin_User = o("contactName")
tb.Admin_User_Email = o("contactEmail")
End If
End If
Me._letter = Threading.Tasks.Task.Run(Async Function() Await Global.Fuchs.intranet.pdf.writeLetter(TB:=tb, draft:=Me.IsDraft, locale:=pdf.deculture)).Result()
Me._letter.Info.Title = Me.ReminderTitle
pdf.ApplyReminder(Me._letter, tb, Me, draft:=Me.IsDraft)
End If
Return Me._letter
End Get
End Property
Public Async Function getReminderFile(ctrl As Global.OCMS.intranet.Controllers.IntranetController) As Task(Of Byte())
Dim ba As Byte() = New Byte() {}
If Me.ReminderRegistration("IsFinal", ReturnAlternative:=False) = True Then
If (Me.ReminderRegistration.ContainsKey("hasFile") = False OrElse Me.ReminderRegistration("hasFile", ReturnAlternative:=False) = False) Then
Call Me.StoreReminderDocumentFile(ctrl)
End If
Call fds.fds_mfr.getFDSDoc(file:=ba, reportid:=Me.Id, type:="reminder")
Else
'render
Dim pdfrend As New MigraDoc.Rendering.PdfDocumentRenderer(True)
pdfrend.Document = Me.ReminderPDF(ctrl)
pdfrend.RenderDocument()
'output
Using MStream As New IO.MemoryStream
pdfrend.PdfDocument.Save(MStream, False)
MStream.Position = 0
ba = MStream.ToArray()
End Using
'convert to pdfa
ba = Global.OCMS.pdf.pdfAFileContent(ba)
End If
Return ba
End Function
Public Async Function StoreReminderDocumentFile(ctrl As Global.OCMS.intranet.Controllers.IntranetController) As Task(Of Byte())
Dim pl As New ParamList
pl.AddParameter("Id", Me.Id)
Dim ba As Byte()
Try
'render
Dim pdfrend As New MigraDoc.Rendering.PdfDocumentRenderer(True)
pdfrend.Document = Me.ReminderPDF(ctrl)
pdfrend.RenderDocument()
''output
Using MStream As New IO.MemoryStream
pdfrend.PdfDocument.Save(MStream, False)
MStream.Position = 0
ba = MStream.ToArray()
End Using
'convert to pdfa
ba = Global.OCMS.pdf.pdfAFileContent(ba)
Catch ex As Exception
ba = New Byte() {}
End Try
If ba.Length > 0 Then
pl.Add(New SqlClient.SqlParameter("@file", dbType:=SqlDbType.VarBinary) With {.Value = ba})
Dim r As Boolean = Await setSQLValue_async("EXECUTE [dbo].[fds__setReminderFile] @Id, @file;", ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, options:=New FIS_SQLOptions())
Return If(r = True, ba, Nothing)
Else
Return Nothing
End If
End Function
Public Sub RegisterReminder(ctrl As Global.OCMS.intranet.Controllers.IntranetController, change As Boolean, RemId As String)
If IsNothing(Me.[rem]) = False AndAlso Me.[rem].Count > 0 Then
Dim r = Threading.Tasks.Task.Run(Async Function()
Try
Dim IsChange As Boolean = change = True AndAlso RemId <> ""
Dim pl As ParamList = ctrl.StdParamlist()
With pl
.Add(SQL_VarChar("InvId", Me.raw_InvId()))
.Add(SQL_Char("type", Me.[rem]("type")))
.Add(SQL_float("amount", stringvalue:=Me.newvalues("amount")))
.Add(SQL_float("amount_payed", stringvalue:=Me.newvalues("amount_payed")))
.Add(SQL_VarChar("SendToAddress", Me.raw_InvoiceAddress.join(vbLf)))
.Add(SQL_NVarChar("SendToEmail", Me.raw_InvoiceEmail))
.Add(SQL_NVarChar("subject", Me.newvalues("subject", ""), dbNull_IfEmpty:=True))
.Add(SQL_NVarChar("text", Me.newvalues("text", ""), dbNull_IfEmpty:=True))
End With
Dim sql As New List(Of String) From {"DECLARE @Id varchar(10);"}
If IsChange = False Then
sql.AddRange(New String() {
"EXECUTE [dbo].[fds__createReminder] @InvId, @type, @amount, @amount_payed, @SendToAddress, @SendToEmail, @subject, @text, @authuser, @Id OUTPUT;"
})
Else
pl.Add(SQL_VarChar("RemId", RemId))
'sql.AddRange(New String() {
' "EXECUTE [dbo].[fds__setInvoice] @InvId, @InvoiceType, @InvoiceTitle, @InvoiceBalance, @InvoiceBalance_net, @InvoiceVAT_net1, @InvoiceVAT_1, @PaymentTerm, @CustomerId, @SendToAddress, @SendToEmail, @ProvisionPeriod, @CustomValues, @authuser, @Id OUTPUT;"
' })
End If
Dim remdset As SQLDataSet = Await getSQLDataSet_async(sql.ToArray.join(vbLf), ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"rem"}, options:=New FIS_SQLOptions())
If remdset.Exception <> "" Then
Diagnostics.Debug.Print("fds__reminder_data.RegisterReminder_V1 - set/create - sql exception: " & remdset.Exception)
ctrl.FuchsIntranet.debug_log("fds__reminder_data.RegisterReminder_V1 - set/create - sql exception: ", [error]:=remdset.Exception, data:=New With {.sql = sql, .pl = pl.ToDictionary})
End If
Me._ReminderRegistration = New GenericObjectDictionary(Base:=remdset.Table("rem").FirstRow.toObjectDictionary())
Catch REMex As Exception
ctrl.FuchsIntranet.debug_log("fds__reminder_data.RegisterReminder_V1", ex:=REMex, data:=New With {.form = ctrl.Form.CustomParamsToJson(), .account = ctrl.AuthAccount, .user = ctrl.UserAccountID})
End Try
Return True
End Function).Result()
End If
End Sub
Public Sub RegisterReminder(ID As String, ctrl As Global.OCMS.intranet.Controllers.IntranetController)
If If(ID, "") <> "" Then
Dim r = Threading.Tasks.Task.Run(Async Function()
Try
Dim pl As ParamList = ctrl.StdParamlist("Id", ID)
pl.Add(SQL_bit("@includefile", False))
Dim sql As String = "EXECUTE [dbo].[fds__getReminder] @Id, @includefile, @authuser;"
Dim remdset As SQLDataSet = Await getSQLDataSet_async(sql, ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "rem"}, options:=New FIS_SQLOptions())
If remdset.Exception <> "" Then
Diagnostics.Debug.Print("fds__reminder_data.RegisterReminder_V2 - set/create - sql exception: " & remdset.Exception)
ctrl.FuchsIntranet.debug_log("fds__reminder_data.RegisterReminder_V2 - set/create - sql exception: ", [error]:=remdset.Exception, data:=New With {.sql = sql, .pl = pl.ToDictionary})
End If
Me._ReminderRegistration = New GenericObjectDictionary(Base:=remdset.Table("rem").FirstRow.toObjectDictionary())
Me._IsDraft = Not (Me._ReminderRegistration("IsFinal") = True)
Catch REMex As Exception
ctrl.FuchsIntranet.debug_log("fds__reminder_data.RegisterReminder_V2", ex:=REMex, data:=New With {.form = ctrl.Form.CustomParamsToJson(), .account = ctrl.AuthAccount, .user = ctrl.UserAccountID})
End Try
Return True
End Function).Result()
End If
End Sub
Public Shared Function getStoredFile(ByRef file As Byte(), reminderid As String, ctrl As Global.OCMS.intranet.Controllers.IntranetController) As IO.FileInfo
Dim sqlrw As Dictionary(Of String, Object) = System.Threading.Tasks.Task.Run(Async Function()
Return (Await getSQLDataSet_async("SELECT TOP(1) * FROM [dbo].[fds__reminder] WHERE [Id] = @Id AND [file] is not null;", SqlConnectionString:=ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=ctrl.StdParamlist("Id", reminderid), ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key)).FirstTable.FirstRow.toObjectDictionary()
End Function).Result()
If sqlrw.Count > 0 AndAlso sqlrw.nz("DocumentName", "") <> "" AndAlso sqlrw.no("file", "").GetType() = GetType(Byte()) Then
file = sqlrw("file")
Return New IO.FileInfo(fileName:=sqlrw.nz("DocumentName"))
Else
Return Nothing
End If
End Function
End Class
Public Class fds__invoice_data
Dim base As Newtonsoft.Json.Linq.JObject
Public ReadOnly Property admin As GenericObjectDictionary
Public ReadOnly Property newvalues As GenericObjectDictionary
Public ReadOnly Property sms As GenericObjectDictionary
Public ReadOnly Property req As List(Of Dictionary(Of String, Object))
Public ReadOnly Property InvoiceAdmin As GenericObjectDictionary
Public ReadOnly Property InvoiceRegistration As GenericObjectDictionary
Public ReadOnly Property InvoiceReq As Dictionary(Of String, Object)() = Nothing
Public ReadOnly Property InvoiceItm As Dictionary(Of String, Object)() = Nothing
Public ReadOnly Property Id As String
Get
Return If(IsNothing(Me.InvoiceRegistration), "", Me.InvoiceRegistration("Id", ReturnAlternative:=""))
End Get
End Property
Public ReadOnly Property IsDraft As Boolean
Public Sub New(ctd As Newtonsoft.Json.Linq.JObject)
Me.base = ctd
Me._IsDraft = True
If IsNothing(ctd) = False Then
If Me.base.ContainsKey("admin") Then Me._admin = New GenericObjectDictionary(Me.base("admin").ToObject(Of Dictionary(Of String, Object)))
If Me.base.ContainsKey("new") Then Me._newvalues = New GenericObjectDictionary(Me.base("new").ToObject(Of Dictionary(Of String, Object)))
If Me.base.ContainsKey("sms") Then Me._sms = New GenericObjectDictionary(Me.base("sms").ToObject(Of Dictionary(Of String, Object)))
If Me.base.ContainsKey("req") Then Me._req = Me.base("req").ToObject(Of List(Of Dictionary(Of String, Object)))
End If
End Sub
Public Sub New(ID As String, ctrl As Global.OCMS.intranet.Controllers.IntranetController)
Me.RegisterInvoice(ID:=ID, ctrl:=ctrl)
End Sub
Private _letter As MigraDoc.DocumentObjectModel.Document
Friend ReadOnly Property InvoicePDF(ctrl As Global.OCMS.intranet.Controllers.IntranetController) As MigraDoc.DocumentObjectModel.Document
Get
If IsNothing(Me._letter) = True Then
If IsNothing(Me.InvoiceReq) = True Then Call RegisterInvoice(Me.Id, ctrl)
Dim tb As New pdf.FDS__TextBlocks() With {
.Admin_Ref = Me.InvoiceId,
.address = Me.InvoiceAddress,
.Admin_User = Me.UserNameFinalized,
.Admin_User_Email = Me.UserEmailFinalized,
.Admin_Prov_Label = If(Me.ProvisionPeriod.Contains("-"), "Leistungszeitraum", "Leistungsdatum"),
.Admin_Prov = Me.ProvisionPeriod,
.Admin_Datum_Value = Me.DateCreated
}
If Me.ContactName <> "" OrElse Me.ContactEmail <> "" Then
tb.Admin_User = Me.ContactName
tb.Admin_User_Email = Me.ContactEmail
End If
Me._letter = Threading.Tasks.Task.Run(Async Function() Await Global.Fuchs.intranet.pdf.writeLetter(TB:=tb, draft:=Me.IsDraft, locale:=pdf.deculture)).Result()
Me._letter.Info.Title = "Rechnung " & Me.InvoiceId
pdf.ApplyInvoice(Me._letter, tb, Me, draft:=Me.IsDraft)
End If
Return Me._letter
End Get
End Property
Public Async Function getInvoiceFile(ctrl As Global.OCMS.intranet.Controllers.IntranetController) As Task(Of Byte())
Dim ba As Byte() = New Byte() {}
If Me.InvoiceRegistration("IsFinal", ReturnAlternative:=False) = True Then
If (Me.InvoiceRegistration.ContainsKey("hasFile") = False OrElse Me.InvoiceRegistration("hasFile", ReturnAlternative:=False) = False) Then
Call Me.StoreInvoiceDocumentFile(ctrl)
End If
Call fds.fds_mfr.getReportDoc(file:=ba, Me.Id)
Else
Try
'render
Dim pdfrend = New MigraDoc.Rendering.PdfDocumentRenderer(True)
pdfrend.Document = Me.InvoicePDF(ctrl)
pdfrend.RenderDocument()
'output
Using MStream As New IO.MemoryStream
pdfrend.PdfDocument.Save(MStream, False)
MStream.Position = 0
ba = MStream.ToArray()
End Using
'convert to pdfa
ba = Global.OCMS.pdf.pdfAFileContent(ba)
Catch ex As Exception
ba = New Byte() {}
debug_log("getFile", ex:=ex, authuser:=ctrl.UserIdent.useraccount_id, data:=New With {.id = Me.Id, .invid = Me.InvoiceId})
End Try
End If
Return ba
End Function
Public Async Function StoreInvoiceDocumentFile(ctrl As Global.OCMS.intranet.Controllers.IntranetController) As Task(Of Byte())
Dim pl As New ParamList
pl.AddParameter("Id", Me.Id)
Dim ba As Byte()
Try
'render
Dim pdfrend = New MigraDoc.Rendering.PdfDocumentRenderer(True)
pdfrend.Document = Me.InvoicePDF(ctrl)
pdfrend.RenderDocument()
'output
Using MStream As New IO.MemoryStream
pdfrend.PdfDocument.Save(MStream, False)
MStream.Position = 0
ba = MStream.ToArray()
End Using
'convert to pdfa
ba = Global.OCMS.pdf.pdfAFileContent(ba)
Catch ex As Exception
ba = New Byte() {}
debug_log("StoreDocumentFile", ex:=ex, authuser:=ctrl.UserIdent.useraccount_id, data:=New With {.id = Me.Id, .invid = Me.InvoiceId})
End Try
If ba.Length > 0 Then
pl.Add(New SqlClient.SqlParameter("@file", dbType:=SqlDbType.VarBinary) With {.Value = ba})
Dim r As Boolean = Await setSQLValue_async("EXECUTE [dbo].[fds__setInvoiceFile] @Id, @file;", ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, options:=SQLOptions())
Return If(r = True, ba, Nothing)
Else
Return Nothing
End If
End Function
Public Sub RegisterInvoice(ctrl As Global.OCMS.intranet.Controllers.IntranetController, change As Boolean, InvId As String)
If IsNothing(Me.admin) = False AndAlso Me.admin.Count > 0 Then
Dim r = Threading.Tasks.Task.Run(Async Function()
Try
Dim IsChange As Boolean = change = True AndAlso InvId <> ""
Dim vathigh As String = "", vats As Dictionary(Of String, Object) = If(Me.sms("vat").GetType = GetType(Dictionary(Of String, Object)), Me.sms("vat"), DirectCast(Me.sms("vat"), Newtonsoft.Json.Linq.JObject).ToObject(Of Dictionary(Of String, Object)))
For Each v As String In vats.Keys
If vathigh = "" Then
vathigh = v
ElseIf Single.Parse(v.Replace("%", "")) > Single.Parse(vathigh.Replace("%", "")) Then
vathigh = v
End If
Next
Dim pl As ParamList = ctrl.StdParamlist()
With pl
.Add(SQL_Char("InvoiceType", Me.admin("type")))
.Add(SQL_VarChar("InvoiceTitle", Me.raw_InvoiceTitle()))
.Add(SQL_float("InvoiceBalance", stringvalue:=Me.sms("ttb")))
.Add(SQL_float("InvoiceBalance_net", stringvalue:=Me.sms("ttn")))
.Add(SQL_float("InvoiceVAT_net1", stringvalue:=If(vathigh = "" OrElse vats.ContainsKey(vathigh) = False, "0", vats(vathigh))))
.Add(SQL_float("InvoiceVAT_1", Single.Parse(If(vathigh = "" OrElse vats.ContainsKey(vathigh) = False, "0", vathigh.Replace("%", "")), pdf.deculture)))
.Add(SQL_VarChar("PaymentTerm", Me.raw_paymentterms))
.Add(SQL_BigInt("CustomerId", value:=Me.raw_CustomerId))
.Add(SQL_VarChar("SendToAddress", Me.raw_InvoiceAddress.join(vbLf)))
.Add(SQL_NVarChar("SendToEmail", Me.raw_InvoiceEmail))
.Add(SQL_VarChar("ProvisionPeriod", Me.raw_ProvisionPeriod, dbNull_IfEmpty:=True))
.Add(SQL_NVarChar("CustomValues", Me.raw_CustomValues, dbNull_IfEmpty:=True))
.Add(SQL_float("InvoiceService_net", stringvalue:=Me.sms("tscn")))
.Add(SQL_float("InvoiceService_VAT", stringvalue:=Me.sms("tscvat")))
.Add(SQL_VarChar("InvoiceOptions", If(Me.admin("p13b", "").GetType = GetType(Boolean) AndAlso Me.admin("p13b", "") = True, "§13b", ""), dbNull_IfEmpty:=True))
End With
Dim sql As New List(Of String) From {"DECLARE @Id varchar(10);"}
If IsChange = False Then
sql.AddRange(New String() {
"EXECUTE [dbo].[fds__createInvoice] @InvoiceType, @InvoiceTitle, @InvoiceBalance, @InvoiceBalance_net, @InvoiceVAT_net1, @InvoiceVAT_1, @PaymentTerm, @CustomerId, @SendToAddress, @SendToEmail, @ProvisionPeriod, @CustomValues, @authuser, @Id OUTPUT;",
"EXECUTE [dbo].[fds__createInvoice_Details] @Id, @InvoiceService_net, @InvoiceService_VAT, @InvoiceOptions, @authuser;"
})
Else
pl.Add(SQL_VarChar("InvId", InvId))
sql.AddRange(New String() {
"EXECUTE [dbo].[fds__setInvoice] @InvId, @InvoiceType, @InvoiceTitle, @InvoiceBalance, @InvoiceBalance_net, @InvoiceVAT_net1, @InvoiceVAT_1, @PaymentTerm, @CustomerId, @SendToAddress, @SendToEmail, @ProvisionPeriod, @CustomValues, @authuser, @Id OUTPUT;",
"EXECUTE [dbo].[fds__createInvoice_Details] @Id, @InvoiceService_net, @InvoiceService_VAT, @InvoiceOptions, @authuser;"
})
End If
If Me.raw_ProvisionLocation.Length > 0 Then
pl.Add(SQL_NVarChar("ProvisionLocation", Me.raw_ProvisionLocation.join(vbLf).LeftToFirst("<!--", emptyIfNotFound:=False)))
sql.Add("UPDATE [dbo].[fds__invoices] SET [ProvisionLocation] = LEFT(@ProvisionLocation,1000) WHERE [Id] = @Id And [isFinal] = 0;")
End If
If vats.Count > 1 Then
For Each v As String In vats.Keys
If v <> vathigh Then
pl.Add(SQL_VarChar("InvoiceVAT_2", Single.Parse(v.Replace("%", "")))) 'only one additional possible at the moment ->> constant suffix
pl.Add(SQL_float("InvoiceVAT_net2", stringvalue:=vats(v)))
sql.Add("UPDATE [dbo].[fds__invoices] SET [InvoiceVAT_net2] = @InvoiceVAT_net2, [InvoiceVAT_2] = @InvoiceVAT_2 WHERE [Id] = @Id And [isFinal] = 0;")
Exit For 'only one additional possible at the moment
End If
Next
End If
sql.Add("SELECT TOP(0) * FROM [dbo].[fds__invoice_servicerequests];")
sql.Add("Select TOP(0) * From [dbo].[fds__invoice_items];")
Dim invdset As SQLDataSet = Await getSQLDataSet_async(sql.ToArray.join(vbLf), ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"inv", "det", "req", "itm"}, options:=SQLOptions())
If invdset.Exception <> "" Then
Diagnostics.Debug.Print("fds__invoice_data.RegisterInvoice - set/create - sql exception: " & invdset.Exception)
ctrl.FuchsIntranet.debug_log("fds__invoice_data.RegisterInvoice - set/create - sql exception: ", [error]:=invdset.Exception, data:=New With {.sql = sql, .pl = pl.ToDictionary})
End If
Me._InvoiceRegistration = New GenericObjectDictionary(Base:=invdset.Table("inv").FirstRow.toObjectDictionary())
Dim itemsdt As DataTable = invdset.Tables("itm"), InvoiceID As String = Me.InvoiceRegistration.Item("Id", ReturnAlternative:=""), InvRqIDList As New List(Of String)
If InvoiceID <> "" Then
If Me.req.Count > 1 Then
Await setSQLValue_async("EXECUTE [dbo].[fds__remInvoice_ServiceRequests] @id, @authuser;", ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=ctrl.StdParamlist("id", InvoiceID), ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, options:=SQLOptions())
End If
For ri As Integer = 0 To Me.req.Count - 1
Dim rdic As New GenericObjectDictionary(Me.req(ri))
pl = ctrl.StdParamlist()
With pl
.Add(SQL_VarChar("InvId", InvoiceID))
.Add(SQL_BigInt("mfr__servicerequest", stringvalue:=rdic.nz("Id")))
.Add(SQL_NVarChar("title", If(rdic.nz("text").ne(rdic("nme", "")), "")))
Dim vnet As Single
If TryCastSingle(rdic.no("netval", Nothing), vnet) = True Then
.Add(SQL_float("value_net", vnet))
Else
.Add(SQL_float("value_net", stringvalue:=rdic.nz("netval")))
End If
.Add(SQL_int("SortOrder", ri))
End With
Dim InvRqDT As SQLDataTable = Await getSQLDatatable_async("EXECUTE [dbo].[fds__createInvoice_ServiceRequest] @InvId, @mfr__servicerequest, @title, @value_net, @SortOrder;", ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, options:=SQLOptions())
If InvRqDT.Exception <> "" Then
Diagnostics.Debug.Print("fds__invoice_data.RegisterInvoice - InvRq - sql exception: " & InvRqDT.Exception)
ctrl.FuchsIntranet.debug_log("fds__invoice_data.RegisterInvoice - InvRq - sql exception: ", [error]:=InvRqDT.Exception, data:=New With {.sql = sql, .pl = pl.ToDictionary})
End If
' InvRqID is string !!
Dim InvRqID As String = InvRqDT.FirstRow.nz("Id", "-1")
If InvRqID <> "-1" Then
InvRqIDList.Add(InvRqID)
Dim ii As Integer = 0
For Each itm As Newtonsoft.Json.Linq.JObject In DirectCast(rdic("itm"), Newtonsoft.Json.Linq.JArray)
ii += 1
Dim itmrw As DataRow = itemsdt.NewRow(), itmdic As New GenericObjectDictionary(itm.ToObject(Of Dictionary(Of String, Object)))
Try
With itmrw
.Item("InvId") = InvoiceID
.Item("InvRqID") = InvRqID
Dim mfr__item As Long
If If(itmdic("id").ToString(), "") <> "" AndAlso If(itmdic("id").ToString, "") <> "undefined" AndAlso Long.TryParse(itmdic("id"), mfr__item) = True Then .Item("mfr__item") = mfr__item
.Item("Type") = itmdic("typ")
.Item("Position") = itmdic("p")
.Item("Quantity") = itmdic("q")
.Item("Text") = itmdic("t")
Dim v As Single
If TryCastSingle(itmdic("v"), v) Then .Item("value") = v
If TryCastSingle(itmdic("vt"), v) Then .Item("value_total") = v
If TryCastSingle(itmdic.nz("vat", "").Replace("%", ""), v) Then .Item("vat") = v
If TryCastSingle(itmdic("vs"), v) Then .Item("value_service") = v
.Item("det") = itmdic("det")
.Item("SortOrder") = ii
End With
itemsdt.Rows.Add(itmrw)
Catch ex As Exception
Diagnostics.Debug.Print("fds__invoice_data.RegisterInvoice - items - " & ex.Message & vbNewLine & ex.StackTrace)
ctrl.FuchsIntranet.debug_log("fds__invoice_data.RegisterInvoice - items", ex)
End Try
Next
End If
Next
Dim dtw As New DatatableWriterAsync(itemsdt, ctrl.Intranet.Intranet__SQLConnectionString, "[dbo].[fds__invoice_items]")
If itemsdt.Rows.Count > 0 Then
dtw.CommandBefore = New SqlClient.SqlCommand("EXECUTE [dbo].[fds__remInvoice_Items] @Id, @authuser;")
dtw.CommandBefore.Parameters.AddRange(ctrl.StdParamlist("id", InvoiceID).ToArray())
End If
dtw.Submit()
End If
Catch RIex As Exception
ctrl.FuchsIntranet.debug_log("fds__invoice_data.RegisterInvoice_V1", ex:=RIex, data:=New With {.form = ctrl.Form.CustomParamsToJson(), .account = ctrl.AuthAccount, .user = ctrl.UserAccountID})
End Try
Return True
End Function).Result()
End If
End Sub
Public Sub RegisterInvoice(ID As String, ctrl As Global.OCMS.intranet.Controllers.IntranetController)
If If(ID, "") <> "" Then
Dim r = Threading.Tasks.Task.Run(Async Function()
Try
Dim pl As ParamList = ctrl.StdParamlist("Id", ID)
Dim invdset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoice] @Id, @authuser;", ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=ctrl.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "inv", "req", "itm"}, options:=SQLOptions())
Me._InvoiceAdmin = New GenericObjectDictionary(Base:=invdset.Table("admin").FirstRow.toObjectDictionary())
Me._InvoiceRegistration = New GenericObjectDictionary(Base:=invdset.Table("inv").FirstRow.toObjectDictionary())
Me._IsDraft = Not (Me._InvoiceRegistration("IsFinal") = True)
Me._InvoiceReq = invdset.Tables("req").toArrayofObjectDictionaries()
Me._InvoiceItm = invdset.Tables("itm").toArrayofObjectDictionaries()
Catch RIex As Exception
ctrl.FuchsIntranet.debug_log("fds__invoice_data.RegisterInvoice_V2", ex:=RIex, data:=New With {.form = ctrl.Form.CustomParamsToJson(), .account = ctrl.AuthAccount, .user = ctrl.UserAccountID})
End Try
Return True
End Function).Result()
End If
End Sub
#Region "props"
Public ReadOnly Property raw_InvoiceAddress As String()
Get
'Me.newvalues("invoiceaddress")
If IsNothing(Me.newvalues) = True OrElse Me.newvalues("invoiceaddress", ReturnAlternative:="") = "" Then
Return New String() {}
Else
Return Me.newvalues.nz("invoiceaddress").Replace("<br>", vbLf).Replace("<br/>", vbLf).Replace("<br />", vbLf).Replace(vbCrLf, vbLf).Replace(vbLf & vbLf, vbLf).Split(vbLf).Convert(Of String)(Function(t As String) HttpUtility.HtmlDecode(t.Trim())).Where(Function(t As String) t <> "").ToArray
End If
End Get
End Property
Public ReadOnly Property raw_ProvisionLocation As String()
Get
If IsNothing(Me.newvalues) = True OrElse Me.newvalues("loc", ReturnAlternative:="") = "" Then
Return New String() {}
Else
Dim nv As String = Me.newvalues.nz("loc")
For Each v As String In StrA("<br>", "<br/>", "<br />")
nv = nv.Replace(v, vbLf).Replace(v.ToUpper, vbLf)
Next
Dim matchpattern As String = "<(?:[^>=]|='[^']*'|=""[^""]*""|=[^'""][^\s>]*)*>"
nv = Regex.Replace(nv, matchpattern, "", RegexOptions.IgnoreCase Or RegexOptions.IgnorePatternWhitespace Or RegexOptions.Multiline Or RegexOptions.Singleline)
Return nv.Split(vbLf).Convert(Of String)(Function(t As String) HttpUtility.HtmlDecode(t.Trim())).Where(Function(t As String) t <> "").ToArray
End If
End Get
End Property
Public ReadOnly Property raw_InvoiceEmail As String
Get
Return If(IsNothing(Me.newvalues) = True, "", Me.newvalues.nz("invoiceemail").Trim())
End Get
End Property
Public ReadOnly Property raw_ProvisionPeriod As String
Get
Return If(IsNothing(Me.newvalues) = True, "", Me.newvalues.nz("provisionperiod").Trim())
End Get
End Property
Public ReadOnly Property raw_paymentterms As String
Get
Return If(IsNothing(Me.admin) = True, "", Me.admin.nz("paymentterms").Trim())
End Get
End Property
Public ReadOnly Property raw_CustomerId As Long?
Get
Dim v As Long
If IsNothing(Me.admin) = True OrElse IsNothing(Me.admin("CustomerId")) = True Then
Return Nothing
ElseIf Me.admin.no("CustomerId", "").GetType() = GetType(Long) Then
Return Me.admin.no("CustomerId", Nothing)
ElseIf Long.TryParse(Me.admin.nz("CustomerId", ""), v) = True Then
Return v
Else Return Nothing
End If
End Get
End Property
Public ReadOnly Property raw_InvoiceTitle As String
Get
Return If(IsNothing(Me.newvalues) = True, "", Me.newvalues.nz("invoicetitle").Trim())
End Get
End Property
Public ReadOnly Property raw_CustomValues As String
Get
Return If(IsNothing(Me.newvalues) = True, "", Me.newvalues.nz("CustomValues").Trim())
End Get
End Property
Public ReadOnly Property InvoiceId As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("InvoiceId"))
End Get
End Property
Public ReadOnly Property DateCreated As Date?
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, Nothing, Me.InvoiceRegistration.nz("DateCreated"))
End Get
End Property
Public ReadOnly Property InvoiceType As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("InvoiceType").Substr(0, 1))
End Get
End Property
Public ReadOnly Property UserNameFinalized As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("UserNameFinalized"))
End Get
End Property
Public ReadOnly Property UserEmailFinalized As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("UserEmailFinalized"))
End Get
End Property
Public ReadOnly Property ContactName As String
Get
If IsNothing(Me.InvoiceRegistration) = True OrElse Me.InvoiceRegistration.nz("CustomValues").StartsWith("{") = False Then
Return ""
Else
Dim o As New GenericObjectDictionary(Me.InvoiceRegistration.nz("CustomValues"))
Return o("contactName")
End If
End Get
End Property
Public ReadOnly Property ContactEmail As String
Get
If IsNothing(Me.InvoiceRegistration) = True OrElse Me.InvoiceRegistration.nz("CustomValues").StartsWith("{") = False Then
Return ""
Else
Dim o As New GenericObjectDictionary(Me.InvoiceRegistration.nz("CustomValues"))
Return o("contactEmail")
End If
End Get
End Property
Public ReadOnly Property InvoiceAddress As String()
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, New String() {}, Me.InvoiceRegistration.nz("SendToAddress").Replace("<br>", vbLf).Replace("<br/>", vbLf).Replace("<br />", vbLf).Replace(vbCrLf, vbLf).Replace(vbLf & vbLf, vbLf).Split(vbLf).ForEach(Function(t As String) t.Trim()))
End Get
End Property
Public ReadOnly Property ProvisionLocation As String()
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, New String() {}, Me.InvoiceRegistration.nz("ProvisionLocation").Replace("<br>", vbLf).Replace("<br/>", vbLf).Replace("<br />", vbLf).Replace(vbCrLf, vbLf).Replace(vbLf & vbLf, vbLf).Split(vbLf).ForEach(Function(t As String) t.Trim()))
End Get
End Property
Public ReadOnly Property InvoiceEmail As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("SendToEmail"))
End Get
End Property
Public ReadOnly Property ProvisionPeriod As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("ProvisionPeriod"))
End Get
End Property
Public ReadOnly Property paymentterms As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("PaymentTerm"))
End Get
End Property
Public ReadOnly Property InvoiceTitle As String
Get
Return If(IsNothing(Me.InvoiceRegistration) = True, "", Me.InvoiceRegistration.nz("InvoiceTitle"))
End Get
End Property
#End Region
Public Function SQLOptions() As FIS_SQLOptions
Return New FIS_SQLOptions()
End Function
End Class
Public Class Fuchs_intranet
Inherits Global.OCMS.intranet.OCMS_intranet
Public Sub New(intranet_namespace As String)
MyBase.New(intranet_namespace:=intranet_namespace)
End Sub
Public Overrides ReadOnly Property project_abbreviation As String = "fuchs"
Public Overrides ReadOnly Property ApplicationName As String = "Sebastian Fuchs Sanitär und Heizung - Intranet"
Public Overrides ReadOnly Property Intranet__SQLConnectionString As String = ConfigurationManager.ConnectionStrings("fuchs_fds_ConnectionString").ConnectionString
Public Overrides ReadOnly Property FallbackCultureInfo As System.Globalization.CultureInfo = MyBase.deCulture
Public Overrides ReadOnly Property Intranet__sql_symmetric_key As Global.OCMS.security.NamePasswordPair = New Global.OCMS.security.NamePasswordPair() With {.Name = "fuchs_enc_1", .Password = "*0&PY_6iyjlKyQ"}
Public Overrides ReadOnly Property Intranet__TOTPsharedsecret_base As String = System.Configuration.ConfigurationManager.AppSettings("fuchs_intranet_TOTP") 'only base32 A-Z,2-7
Public ReadOnly Property Intranet__SMS_API_key As String = System.Configuration.ConfigurationManager.AppSettings("SMS_APIKey")
Public Overrides ReadOnly Property Intranet__cookiename As String = "fuchs_" & System.Configuration.ConfigurationManager.AppSettings("fuchs_intranet_guid")
Protected Overrides ReadOnly Property SQL_admin_debug As String = "EXECUTE [dbo].[fis_admin_debug] @machine, @type, @url, @uniquekey, @authuser, @query, @form_content, @server_variables, @cookies, @authcookie, @files, @isdebug;"
Protected Overrides ReadOnly Property SQL_admin_debug__update As String = "UPDATE [dbo].[fis_admin_debuglog] SET [authuser] = @authuser Where [authuser] = @uniquekey And [type] = 'request';"
Private _SQL_Authenticate As String = "SELECT * FROM [dbo].[fis_admin_authenticate](@email, @password);"
Private _SQL_UserAccountByEmail As String = "SELECT TOP(1) * FROM [dbo].[fis_admin_getUserAccount_byemail]( @email, @include_password );"
Private _SQL_UserAccount As String = "SELECT TOP(1) * FROM [dbo].[fis_admin_getUserAccount]( @useraccount_id );"
Private _SQL_UserSetting As String = "SELECT [dbo].[fis_admin_getUserSetting](@useraccount_id, @key);"
Public Overrides Function get_UserAccountRow_byEmail(ByVal emailaddress As String, Optional include_password As Boolean = False) As DataRow
Dim pl As New List(Of SqlClient.SqlParameter) From {SQL_VarChar("email", emailaddress), SQL_bit("include_password", include_password)}
Dim sql_exception As String = ""
Dim useraccount As DataRow = getSQLFirstRow(Me._SQL_UserAccountByEmail, SQLConnection:=Me.Intranet_SqlCon(), SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet__sql_symmetric_key, exception:=sql_exception)
If sql_exception <> "" Then
OCMS.debug_log(Me.project_abbreviation & "_intranet_authentication get_UserAccountRow_byEmail", sql_exception, data:=New With {.emailaddress = emailaddress, .sql_exception = sql_exception})
End If
Return useraccount
End Function
Public Overrides Function get_UserAccountRow(ByVal useraccount_id As String) As DataRow
Dim Exception As String = ""
Dim UserAccountRow As DataRow = getSQLFirstRow(Me._SQL_UserAccount, SQLConnection:=Me.Intranet_SqlCon(), SqlParameterList:=New List(Of SqlClient.SqlParameter) From {SQL_VarChar("useraccount_id", useraccount_id)}, ApplySymmetricKey:=Me.Intranet__sql_symmetric_key, exception:=Exception)
If Exception <> "" Then
OCMS.debug_log(Me.project_abbreviation & "_intranet_authentication UserIdentity New:SQL", Exception, data:=New With {.UserAccountID_unverified = useraccount_id, .sql_exception = Exception})
ElseIf IsNothing(UserAccountRow) = True Then
OCMS.debug_log(Me.project_abbreviation & "_intranet_authentication UserIdentity New:SQL (2)", Exception, data:=New With {.UserAccountID_unverified = useraccount_id, .sql_exception = Exception})
End If
Return UserAccountRow
End Function
Public Overrides Function get_UserSetting(ByVal UserIdentity As Global.OCMS.ocms_UserIdentity, key As String) As String
Dim sql_exception As String = Nothing
Dim pl As New List(Of SqlClient.SqlParameter) From {SQL_VarChar("useraccount_id", UserIdentity.useraccount_id), SQL_NVarChar("key", key)}
Dim Result As String = If(getSQLValue(Me._SQL_UserSetting, SQLConnection:=Me.Intranet_SqlCon(), SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet__sql_symmetric_key, exception:=sql_exception), "")
If sql_exception <> "" Then
OCMS.debug_log(Me.project_abbreviation & "_intranet_authentication authenticate", sql_exception, data:=New With {.useraccount_id = UserIdentity.useraccount_id, .sql_exception = sql_exception})
End If
Return Result
End Function
''' <summary>
''' will verify the credentials against the Database
''' </summary>
''' <param name="email"></param>
''' <param name="password"></param>
''' <param name="exception"></param>
''' <returns></returns>
Public Overrides Function authenticate(email As String, password As String, exception As String) As DataRow
Dim sql_exception As String = Nothing
Dim pl As New List(Of SqlClient.SqlParameter) From {Global.OCMS.SQLHandling.SQL_VarChar("email", email), Global.OCMS.SQLHandling.SQL_NVarChar("password", password)}
Dim AuthRw As DataRow = Global.OCMS.SQLHandling.getSQLFirstRow(Me._SQL_Authenticate, SQLConnection:=Me.Intranet_SqlCon(), SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet__sql_symmetric_key, exception:=sql_exception)
If sql_exception <> "" Then
OCMS.debug_log(Me.project_abbreviation & "_intranet_authentication authenticate", sql_exception, data:=New With {.email = email, .sql_exception = sql_exception})
Return Nothing
Else
Return AuthRw
End If
End Function
Public Async Function getModuleAuth(authmodule As String, UserAccountID As String) As Task(Of Integer)
Dim pl As New ParamList From {
SQL_VarChar("@authuser", UserAccountID),
SQL_VarChar("@module", authmodule, dbNull_IfEmpty:=True)
}
Dim val As SQLObjectTyped(Of Integer) = Await getSQLValue_async(Of Integer)("SELECT ISNULL([dbo].[fis_getModuleAuth](@module, @authuser),-1);", Me.Intranet__SQLConnectionString, DefaultValue:=-1, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet__sql_symmetric_key)
Return If(val.Exception <> "", val.Result, -1)
End Function
''' <summary>
'''
''' </summary>
''' <param name="procedure">Reference to procedure / location in the code</param>
''' <param name="ex">Exception thrown</param>
''' <param name="authuser"></param>
''' <param name="data"></param>
Public Sub debug_log(ByVal procedure As String, ByVal ex As Exception, Optional authuser As String = "", Optional data As Object = Nothing)
Dim datavalue As String = ""
Dim message As String = If(IsNothing(ex) = True, "", ex.Message) & "" 'to make sure it's not a reference, but a new value
Dim stacktrace As String = If(IsNothing(ex) = True, "", ex.StackTrace) & ""
Threading.Tasks.Task.Run(Sub()
If IsNothing(data) = True Then
datavalue = ""
ElseIf data.GetType = GetType(String) Then
datavalue = data
Else
datavalue = Newtonsoft.Json.JsonConvert.SerializeObject(data)
End If
Dim pl As New List(Of SqlClient.SqlParameter) From {
SQL_VarChar("ExceptionMessage", message, dbNull_IfEmpty:=True),
SQL_VarChar("CodeReference", procedure),
SQL_VarChar("StackTrace", stacktrace),
SQL_VarChar("data", datavalue, dbNull_IfEmpty:=True)
}
Dim sql_exception As String = ""
setSQLValue("EXECUTE [dbo].[fds__admin_logdebug] @CodeReference, @ExceptionMessage, @StackTrace, @Data;", SQLConnection:=Me.Intranet_SqlCon(), SqlParameterList:=pl, exception:=sql_exception)
End Sub)
End Sub
Public Sub debug_log(ByVal procedure As String, ByVal [error] As String, Optional StackTrace As String = "", Optional data As Object = Nothing)
Dim datavalue As String = ""
Threading.Tasks.Task.Run(Sub()
If IsNothing(data) = True Then
datavalue = ""
ElseIf data.GetType = GetType(String) Then
datavalue = data
Else
datavalue = Newtonsoft.Json.JsonConvert.SerializeObject(data)
End If
Dim pl As New List(Of SqlClient.SqlParameter) From {
SQL_VarChar("ExceptionMessage", [error], dbNull_IfEmpty:=True),
SQL_VarChar("CodeReference", procedure),
SQL_VarChar("StackTrace", StackTrace),
SQL_VarChar("data", datavalue, dbNull_IfEmpty:=True)
}
Dim sql_exception As String = ""
setSQLValue("EXECUTE [dbo].[fds__admin_logdebug] @CodeReference, @ExceptionMessage, @StackTrace, @Data;", SQLConnection:=Me.Intranet_SqlCon(), SqlParameterList:=pl, exception:=sql_exception)
End Sub)
End Sub
End Class
Public Class FIS_SQLOptions
Inherits sqloptions
Dim baseinfo As New Dictionary(Of String, Object)
Public Sub New(Optional dic As Dictionary(Of String, Object) = Nothing)
MyBase.New()
Me.baseinfo = dic
Me.OnError = Sub(procedure As String, ex As Exception, data As Object)
Call debug_log(procedure:=procedure, ex:=ex, data:=New With {.ctrl_nfo = dic, .sql = data})
End Sub
End Sub
End Class
End Namespace
+204
View File
@@ -0,0 +1,204 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.OCMS.intranet.Controllers
Public Class IntranetController
Inherits Global.OCMS.intranet.Controllers.IntranetController_base
Private intranet_do_allowedNONAUTH As New List(Of String) From {"spwc", "spw"}
Public Overrides ReadOnly Property LocalSSL As Integer = 44360
Public Sub New()
MyBase.New()
Me._UserIdent = New Global.OCMS.intranet.OCMS_intranet_useridentity(Me.Intranet) ' by intention initially empty
Me.intranet_do_allowedGET.Add("inv|datevzip")
Me.intranet_do_allowedGET.Add("inv|rdoc")
Me.intranet_do_allowedGET.Add("inv|rdocn")
Me.intranet_do_allowedGET.Add("req|idoc")
Me.intranet_do_allowedGET.Add("req|resend")
Me.intranet_do_allowedGET.Add("rem|idoc")
Me.intranet_do_allowedGET.Add("rem|resend")
Me.intranet_do_allowedGET.Add("bam|up")
Me.intranet_do_allowedGET.Add("mfr")
Me.intranet_do_allowedGET.Add("mfr_update")
Me.intranet_do_allowedGET.Add("todos")
End Sub
Public Overrides ReadOnly Property Intranet As OCMS_intranet
Get
If IsNothing(Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet) Then
Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet = New Global.Fuchs.intranet.Fuchs_intranet("Fuchs.intranet")
End If
Return Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet
End Get
End Property
Public ReadOnly Property FuchsIntranet As Global.Fuchs.intranet.Fuchs_intranet
Get
If IsNothing(Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet) Then
Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet = New Global.Fuchs.intranet.Fuchs_intranet("Fuchs.intranet")
End If
Return Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet
End Get
End Property
Public Async Function opx(fn As String, id As String, code As String) As Task(Of ActionResult)
Return Await Global.OCMS.intranet.proxy.vmp(Me, path:=Me.Request.Url.BaseUrl.AppendIf("/") & "intranet/")
End Function
Public Overrides Async Function _Do(fn As String, id As String, code As String) As Task(Of ActionResult)
Dim Action As ActionResult = Nothing
Try
If Global.Fuchs.My.Settings.FDS_Intranet_DebugState = True Then
Dim t As New Threading.Tasks.Task(Sub()
Dim pl As List(Of SqlClient.SqlParameter) = Me.StdParamlist(SQL_VarChar("@activity", "IntranetController.do"), SQL_VarChar("@info", njson.SerializeObject(New With {.fn = fn, .id = id, .code = code})), SQL_NVarChar("@data", Me.Form.CustomParamsToJson))
setSQLValue("INSERT INTO [dbo].[fds__admin_activity]([timestamp],[activity],[authuser],[info],[data]) VALUES (GETUTCDATE(), @activity, @authuser, @info, @data);", Me.Intranet.Intranet_SqlCon, pl)
End Sub)
t.Start() 'fire and forget
End If
If Me.UserIdent.isAuthenticated = False AndAlso Me.intranet_do_allowedNONAUTH.Contains(fn.ToLower) = False Then Return New NotAuthenticatedResult()
Select Case fn.ToLower
Case "ping"
Action = New OKResult()
Case "auth"
If Me.Form.CheckParams(StrA("module")) = False Then Return New InputMissingResult()
If Me.Form("array") = "1" Then
Dim authresult As SQLDataTable = Await getSQLDatatable_async("SELECT * FROM [dbo].[fis_getModuleAuthList](@module, @authuser);", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("module", Me.Form("module")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(authresult.DataTable.ToDictionary(KeyColumn:="module", ValueColumn:="auth"))
Else
Dim authresult As SQLObject = Await getSQLValue_async("SELECT [dbo].[fis_getModuleAuth](@module, @authuser);", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("module", Me.Form("module")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.auth = CInt(OCMS.ocms_commons.n_int(authresult.Result, -1))})
End If
Case "wdg"
Return Await Global.Fuchs.intranet.intranet_wdg(Me, fn:=id)
Case "spwc"
If Me.Form.CheckParams(New String() {"lastname", "email"}) = False Then Return New InputMissingResult()
Dim ua As SQLDataTable = Await getSQLDatatable_async("SELECT TOP(1) * FROM [dbo].[fis_admin_getUserAccount_byemail](@email, @include_password);", Me.Intranet.Intranet__SQLConnectionString, Me.StdParamlist(SQL_VarChar("@email", Me.Form("email")), SQL_bit("@include_password", True)), "user", ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim uadic As Dictionary(Of String, String) = ua.FirstRow.toStringDictionary()
If uadic("email").Length > 5 AndAlso uadic("name").ToLower.Trim = Me.Form("lastname").ToLower.Trim() Then
If uadic("mobile").Length > 5 Then
Dim sms As New Global.OCMS.sms.SMS(Me.FuchsIntranet.Intranet__SMS_API_key, "ProcessWeb")
Dim totp As String = Global.OCMS.security.generateTotp_12h(Me.FuchsIntranet.Intranet__TOTPsharedsecret_base)
If Me.Request.Url.Host.ToLower.Contains("localhost") = False Then
Dim apiresponse As GenericObjectDictionary = sms.SendSMS(uadic("mobile").Replace("+", "00").Replace(" ", ""), "Zur Bestätigungs des Passwortversands auf sanitarfuchs.de, verwenden Sie bitte folgenden Code:" & totp)
Else
Diagnostics.Debug.Print(totp)
End If
End If
End If
Action = New OKResult() ' No exception for safety reasons, so that robots can't misuse this form
Case "spw"
If Me.Form.CheckParams(New String() {"lastname", "email", "code"}) = False Then Return New InputMissingResult()
If Global.OCMS.security.validateTotp_12h(Me.FuchsIntranet.Intranet__TOTPsharedsecret_base, Me.Form("code")) = True Then
Dim ua As SQLDataTable = Await getSQLDatatable_async("SELECT TOP(1) * FROM [dbo].[fis_admin_getUserAccount_byemail](@email, @include_password);", Me.Intranet.Intranet__SQLConnectionString, Me.StdParamlist(SQL_VarChar("@email", Me.Form("email")), SQL_bit("@include_password", True)), "user", ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim uadic As Dictionary(Of String, String) = ua.FirstRow.toStringDictionary()
If uadic("email").Length > 5 Then
Dim sets As String = System.Configuration.ConfigurationManager.AppSettings("ocms_serviceemail")
If (Await Global.OCMS.SendEmail(sets, "Password", "sanitaerfuchs.de Intranet Passwort", "<p>Guten Tag " & uadic("firstname") & " " & uadic("name") & ",<br />Sie haben für das Intranet der Seite 'sanitaerfuchs.de' angefordert, dass Ihnen das Passwort zugeschickt wird.<br />Sie finden es unten aufgeführt zu Ihrer Information. Bitte stellen Sie sicher, dass dieses Passwort niemandem zugänglich wird. Diese Email sollten Sie ebenfalls aus Sicherheitsgründen löschen.<br />&nbsp;<br />&nbsp;</p></div><table><tr><td style=""padding:6px 12px"">Ihr Passwort</td><td style=""padding:6px 12px"">" & HttpUtility.HtmlEncode(uadic("password")) & "</td></tr></table><p>&nbsp;<br />&nbsp;</p>", uadic("email"), uadic("firstname") & " " & uadic("name"), files:=Nothing, logdebug:=Nothing) = True) Then
Action = New OKResult()
End If
End If
End If
Action = New OKResult() ' No exception for safety reasons, so that robots can't misuse this form
Case "account"
Select Case id.ToLower()
Case "sms"
Dim ua As SQLDataTable = Await getSQLDatatable_async("SELECT TOP(1) * FROM [dbo].[fis_admin_getUserAccount_byemail](@email, @include_password);", Me.Intranet.Intranet__SQLConnectionString, Me.StdParamlist(SQL_VarChar("@email", Me.UserIdent.Email), SQL_bit("@include_password", True)), "user", ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim uadic As Dictionary(Of String, String) = ua.FirstRow.toStringDictionary()
If uadic("mobile").Length > 5 Then
Dim sms As New Global.OCMS.sms.SMS(Me.FuchsIntranet.Intranet__SMS_API_key, "ProcessWeb")
Dim totp As String = Global.OCMS.security.generateTotp_3h(Me.FuchsIntranet.Intranet__TOTPsharedsecret_base & "3MDR")
If Me.Request.Url.Host.ToLower.Contains("localhost") = False Then
Dim apiresponse As GenericObjectDictionary = sms.SendSMS(uadic("mobile").Replace("+", "00").Replace(" ", ""), "Zur Bestätigungs der Passwortänderung auf sanitarfuchs.de, verwenden Sie bitte folgenden Code:" & totp)
Else
Diagnostics.Debug.Print(totp)
End If
End If
Action = New OKResult()
Case "changepassword"
If Me.Form.CheckParams(New String() {"npw", "npwc", "code"}) = False Then Return New InputMissingResult()
If Me.Form("npw").ValidatePassword(minLength:=6, numSpecial:=0) = False Then
Action = New ExceptionResult("requirements", OCMS_StatusCodes.exception)
ElseIf Global.OCMS.security.validateTotp_3h(Me.FuchsIntranet.Intranet__TOTPsharedsecret_base & "3MDR", Me.Form("code")) = False Then
Action = New ExceptionResult("sms", OCMS_StatusCodes.exception)
ElseIf (Await getSQLDatatable_async("SELECT TOP(1) * FROM [dbo].[fis_admin_authenticate_byID](@useraccount_id, @password);", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=New List(Of SqlClient.SqlParameter) From {SQL_VarChar("@useraccount_id", Me.UserAccountID), SQL_VarChar("@password", Me.Form("opw"))}, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))).FirstRow.nz("useraccount_id") <> Me.UserAccountID AndAlso Me.UserAccountID <> "" Then
Action = New ExceptionResult("valid", OCMS_StatusCodes.exception)
Else
Await setSQLValue_async("EXECUTE [dbo].[fis_admin_setNewPassword] @useraccount_id, @oldpassword, @newpassword, @enc_key;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=New List(Of SqlClient.SqlParameter) From {SQL_VarChar("@useraccount_id", Me.UserAccountID), SQL_VarChar("@oldpassword", Me.Form("opw")), SQL_VarChar("@newpassword", Me.Form("npw"))}, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = New OKResult()
End If
End Select
Case "todos"
Action = New FilePathResult(OCMS.ocms_commons.ApplicationBase.FullName & "\Areas\Intranet\Data\ProjectToDos.html", "text/html")
Case "mfr"
If id = "" Then
Action = New ContentResult() With {.Content = Await Global.fds.getSchema(), .ContentType = "text/xml", .ContentEncoding = Encoding.UTF8}
ElseIf Me.UserAccountID <> "" AndAlso IsNothing(Me.UserIdent) = False AndAlso Me.UserIdent.authorization > 3 Then
Action = New ContentResult() With {.Content = Await Global.fds.getAnything(id & If(code <> "", "/" & code, HttpUtility.UrlDecode(Me.Request.Url.Query)), throwerror_if_nOK:=False), .ContentType = "text/json", .ContentEncoding = Encoding.UTF8}
End If
Case "mfr_update"
Dim et As MFR_RESTClient.generic._generic.EntityTypes = MFR_RESTClient.generic._generic.EntityValue(Me.Form("type"))
If Not et = MFR_RESTClient.generic._generic.EntityTypes.none AndAlso Me.Form("need") = "" Then
Await Global.fds.UpdateIfNecessary_Single_async(et:=et)
Action = New OKResult()
ElseIf Not et = MFR_RESTClient.generic._generic.EntityTypes.none AndAlso Me.Form("need") <> "" Then
Dim need As fds.fds_mfr.UpdateNeed = fds.fds_mfr.UpdateNeedValue(Me.Form("need"))
If IsNothing(need) = false Then
Using mfr As New fds.fds_MFR_Client()
Await mfr.Update__entitytable(et, UpdateNeed:=need, EntityID:=Nothing, DebugDetails:=False)
End Using
End If
Else
Action = New InputMissingResult()
End If
Case "req"
Action = Await Do_Process_Requests(fn:=fn, id:=id, code:=code)
Case "inv"
Action = Await Do_Process_Invoices(fn:=fn, id:=id, code:=code)
Case "rem"
Action = Await Do_Process_Reminder(fn:=fn, id:=id, code:=code)
Case "rep"
Action = Await Do_Process_Reports(fn:=fn, id:=id, code:=code)
Case "bam" 'bank-account-management
Action = Await Do_Process_Bankings(fn:=fn, id:=id, code:=code)
End Select
Catch _DOex As Exception
Me.FuchsIntranet.debug_log("IntranetController._Do", ex:=_DOex, data:=New With {.fn = fn, .id = id, .code = code, .form = Me.Form.CustomParamsToJson(), .account = Me.AuthAccount, .user = Me.UserAccountID})
Action = New ExceptionResult("", OCMS_StatusCodes.exception)
End Try
Return Action
End Function
#Disable Warning BC42356 ' This async method lacks 'Await' operators and so will run synchronously
Public Overrides Async Function _Index(fn As String, id As String, code As String) As Task(Of ActionResult)
Return View("intranet", New Global.OCMS.intranet.intranet_model(Me, True))
End Function
Protected Overrides Function IntranetView() As ViewResult
Return View("intranet", New Global.OCMS.intranet.intranet_model(Me, True))
End Function
Public Function SQLOptBasic(fn As String, id As String, code As String, form As RequestFormHandler) As Fuchs.intranet.FIS_SQLOptions
Return New Fuchs.intranet.FIS_SQLOptions(New Dictionary(Of String, Object) From {{"fn", fn}, {"id", id}, {"code", code}, {"form", form.toDic}})
End Function
End Class
#Enable Warning BC42356 ' This async method lacks 'Await' operators and so will run synchronously
End Namespace
@@ -0,0 +1,360 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.OCMS.intranet.Controllers
Partial Public Class IntranetController
Private Async Function Do_Process_Invoices(fn As String, id As String, code As String) As Task(Of ActionResult)
Dim Action As ActionResult = Nothing
Select Case id.ToLower
Case "auth"
Action = Await JSONAsync(New With {.manage = 1})
Case "setpyd"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
'Dim sqlopt As New sqloptions() With {.OnError = Sub(ex As Exception)
' Me.FuchsIntranet.debug_log("IntranetController._Do.inv.setpyd - sql exception command after: ", ex:=ex, data:=New With {.Id = Me.Form("id")})
' End Sub}
Dim res As Boolean = Await setSQLValue_async("EXECUTE [dbo].[fds__setInvoicePayed] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Return If(res = True, New OKResult(), New ExceptionResult("", OCMS_StatusCodes.exception))
Case "setupd"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
'Dim sqlopt As New sqloptions() With {.OnError = Sub(ex As Exception)
' Me.FuchsIntranet.debug_log("IntranetController._Do.inv.setupd - sql exception command after: ", ex:=ex, data:=New With {.Id = Me.Form("id")})
' End Sub}
Dim res As Boolean = Await setSQLValue_async("EXECUTE [dbo].[fds__setInvoiceUNPayed] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Return If(res = True, New OKResult(), New ExceptionResult("", OCMS_StatusCodes.exception))
Case "setvat"
Dim val As Single
If Single.TryParse(Me.Form("val").Replace("%", "").Replace(",", ".").Trim(), style:=System.Globalization.NumberStyles.AllowDecimalPoint, provider:=Globalization.CultureInfo.InvariantCulture, result:=val) = True Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {
SQL_BigInt("@id", Me.Form("id")),
SQL_VarChar("@entitytype", "report"),
New SqlClient.SqlParameter("@vat", val),
SQL_VarChar("@userid", Me.UserAccountID)
})
Dim sqlException As String = ""
setSQLValue("EXECUTE [dbo].[fds__setReportVAT] @id, @entitytype, @vat, @authuser;", Me.Intranet.Intranet_SqlCon, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, exception:=sqlException)
If sqlException = "" Then
Action = New OKResult
Else
Action = New ExceptionResult("Der Wert konnte möglicherweise nicht gespeichert werden", InternalCode:=OCMS_StatusCodes.exception, internalDescription:=sqlException)
End If
Else
Action = New InputMissingResult()
End If
Case "sis"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist("Id", Me.Form("id"))
pl.Add(SQL_bit("@auto", False))
Dim dt2 As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__setInvoiceSent] @Id, @auto, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = If(If(dt2.Exception, "") = "", New OKResult, New ExceptionResult("not successful", OCMS_StatusCodes.exception))
Case "pget"
Dim tgtid As Long
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
If 1 = 1 OrElse (Me.Request.Url.Host.ToLower <> "localhost" AndAlso Diagnostics.Debugger.IsAttached = False) Then
If Long.TryParse(Me.Form("id"), tgtid) = True Then
Using mfr As New fds.fds_MFR_Client()
Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.Invoice, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=New Long() {tgtid}, DebugDetails:=False)
End Using
End If
Dim dt As SQLDataTable = Await getSQLDatatable_async("SELECT * FROM [dbo].[fds__getInvoiceTreeIds](@srqid);", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("srqid", tgtid), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
If dt.Count > 0 Then
Dim invoice_ids As New List(Of Long), srq_ids As New List(Of Long)
For Each rw As DataRow In dt.DataTable.Rows
Dim iid As Long = rw.nint("Id", -1)
Select Case rw.nz("type")
Case "invoice"
If iid > 0 AndAlso invoice_ids.Contains(iid) = False Then invoice_ids.Add(iid)
Case "servicerequest"
If iid > 0 AndAlso srq_ids.Contains(iid) = False Then srq_ids.Add(iid)
End Select
Next
Using mfr As New fds.fds_MFR_Client()
For Each iid As Long In invoice_ids
Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.Invoice, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=New Long() {iid}, DebugDetails:=False)
Next
For Each iid As Long In srq_ids
Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=New Long() {iid}, DebugDetails:=False)
Next
End Using
End If
End If
Action = New OKResult()
Case "get"
Try
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_VarChar("@Id", Me.Form("id"))})
Dim sqldset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoice] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "inv", "req", "itm"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each rq As DataRow In sqldset.Tables("req").Select("", If(sqldset.Tables("req").Columns.Contains("order"), "order", ""))
Dim rdic As Dictionary(Of String, Object) = rq.toObjectDictionary()
Dim sdic As New Dictionary(Of String, Object) From {
{"Id", rdic("mfr__servicerequest")},
{"InvRqId", rdic("Id")},
{"text", HttpUtility.HtmlDecode(rdic("title"))}
}
If sqldset.Contains("itm") Then
Dim itm As New List(Of Dictionary(Of String, Object))
' the InvRqId here is a STRING !
For Each sitm As DataRow In sqldset.Tables("itm").Select($"[InvRqId] = '{rdic("Id")}'", If(sqldset.Tables("itm").Columns.Contains("order"), "order", ""))
Dim idic As Dictionary(Of String, Object) = sitm.toObjectDictionary()
'{ Id: ix.Id, net_val: ix.net_val || 0, vat_val: ix.vat_val || 0, svcnet_val: 0, svcvat_val: 0, net: ix.net || 0, Note: ix.Note || '' }
Dim ndic As New Dictionary(Of String, Object) From {
{"Id", idic("Id")},
{"net_val", idic("value_total")},
{"vat_val", idic.no("value_total", 0) * idic.no("vat", 0) * 0.01},
{"vat", If(idic.no("vat", 0) = 0, "", CSng(idic.no("vat", 0)).ToString("0.00", Fuchs.intranet.pdf._pdf.deculture) & "%")},
{"svcnet_val", idic("value_service")},
{"net", idic("value")},
{"quantity", idic("Quantity")},
{"quantityhours", If(idic.no("value", 0) <> 0 AndAlso idic("Quantity").startswith(CLng(idic("value_total") / idic("value")).ToString() & " "), CLng(idic("value_total") / idic("value")), "")},
{"UnitString", If(idic.nz("Quantity", "") <> "", idic("Quantity").ToString.RightFromFirst(" "), "")},
{"Type", idic("Type")},
{"Note", Nothing},
{"NameOrNumber", ""},
{"htmltext", idic("Text")},
{"position", idic("Position")},
{"SortOrder", idic("SortOrder")}
}
itm.Add(ndic)
Next
sdic.Add("items", itm)
End If
ldic.Add(sdic)
Next
Dim AdminDic As Dictionary(Of String, Object) = sqldset.Table("admin").FirstRow.toObjectDictionary()
Dim InvDic As Dictionary(Of String, Object) = sqldset.Table("inv").FirstRow.toObjectDictionary()
If InvDic.nz("InvoiceOptions", "").Split(",").Contains("§13b") Then AdminDic.Add("p13b", True)
Action = Await JSONAsync(New With {.admin = AdminDic, .inv = InvDic, .req = ldic})
Catch ex As Exception
Action = New ExceptionResult("", InternalCode:=OCMS_StatusCodes.exception)
End Try
Case "icget"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
'Using mfr As New fds.fds_MFR_Client()
' Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=CLng(Me.Form("id")), DebugDetails:=False)
'End Using
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_VarChar("@InvId", Me.Form("id"))})
Dim tn As String() = New String() {"admin", "requests", "items", "steps", "companies", "locations"}
Dim sqldset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__prepStorno_recreate] @InvId, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=tn, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each sq As DataRow In sqldset.Tables("requests").Select("", If(sqldset.Tables("requests").Columns.Contains("order"), "order", ""))
Dim sdic As Dictionary(Of String, Object) = sq.toObjectDictionary()
If sqldset.Contains("items") Then
Dim itm As New List(Of Dictionary(Of String, Object))
' the ServiceRequestId here is a number !
For Each sitm As DataRow In sqldset.Tables("items").Select("[ServiceRequestId] = " & sdic("Id"), If(sqldset.Tables("items").Columns.Contains("order"), "order", ""))
itm.Add(sitm.toObjectDictionary)
Next
sdic.Add("items", itm)
End If
If sqldset.Contains("steps") Then
Dim stp As New List(Of Dictionary(Of String, Object))
' the ServiceRequestId here is a number !
For Each sitm As DataRow In sqldset.Tables("steps").Select("[ServiceRequestId] = " & sdic("Id"), If(sqldset.Tables("steps").Columns.Contains("order"), "order", ""))
stp.Add(sitm.toObjectDictionary)
Next
sdic.Add("steps", stp)
End If
ldic.Add(sdic)
Next
Action = Await JSONAsync(New With {.admin = sqldset.Table("admin").FirstRow.toObjectDictionary(), .requests = ldic, .companies = sqldset.Tables("companies").toArrayofObjectDictionaries(), .locations = sqldset.Tables("locations").toArrayofObjectDictionaries()})
Case "storno", "credit"
If Me.Form.CheckParams(New String() {"id", "mode"}) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_VarChar("@Id", Me.Form("id"))})
Dim sqlcmd As String = ""
Select Case Me.Form("mode")
Case "credit"
sqlcmd = "EXECUTE [dbo].[fds__createCredit_simple] @Id, @authuser;"
Case "simple"
sqlcmd = "EXECUTE [dbo].[fds__createStorno_simple] @Id, @authuser;"
Case "copy"
sqlcmd = "EXECUTE [dbo].[fds__createStorno_copy] @Id, @authuser;"
End Select
If sqlcmd = "" Then Return New ExceptionResult("function not allowed", OCMS_StatusCodes.exception)
Dim sqldset As SQLDataSet = Await getSQLDataSet_async(sqlcmd, Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "inv", "req", "itm"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each rq As DataRow In sqldset.Tables("req").Select("", If(sqldset.Tables("req").Columns.Contains("order"), "order", ""))
Dim rdic As Dictionary(Of String, Object) = rq.toObjectDictionary()
Dim sdic As New Dictionary(Of String, Object) From {
{"Id", rdic("mfr__servicerequest")},
{"InvRqId", rdic("Id")},
{"text", HttpUtility.HtmlDecode(rdic("title"))}
}
If sqldset.Contains("itm") Then
Dim itm As New List(Of Dictionary(Of String, Object))
' the InvRqId here is a STRING !
For Each sitm As DataRow In sqldset.Tables("itm").Select($"[InvRqId] = '{rdic("Id")}'", If(sqldset.Tables("itm").Columns.Contains("order"), "order", ""))
Dim idic As Dictionary(Of String, Object) = sitm.toObjectDictionary()
'{ Id: ix.Id, net_val: ix.net_val || 0, vat_val: ix.vat_val || 0, svcnet_val: 0, svcvat_val: 0, net: ix.net || 0, Note: ix.Note || '' }
Dim ndic As New Dictionary(Of String, Object) From {
{"Id", idic("Id")},
{"net_val", idic("value_total")},
{"vat_val", idic.no("value_total", 0) * idic.no("vat", 0) * 0.01},
{"vat", If(idic.no("vat", 0) = 0, "", CSng(idic.no("vat", 0)).ToString("0.00", Fuchs.intranet.pdf._pdf.deculture) & "%")},
{"svcnet_val", idic("value_service")},
{"net", idic("value")},
{"quantity", idic("Quantity")},
{"quantityhours", If(idic.ContainsKey("value") AndAlso idic.ContainsKey("value_total") AndAlso idic.ContainsKey("Quantity") AndAlso ocms_commons.n_int(idic("value"), 0) <> 0 AndAlso ocms_commons.nz(idic("Quantity")).StartsWith(CLng(idic("value_total") / idic("value")).ToString() & " "), CLng(idic("value_total") / idic("value")), "")},
{"UnitString", If(idic.ContainsKey("Quantity") AndAlso ocms_commons.nz(value:=idic("Quantity")) <> "", idic("Quantity").ToString.RightFromFirst(" "), "")},
{"Type", idic("Type")},
{"Note", Nothing},
{"NameOrNumber", ""},
{"htmltext", idic("Text")},
{"position", idic("Position")},
{"SortOrder", idic("SortOrder")}
}
itm.Add(ndic)
Next
sdic.Add("items", itm)
End If
ldic.Add(sdic)
Next
Action = Await JSONAsync(New With {.admin = sqldset.Table("admin").FirstRow().toObjectDictionary(), .inv = sqldset.Table("inv").FirstRow().toObjectDictionary(), .req = ldic})
Case "invl"
If Me.Form.CheckParams(StrA("mode")) = False Then Return New InputMissingResult()
Dim tgtdate As Date, mode As String = Me.Form("mode").ToLower
If mode = "s" AndAlso Me.Form("tgt").Contains(":") Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", tgtdate), SQL_VarChar("@mode", Me.Form("mode").ne("m")), SQL_bit("@include_drafts", Me.Form("all"))})
pl.Add(SQL_VarChar("@search", Me.Form("tgt")))
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoices_list2] @tgtdate, @mode, @include_drafts, @search, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "invoices"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .invoices = sqldt.Tables("invoices").toArrayofObjectDictionaries})
ElseIf Date.TryParseExact(Me.Form("tgt"), "yy-MM-dd", Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AllowWhiteSpaces, tgtdate) = True Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", tgtdate), SQL_VarChar("@mode", Me.Form("mode").ne("m")), SQL_VarChar("@includes", Me.Form("includes").ne(If(Me.Form("all") = "true", "all", "")))})
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoices_list_vario] @tgtdate, @mode, @includes, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "invoices"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .invoices = sqldt.Tables("invoices").toArrayofObjectDictionaries})
Else
Action = New InputMissingResult()
End If
Case "rqi"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@invoiceid", Me.Form("id")))
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvRequestItems] @invoiceid, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"requests", "items"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each sq As DataRow In sqldt.Tables("requests").Select("", If(sqldt.Tables("requests").Columns.Contains("order"), "order", ""))
Dim sdic As Dictionary(Of String, Object) = sq.toObjectDictionary()
Dim itm As New List(Of Dictionary(Of String, Object))
' the ServiceRequestId here is a number !
For Each sitm As DataRow In sqldt.Tables("items").Select("[ServiceRequestId] = " & sdic("id"), If(sqldt.Tables("items").Columns.Contains("order"), "order", ""))
itm.Add(sitm.toObjectDictionary)
Next
sdic.Add("items", itm)
ldic.Add(sdic)
Next
Action = Await JSONAsync(New With {.requests = ldic})
Case "pyi"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@invoiceid", Me.Form("id")))
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvPayments] @invoiceid, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"items"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each sitm As DataRow In sqldt.Tables("items").Select("", If(sqldt.Tables("items").Columns.Contains("order"), "order", ""))
ldic.Add(sitm.toObjectDictionary)
Next
Action = Await JSONAsync(New With {.payments = ldic})
Case "datev"
Dim tgtdate As Date
If Date.TryParseExact(Me.Form("tgt"), "yy-MM-dd", Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AllowWhiteSpaces, tgtdate) = True Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", tgtdate), SQL_VarChar("@mode", Me.Form("mode").ne("m"))})
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getDatevExports] @tgtdate, @mode, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"files", "invoices", "debits"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.files = sqldt.Tables("files").toArrayofObjectDictionaries, .invoices = sqldt.Tables("invoices").toArrayofObjectDictionaries})
Else
Action = New InputMissingResult()
End If
Case "rdoc"
Dim reportid As String = Me.Form("id")
Dim filecontent As Byte() = Nothing
Dim file As IO.FileInfo = Global.fds.getReportDoc(file:=filecontent, reportid:=reportid)
If IsNothing(file) = False Then
If Me.Form("typ") <> "img" Then
Action = Await FileContentResultAsync(filecontent, file.MimeType, file.Name)
Else
Dim imgarray As String() = (Await Global.OCMS.pdf.pdfImageresultAsync(filecontent)).ToArray.Convert(Of String)(Function(i As Drawing.Image) "data:image/png;base64," & i.ToBase64()).ToArray()
Action = Await JSONAsync(New With {.id = reportid, .img = imgarray})
End If
Else
Action = New ExceptionResult("Dokument wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
Case "rdocn"
If Me.Form.CheckParams(New String() {"name"}) = False Then Return New InputMissingResult()
Dim nme As String = Me.Form("name").ToString().LeftToFirst("(").Trim()
Dim reportid As String = ""
If nme <> "" Then
Dim so As SQLObject = Await getSQLValue_async("SELECT [dbo].[fds__fn_InvoiceIdByName](@nme);", SQLConnectionString:=Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("nme", nme), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
reportid = ocms_commons.nz(so.Result, "")
End If
If reportid <> "" Then
Dim filecontent As Byte() = Nothing
Dim file As IO.FileInfo = Global.fds.getReportDoc(file:=filecontent, reportid:=reportid)
If IsNothing(file) = False Then
If Me.Form("typ") <> "img" Then
Action = Await FileContentResultAsync(filecontent, file.MimeType, file.Name)
Else
Dim imgarray As String() = (Await Global.OCMS.pdf.pdfImageresultAsync(filecontent)).ToArray.Convert(Of String)(Function(i As Drawing.Image) "data:image/png;base64," & i.ToBase64()).ToArray()
Action = Await JSONAsync(New With {.id = reportid, .img = imgarray})
End If
Else
Action = New ExceptionResult("Dokument wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
Else
Action = New ExceptionResult("Not found", OCMS_StatusCodes.exception)
End If
Case "datevzip"
Dim tgtdate As Date
If Date.TryParseExact(Me.Form("tgt"), "yy-MM-dd", Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AllowWhiteSpaces, tgtdate) = True Then
Dim ms As New IO.MemoryStream
Dim file As IO.FileInfo = Global.fds.getDatevZip(stream:=ms, tgtdate, mode:=Me.Form("mode").ne("m"), AuthUser:=Me.UserAccountID, includeFiles:=If(Me.Form("files", "1") = "0", False, True))
If IsNothing(file) = False Then
ms.Position = 0
Action = Await FileStreamResultAsync(ms, file.MimeType, file.Name)
End If
Else
Action = New InputMissingResult()
End If
Case "getrem"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@InvId", Me.Form("id")))
pl.Add(SQL_bit("@include_drafts", Me.Form("drafts")))
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoiceReminder] @InvId, @include_drafts, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"reminder"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(sqldt.Table("reminder").DataTable.toArrayofObjectDictionaries())
Case "mfrrel"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim tgtid As Long
If Long.TryParse(Me.Form("id"), tgtid) = True Then
Using mfr As New fds.fds_MFR_Client()
Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.Invoice, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=New Long() {tgtid}, DebugDetails:=False)
End Using
Action = New OKResult
Else
Action = New InputMissingResult()
End If
End Select
Return Action
End Function
End Class
End Namespace
@@ -0,0 +1,180 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.OCMS.intranet.Controllers
Partial Public Class IntranetController
Private Async Function Do_Process_Reminder(fn As String, id As String, code As String) As Task(Of ActionResult)
Dim Action As ActionResult = Nothing
Select Case id.ToLower
Case "get"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_VarChar("@InvId", Me.Form("id"))})
pl.Add(SQL_VarChar("@type", Me.Form("type")))
pl.Add(SQL_int("@level", Me.Form("level")))
Dim sqldset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__prepReminder] @InvId, @authuser, @type, @level;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"rem"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.rm = sqldset.Table("rem").FirstRow.toObjectDictionary()})
Case "prep"
If Me.Form.CheckParams(New String() {"remc"}) = False Then Return New InputMissingResult()
Dim ct As String = Me.Form("remc")
Dim ctd As Object = njson.DeserializeObject(ct)
Dim fd_rem As New Fuchs.intranet.fds__reminder_data(ctd)
fd_rem.RegisterReminder(Me, change:=False, RemId:="")
If fd_rem.Id <> "" Then
Dim imgcol As Global.OCMS.pdf.ImageCollection = Await Global.OCMS.pdf.pdfImageresultAsync(fd_rem.ReminderPDF(Me))
Action = Await JSONAsync(New With {.id = fd_rem.Id, .img = imgcol.ImgB64Array(), .total = imgcol.TotalPages})
Else
Action = New ExceptionResult("Erinnerung wurde nicht registriert", OCMS_StatusCodes.exception)
End If
Case "conf"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim dt As SQLDataTable = Await getSQLDatatable_async("EXECUTE [dbo].[fds__setReminderFinal] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim frdic As Dictionary(Of String, Object) = dt.FirstRow.toObjectDictionary()
If frdic.ContainsKey("IsFinal") = True AndAlso frdic("IsFinal") = True Then
Dim RemID As String = frdic("Id")
Dim fd_rem As New Fuchs.intranet.fds__reminder_data(RemID, Me)
Dim filebyte As Byte() = Await fd_rem.StoreReminderDocumentFile(Me)
If frdic.nz("SendToEmail", "") <> "" AndAlso If(filebyte, New Byte() {}).Length > 0 Then ' Make sure no reminder is sent without file
Dim remdoc As New Dictionary(Of String, Byte()) From {{frdic.nz("DocumentName", "").ne("Zahlungserinnerung.pdf"), filebyte}}
If frdic.nz("InvoiceFileName") <> "" AndAlso frdic.no("InvoiceFile", "").GetType = GetType(Byte()) Then
remdoc.Add(frdic.nz("InvoiceFileName"), frdic("InvoiceFile"))
End If
Dim reminderbody As String = "<p>Sehr geehrte Damen und Herren,<br/>" &
"wir vermissen Ihren Zahlungseingang.</p>" &
If(frdic.no("amount_open", 0) <> 0, "<p>Der offene Betrag beläuft sich auf (inkl. MwSt.): " & CSng(frdic("amount_open")).ToString("0.00 €", Fuchs.intranet.pdf._pdf.deculture) & "</p>", "<p>Die Erinnerung mit allen Details finden Sie angehängt an diese Email.</p>") &
"<p>Bitte überweisen Sie den Rechnungsbetrag innerhalb von einer Woche auf unser Konto:<br />" &
"IBAN: DE76300501100045014800, BIC DUSSSDEDDXXX (Stadtsparkasse Düsseldorf)</p>" &
"<p>Wenn Sie mit uns zufrieden waren, empfehlen Sie uns gerne weiter, wenn nicht, dann sagen Sie es uns unter <a href=""mailto:info@sanitaerfuchs.de"">info@sanitaerfuchs.de</a>.<br />&nbsp;<br />&nbsp;<p>"
Dim SendToEmail As String = frdic("SendToEmail").trim()
Dim isSent As Boolean = Await Fuchs.intranet.fuchs_fds_email.SendEmail(Ref:="inv_" & RemID, Subject:="SanitärFuchs - " & frdic.nz("subject").ne(frdic.nz("DocumentName")), html:=reminderbody, Email:=SendToEmail, Name:="", files:=remdoc, Fuchs_intranet:=Me.Intranet)
If isSent = True Then
Dim pl As ParamList = Me.StdParamlist("Id", RemID)
pl.Add(SQL_bit("@auto", True))
dt = Await getSQLDatatable_async("EXECUTE [dbo].[fds__setReminderSent] @Id, @auto, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
End If
End If
Action = New OKResult()
Else
Action = New ExceptionResult("Aktion war nicht erfolgreich", OCMS_StatusCodes.exception)
End If
Case "srs"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist("Id", Me.Form("id"))
pl.Add(SQL_bit("@auto", False))
Dim dt2 As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__setReminderSent] @Id, @auto, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = If(If(dt2.Exception, "") = "", New OKResult, New ExceptionResult("not successful", OCMS_StatusCodes.exception))
Case "rdoc"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim reportid As String = Me.Form("id")
Dim filecontent As Byte() = Nothing
Dim file As IO.FileInfo = Fuchs.intranet.fds__reminder_data.getStoredFile(file:=filecontent, reminderid:=reportid, Me)
If IsNothing(file) = False Then
If Me.Form("typ") <> "img" Then
Action = Await FileContentResultAsync(filecontent, file.MimeType, file.Name)
Else
Dim imgarray As String() = (Await Global.OCMS.pdf.pdfImageresultAsync(filecontent)).ToArray.Convert(Of String)(Function(i As Drawing.Image) "data:image/png;base64," & i.ToBase64()).ToArray()
Action = Await JSONAsync(New With {.id = reportid, .img = imgarray})
End If
Else
Action = New ExceptionResult("Dokument wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
Case "idoc"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
If Me.Form("id") <> "" AndAlso Me.Form("typ") <> "img" Then
Dim fd_rem As New Fuchs.intranet.fds__reminder_data(Me.Form("id"), Me)
If fd_rem.Id <> "" Then
Dim filename As String = fd_rem.ReminderRegistration.nz("DocumentName").ne("Zahlungserinnerung_zu_" & fd_rem.ReminderRegistration("invoiceid", ReturnAlternative:="").ToString().ne("draft" & fd_rem.Id.ToString()) & ".pdf")
If Me.Form("create", "0") <> "1" Then
Dim ct As Byte() = Await fd_rem.getReminderFile(Me)
If IsNothing(ct) OrElse ct.Length = 0 Then ct = Await fd_rem.StoreReminderDocumentFile(Me)
Action = Await FileContentResultAsync(content:=ct, contenttype:="application/pdf", inline:=True, FileDownloadName:=filename)
Else
Action = Await Global.OCMS.pdf.pdfFileresultAsync(fd_rem.ReminderPDF(Me), filename:=filename, Locale:=New Globalization.CultureInfo("de-de"), inline:=True)
End If
Else
Action = New ExceptionResult("Erinnerung wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
ElseIf Me.Form("id") <> "" Then
Dim fd_rem As New Fuchs.intranet.fds__reminder_data(Me.Form("id"), Me)
If fd_rem.Id <> "" Then
Dim img As New List(Of Drawing.Image), ct As Byte()
Dim filename As String = fd_rem.ReminderRegistration.nz("DocumentName").ne("Zahlungserinnerung_zu_" & fd_rem.ReminderRegistration("invoiceid", ReturnAlternative:="").ToString().ne("draft" & fd_rem.Id.ToString()) & ".pdf")
If Me.Form("create", "0") <> "1" Then
ct = Await fd_rem.getReminderFile(Me)
If IsNothing(ct) OrElse ct.Length = 0 Then ct = Await fd_rem.StoreReminderDocumentFile(Me)
Else
ct = Global.OCMS.pdf.pdfFileContent(fd_rem.ReminderPDF(Me))
End If
Dim imgcol As Global.OCMS.pdf.ImageCollection = Await Global.OCMS.pdf.pdfImageresultAsync(fd_rem.ReminderPDF(Me))
Action = Await JSONAsync(New With {.id = fd_rem.Id, .img = imgcol.ImgB64Array(), .total = imgcol.TotalPages})
Else
Action = New ExceptionResult("Erinnerung wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
Else
Action = New ExceptionResult("Not found", OCMS_StatusCodes.exception)
End If
Case "resend"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
If Me.Form("id") <> "" Then
Dim pl As List(Of SqlClient.SqlParameter) = Me.StdParamlist("Id", Me.Form("id"))
pl.Add(SQL_bit("@includefile", True))
Dim dtset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getReminder] @Id, @includefile, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "inv", "req", "itm"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim frdic As Dictionary(Of String, Object) = dtset.Table("inv").FirstRow.toObjectDictionary()
If frdic.ContainsKey("IsFinal") = True AndAlso frdic("IsFinal") = True Then
Dim RemID As String = frdic("Id")
Dim fd_rem As New Fuchs.intranet.fds__reminder_data(RemID, Me)
Dim filebyte As Byte() = frdic.no("file", New Byte() {})
If frdic.nz("SendToEmail", "") <> "" AndAlso filebyte.Length > 0 Then ' Make sure no reminder is sent without file
Dim remdoc As New Dictionary(Of String, Byte()) From {{frdic.nz("DocumentName", "").ne("Zahlungserinnerung.pdf"), filebyte}}
If frdic.nz("InvoiceFileName") <> "" AndAlso frdic.no("InvoiceFile", "").GetType = GetType(Byte()) Then
remdoc.Add(frdic.nz("InvoiceFileName"), frdic("InvoiceFile"))
End If
Dim reminderbody As String = "<p>Sehr geehrte Damen und Herren,<br/>" &
"wir vermissen Ihren Zahlungseingang.</p>" &
If(frdic.no("amount_open", 0) <> 0, "<p>Der offene Betrag beläuft sich auf (inkl. MwSt.): " & CSng(frdic("amount_open")).ToString("0.00 €", Fuchs.intranet.pdf._pdf.deculture) & "</p>", "<p>Die Erinnerung mit allen Details finden Sie angehängt an diese Email.</p>") &
"<p>Bitte überweisen Sie den Rechnungsbetrag innerhalb von einer Woche auf unser Konto:<br />" &
"IBAN: DE76300501100045014800, BIC DUSSSDEDDXXX (Stadtsparkasse Düsseldorf)</p>" &
"<p>Wenn Sie mit uns zufrieden waren, empfehlen Sie uns gerne weiter, wenn nicht, dann sagen Sie es uns unter <a href=""mailto:info@sanitaerfuchs.de"">info@sanitaerfuchs.de</a>.<br />&nbsp;<br />&nbsp;<p>"
Dim SendToEmail As String = frdic("SendToEmail").trim()
Dim isSent As Boolean = Await Fuchs.intranet.fuchs_fds_email.SendEmail(Ref:="rem_" & RemID, Subject:="SanitärFuchs - " & frdic.nz("subject").ne(frdic.nz("DocumentName")), html:=reminderbody, Email:=SendToEmail, Name:="", files:=remdoc, Fuchs_intranet:=Me.Intranet)
If isSent = True Then
Dim pls As ParamList = Me.StdParamlist("Id", RemID)
pls.Add(SQL_bit("@auto", True))
Dim dt2 As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__setReminderSent] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pls, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
End If
End If
Action = New OKResult()
Else
Action = New ExceptionResult("Aktion war nicht erfolgreich", OCMS_StatusCodes.exception)
End If
Else
Action = New ExceptionResult("Not found", OCMS_StatusCodes.exception)
End If
Case "lrem"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim dtset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__lookupReminders] @InvId, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("@InvId", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"ov", "rem"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.ov = dtset.Table("ov").FirstRow().toStringDictionary(), .lst = dtset.Tables("rem").toArrayofObjectDictionaries()})
Case "del"
End Select
Return Action
End Function
End Class
End Namespace
@@ -0,0 +1,318 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.OCMS.intranet.Controllers
Partial Public Class IntranetController
Private Async Function Do_Process_Requests(fn As String, id As String, code As String) As Task(Of ActionResult)
Dim Action As ActionResult = Nothing
Select Case id.ToLower
Case "auth"
Action = Await JSONAsync(New With {.manage = 1})
Case "rthd"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_BigInt("@id", Me.Form("id"))})
Dim sqldt As SQLDataTable = Await getSQLDatatable_async("EXECUTE [dbo].[fds__toggleRequestHidden] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
If sqldt.Count > 0 Then
Dim dic As Dictionary(Of String, Object) = sqldt.FirstRow.toObjectDictionary
Action = Await JSONAsync(New With {.id = dic("EntityId"), .visible = (dic.no("hidden", False) = False)})
Else
Action = New ExceptionResult("not found", OCMS_StatusCodes.exception)
End If
Case "reql"
If Me.Form.CheckParams(StrA("mode")) = False Then Return New InputMissingResult()
Dim tgtdate As Date, mode As String = Me.Form("mode").ToLower
If mode = "s" AndAlso Me.Form("tgt").Contains(":") Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", DBNull.Value), SQL_VarChar("@mode", mode), SQL_bit("@completed", True)})
pl.Add(SQL_VarChar("@search", Me.Form("tgt")))
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getRequests_list2] @tgtdate, @mode, @completed, @search, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "requests", "reports"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim req As New List(Of Dictionary(Of String, Object))(sqldt.Tables("requests").toArrayofObjectDictionaries())
For Each r As Dictionary(Of String, Object) In req
Try
r.Add("reports", sqldt.Tables("reports").toArrayofObjectDictionaries(selectstring:="[requestID] = " & r("Id")))
Catch ex As Exception
End Try
Next
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .requests = req})
ElseIf Date.TryParseExact(Me.Form("tgt"), "yy-MM-dd", Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AllowWhiteSpaces, tgtdate) = True Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", tgtdate), SQL_VarChar("@mode", mode), SQL_bit("@completed", True)})
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getRequests_list] @tgtdate, @mode, @completed, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "requests", "reports"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim req As New List(Of Dictionary(Of String, Object))(sqldt.Tables("requests").toArrayofObjectDictionaries())
For Each r As Dictionary(Of String, Object) In req
Try
r.Add("reports", sqldt.Tables("reports").toArrayofObjectDictionaries(selectstring:="[requestID] = " & r("Id")))
Catch ex As Exception
End Try
Next
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .requests = req})
Else
Action = New InputMissingResult()
End If
Case "pget"
Dim tgtid As Long
If Me.Form.CheckParams(StrA("id")) = False OrElse Long.TryParse(Me.Form("id"), tgtid) = False Then Return New InputMissingResult()
If 1 = 1 OrElse (Me.Request.Url.Host.ToLower <> "localhost" AndAlso Diagnostics.Debugger.IsAttached = False) Then
Dim dt As SQLDataTable = Await getSQLDatatable_async("SELECT * FROM [dbo].[fds__getRequestTreeIds](@srqid);", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("srqid", tgtid), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
If dt.Count > 0 Then
Dim ids As New List(Of Long) From {Me.Form("id")}
For Each rw As DataRow In dt.DataTable.Rows
Dim iid As Long = rw.nint("Id", -1)
If iid > 0 AndAlso ids.Contains(iid) = False Then ids.Add(iid)
Next
Dim SchemaDic As New Dictionary(Of String, fds.fds_MFR_Client.DatabaseSchema), thisEntityNAme As String = MFR_RESTClient.generic._generic.EntityName(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest)
SchemaDic.Add(thisEntityNAme, New fds.fds_MFR_Client.DatabaseSchema(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest))
Using mfr As New fds.fds_MFR_Client()
Diagnostics.Debug.Print("pget - srq " & ids.Count.ToString & "start " & Now.ToShortTimeString)
Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=ids.ToArray, SchemaDic:=SchemaDic)
Diagnostics.Debug.Print("pget - srq " & ids.Count.ToString & "complete " & Now.ToShortTimeString)
End Using
Else
Using mfr As New fds.fds_MFR_Client()
Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=New Long() {tgtid}, DebugDetails:=False)
End Using
End If
End If
Action = New OKResult()
Case "get"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
'Using mfr As New fds.fds_MFR_Client()
' Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=CLng(Me.Form("id")), DebugDetails:=False)
'End Using
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_BigInt("@servicerequestid", Me.Form("id")), SQL_Char("@typ", Me.Form("typ").Substr(0, 1).ToLower()), SQL_VarChar("@mode", Me.Form("mode").ne("ov"))})
Dim tn As String() = New String() {"requests", "items"}
Select Case Me.Form("mode").ne("ov")
Case "r"
tn = New String() {"admin", "requests", "inv"}
Case "ov"
tn = New String() {"admin", "requests", "items", "inv"}
Case "ful"
tn = New String() {"admin", "requests", "items", "steps", "companies", "locations", "inv"}
End Select
Dim sqldset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getRequest_details] @servicerequestid, @mode, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=tn, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each sq As DataRow In sqldset.Tables("requests").Select("", If(sqldset.Tables("requests").Columns.Contains("order"), "order", ""))
Dim sdic As Dictionary(Of String, Object) = sq.toObjectDictionary()
If sqldset.Contains("items") Then
Dim itm As New List(Of Dictionary(Of String, Object))
For Each sitm As DataRow In sqldset.Tables("items").Select("[ServiceRequestId] = " & sdic("Id"), If(sqldset.Tables("items").Columns.Contains("order"), "order", ""))
itm.Add(sitm.toObjectDictionary)
Next
sdic.Add("items", itm)
End If
If sqldset.Contains("steps") Then
Dim stp As New List(Of Dictionary(Of String, Object))
For Each sitm As DataRow In sqldset.Tables("steps").Select("[ServiceRequestId] = " & sdic("Id"), If(sqldset.Tables("steps").Columns.Contains("order"), "order", ""))
stp.Add(sitm.toObjectDictionary)
Next
sdic.Add("steps", stp)
End If
ldic.Add(sdic)
Next
Dim AdminDic As Dictionary(Of String, Object) = sqldset.Table("admin").FirstRow.toObjectDictionary()
Action = Await JSONAsync(New With {.admin = AdminDic, .requests = ldic, .companies = sqldset.Tables("companies").toArrayofObjectDictionaries(), .locations = sqldset.Tables("locations").toArrayofObjectDictionaries(), .inv = sqldset.Tables("inv").toArrayofObjectDictionaries()})
Case "iget"
If Me.Form.CheckParams(New String() {"id", "typ"}) = False Then Return New InputMissingResult()
'Using mfr As New fds.fds_MFR_Client()
' Await mfr.Update__entitytable(MFR_RESTClient.generic._generic.EntityTypes.ServiceRequest, UpdateNeed:=fds.fds_mfr.UpdateNeed.Reset, EntityID:=CLng(Me.Form("id")), DebugDetails:=False)
'End Using
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_BigInt("@servicerequestid", Me.Form("id")), SQL_Char("@type", Me.Form("typ").Substr(0, 1).ToLower()), SQL_VarChar("@mode", Me.Form("mode").ne("ov"))})
pl.Add(SQL_VarChar("sel", Me.Form("sel")))
Dim tn As String() = New String() {"admin", "requests", "items", "steps", "companies", "locations"}
Dim sqldset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__prepInvoice] @servicerequestid, @mode, @authuser, @type, @sel;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=tn, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim ldic As New List(Of Dictionary(Of String, Object))
For Each sq As DataRow In sqldset.Tables("requests").Select("", If(sqldset.Tables("requests").Columns.Contains("order"), "order", ""))
Dim sdic As Dictionary(Of String, Object) = sq.toObjectDictionary()
If sqldset.Contains("items") Then
Dim itm As New List(Of Dictionary(Of String, Object))
For Each sitm As DataRow In sqldset.Tables("items").Select("[ServiceRequestId] = " & sdic("Id"), If(sqldset.Tables("items").Columns.Contains("order"), "order", ""))
itm.Add(sitm.toObjectDictionary)
Next
sdic.Add("items", itm)
End If
If sqldset.Contains("steps") Then
Dim stp As New List(Of Dictionary(Of String, Object))
For Each sitm As DataRow In sqldset.Tables("steps").Select("[ServiceRequestId] = " & sdic("Id"), If(sqldset.Tables("steps").Columns.Contains("order"), "order", ""))
stp.Add(sitm.toObjectDictionary)
Next
sdic.Add("steps", stp)
End If
ldic.Add(sdic)
Next
Action = Await JSONAsync(New With {.admin = sqldset.Table("admin").FirstRow.toObjectDictionary(), .requests = ldic, .companies = sqldset.Tables("companies").toArrayofObjectDictionaries(), .locations = sqldset.Tables("locations").toArrayofObjectDictionaries()})
Case "save"
If Me.Form.CheckParams(New String() {"invc"}) = False Then Return New InputMissingResult()
Dim ct As String = Me.Form("invc")
Dim ctd As Object = njson.DeserializeObject(ct)
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(ctd)
fd_inv.RegisterInvoice(Me, change:=Me.Form("id") <> "", InvId:=Me.Form("id"))
If fd_inv.Id <> "" Then
Action = Await JSONAsync(New With {.id = fd_inv.Id})
Else
Action = New ExceptionResult("Rechnung wurde nicht gespeichert", OCMS_StatusCodes.exception)
End If
Case "sprep"
If Me.Form.CheckParams(New String() {"invc"}) = False Then Return New InputMissingResult()
Dim ct As String = Me.Form("invc")
Dim ctd As Object = njson.DeserializeObject(ct)
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(ctd)
fd_inv.RegisterInvoice(Me, change:=False, InvId:="")
If fd_inv.Id <> "" Then
Dim imgcol As Global.OCMS.pdf.ImageCollection = Await Global.OCMS.pdf.pdfImageresultAsync(fd_inv.InvoicePDF(Me))
Action = Await JSONAsync(New With {.id = fd_inv.Id, .img = imgcol.ImgB64Array(), .total = imgcol.TotalPages})
Else
Action = New ExceptionResult("Rechnung wurde nicht registriert", OCMS_StatusCodes.exception)
End If
Case "sedit"
If Me.Form.CheckParams(New String() {"id", "invc"}) = False Then Return New InputMissingResult()
Dim ct As String = Me.Form("invc"), invoiceid As String = Me.Form("id")
Dim ctd As Object = njson.DeserializeObject(ct)
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(ctd)
fd_inv.RegisterInvoice(Me, change:=True, InvId:=invoiceid)
If fd_inv.Id <> "" Then
Dim imgcol As Global.OCMS.pdf.ImageCollection = Await Global.OCMS.pdf.pdfImageresultAsync(fd_inv.InvoicePDF(Me))
Action = Await JSONAsync(New With {.id = fd_inv.Id, .img = imgcol.ImgB64Array(), .total = imgcol.TotalPages})
Else
Action = New ExceptionResult("Rechnung wurde nicht registriert", OCMS_StatusCodes.exception)
End If
Case "sdel"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Await setSQLValue_async("EXECUTE [dbo].[fds__remInvoice] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = New OKResult()
Case "sconf"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
Dim dt As SQLDataTable = Await getSQLDatatable_async("EXECUTE [dbo].[fds__setInvoiceFinal] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim frdic As Dictionary(Of String, Object) = dt.FirstRow.toObjectDictionary()
If frdic.ContainsKey("IsFinal") = True AndAlso frdic("IsFinal") = True Then
Dim InvID As String = frdic("Id")
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(InvID, Me)
Dim filebyte As Byte() = Await fd_inv.StoreInvoiceDocumentFile(Me)
Dim dtset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoice] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "inv", "req", "itm"}, options:=SQLOptBasic(fn, id, code, Me.Form))
frdic = dtset.Table("inv").FirstRow.toObjectDictionary()
If frdic.nz("SendToEmail", "") <> "" AndAlso If(filebyte, New Byte() {}).Length > 0 Then ' make sure that no invoice is sent without file !!
Dim inv As New Dictionary(Of String, Byte()) From {{frdic("DocumentName"), filebyte}}
Dim invoicebody As String = "<p>Sehr geehrte Damen und Herren,<br/>" &
"vielen Dank für Ihren Auftrag, wir haben gern für Sie gearbeitet.</p>" &
If(frdic.no("InvoiceBalance", 0) <> 0, "<p>Unsere Dienstleistung stellen wir wie folgt In Rechnung (inkl. MwSt.): " & CSng(frdic("InvoiceBalance")).ToString("0.00 €", Fuchs.intranet.pdf._pdf.deculture) & "</p>", "<p>Die Abrechnung unserer Dienstleistung finden Sie angehängt an diese Email.</p>") &
"<p>Bitte überweisen Sie den Rechnungsbetrag innerhalb von " & fd_inv.paymentterms.Replace("wd", " Werktagen").Replace("d", " Tagen").Replace("wk", " Wochen").ne("10 Tagen") & " auf unser Konto:<br />" &
"IBAN: DE76300501100045014800, BIC DUSSSDEDDXXX (Stadtsparkasse Düsseldorf)</p>" &
"<p>Bei Rückfragen antworten Sie bitte nicht an diese Absenderadresse, sondern wenden Sie sich direkt an Ihre/n Sachberarbeiter/in oder an die <a href=""mailto:info@sanitaerfuchs.de"">info@sanitaerfuchs.de</a>.</p>" &
"<p>Wenn Sie mit uns zufrieden waren, empfehlen Sie uns gerne weiter, wenn nicht, dann sagen Sie es uns unter <a href=""mailto:info@sanitaerfuchs.de"">info@sanitaerfuchs.de</a>.<br />&nbsp;<br />&nbsp;<p>"
Dim SendToEmail As String = frdic("SendToEmail").trim()
Dim isSent As Boolean = Await Fuchs.intranet.fuchs_fds_email.SendEmail(Ref:="inv_" & InvID, Subject:="SanitärFuchs - " & frdic("DocumentName"), html:=invoicebody, Email:=SendToEmail, Name:="", files:=inv, Fuchs_intranet:=Me.Intranet)
If isSent = True Then
Dim pl As ParamList = Me.StdParamlist("Id", InvID)
pl.Add(SQL_bit("@auto", True))
dt = Await getSQLDatatable_async("EXECUTE [dbo].[fds__setInvoiceSent] @Id, @auto, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
End If
End If
Action = New OKResult()
Else
Action = New ExceptionResult("Aktion war nicht erfolgreich", OCMS_StatusCodes.exception)
End If
Case "idoc"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
If Me.Form("id") <> "" AndAlso Me.Form("typ") <> "img" Then
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(Me.Form("id"), Me)
If fd_inv.Id <> "" Then
Dim filename As String = fd_inv.InvoiceRegistration.nz("DocumentName").ne("Rechnung_" & fd_inv.InvoiceRegistration("invoiceid", ReturnAlternative:="").ToString().ne("draft" & fd_inv.Id.ToString()) & ".pdf")
If Me.Form("create", "0") <> "1" Then
Dim ct As Byte() = Await fd_inv.getInvoiceFile(Me)
If IsNothing(ct) OrElse ct.Length = 0 Then ct = Await fd_inv.StoreInvoiceDocumentFile(Me)
If IsNothing(ct) = False Then
Action = Await FileContentResultAsync(content:=ct, contenttype:="application/pdf", inline:=True, FileDownloadName:=filename)
Else
Action = New ExceptionResult("Rechnungs-PDF konnte nicht erstellt werden", OCMS_StatusCodes.exception)
End If
Else
Action = Await Global.OCMS.pdf.pdfFileresultAsync(fd_inv.InvoicePDF(Me), filename:=filename, Locale:=New Globalization.CultureInfo("de-de"), inline:=True)
End If
Else
Action = New ExceptionResult("Rechnung wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
ElseIf Me.Form("id") <> "" Then
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(Me.Form("id"), Me)
If fd_inv.Id <> "" Then
Dim img As New List(Of Drawing.Image), ct As Byte()
Dim filename As String = fd_inv.InvoiceRegistration.nz("DocumentName").ne("Rechnung_" & fd_inv.InvoiceRegistration("invoiceid", ReturnAlternative:="").ToString().ne("draft" & fd_inv.Id.ToString()) & ".pdf")
If Me.Form("create", "0") <> "1" Then
ct = Await fd_inv.getInvoiceFile(Me)
If IsNothing(ct) OrElse ct.Length = 0 Then ct = Await fd_inv.StoreInvoiceDocumentFile(Me)
Else
ct = Global.OCMS.pdf.pdfFileContent(fd_inv.InvoicePDF(Me))
End If
Dim imgcol As Global.OCMS.pdf.ImageCollection = Await Global.OCMS.pdf.pdfImageresultAsync(fd_inv.InvoicePDF(Me))
Action = Await JSONAsync(New With {.id = fd_inv.Id, .img = imgcol.ImgB64Array(), .total = imgcol.TotalPages})
Else
Action = New ExceptionResult("Rechnung wurde nicht gefunden", OCMS_StatusCodes.exception)
End If
Else
Action = New ExceptionResult("Not found", OCMS_StatusCodes.exception)
End If
Case "resend"
If Me.Form.CheckParams(StrA("id")) = False Then Return New InputMissingResult()
If Me.Form("id") <> "" Then
Dim dtset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getInvoice] @Id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=Me.StdParamlist("Id", Me.Form("id")), ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "inv", "req", "itm"})
Dim frdic As Dictionary(Of String, Object) = dtset.Table("inv").FirstRow.toObjectDictionary()
If frdic.ContainsKey("IsFinal") = True AndAlso frdic("IsFinal") = True Then
Dim InvID As String = frdic("Id")
Dim fd_inv As New Fuchs.intranet.fds__invoice_data(InvID, Me)
Dim filebyte As Byte() = Global.OCMS.pdf.pdfFileContent(fd_inv.InvoicePDF(Me))
If frdic.nz("SendToEmail", "") <> "" AndAlso If(filebyte, New Byte() {}).Length > 0 Then ' Make sure no reminder is sent without file
Dim inv As New Dictionary(Of String, Byte()) From {{frdic("DocumentName"), filebyte}}
Dim invoicebody As String = "<p>Sehr geehrte Damen und Herren,<br/>" &
"vielen Dank für Ihren Auftrag, wir haben gern für Sie gearbeitet.</p>" &
If(frdic.no("InvoiceBalance", 0) <> 0, "<p>Unsere Dienstleistung stellen wir wie folgt In Rechnung (inkl. MwSt.): " & CSng(frdic("InvoiceBalance")).ToString("0.00 €", Fuchs.intranet.pdf._pdf.deculture) & "</p>", "<p>Die Abrechnung unserer Dienstleistung finden Sie angehängt an diese Email.</p>") &
"<p>Bitte überweisen Sie den Rechnungsbetrag innerhalb von " & fd_inv.paymentterms.Replace("wd", " Werktagen").Replace("d", " Tagen").Replace("wk", " Wochen").ne("10 Tagen") & " auf unser Konto:<br />" &
"IBAN: DE76300501100045014800, BIC DUSSSDEDDXXX (Stadtsparkasse Düsseldorf)</p>" &
"<p>Wenn Sie mit uns zufrieden waren, empfehlen Sie uns gerne weiter, wenn nicht, dann sagen Sie es uns unter <a href=""mailto:info@sanitaerfuchs.de"">info@sanitaerfuchs.de</a>.<br />&nbsp;<br />&nbsp;<p>"
Dim SendToEmail As String = frdic("SendToEmail").trim()
Dim isSent As Boolean = Await Fuchs.intranet.fuchs_fds_email.SendEmail(Ref:="inv_" & InvID, Subject:="SanitärFuchs - " & frdic("DocumentName"), html:=invoicebody, Email:=SendToEmail, Name:="", files:=inv, Fuchs_intranet:=Me.Intranet)
If isSent = True Then
Dim pl As ParamList = Me.StdParamlist("Id", InvID)
pl.Add(SQL_bit("@auto", True))
Dim dt2 As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__setInvoiceSent] @Id, @auto, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key)
End If
End If
Action = New OKResult()
Else
Action = New ExceptionResult("Aktion war nicht erfolgreich", OCMS_StatusCodes.exception)
End If
Else
Action = New ExceptionResult("Not found", OCMS_StatusCodes.exception)
End If
End Select
Return Action
End Function
End Class
End Namespace
+294
View File
@@ -0,0 +1,294 @@
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports json = Newtonsoft.Json.JsonConvert
Namespace Global.Fuchs.intranet
Module fuchs_reports
'Public Function LogReport(ReportId As Long) As Boolean
' Try
' Dim t As System.Threading.Tasks.Task(Of Object) = SO_Tools.setSQLValue_async("EXECUTE [dbo].[ctm__reports_logReport] @report_id;", SQLConnectionString:=System.Configuration.ConfigurationManager.ConnectionStrings("CTM_Reporting").ConnectionString, SqlParameterList:=New List(Of SqlClient.SqlParameter) From {New SqlClient.SqlParameter("@report_id", ReportId)})
' t.Start()
' Catch ex As Exception
' Debug.Print("fds_reports - LogReport_async", ex:=ex, data:=json.SerializeObject(New With {.report_id = ReportId}))
' End Try
' Return True
'End Function
'Public Function LogReport(ReportId As String, parameter As String, Optional sync As Boolean = False) As Boolean
' Try
' Dim report As Long
' If Long.TryParse(ReportId, report) = False Then
' Throw New Exception("ReportID '" & ReportId & "' not valid")
' End If
' Dim spl As New List(Of SqlClient.SqlParameter) From {
' New SqlClient.SqlParameter("@report_id", report),
' New SqlClient.SqlParameter("@parameter", parameter)
' }
' Dim setSql As Action = Sub() Call setSQLValue("EXECUTE [dbo].[ctm__reports_logReport] @report_id, @parameter;", SQLConnection:=Intranet.Intranet_SqlCon, SqlParameterList:=spl)
' If sync = False Then
' Threading.Tasks.Task.Run(setSql)
' Else
' Call setSql()
' End If
' Catch ex As Exception
' OCMS.debug_log("fds_reports - LogReport", ex:=ex, data:=json.SerializeObject(New With {.report_id = ReportId}))
' End Try
' Return True
'End Function
'Public Sub SendReports(Optional ByVal ReportId As String = "")
' Dim Reports As New DataTable
' If ReportId = "" Then
' Reports = getSQLDatatable("EXECUTE [dbo].[fds__reports_getReports];", Intranet.Intranet_SqlCon)
' Else
' Reports = getSQLDatatable("EXECUTE [dbo].[ctm__reports_getSingleReport] @report_id;", Intranet.Intranet_SqlCon, New List(Of SqlClient.SqlParameter) From {New SqlClient.SqlParameter("@report_id", Long.Parse(ReportId))})
' End If
' If Reports.Rows.Count > 0 Then
' For Each rw As DataRow In Reports.Select("", "Time")
' Try
' Dim type As String = rw.nz("type", "")
' Dim report As String = rw.Item("report")
' ReportId = rw.Item("report_id")
' Dim parameter_str As String = rw.nz("parameter", "")
' Dim parameter_nvc As Specialized.NameValueCollection = If(parameter_str = "", New Specialized.NameValueCollection, json.DeserializeObject(Of NameValueCollection)(rw.Item("parameter")))
' Dim email_csv As String = rw.Item("recipients").Replace(";", ",")
' Select Case type
' Case "generic"
' Dim ctm_email As New ctm_email.ctm_email(email_csv.Split(","), subject:="CTM_Reporting: " & report, htmlbody:="")
' AddHandler ctm_email.DebugLogRequest, AddressOf OCMS.debug_logStandard
' AddHandler ctm_email.SentSuccess, Function() LogReport(ReportId:=ReportId, parameter:=parameter_str)
' 'AddHandler ctm_email.SentSuccess, Function() LogReport(ReportId:=ReportId)
' Dim hp As ocms_visualization.HtmlPage = ocms_visualization.renderQueryAsHtmlPage(report, report, ocms_visualization.queryTypes.generic, params:=parameter_nvc, destination:=ocms_visualization.destinationTypes.email, allowcache:=False)
' Dim html As String = hp.toString(destination:=ocms_visualization.destinationTypes.email)
' Dim ac As New MimeKit.AttachmentCollection()
' For Each imgcid In hp.LinkedImages.Keys
' 'There are guid-like id used by the html creation function, those need to be replaced by valid IDs as provided by email library
' Dim contentid As ctm_email.ctm_email.EmbeddedImageID = ctm_email.AddEmbeddedImage(ac.Add(hp.LinkedImages(imgcid).filename, hp.LinkedImages(imgcid).filecontent))
' html = html.Replace(imgcid, contentid.ID)
' Next
' ctm_email.AppendHtml(html)
' If Reports.Columns.Contains("attachment") Then
' Select Case (If(IsDBNull(rw.Item("attachment")), "", If(rw.Item("attachment"), "")).ToString.ToLower())
' Case "excel"
' Try
' Dim ADT As New DataTable, DList As New List(Of DataTable)
' Call ocms_visualization.GetQuery(report, parameter_nvc, ADT, DList)
' Dim xls As New ocms_Excel.SimpleExcel(report.Replace(" ", "_"), DList, "en")
' Dim xlscontent As Byte() = xls.toBytes()
' ctm_email.AddFile(xlscontent, report & "_" & Now.ToString("yyyyMMdd_HHmm") & ".xlsx")
' Catch ex As Exception
' Call OCMS.debug_log("fds_reports - SendReports generic excel", ex:=ex, data:=json.SerializeObject(rw))
' End Try
' End Select
' End If
' ctm_email.send(Sub() LogReport(ReportId:=ReportId, parameter:=parameter_str, sync:=True))
' Case "chart"
' Dim ctm_email As New ctm_email.ctm_email(email_csv.Split(","), subject:="CTM_Reporting: " & report, htmlbody:="")
' AddHandler ctm_email.DebugLogRequest, AddressOf OCMS.debug_logStandard
' AddHandler ctm_email.SentSuccess, Function() LogReport(ReportId:=ReportId, parameter:=parameter_str)
' 'AddHandler ctm_email.SentSuccess, Function() LogReport(ReportId:=ReportId)
' Dim chart As Byte() = ocms_visualization.renderQueryAsChart(report, ocms_visualization.queryTypes.generic)
' If IsNothing(chart) = False Then
' ctm_email.AppendHtml(ctm_email.AddEmbeddedImage("chart.png", chart).ImageHtml)
' ctm_email.send(Sub() LogReport(ReportId:=ReportId, parameter:=parameter_str, sync:=True))
' End If
' End Select
' Catch rex As Exception
' OCMS.debug_log("fds_reports - SendReports (loop)", ex:=rex, data:=json.SerializeObject(rw))
' End Try
' Next
' End If
'End Sub
'Public Sub SendNotifications()
' Dim ndt As DataTable = Nothing
' ndt = getSQLDatatable("EXECUTE [dbo].[ctm__admin_getNotifications];", Intranet.Intranet_SqlCon)
' If IsNothing(ndt) = False AndAlso ndt.Rows.Count > 0 Then
' For Each rw As DataRow In ndt.Rows
' Dim bdy As String = rw.nz("body", "")
' Dim ctm_email As New ctm_email.ctm_email(rw.nz("to_csv", "").ToString().Split(","), subject:="Fuchs DatenService: " & rw.nz("subject", ""), htmlbody:=If(left(bdy, 1) = "<", bdy, "<div>" & Web.HttpUtility.HtmlEncode(bdy) & "</div>"))
' ctm_email.send(Sub() Diagnostics.Debug.Print("success"))
' Next
' End If
'End Sub
Public ReloadSeconds As Integer = 60 * 10
Public Async Function process_fdsrequest(ByVal ctrl As Global.OCMS.intranet.Controllers.IntranetController_base, ByVal fnc As String, ByVal id As String) As Threading.Tasks.Task(Of ActionResult)
Dim parameter As RequestFormHandler = ctrl.Form()
parameter.SetValue("@authuser", ctrl.UserAccountID) 'overwrite also
Dim tgt_function As String = If(fnc <> "", fnc, parameter.Item("fnc", ReturnAlternative:=fnc)).Replace("gct", "generic_content")
Dim report As String = parameter.Item("report", ReturnAlternative:=If(id <> "", id, ""))
Dim Catalog As SQLDataTable = Await getSQLDatatable_async("EXECUTE [dbo].[fds__admin_getReportCatalog] @report_name, @authuser;", ctrl.Intranet.Intranet__SQLConnectionString, SqlParameterList:=New List(Of SqlClient.SqlParameter) From {New SqlClient.SqlParameter("@report_name", report), New SqlClient.SqlParameter("@authuser", ctrl.UserAccountID)})
Dim HtmlPage_TemplatePath As String = ctrl.ApplicationBaseDirectory().FullName.AppendIf("\") & "Content\FDS_Template.html"
Dim reportdic As Dictionary(Of String, Object) = Catalog.FirstRow.toObjectDictionary
Try
Select Case tgt_function
Case "generic_content"
Dim responseData = New With {.Date = DateTime.Now}
Dim ci_auth As Boolean = If(reportdic.ContainsKey("auth") AndAlso IsNothing(reportdic("auth")) = False AndAlso reportdic("auth").GetType() = GetType(Boolean), reportdic("auth"), True)
'Dim ci_refresh As Int16 = If(reportdic.ContainsKey("refresh") AndAlso IsNothing(reportdic("refresh")) = False AndAlso reportdic("refresh").GetType() = GetType(Int16), reportdic("refresh"), -2)
Dim ci_cache As Boolean = reportdic.ContainsKey("functions") AndAlso IsNothing(reportdic("functions")) = False AndAlso reportdic("functions").ToString().Split(",").Contains("cache")
Dim ci_forceReload As Boolean = parameter.Contains("cache") AndAlso parameter("cache").ToLower = "0"
If ci_cache = True Then
End If
Try
'create
If report = "" Then
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.Ambiguous, "No report defined")
Else
Dim DebugPrint As Action(Of Exception, String, String) = Sub(exs, ref, data)
Call OCMS.debug_log(ref, ex:=exs, data:=data)
End Sub
Dim hp As String = Await ocms_visualization.renderQueryAsHtml(report, report, ocms_visualization.queryTypes.generic, params:=parameter, AuthUserAccountID:=ctrl.UserAccountID, destination:=ocms_visualization.destinationTypes.content, templatePath:=HtmlPage_TemplatePath, context:=ctrl.HttpContext, allowcache:=ci_cache, forceReload:=ci_forceReload)
Return New Mvc.ContentResult() With {.Content = hp, .ContentType = "text/html", .ContentEncoding = Encoding.UTF8}
End If
Catch exi As Exception
Call OCMS.debug_log("process_fdsrequest generic", ex:=exi, data:=json.SerializeObject(parameter))
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
End Try
Case "generic"
Dim responseData = New With {.Date = DateTime.Now}
Dim ci_auth As Boolean = If(reportdic.ContainsKey("auth") AndAlso IsNothing(reportdic("auth")) = False AndAlso reportdic("auth").GetType() = GetType(Boolean), reportdic("auth"), True)
Dim ci_refresh As Int16 = If(reportdic.ContainsKey("refresh") AndAlso IsNothing(reportdic("refresh")) = False AndAlso reportdic("refresh").GetType() = GetType(Int16), reportdic("refresh"), -2)
Dim ci_cache As Boolean = reportdic.ContainsKey("functions") AndAlso IsNothing(reportdic("functions")) = False AndAlso reportdic("functions").ToString().Split(",").Contains("cache")
Dim ci_forceReload As Boolean = parameter.Contains("cache") AndAlso parameter("cache").ToLower = "0"
If ci_cache = True Then
End If
Try
'create
If report = "" Then
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.Ambiguous, "No report defined")
Else
Dim DebugPrint As Action(Of Exception, String, String) = Sub(exs, ref, data)
Call OCMS.debug_log(ref, ex:=exs, data:=data)
End Sub
Dim hp As ocms_visualization.HtmlPage = Await ocms_visualization.renderQueryAsHtml(report, report, ocms_visualization.queryTypes.generic, params:=parameter, AuthUserAccountID:=ctrl.UserAccountID, destination:=ocms_visualization.destinationTypes.web, templatePath:=HtmlPage_TemplatePath, context:=ctrl.HttpContext, allowcache:=ci_cache, forceReload:=ci_forceReload)
If parameter.Item("reload") <> "" Then
Dim ReloadSeconds As Integer
If Integer.TryParse(parameter("reload"), ReloadSeconds) = True Then
hp.ReloadSeconds = ReloadSeconds
End If
ElseIf ci_refresh > -2 Then
hp.ReloadSeconds = ci_refresh
ElseIf ReloadSeconds > 0 Then
hp.ReloadSeconds = ReloadSeconds
End If
If hp.QueryDuration > 180 AndAlso hp.ReloadSeconds > 0 AndAlso hp.ReloadSeconds < 3600 Then
hp.ReloadSeconds = 1200
ElseIf hp.QueryDuration > 60 AndAlso hp.ReloadSeconds > 0 AndAlso hp.ReloadSeconds < 1200 Then
hp.ReloadSeconds = 1200
End If
Return New Mvc.ContentResult() With {.Content = hp.toString(destination:=ocms_visualization.destinationTypes.web), .ContentType = "text/html", .ContentEncoding = Encoding.UTF8}
End If
Catch exi As Exception
Call OCMS.debug_log("process_fdsrequest generic", ex:=exi, data:=json.SerializeObject(parameter))
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
End Try
Case "chart"
Dim chart As Byte() = Await ocms_visualization.renderQueryAsChart(report, ocms_visualization.queryTypes.generic)
If IsNothing(chart) = False Then
Return New Mvc.FileContentResult(chart, "image/png") With {.FileDownloadName = report.Replace(" ", "_") & "_" & Now().ToString("yyyyMMdd_HHmm") & ".png"}
Else
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
End If
Case "xls"
Throw New NotImplementedException
'Try
' If report = "" Then
' Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.Ambiguous, "No report defined")
' Else
' Dim ADT As New DataTable, DList As New List(Of DataTable)
' Call ocms_visualization.GetQuery(report, parameter, ADT, DList)
' Dim xls As New ctm_Excel.SimpleExcel(report.Replace(" ", "_"), DList, "en")
' Dim xlscontent As Byte() = xls.toBytes()
' If IsNothing(xlscontent) = False Then
' Return New Mvc.FileContentResult(xlscontent, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") With {.FileDownloadName = report.Replace(" ", "_") & "_" & Now().ToString("yyyyMMdd_HHmm") & ".xlsx"}
' Else
' Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
' End If
' End If
'Catch exi As Exception
' Call OCMS.debug_log("process_fdsrequest xls", ex:=exi, data:=json.SerializeObject(parameter))
' Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
'End Try
Case Else
Dim responseData = New With {.Date = DateTime.Now}
Try
Dim querytype As ocms_visualization.queryTypes
If [Enum].TryParse(Of ocms_visualization.queryTypes)(fnc, querytype) = True Then
'create chart
If report = "" Then
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.Ambiguous, "No report defined")
Else
Dim hp As ocms_visualization.HtmlPage = Await ocms_visualization.renderQueryAsHtml(report, report, qtype:=querytype, params:=parameter, AuthUserAccountID:=ctrl.UserAccountID, destination:=ocms_visualization.destinationTypes.web, templatePath:=HtmlPage_TemplatePath, context:=ctrl.HttpContext)
If parameter.Item("reload") <> "" Then
Dim ReloadSeconds As Integer
If Integer.TryParse(parameter("reload"), ReloadSeconds) = True Then
hp.ReloadSeconds = ReloadSeconds
End If
ElseIf ReloadSeconds > 0 Then
hp.ReloadSeconds = ReloadSeconds
End If
If hp.QueryDuration > 180 AndAlso hp.ReloadSeconds > 0 AndAlso hp.ReloadSeconds < 3600 Then
hp.ReloadSeconds = 1200
ElseIf hp.QueryDuration > 60 AndAlso hp.ReloadSeconds > 0 AndAlso hp.ReloadSeconds < 1200 Then
hp.ReloadSeconds = 1200
End If
Return New Mvc.ContentResult() With {.Content = hp.toString(destination:=ocms_visualization.destinationTypes.web), .ContentType = "text/html", .ContentEncoding = Encoding.UTF8}
End If
Else
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.Ambiguous, "No report defined")
End If
Catch exi As Exception
Call OCMS.debug_log("process_fdsrequest else", ex:=exi, data:=json.SerializeObject(parameter))
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
End Try
End Select
Catch exo As Exception
Call OCMS.debug_log("process_fdsrequest outer", ex:=exo)
Return New Mvc.HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, "Bei der Bearbeitung der Anfrage ist ein Fehler aufgetreten.")
End Try
End Function
End Module
End Namespace
+182
View File
@@ -0,0 +1,182 @@
Imports OCMS
Namespace Global.Fuchs.intranet.services
Public Module WeatherCom
Public Async Function GetWeather(ByVal CityCode As String) As Threading.Tasks.Task(Of ContiDateDataDic)
Dim WeatherData As New ContiDateDataDic(7, 3)
Try
'returndic.Add("date", Format(tgtDateTime, SO_Tools.DateTime_Tools.GetDateFormat(SO_Tools.DateTime_Tools.DateFormat.ISO_DateTime_long)))
Dim APIKey As String = "1a5b6bd10406dad7d4159f2001a90bdb"
Dim ProjektName As String = "scheduler"
Dim IconBaseUrl As String = "https://cs3.wettercomassets.com/wcomv5/images/icons/weather/d_" '"http://ls1.wetter.com/img/icons/weather/small/d_"
Dim IconBaseExt As String = ".svg" '"_S.png"
Dim Authstring As String = ProjektName & APIKey & CityCode
Dim iMD5 As System.Security.Cryptography.MD5 = System.Security.Cryptography.MD5.Create()
Dim data = iMD5.ComputeHash(Encoding.UTF8.GetBytes(Authstring))
Dim sb As New StringBuilder()
Array.ForEach(data, Function(x) sb.Append(x.ToString("X2")))
Dim AuthCode As String = sb.ToString().ToLower
Dim TgtURL = "http://api.wetter.com/forecast/weather/city/" & CityCode & "/project/" & ProjektName & "/cs/" & AuthCode
Dim responseText As String = Await GetWebResponse(TgtURL)
Dim xmlDocument As New System.Xml.XmlDocument()
xmlDocument.LoadXml(responseText)
Dim root As System.Xml.XmlElement = xmlDocument.DocumentElement
For Each E As System.Xml.XmlElement In root.SelectNodes("//time")
Dim elementdic As New Global.OCMS.ocms_dictionaries.GenericStringDictionary
Dim localTime As Date = Date.ParseExact(E.SelectSingleNode("dhl").InnerText, "yyyy\-MM\-dd HH\:mm", New Globalization.CultureInfo("de")) 'lokale Zeit ISO 8601
Dim validTimespan As Integer = E.SelectSingleNode("p").InnerText
Dim statuscode As String = E.SelectSingleNode("w").InnerText
Dim statustext As String = E.SelectSingleNode("w_txt").InnerText
Dim T_Min As String = E.SelectSingleNode("tn").InnerText
Dim T_Max As String = E.SelectSingleNode("tx").InnerText
Dim W_angle As String = E.SelectSingleNode("wd").InnerText
Dim W_dir As String = E.SelectSingleNode("wd_txt").InnerText
Dim W_v As String = E.SelectSingleNode("ws").InnerText
Dim rainProb As String = E.SelectSingleNode("pc").InnerText
With elementdic
.Add("localdate", localTime.ToString("yyyy\-MM\-ddTHH\:mm\:ss", New Globalization.CultureInfo("de")))
.Add("valid", validTimespan)
.Add("valid_hours", "(" & localTime.ToString("HH") & " - " & localTime.AddHours(validTimespan).ToString("HH") & " h)")
.Add("t_min", T_Min & " °C")
.Add("t_max", T_Max & " °C")
.Add("t_min_rw", T_Min)
.Add("t_max_rw", T_Max)
.Add("rain", rainProb & " %")
.Add("wind", W_v & " km/h")
.Add("wind_angle", W_angle & "°")
.Add("wind_dir", W_dir)
.Add("status", statuscode)
.Add("status_txt", statustext)
.Add("credit_text", root.SelectSingleNode("//credit/text").InnerText)
.Add("credit_link", root.SelectSingleNode("//credit/link").InnerText)
.Add("icon_url_s", IconBaseUrl & left(statuscode, 1) & IconBaseExt)
.Add("icon_url_m", IconBaseUrl.Replace("small", "medium") & left(statuscode, 1) & IconBaseExt.Replace("S", "M"))
.Add("icon_url_l", IconBaseUrl.Replace("small", "large") & left(statuscode, 1) & IconBaseExt.Replace("S", "L"))
End With
WeatherData.Add(localTime, elementdic)
Next
Return WeatherData
Catch ex As Exception
Debug.Print("Shared_VM_SvcTools GetWeather", ex, Nothing, False)
Return WeatherData
End Try
End Function
End Module
Public Module svc
'Public Async Function getGermanHolidays(Ctrl As Global.OCMS.ocms_ClientController) As Threading.Tasks.Task(Of Mvc.ActionResult)
' Dim Startyear As Integer, Endyear As Integer
' If Integer.TryParse(Ctrl.Form("start"), Startyear) = True AndAlso Integer.TryParse(Ctrl.Form("end"), Endyear) = True Then
' Try
' Return Await JSONAsync(Await getGermanHolidays(Startyear:=Startyear, Endyear:=Endyear))
' Catch ex As Exception
' End Try
' Else
' Return New OCMS_HttpStatusCodeResult(Net.HttpStatusCode.BadRequest, Internal_Code:=OCMS_StatusCodes.inputmissing)
' End If
' 'if function reaches this point, an exception happened
' Return New OCMS_HttpStatusCodeResult(Net.HttpStatusCode.InternalServerError, Internal_Code:=OCMS_StatusCodes.exception)
'End Function
'Public Async Function getGermanHolidays(Startyear As Integer, Endyear As Integer) As Threading.Tasks.Task(Of String)
' Dim dic As New Dictionary(Of String, String)
' Dim tgtState As String = "NW"
' For yr As Integer = Startyear To Endyear
' Dim req As Net.HttpWebRequest = Net.HttpWebRequest.Create(My.Settings.FeiertageAPI_Url & "?jahr=" & yr.ToString) ' & "&nur_land=" & tgtState)
' Using res As Net.HttpWebResponse = Await req.GetResponseAsync()
' Using reader As New System.IO.StreamReader(res.GetResponseStream())
' Dim responsecontent As String = reader.ReadToEnd
' Dim d As Dictionary(Of String, Dictionary(Of String, Dictionary(Of String, String))) = Newtonsoft.Json.JsonConvert.DeserializeObject(responsecontent, GetType(Dictionary(Of String, Dictionary(Of String, Dictionary(Of String, String)))))
' If d.ContainsKey(tgtState) = True Then
' Dim stateDic As Dictionary(Of String, Dictionary(Of String, String)) = d(tgtState)
' For Each ky As String In stateDic.Keys
' Dim di As Dictionary(Of String, String) = stateDic(ky)
' dic.Add(di("datum").Replace("-", ""), ky)
' Next
' End If
' End Using
' End Using
' Next
' Return Newtonsoft.Json.JsonConvert.SerializeObject(dic)
'End Function
End Module
Public Class ContiDateDataDic
Inherits SortedDictionary(Of Date, Global.OCMS.ocms_dictionaries.GenericStringDictionary)
Private _timespan As Integer
Private _validHours As Integer
Public Sub New(timespan As Integer, validHours As Integer)
_timespan = timespan
_validHours = validHours
End Sub
Public Shadows Sub Add(key As Date, value As Global.OCMS.ocms_dictionaries.GenericStringDictionary)
If Not value.ContainsKey("DateCreated") Then value.Add("DateCreated", Now())
If Not value.ContainsKey("DateValid") Then value.Add("DateValid", DateAdd(DateInterval.Hour, (_validHours), Now()))
If Me.ContainsKey(key) Then Me.Remove(key)
MyBase.Add(key, value)
Call ClearOldValues()
End Sub
Public Sub ClearOldValues()
For Each ky As Date In Me.Keys
If ky < DateAdd(DateInterval.Day, (_timespan * -1), Now) Then
Me.Remove(ky)
End If
Next
End Sub
Public Function GetValidItem(TgtDate As Date) As Global.OCMS.ocms_dictionaries.GenericStringDictionary
Dim Ret As New Global.OCMS.ocms_dictionaries.GenericStringDictionary
Try
For Each ky As Date In Me.Keys
If ky > TgtDate And DateDiff(DateInterval.Hour, TgtDate, ky) <= 12 Then
Ret = Me.Item(ky)
Exit For
ElseIf ky > TgtDate Then
Exit For
ElseIf ky <= TgtDate And DateAdd(DateInterval.Hour, CInt(Me.Item(ky)("valid")), ky) > TgtDate Then
Ret = Me.Item(ky)
Exit For
End If
Next
Catch ex As Exception
Debug.Print("ContiDateDataDic GetvalidItem", ex, TgtDate.ToString, Nothing)
End Try
Return Ret
End Function
Public Function getNextValid(TgtDate As Date, NextCount As Byte) As SortedDictionary(Of Date, Global.OCMS.ocms_dictionaries.GenericStringDictionary)
Dim returndic As New SortedDictionary(Of Date, Global.OCMS.ocms_dictionaries.GenericStringDictionary)
For Each ky As Date In Me.Keys
If ky > TgtDate And returndic.Count < NextCount Then
returndic.Add(ky, Me.Item(ky))
End If
Next
Return returndic
End Function
End Class
End Namespace
@@ -0,0 +1,89 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.OCMS.intranet.Controllers
Partial Public Class IntranetController
Private Async Function Do_Process_Bankings(fn As String, id As String, code As String) As Task(Of ActionResult)
Dim Action As ActionResult = Nothing
Select Case id.ToLower
Case "auth"
Action = Await JSONAsync(New With {.manage = 1})
Case "up"
For f As Integer = 0 To Me.Request.Files.Count - 1
Dim fle As HttpPostedFileWrapper = Me.Request.Files(f), SchemaDatatable = (Await getSQLDatatable_async(" DECLARE @tmp [dbo].[fds__tt__bankingtransactions]; SELECT TOP(0) * FROM @tmp;", SqlConnectionString:=Me.FuchsIntranet.Intranet__SQLConnectionString, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))).DataTable
Dim tbl As DataTable = Global.Fuchs.intranet.banking.parseToDatatable(stream:=fle.InputStream, SchemaDatatable:=SchemaDatatable)
Dim dtwa As New DatatableWriterAsync(tbl, Global.Fuchs.intranet.fuchs_ocms_intranet.Intranet.Intranet__SQLConnectionString)
Dim tmptbl As String = "bs_" & Guid.NewGuid().ToString.ToLower.Replace("-", "")
dtwa.CommandAfterError = New SqlClient.SqlCommand("Select * INTO [" & tmptbl & "] FROM " & dtwa.DestinationTableName & ";")
dtwa.CommandAfter = New SqlClient.SqlCommand("EXECUTE [dbo].[fds__merge_bankingtransactions] @tblname, @authuser;")
dtwa.CommandAfter.Parameters.AddRange(New SqlClient.SqlParameter() {New SqlClient.SqlParameter("@tblname", dtwa.DestinationTableName), SQL_VarChar("@authuser", Me.UserAccountID)})
AddHandler dtwa.OnError, Sub(sender As DatatableWriterAsync, exc As Exception, message As String)
Me.FuchsIntranet.debug_log("IntranetController._Do.bam.up - sql exception: ", ex:=exc, data:=New With {.uid = dtwa.InstanceGUID, .tmptbl = tmptbl})
End Sub
AddHandler dtwa.OnCommandAfterError, Sub(sender As DatatableWriterAsync, exc As Exception)
Me.FuchsIntranet.debug_log("IntranetController._Do.bam.up - sql exception command after: ", ex:=exc, data:=New With {.uid = dtwa.InstanceGUID, .tmptbl = tmptbl})
End Sub
Diagnostics.Debug.Print("bankingtransactions table: " & dtwa.DestinationTableName)
dtwa.DoSubmit()
Next
Action = New OKResult()
Case "qtl"
If Me.Form.CheckParams(StrA("mode")) = False Then Return New InputMissingResult()
'Dim tgtdate As Date
'If Date.TryParseExact(Me.Form("tgt"), "yy-MM-dd", Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AllowWhiteSpaces, tgtdate) = True Then
If 1 = 1 Then 'conditional fame kept just in case the date-parameter will be added at some point
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_VarChar("@mode", Me.Form("mode"))})
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getBankingtransfers_questionable] @mode, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "transfers"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim bsl As New List(Of Dictionary(Of String, Object))(sqldt.Tables("transfers").toArrayofObjectDictionaries())
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .bs = bsl})
Else
Action = New InputMissingResult()
End If
Case "btl"
If Me.Form.CheckParams(StrA("mode")) = False Then Return New InputMissingResult()
Dim tgtdate As Date, mode As String = Me.Form("mode").ToLower
If mode = "s" AndAlso Me.Form("tgt").Contains(":") Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", tgtdate), SQL_VarChar("@mode", Me.Form("mode").ne("m")), SQL_bit("@include_drafts", Me.Form("all"))})
pl.Add(SQL_VarChar("@search", Me.Form("tgt")))
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getBankingtransfers_list2] @tgtdate, @mode, @search, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "bank"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .bank = sqldt.Tables("bank").toArrayofObjectDictionaries})
ElseIf Date.TryParseExact(Me.Form("tgt"), "yy-MM-dd", Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AllowWhiteSpaces, tgtdate) = True Then
Dim pl As ParamList = Me.StdParamlist(New SqlClient.SqlParameter() {SQL_date("@tgtdate", tgtdate), SQL_VarChar("@mode", Me.Form("mode").ne("m")), SQL_VarChar("@includes", Me.Form("includes").ne(If(Me.Form("all") = "true", "all", "")))})
Dim sqldt As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__getBankingtransfers_list] @tgtdate, @mode, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"admin", "bank"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(New With {.admin = sqldt.Table("admin").FirstRow().toObjectDictionary(), .bank = sqldt.Tables("bank").toArrayofObjectDictionaries})
Else
Action = New InputMissingResult()
End If
Case "smd"
If Me.Form.CheckParams(StrA("taid")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@taID", Me.Form("taid"), dbNull_IfEmpty:=True))
Dim res As SQLObject = Await getSQLValue_async("EXECUTE [dbo].[fds__setBankingtransaction_done] @taID, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = If(IsNothing(res.Result) = False AndAlso res.Result.GetType = GetType(Boolean) AndAlso res.Result = True, New OKResult, New ExceptionResult("not successful", OCMS_StatusCodes.exception))
Case "ati"
If Me.Form.CheckParams(StrA("taid", "iid")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@taid", Me.Form("taid"), dbNull_IfEmpty:=True), SQL_VarChar("@invoice_id", Me.Form("iid"), dbNull_IfEmpty:=True))
Dim res As SQLObject = Await getSQLValue_async("EXECUTE [dbo].[fds__setBankingtransaction_assignToIvoice] @taID, @invoice_id, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = If(IsNothing(res.Result) = False AndAlso res.Result.GetType = GetType(Boolean) AndAlso res.Result = True, New OKResult, New ExceptionResult("not successful", OCMS_StatusCodes.exception))
Case "vfi"
If Me.Form.CheckParams(StrA("invid")) = False Then Return New InputMissingResult()
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@InvoiceId", Me.Form("invid"), dbNull_IfEmpty:=True))
Dim res As SQLDataTable = Await getSQLDatatable_async("Select [Id], [InvoiceId], [SendToAddress] FROM [dbo].[fds__invoices] WHERE [InvoiceId] Like ('%' + @InvoiceId) AND [InvoiceId] is not null AND [DateFinalized] is not null;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, options:=SQLOptBasic(fn, id, code, Me.Form))
Action = Await JSONAsync(res.DataTable.toArrayofObjectDictionaries)
End Select
Return Action
End Function
End Class
End Namespace
@@ -0,0 +1,40 @@
Option Explicit On
Imports System.Threading.Tasks
Imports OCMS
Imports OCMS.intranet
Imports OCMS.SQLHandling
Imports njson = Newtonsoft.Json.JsonConvert
Namespace Global.OCMS.intranet.Controllers
Partial Public Class IntranetController
Private Async Function Do_Process_Reports(fn As String, id As String, code As String) As Task(Of ActionResult)
Dim Action As ActionResult = Nothing
Select Case id.ToLower
Case "auth"
Action = Await JSONAsync(New With {.manage = 1})
Case "catalog"
Dim pl As ParamList = Me.StdParamlist(SQL_VarChar("@report_name", Me.Form("report"), dbNull_IfEmpty:=True))
Dim dset As SQLDataSet = Await getSQLDataSet_async("EXECUTE [dbo].[fds__admin_getReportCatalog] @report_name, @authuser;", Me.Intranet.Intranet__SQLConnectionString, SqlParameterList:=pl, ApplySymmetricKey:=Me.Intranet.Intranet__sql_symmetric_key, tablenames:=New String() {"reports", "params", "categories", "tags"}, options:=SQLOptBasic(fn, id, code, Me.Form))
Dim reps As Dictionary(Of String, Object)() = dset.Tables("reports").toArrayofObjectDictionaries()
For Each ri As Dictionary(Of String, Object) In reps
Dim params As Dictionary(Of String, Object)() = New Dictionary(Of String, Object)() {}
Try
params = dset.Tables("params").toArrayofObjectDictionaries(selectstring:="[object_id] = " & ri("object_id") & " AND [name] <> '@authuser'")
Finally
ri.Add("params", params)
End Try
Next
Return Await JSONAsync(New With {.reports = reps, .categories = dset.Tables("categories").toArrayofObjectDictionaries(), .tags = dset.Tables("tags").toArrayofObjectDictionaries()})
Case Else
Action = Await Global.Fuchs.intranet.fuchs_reports.process_fdsrequest(Me, id.ToLower, id:=code)
End Select
Return Action
End Function
End Class
End Namespace
+118
View File
@@ -0,0 +1,118 @@
Imports MigraDoc.DocumentObjectModel
Imports cs = System.Runtime.CompilerServices
Imports System
Imports System.Collections.Generic
Namespace Global.MigraDoc.Extensions.Html
Public Module Extensions
<cs.Extension()>
Public Function AddHtml(ByVal section As Section, ByVal html As String) As Section
Return section.Add(html, New HtmlConverter())
End Function
<cs.Extension()>
Public Function AddHtml(ByVal cell As MigraDoc.DocumentObjectModel.Tables.Cell, ByVal html As String) As Tables.Cell
Return cell.Add(html, New HtmlConverter())
End Function
<cs.Extension()>
Public Function AddHtml(ByVal cell As Shapes.TextFrame, ByVal html As String) As Shapes.TextFrame
Return cell.Add(html, New HtmlConverter())
End Function
End Module
End Namespace
Namespace Global.MigraDoc.Extensions
Public MustInherit Class IConverter
Public MustOverride Function Convert(ByVal contents As String) As Action(Of Section)
Public MustOverride Function ConvertTextFrame(ByVal contents As String) As Action(Of Shapes.TextFrame)
Public MustOverride Function ConvertCell(ByVal contents As String) As Action(Of MigraDoc.DocumentObjectModel.Tables.Cell)
End Class
Public Module Extensions
<cs.Extension()>
Public Function Add(ByVal cell As MigraDoc.DocumentObjectModel.Tables.Cell, ByVal contents As String, ByVal converter As IConverter) As MigraDoc.DocumentObjectModel.Tables.Cell
If String.IsNullOrEmpty(contents) Then
Throw New ArgumentNullException("contents")
End If
If converter Is Nothing Then
Throw New ArgumentNullException("converter")
End If
Dim addAction As Action(Of MigraDoc.DocumentObjectModel.Tables.Cell) = converter.ConvertCell(contents)
addAction(cell)
Return cell
End Function
<cs.Extension()>
Public Function Add(ByVal frame As Shapes.TextFrame, ByVal contents As String, ByVal converter As IConverter) As Shapes.TextFrame
If String.IsNullOrEmpty(contents) Then
Throw New ArgumentNullException("contents")
End If
If converter Is Nothing Then
Throw New ArgumentNullException("converter")
End If
Dim addAction As Action(Of Shapes.TextFrame) = converter.ConvertTextFrame(contents)
addAction(frame)
Return frame
End Function
<cs.Extension()>
Public Function Add(ByVal section As Section, ByVal contents As String, ByVal converter As IConverter) As Section
If String.IsNullOrEmpty(contents) Then
Throw New ArgumentNullException("contents")
End If
If converter Is Nothing Then
Throw New ArgumentNullException("converter")
End If
Dim addAction As Action(Of Section) = converter.Convert(contents)
addAction(section)
Return section
End Function
<cs.Extension()>
Public Function SetStyle(ByVal paragraph As Paragraph, ByVal style As String) As Paragraph
If paragraph Is Nothing Then
Throw New ArgumentNullException("paragraph")
End If
If String.IsNullOrEmpty(style) Then
Throw New ArgumentNullException("style")
End If
paragraph.Style = style
Return paragraph
End Function
End Module
Public Module FormattedTextExtensions
Private formats As Dictionary(Of TextFormat, Action(Of FormattedText)) = New Dictionary(Of TextFormat, Action(Of FormattedText)) From {
{TextFormat.Bold, Sub(text) text.Bold = True},
{TextFormat.NotBold, Sub(text) text.Bold = False},
{TextFormat.Italic, Sub(text) text.Italic = True},
{TextFormat.NotItalic, Sub(text) text.Italic = False},
{TextFormat.Underline, Sub(text) text.Underline = Underline.[Single]},
{TextFormat.NoUnderline, Sub(text) text.Underline = Underline.None}
}
<cs.Extension()>
Public Function Format(ByVal formattedText As FormattedText, ByVal textFormat As TextFormat) As FormattedText
If formattedText Is Nothing Then
Throw New ArgumentNullException("formattedText")
End If
Dim formatter As Action(Of FormattedText) = Nothing
If formats.TryGetValue(textFormat, formatter) Then
formatter(formattedText)
End If
Return formattedText
End Function
End Module
End Namespace
@@ -0,0 +1,252 @@
Imports HtmlAgilityPack
Imports MigraDoc.DocumentObjectModel
Imports System
Imports System.Collections.Generic
Imports System.Net
Imports System.Linq
Imports MigraDoc.Extensions
Namespace Global.MigraDoc.Extensions.Html
Public Class HtmlConverter
Inherits IConverter
Private nodeHandlersField As IDictionary(Of String, Func(Of HtmlNode, DocumentObject, DocumentObject)) = New Dictionary(Of String, Func(Of HtmlNode, DocumentObject, DocumentObject))()
Public Sub New()
AddDefaultNodeHandlers()
End Sub
Public ReadOnly Property NodeHandlers As IDictionary(Of String, Func(Of HtmlNode, DocumentObject, DocumentObject))
Get
Return nodeHandlersField
End Get
End Property
Public Overrides Function Convert(ByVal contents As String) As Action(Of Section)
Return Sub(section As Section) Me.ConvertHtml(contents, section)
End Function
Public Overrides Function ConvertTextFrame(ByVal contents As String) As Action(Of Shapes.TextFrame)
Return Sub(frame As Shapes.TextFrame) Me.ConvertHtml(contents, frame)
End Function
Public Overrides Function ConvertCell(ByVal contents As String) As Action(Of MigraDoc.DocumentObjectModel.Tables.Cell)
Return Sub(cell As Tables.Cell) Me.ConvertHtml(contents, cell)
End Function
Private Overloads Sub ConvertHtml(ByVal html As String, ByVal section As Section)
If String.IsNullOrEmpty(html) Then
Throw New ArgumentNullException("html")
ElseIf section Is Nothing Then
Throw New ArgumentNullException("section")
End If
Dim doc As New HtmlDocument()
doc.LoadHtml(html)
ConvertHtmlNodes(doc.DocumentNode.ChildNodes, section)
End Sub
Private Overloads Sub ConvertHtml(ByVal html As String, ByVal cell As Tables.Cell)
If String.IsNullOrEmpty(html) Then
Throw New ArgumentNullException("html")
ElseIf cell Is Nothing Then
Throw New ArgumentNullException("cell")
End If
Dim doc As New HtmlDocument()
doc.LoadHtml(html)
ConvertHtmlNodes(doc.DocumentNode.ChildNodes, cell)
End Sub
Private Overloads Sub ConvertHtml(ByVal html As String, ByVal frame As Shapes.TextFrame)
If String.IsNullOrEmpty(html) Then
Throw New ArgumentNullException("html")
ElseIf frame Is Nothing Then
Throw New ArgumentNullException("frame")
End If
Dim doc As New HtmlDocument()
doc.LoadHtml(html)
ConvertHtmlNodes(doc.DocumentNode.ChildNodes, frame)
End Sub
Private Sub ConvertHtmlNodes(ByVal nodes As HtmlNodeCollection, ByRef section As DocumentObject, ByVal Optional current As DocumentObject = Nothing)
For Each node In nodes
Dim nodeHandler As Func(Of HtmlNode, DocumentObject, DocumentObject) = Nothing
If nodeHandlersField.TryGetValue(node.Name, nodeHandler) Then
' pass the current container or section
Dim result = nodeHandler(node, If(current, section))
If IsNothing(result) = False AndAlso node.HasChildNodes Then
ConvertHtmlNodes(node.ChildNodes, section, result)
End If
Else
If node.HasChildNodes Then
ConvertHtmlNodes(node.ChildNodes, section, current)
End If
End If
Next
End Sub
Private Sub AddDefaultNodeHandlers()
' Block Elements
' could do with a predicate/regex matcher so we could just use one handler for all headings
nodeHandlersField.Add("h1", New Func(Of HtmlNode, DocumentObject, DocumentObject)(AddressOf HtmlConverter.AddHeading))
nodeHandlersField.Add("h2", New Func(Of HtmlNode, DocumentObject, DocumentObject)(AddressOf HtmlConverter.AddHeading))
nodeHandlersField.Add("h3", New Func(Of HtmlNode, DocumentObject, DocumentObject)(AddressOf HtmlConverter.AddHeading))
nodeHandlersField.Add("h4", New Func(Of HtmlNode, DocumentObject, DocumentObject)(AddressOf HtmlConverter.AddHeading))
nodeHandlersField.Add("h5", New Func(Of HtmlNode, DocumentObject, DocumentObject)(AddressOf HtmlConverter.AddHeading))
nodeHandlersField.Add("h6", New Func(Of HtmlNode, DocumentObject, DocumentObject)(AddressOf HtmlConverter.AddHeading))
nodeHandlersField.Add("p", Function(node As HtmlNode, parent As DocumentObject) If(parent.GetType() = GetType(Tables.Cell), CType(parent, Tables.Cell).AddParagraph(), CType(parent, Section).AddParagraph()))
' Inline Elements
nodeHandlersField.Add("strong", Function(node As HtmlNode, parent As DocumentObject) AddFormattedText(node, parent, TextFormat.Bold))
nodeHandlersField.Add("i", Function(node As HtmlNode, parent As DocumentObject) AddFormattedText(node, parent, TextFormat.Italic))
nodeHandlersField.Add("em", Function(node As HtmlNode, parent As DocumentObject) AddFormattedText(node, parent, TextFormat.Italic))
nodeHandlersField.Add("u", Function(node As HtmlNode, parent As DocumentObject) AddFormattedText(node, parent, TextFormat.Underline))
nodeHandlersField.Add("a", Function(node As HtmlNode, parent As DocumentObject) HtmlConverter.GetParagraph(parent).AddHyperlink(node.GetAttributeValue("href", ""), HyperlinkType.Web))
nodeHandlersField.Add("hr", Function(node As HtmlNode, parent As DocumentObject) HtmlConverter.GetParagraph(parent).SetStyle("HorizontalRule"))
nodeHandlersField.Add("br", Function(node As HtmlNode, parent As DocumentObject)
If TypeOf parent Is FormattedText Then
' inline elements can contain line breaks
CType(parent, FormattedText).AddLineBreak()
Return parent
End If
Dim paragraph As Paragraph = HtmlConverter.GetParagraph(parent)
If IsNothing(paragraph) = False Then
paragraph.AddLineBreak()
End If
Return paragraph
End Function)
nodeHandlersField.Add("li", Function(node As HtmlNode, parent As DocumentObject)
Dim listStyle As String = If(node.ParentNode.Name Is "ul", "UnorderedList", "OrderedList")
If parent.GetType() = GetType(Tables.Cell) Then
Dim cell As Tables.Cell = CType(parent, Tables.Cell)
Dim isFirst As Boolean = node.ParentNode.Elements("li").First() Is node
Dim isLast As Boolean = node.ParentNode.Elements("li").Last() Is node
' if this is the first item add the ListStart paragraph
If isFirst Then
cell.AddParagraph().SetStyle("ListStart")
End If
Dim listItem As Paragraph = cell.AddParagraph().SetStyle(listStyle)
' disable continuation if this is the first list item
listItem.Format.ListInfo.ContinuePreviousList = Not isFirst
' if the this is the last item add the ListEnd paragraph
If isLast Then
cell.AddParagraph().SetStyle("ListEnd")
End If
Return listItem
ElseIf parent.GetType() = GetType(Shapes.TextFrame) Then
Dim frame As Shapes.TextFrame = CType(parent, Shapes.TextFrame)
Dim isFirst As Boolean = node.ParentNode.Elements("li").First() Is node
Dim isLast As Boolean = node.ParentNode.Elements("li").Last() Is node
' if this is the first item add the ListStart paragraph
If isFirst Then
frame.AddParagraph().SetStyle("ListStart")
End If
Dim listItem As Paragraph = frame.AddParagraph().SetStyle(listStyle)
' disable continuation if this is the first list item
listItem.Format.ListInfo.ContinuePreviousList = Not isFirst
' if the this is the last item add the ListEnd paragraph
If isLast Then
frame.AddParagraph().SetStyle("ListEnd")
End If
Return listItem
Else
Dim section As Section = CType(parent, Section)
Dim isFirst As Boolean = node.ParentNode.Elements("li").First() Is node
Dim isLast As Boolean = node.ParentNode.Elements("li").Last() Is node
' if this is the first item add the ListStart paragraph
If isFirst Then
section.AddParagraph().SetStyle("ListStart")
End If
Dim listItem As Paragraph = section.AddParagraph().SetStyle(listStyle)
' disable continuation if this is the first list item
listItem.Format.ListInfo.ContinuePreviousList = Not isFirst
' if the this is the last item add the ListEnd paragraph
If isLast Then
section.AddParagraph().SetStyle("ListEnd")
End If
Return listItem
End If
End Function)
nodeHandlersField.Add("#text", Function(node As HtmlNode, parent As DocumentObject)
' remove line breaks
Dim innerText As String = node.InnerText.Replace(vbCr, "").Replace(vbLf, "")
If String.IsNullOrWhiteSpace(innerText) Then
Return parent
End If
' decode escaped HTML
innerText = WebUtility.HtmlDecode(innerText)
' text elements must be wrapped in a paragraph but this could also be FormattedText or a Hyperlink!!
' this needs some work
If TypeOf parent Is FormattedText Then
Return CType(parent, FormattedText).AddText(innerText)
End If
If TypeOf parent Is Hyperlink Then
Return CType(parent, Hyperlink).AddText(innerText)
End If
' otherwise a section or paragraph
Return HtmlConverter.GetParagraph(parent).AddText(innerText)
End Function)
End Sub
Private Shared Function AddFormattedText(ByVal node As HtmlNode, ByVal parent As DocumentObject, ByVal format As TextFormat) As DocumentObject
Dim formattedText As FormattedText = TryCast(parent, FormattedText)
If formattedText IsNot Nothing Then
Return formattedText.Format(format)
End If
' otherwise parent is paragraph or section
Return HtmlConverter.GetParagraph(parent).AddFormattedText(format)
End Function
Private Shared Function AddHeading(ByVal node As HtmlNode, ByVal parent As DocumentObject) As DocumentObject
If parent.GetType() = GetType(Tables.Cell) Then
Return CType(parent, Tables.Cell).AddParagraph().SetStyle("Heading" & node.Name(1))
Else : Return CType(parent, Section).AddParagraph().SetStyle("Heading" & node.Name(1))
End If
End Function
Private Shared Function GetParagraph(ByVal parent As DocumentObject) As Paragraph
If parent.GetType() = GetType(Tables.Cell) Then
Return CType(parent, Tables.Cell).AddParagraph()
ElseIf parent.GetType() = GetType(Paragraph) Then
Return parent
ElseIf parent.GetType() = GetType(Section) Then
Return CType(parent, Section).AddParagraph()
Else
Return Nothing
End If
End Function
Private Shared Function AddParagraphWithStyle(ByVal parent As DocumentObject, ByVal style As String) As Paragraph
If parent.GetType() = GetType(Tables.Cell) Then
Return CType(parent, Tables.Cell).AddParagraph().SetStyle(style)
Else : Return CType(parent, Section).AddParagraph().SetStyle(style)
End If
End Function
End Class
End Namespace
+407
View File
@@ -0,0 +1,407 @@
#contentframe >.edit_frm{
+.list_frm{
display: none;
}
}
.list_frm{
min-height: 100%;
}
main nav ul > li a[role=button] {
&::after {
border-top: 1px solid $oci_light_60;
border-left: 1px solid $oci_light_60;
border-right: 1px solid $oci_light_60;
}
&:hover::after, &.fbtn::after {
border-color: $oci_light;
}
}
#dashboard_frame {
overflow-y: auto;
height: 100%;
width: 100%;
padding: 1rem;
background: #DDD;
text-align: center;
}
.wdg_frame {
background-color: #FFF;
border: 1px solid #ccc;
border-radius: 6px;
/*box-shadow: 1px 1px 3px 0 rgba(75, 75, 75, 0.2);*/
/*box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.17);*/
/*box-shadow: 1px 1px 3px 0 rgba(0,0,0,.17), -3px -3px 8px 0px rgb(250, 250, 250);*/
box-shadow: 1px 2px 8px 0 rgba(140,140,160,.6), -2px -3px 8px 0px rgb(250, 250, 250);
/*float: left;*/
display: inline-block;
height: 300px;
margin-bottom: 10px;
position: relative;
width: 300px;
margin-right: 15px;
text-align:left;
overflow: hidden;
&.dbl {
width: 615px;
}
&.tpl {
width: 930px;
}
&.tny {
width: 150px;
.wdg_cnt > .ind label {
font-size: 80%;
}
}
.wdg_hd {
border-top-left-radius: inherit;
border-top-right-radius: inherit;
height: 1.5rem;
position: relative;
background-color: $fuchs_blau_80;
box-shadow: 1px 5px 5px $fuchs_blau inset;
color: $fuchs_textlight;
text-align: center;
font-size: 0.8rem;
font-weight: bold;
padding: .3rem .2rem 0 .2rem;
cursor: pointer;
margin: -1px -1px 0 -1px;
> * {
user-select: none;
}
}
.wdg_cnt {
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
height: calc(100% - 24px);
overflow-x: hidden;
overflow-y: auto;
padding: 0;
position: relative;
> .ind {
text-align: center;
padding: 1rem;
font-size: 1.3rem;
&.sts_neg > .ind {
color: red;
}
&.sts_pos > .ind {
color: rgb(86,165,50);
}
> .ind {
font-size: 4.0rem;
margin: 3rem 0rem;
text-shadow: 0.08rem 0.12rem 0.35rem rgba(50,50,50,.6);
color: $fuchs_blau;
}
}
.clickable {
cursor: pointer;
}
table {
border-collapse: collapse;
width: 100%;
tr:first-child {
border: none;
}
th {
background-color: #CCC;
padding: 2px 4px;
font-size: 11px;
line-height: 1.2;
border: 1px solid transparent;
text-align: left;
&:first-child {
border-left: none;
}
&:last-child {
border-right: none;
}
}
td {
padding: 2px 4px;
font-size: 12px;
line-height: 1.1;
border: 1px solid #CCC;
&:first-child {
border-left: none;
}
&:last-child {
border-right: none;
}
}
}
}
}
#listframe {
div.mth, div.yr {
border: 1px solid #ccc;
background-color: #EEE;
padding: 0.4rem 0.2rem 0.2rem 0.35rem;
border-radius: 0.2rem;
cursor: pointer;
margin: 0.2rem;
position: relative;
display: block;
white-space: nowrap;
min-height: 2.0rem;
&.extra {
text-decoration: red underline;
}
&.ivc + .extra {
margin-top: 0.4rem;
}
&.selected {
background-color: lightgreen;
> div.wfrm, > div.mfrm {
display: block;
}
> div.mthdl, > div.wthdl, > div.ythdl {
display: inline-block;
cursor: pointer;
}
}
div.wfrm, div.mfrm, div.yfrm {
display: none;
position: relative;
background-color: #FFF;
margin: 1rem 0.2rem 0.2rem 1rem;
padding: 0.15rem;
border-radius: 0.2rem;
.wk {
border: 1px solid #ccc;
background-color: #EEE;
padding: 0.4rem 1.35rem 0.2rem 0.35rem;
border-radius: 0.2rem;
cursor: pointer;
margin: 0.2rem;
position: relative;
display: block;
white-space: nowrap;
min-height: 2.0rem;
&.selected {
background-color: lightblue;
div.wkdl {
display: inline-block;
cursor: pointer;
}
}
}
}
}
div.yrdl, div.mthdl, div.wkdl {
height: 1.5rem;
width: 1.5rem;
display: none;
background-color: #FFF; /* the selected box is colored */
position: absolute;
right: 0.4rem;
border: 1px solid #CCC;
border-radius: 0.2rem;
padding: 0.1rem;
top: 0.18rem;
font-size: 1rem;
text-align: center;
}
}
.invfrm {
> table, table.invtbl {
border-collapse: separate;
border-spacing: 0;
margin: 2rem;
th {
padding: 0.2rem 0.35rem;
border: 1px solid #CCC;
text-align: left;
}
th, td {
&.currency, &.num {
text-align: right;
white-space: nowrap;
}
&.keep {
white-space: nowrap;
}
}
td {
padding: 0.2rem 0.35rem;
border: 1px solid #CCC;
vertical-align: top;
position: relative;
&.hl {
background-color: lightyellow;
}
input, select {
display: none;
}
&.raux {
min-width: #{1.5rem * 1.6 * 2 + 0.5rem};
}
> .ttip {
display: none;
background: #FFF;
padding: 0.2rem 0.35rem;
padding: inherit;
border: 1px solid #CCC;
box-shadow: 1px 1px 3px rgba(50,50,50,0.5);
min-width: 100%;
min-height: 100%;
border-top-color: orangered;
z-index: 5;
}
.ttip p, .ctw p {
margin: 0 0 0.1rem 0;
}
&:hover {
border-top-color: orangered !important;
border-top-width: 2px;
> .ttip {
display: block;
position: absolute;
top: 0;
height: auto;
width: auto;
left: 0;
}
}
}
tr {
&:nth-child(2n+1) td {
background-color: rgba(150,150,150,.2);
&.hl {
background-color: lightyellow;
}
}
&.selected td {
background-color: lightblue;
&.hl {
background-color: lightyellow;
}
/*input, select {
display: block;
}*/
.ilbtn {
display: inline-block;
}
}
}
}
.ovhd {
display: block;
font-size: 1.5rem;
margin: 1rem 2rem;
font-weight: bold;
text-decoration: underline;
text-decoration-style: double;
> span {
display: block;
&:first-child {
text-decoration: underline;
text-decoration-style: double;
}
+ span {
margin-top: 0.5rem;
}
&.note {
font-size: 1rem;
font-weight: normal;
text-decoration: none;
text-decoration-style: none;
}
}
}
&.mdw .ovhd {
text-decoration-color: lightblue;
}
&.mdm .ovhd {
text-decoration-color: lightgreen;
}
}
.ilbtn {
cursor: pointer;
border-radius: #{1.5rem * 0.2};
display: none;
padding: 0.1rem;
margin-bottom: 0;
font-size: 1.5rem;
letter-spacing: 0.025rem;
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-color: $oci_white;
background-image: none;
border: 1px solid #ababab;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-shadow: 1px 1px 3px rgba(50, 50, 50, 0.3);
box-shadow: 1px 1px 3px rgba(50, 50, 50, 0.3);
min-width: #{1.5rem * 1.6};
}
+26
View File
@@ -0,0 +1,26 @@

/* basics */
$fontsize: 14px;
$fontfamily: 'Arial';
$logo_ico: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADVElEQVRYhe2V309bZRjH+TvovDJbuZkXJsY7Yckpg9pF3QXtKAksxoWZxYEQPWsLtbSW/XDRqcnsYub0YrvxYiNZWTYXIzMQY0xMrHSOtlBKa1vWM3Br2UjP+/HinB1haDxktNzsTb55z8n75D2ffPN8n9PQKMlspxqeAWzVRRZJpsUV4MDhU3T0nmS3w1dfgJ1tHi5cGiefLzGbznFo8DMs9QSw2j2Mjd9CFYJyZYW+oUh9AXa1awBCB+j3bSdAeRscsNq9XIlO6AAP6a83QJPdy+WrE4YD/UMRLLYaAFjbPexxjeDoCeM4qKsnzOtvHufazSmEEFQqK3xw4hscPaPs6xnVavX91e4PeWGfb/MAz9mO4T5ymus3f2IhW6BQVP7RYonCosKDBxUAVFWgKMsUFh+fayreVVjIFTkWOm+4YwrAIskc7PuEzEIBIQRmlhAghFgv4NHqKuEzF9mxGYCX3hhm6ueYdokqyBdKTN9OGYrFk0zHUxSKCgDVapWZZIbYdIJYPMnv8RSx6SSxeJJff7vDUd8XRoOaAuh+52OWlu4DMDef49Dgp+xxjdDcEdDkDNDqDhG9Pmn0gDd8nhZXgFec2nmLM6C9dwTY2eYx3wMWSaZ/KEK5soIQguiNSaztng11Tw6iLZsDFklmYDhCpfIQIQRj47fY9S8ATXYP176bMmJ41Hd2cwBN7V6kziB73SFa3SFsnUGkziCtXSH8J742AKI3pnB0h2l1B7Hp2tsVos93lmyuCIBy7y+6jpw2la6GRknGYpMZ8J8j/scsM4l5ZhJpfZ/nTiJNOvMn1aoKQElZIpHUahKpeV0ZSsqS0e0//PgLL742ZB5gh00mfOYij1ZXn4iQ9mx2qapKMpWh8+2PTNm/zoH3g18yO5cjmyuykF2jXJFCUUFVNQeWl+9vrMkWSKQyfDv2PfvfOm5k3DTA4yZqXhsZ54gm1wi+0a/W9MAkkjuo12k1zc4AL+/383zbxuZ8+hTYZN71RyiXtRhevjpBk9276Q89VQwH/eco6w5ciU5grTfAwBqA/5oDNQb4/0FUW4DhCJXKCqoOYLXXGaD3vc+ZS+fI50tcuDS+7mdSc4BGSWa3w0dH70kOHD5FiytgeshsGUAt9Qzgb8pqydEEvRadAAAAAElFTkSuQmCC');
/* Color SCHEME */
$fuchs_blau: rgb(27, 67, 121); /* #1b4379 #0033b3 */
$fuchs_blau_60: rgba(27, 67, 121, 0.6);
$fuchs_blau_80: rgba(27, 67, 121, 0.85);
$fuchs_akzent: rgb(86,165,50); /*neu: #56a532 ; alt: rgb(32,144,119);*/
$fuchs_lightgray: #e5e5e5; /* 10% sw */
$fuchs_weiss: #FFF;
$fuchs_textlight: #FFF;
$fuchs_textdark: $fuchs_blau;
$fuchs_textbase: #000000;
$oci_main: $fuchs_blau;
$oci_main_60: $fuchs_blau_60;
$page_bg: $oci_main;
Binary file not shown.
@@ -0,0 +1,288 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
<font-face units-per-em="1200" ascent="960" descent="-240" />
<missing-glyph horiz-adv-x="500" />
<glyph horiz-adv-x="0" />
<glyph horiz-adv-x="400" />
<glyph unicode=" " />
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xa0;" />
<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
<glyph unicode="&#x2000;" horiz-adv-x="650" />
<glyph unicode="&#x2001;" horiz-adv-x="1300" />
<glyph unicode="&#x2002;" horiz-adv-x="650" />
<glyph unicode="&#x2003;" horiz-adv-x="1300" />
<glyph unicode="&#x2004;" horiz-adv-x="433" />
<glyph unicode="&#x2005;" horiz-adv-x="325" />
<glyph unicode="&#x2006;" horiz-adv-x="216" />
<glyph unicode="&#x2007;" horiz-adv-x="216" />
<glyph unicode="&#x2008;" horiz-adv-x="162" />
<glyph unicode="&#x2009;" horiz-adv-x="260" />
<glyph unicode="&#x200a;" horiz-adv-x="72" />
<glyph unicode="&#x202f;" horiz-adv-x="260" />
<glyph unicode="&#x205f;" horiz-adv-x="325" />
<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
#oci_login {
width: 600px;
}
+6
View File
@@ -0,0 +1,6 @@
table.sortable, tbody.sortable {
> tr.sortactive > td {
background-color: lightyellow !important;
box-shadow: 1px 1px 2px rgba(50,50,50,.3);
}
}
+493
View File
@@ -0,0 +1,493 @@

#mainmenu {
border-bottom: 1px solid #CCC;
}
/* nav */
nav {
position: relative;
left: 0;
width: 100%;
display: block;
z-index: 10000;
border-radius: 0;
min-height: $oci_header;
height: $oci_header;
max-height: $oci_header;
padding-left: 0;
margin-bottom: 0;
list-style: none;
color: $oci_light;
background-color: $page_bg;
&.nv {
height: 100%;
max-height: 100%;
width: 2.3rem;
max-width: 2.3rem;
@media (max-width:$break3) {
padding-top: $oci_header;
> ul {
display: none;
}
&.vis, &.avis {
ul {
}
}
}
ul {
min-height: 0;
min-width: 100%;
> li {
height: auto;
width: 100%;
padding-top: 0;
padding-bottom: 0;
a {
width: 100%;
height: auto;
padding: 1rem 0;
span.ico {
width: 100%;
height: 2.3rem;
}
}
}
}
> ul {
height: auto;
}
}
#logo {
background: url('') center center/contain no-repeat transparent;
background-image: $logo_ico;
margin-right: 10px;
height: 1.9rem;
width: 1.9rem;
}
.nav-header {
float: left;
position: relative;
padding-left: 0;
margin: 0 0 0 0;
list-style: none;
min-height: 100%;
> div {
float: left;
padding: 0.4rem 1rem 0 0;
line-height: 1.4rem;
height: 100%;
}
> button, > div.button {
float: left;
height: 100%;
padding: 0.2rem 0.8rem;
background: transparent;
color: inherit;
margin-right: 1.1rem;
box-shadow: none;
}
.brand, .activemodule {
cursor: default;
@include noselect;
}
.activemodule {
color: #fff240;
overflow: hidden;
}
@media (min-width:#{$break3 + 1px}) {
#mmmb {
display: none !important;
pointer-events: none;
}
}
@media (max-width:$break3) {
width: 100%;
position: absolute;
top: 0;
left: 0;
#mmmb {
float: right;
margin-right: 0;
}
}
@media (min-width:#{$break3b + 1px}) {
.activemodule {
max-width: calc(100% - 46px);
font-size: 16px
}
.brand {
display: inline-block;
}
}
@media (max-width:$break3b) {
.brand {
/*max-width: 115px;
overflow: hidden*/
display: none;
}
.activemodule {
max-width: calc(100% - 190px);
font-size: 16px;
line-height: 28px;
padding: 0
}
}
}
@media (min-width:#{$break3 + 1px}) {
ul {
&.nav-right {
float: right !important;
li.dropdown.submenu > ul {
left: auto;
right: 100%;
right: calc(100% + 0.1rem);
}
}
li[role=separator] {
@include noselect;
pointer-events: none;
&::before {
content: '|';
cursor: default;
padding: 0.4rem 1rem 0 1rem;
line-height: 1.4rem;
height: 100%;
display: block;
font-weight: 400;
white-space: nowrap;
min-height: inherit;
@include noselect;
pointer-events: none;
}
}
}
}
@media (max-width:$break3) {
padding-top: $oci_header;
&.ctxt > ul {
width: 100%;
> li {
&[role=lbl] {
max-width: 55vw;
white-space: nowrap;
overflow: hidden;
font-size: 85%;
}
> a {
padding: 0.4rem 0.75rem 0 0.75rem;
&.fbtn {
padding: 0.4rem 0.75rem 0 0.75rem;
}
> span {
display: none;
&.ico, &.glyphicon, &.caret {
display: inline-block;
}
}
}
}
}
&#mainmenu {
&.vis {
> ul {
display: block;
}
}
> ul {
padding-bottom: 1rem;
display: none; /* initially hidden */
width: 100%;
float: none;
}
}
&.vis {
> ul {
height: auto;
li {
width: 100%;
float: none;
&[role=separator] {
padding: 0 1rem;
@include noselect;
pointer-events: none;
margin: 0.3rem 0;
&::before {
content: '';
cursor: default;
position: relative;
width: 100%;
height: 100%;
border-bottom: 1px solid $oci_light;
display: block;
}
}
}
}
}
}
> ul {
height: 100%;
float: left;
}
ul {
position: relative;
padding-left: 0;
margin: 0 0 0 0;
list-style: none;
min-height: 100%;
background-color: inherit;
> li {
list-style: none;
float: left;
position: relative;
display: block;
padding-left: 0;
margin-bottom: 0;
height: 100%;
&.ar {
float: right;
}
&[role=lbl], &[role=info] {
color: #fff240;
padding: 0.5rem 0.5rem 0 0.5rem;
}
a {
@include noselect;
cursor: pointer;
padding: 0.4rem 1rem 0 1rem;
line-height: 1.4rem;
height: 100%;
display: block;
font-weight: 400;
white-space: nowrap;
min-height: inherit;
span + .caret, span + span {
margin-left: 0.5rem;
}
span.ico {
height: 1.1rem;
width: 1.1rem;
background-color: transparent;
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-clip: content-box;
display: inline-block;
padding: 0.15rem;
}
> .caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 4px dashed;
border-top: 4px solid\9;
border-right: 4px solid transparent;
border-left: 4px solid transparent
}
> .glyphicon {
font-size: 1.1rem;
}
&[role=button] {
&::after {
content: '';
position: absolute;
top: 0.2rem;
left: 0.1rem;
right: 0.1rem;
bottom: 0;
border-top: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-bottom: none;
border-top-left-radius: 0.2rem;
border-top-right-radius: 0.2rem;
}
&:hover::after, &.fbtn::after {
border-color: $oci_light_60;
border-top-left-radius: 0.2rem;
border-top-right-radius: 0.2rem;
}
}
&.disabled {
cursor: default;
opacity: 0.5;
}
}
&.dropdown {
position: relative;
&.submenu {
> ul {
position: absolute;
top: 0;
left: 100%;
left: calc(100% + 0.1rem);
right: auto;
min-height: inherit;
}
}
> ul {
display: none;
> li {
min-height: $oci_header;
float: none;
display: block;
}
}
&.open {
> ul {
display: block;
}
> a {
background-color: $oci_light_60;
color: $oci_white;
}
@media (max-width:$break3) {
> ul {
position: fixed;
top: #{2.8rem + 2.3rem};
top: calc(#{2.8rem + 2.3rem} - 2px
}
);
left: 0.5rem;
right: 0.5rem;
left: calc(0.5rem - 1px);
right: calc(0.5rem - 1px);
height: auto;
min-height: 25%;
}
}
}
}
}
&.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 10rem;
padding: 5px 0;
margin: 2px 0 0;
font-size: 1rem;
text-align: left;
background-color: $oci_main;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
box-shadow: 0 6px 12px rgba(0,0,0,.175);
&.right {
right: 0;
left: auto;
}
li {
&[role=separator], &.divider {
height: 1px;
margin: 0.25rem 0 0.7rem 0;
overflow: hidden;
background-color: #e5e5e5;
min-height: 1px;
max-height: 1px;
@include noselect;
}
&[role=lbl], &[role=info], &.info {
color: $oci_lightyellow;
@include noselect;
}
> span {
padding: 0.4rem 1rem 0 0.4rem;
display: inline-block;
}
a[role="button"]::after {
border-left: none;
border-right: none;
border-top-left-radius: 0;
}
}
}
}
}
span.sbc {
background-image: url('/ct/img/wave_v.svg');
}
+55
View File
@@ -0,0 +1,55 @@

/* basics */
$fontsize: 14px;
$fontfamily: 'Arial';
$logo_ico: url('');
/* Color SCHEME */
$oci_main: rgb(131, 150, 189); /* #8396bd */
$oci_main_60: rgba(131, 150, 189, 0.6);
$oci_light: rgb(227,231,231); /* #e3e6e6 */
$oci_light_60: rgba(227,231,231,0.6);
$oci_white: rgb(255,255,255); /* #ffffff */
$oci_darkgrey: rgb(38,38,38); /* #262626 */
$oci_midgrey: rgb(82, 82, 82); /* #262626 */
$oci_lightgrey: rgb(171,171,171); /* #e3e6e6 */
$oci_orange: rgb(218, 102, 0);
$oci_yellow: rgb(255, 200, 1); /* #FFC801 */
$oci_lightyellow: rgb(255, 255, 74); /* #ffff4a */
$oci_black: rgb(0,0,0);
$oci_black_75: rgba(0,0,0,.075);
$page_bg: $oci_main;
/* media breaks */
$break1: 1270px;
$break2: 800px;
$break2a: 798px;
$break3: 796px;
$break3a: 700px;
$break3b: 550px;
$break4: 361px;
/* other */
$oci_header: 2.3rem;
/* mixin */
@mixin noselect {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@mixin boxshadow {
-webkit-box-shadow: 1px 1px 3px rgba(50,50,50,.3);
box-shadow: 1px 1px 3px rgba(50,50,50,.3);
}
+230
View File
@@ -0,0 +1,230 @@
$ocms.init = function (ev) {
var mdl = typeof ev === 'string' ? ev : ((ev.data || {}).fn || '');
if (mdl === '') {
return;
} else if (mdl === 'home') {
$cfr(); $lfr();
$('#topbar').ocmsmenu([], true);
$('#activemodule').text($t.ov);
$fis.ov();
} else {
$cfr(); $lfr();
$('#topbar').ocmsmenu([]);
$ocms.postXT({
url: $ocms.url(mdl + '/auth'), success: function (auth) {
if (typeof $ocms[mdl] === 'undefined') {
$ocms[mdl] = {};
}
$ocms[mdl].auth = auth;
if (auth.manage > 0) {
$ocms.getScript({
module: mdl, script: ['/web/fis', mdl, $ocms.auth.locale || 'de', 'js'].join('.'), css: ['/web/fis', mdl, 'css'].join('.'), condition: typeof $ocms[mdl].init2 !== 'function'
}, function () { $ocms[mdl].init2(); });
}
}, error: function () {
$('#contentframe').empty();
}
});
}
};
var $fis = { auth: {} };
$fis.db = function () {
$('#mainmenu_activemodule').text($t.ov);
let cf = $(this).empty(), ovf = $$.d({ id: 'dashboard_frame' }).appendTo(cf);
$ocms.postXT({
url: $ocms.url('wdg/my'), success: function (wx) {
$.each(wx, function (ii, wi) {
var wf = $$.dc('wdg_frame', ovf, { 'data-wdg': wi }).ldng(1);
$ocms.wdg.call(wf, { wdg: wi });
});
}, loading: ovf
});
};
$fis.ValidateEmail = function (mail) {
if (/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(mail)) {
return true;
} else {
return false;
}
};
$fis.cf = (reset) => {
let cf = $('#contentframe'); if (bool(reset, false) === true) { cf.empty().rC('hd'); } return cf;
}
$fis.lf = (reset) => {
let lf = $('#listframe'); if (bool(reset, false) === true) { lf.empty().aC('hd').rC('fix'); } return lf;
};
$fis.frm_edit = function (resethd) {
let cf = $fis.cf(false), cf2 = cf.children('.cfrm'), edf = cf.children('.edit_frm');
if (cf2.length < 1) {
cf2 = $$.dc('cfrm hd').prependTo(cf);
} else if (bool(resethd, false) === true) {
cf2.empty();
}
if (edf.length < 1) {
edf = $$.dc('edit_frm').insertAfter(cf2); //must be before list
}
return edf.empty();
};
$fis.frm_list = function (resethd, remedit) {
let cf = $fis.cf(false), cf2 = cf.children('.cfrm'), lf = cf.children('.list_frm');
if (cf2.length < 1) {
cf2 = $$.dc('cfrm hd').prependTo(cf);
} else if (bool(resethd, false) === true) {
cf2.empty();
}
if (bool(remedit, false) === true) {
cf.children('.edit_frm').remove();
}
if (lf.length < 1) {
lf = $$.dc('list_frm').appendTo(cf); //must be after list
}
return lf.empty();
};
$fis.lfm = () => {
let lf = $fis.lf(false) , h = lf.children('.lfrm');
if (h.length < 1) {
h = $$.dc('lfrm').prependTo(lf);
}
return h;
};
$fis.getAuth = (module, force) => {
return new Promise((resolve, reject) => {
if ($fis.auth[module] && bool(force, false) === false) {
resolve($fis.auth[module] || -1);
} else {
$ocms.postXT({
url: $ocms.url('auth'), data: { module: module }, success: (response) => {
$fis.auth[module] = response.auth || -1;
resolve($fis.auth[module] || -1);
}, error: () => {
reject();
}
});
}
});
};
$fis.prepAuth = (modules) => {
return new Promise((resolve, reject) => {
$ocms.postXT({
url: $ocms.url('auth'), data: { module: modules, array: 1 }, success: (response) => {
$.extend($fis.auth, response || {});
}, complete: () => {
resolve();
}
});
});
};
$fis.isAuth = (module, min) => {
return ($fis.auth[module] || -1) >= (min || 1);
};
$fis.resetPass = function (id, fds) {
if (confirm($t.smsc)) {
$ocms.postXT({ url: $ocms.url('account/sms'), data: { fn: 'pwc'} });
$ocms.dlgform($fd.rsp.clone(), {
title: $t.rsp || '',
submit: function (e) {
var c = $(this).ldng(1);
var qs = $.extend({ loginaccount: $ocms.auth.account || '' }, c.serializeObject(true, { typedvalues: true }));
if ((qs.npw || '') !== (qs.npwc || '')) {
c.find('input[name="npw"]:first')[0].setCustomValidity($t.pnm);
} else {
$ocms.postXT({
url: $ocms.url('account/changepassword'), data: qs, success: function (response) {
alert($t.cps);
c.trigger('modal_close');
}, error: function (x) {
alert($t.rspf[x.getResponseHeader('x-ocms-std')]);
}, complete: function () {
c.ldng(0);
}, timeout: 60000
});
}
}
});
}
};
$fis.wdg = function (options) {
let wf = $(this).empty();
$ocms.postXT({
url: $ocms.url('wdg/one'), data: { short_name: options.wdg }, success: function (response, textStatus, jqXHR) {
let wi = options.wdg, wx = response[wi];
let dbl = $.inArrayRegEx('dblwidth', wx.rendering_options) > -1, tiny = $.inArrayRegEx('tiny', wx.rendering_options) > -1;
wf.toggleClass('dbl', dbl && !tiny).toggleClass('tny', tiny);
let whd = $$.dc('wdg_hd', wf, { title: ne(wx.description, $t.wdc) }).toggleClass('dbl', dbl).text(ne(wx.name, options.wdg)).dblclick(function (ev) {
ev.stopPropagation();
$fis.wdg.call(wf, { wdg: wi });
});
let wct = $$.dc('wdg_cnt', wf).toggleClass('dbl', dbl).hide();
let bgcolix = $.inArrayRegEx('bgcolor', wx.rendering_options);
if (bgcolix > -1) { wct.css('backgroundColor', wx.rendering_options[bgcolix].toString().right(':')); }
switch (wx.type) {
case 'table':
var tblset = $$.tblset({}, wct);
var thr = $$.tr().appendTo(tblset.hd);
var $cc = $t.wdg[wi.indexOf('wdg_ev_') >= 0 ? 'wdg_ev_' : wi] || {};
$.each(wx.columns, function (ci, col) {
var cc = (!$cc[col]) ? col : $cc[col].label;
var thc = $$.th().text(cc).appendTo(thr);
});
$.each(wx.data, function (di, dx) {
var tdr = $$.tr().appendTo(tblset.bdy);
$.each(wx.columns, function (ci, col) {
var tdc = $$.td().appendTo(tdr);
if (dx[col] instanceof Date || $ocms.isDateString(dx[col]) === true) {
tdc.text(fdt(dx[col], $t.dateformat));
} else {
tdc.rwText(dx[col]);
}
});
//if (dx.person_guid || false) { tdr.addClass('clickable').dblclick($.proxy($fis.i_vmm, tdr, dx.person_guid[1])); }
});
if ($.inArray('firstrow_bold', wx.rendering_options) > -1) { thr.nextAll('tr:first').css('font-weight', 'bold'); }
break;
case 'ind':
$$.dc('ind', wct).addClass('sts_' + (wx.data.status || '')).append([$$.dc('ind').text(wx.data.value), $$.lbl(wx.data.label)]);
break;
case 'image_url':
wct.css('background', 'url(\'' + wx.url + '\') no-repeat center center transparent');
break;
case 'image_base64':
wct.css('background', 'url(\'data:image/png;base64,' + wx.image + '\') no-repeat center center transparent');
break;
case 'html':
wct.html(wx.html);
if ($.inArray('reload_10min', wx.rendering_options) > -1) {
var ifr = wct.find('iframe');
setTimeout(function () { ifr.attr('src', function (i, val) { return val; }); }, (10 * 60 * 1000));
}
break;
default:
}
if ($.inArray('reload_30min', wx.rendering_options) > -1 && wx.type !== 'html') {
setTimeout(function () { $fis.wdg.call(wf, { wdg: wi }); }, (30 * 60 * 1000));
}
wct.slideDown(150);
}, error: function (jqXHR) {
wf.slideUp(150);
$fis.failure.call(this, jqXHR);
}, complete: function () {
wf.ldng(0);
}
});
};
$fis.ov = function () {
//$('#mainmenu_activemodule').text("");
$fis.lf(true);
let cf = $('#contentframe').empty(), ovf = $$.d({ id: 'dashboard_frame' }).appendTo(cf);
$ocms.postXT({
url: $ocms.url('wdg/my'), success: function (wx) {
$.each(wx, function (ii, wi) {
var wf = $$.dc('wdg_frame', ovf, { 'data-wdg': wi }).ldng(1);
$fis.wdg.call(wf, { wdg: wi });
});
}, loading: ovf
});
};
+3
View File
@@ -0,0 +1,3 @@
$(document).ready(function () {
$fis.ov();
});
+12
View File
@@ -0,0 +1,12 @@
(function () {
Array.prototype.push.apply($ocms.ocmsmenu,[
{ lbl: $t.m_inv, id: 'm_inv', fnc: 'init:inv', ico: 'glyphicon glyphicon-list-alt'}
,{ lbl: $t.m_req, id: 'm_req', fnc: 'init:req', ico: 'glyphicon glyphicon-eur' }
, { lbl: $t.m_bcd, id: 'm_bcd', fnc: 'init:bam', ico: 'glyphicon glyphicon-indent-right' }
, { fnc: 'separator' }
, { lbl: $t.m_rep, id: 'm_rep', fnc: 'init:rep', ico: 'glyphicon glyphicon-dashboard' }
, { fnc: 'separator' }
, { lbl: $t.m_todo, id: 'm_todo', fnc: () => { $('#contentframe').empty().load($ocms.url('todos')); $('#listframe').rC('fix').aC('hd'); }, ico: 'glyphicon glyphicon-sunglasses' }
//, { lbl: $t.m_efa, id: 'm_efa', fnc: 'init:efa' }
]);
})();
+24
View File
@@ -0,0 +1,24 @@
$.extend($t, {
m_inv: 'Rechnungen'
, m_req: 'Aufträge'
, m_rep: 'Berichte'
, m_todo: 'ToDos'
, m_bcd: 'BankBuchungen'
, rsp: 'Passwort ändern'
, pnm: 'Die Passwörter stimmen nicht überein'
, cps: 'Das neue Passwort wurde gespeichert.'
, pwr: 'Bitte wählen Sie ein starkes Passwort (min 8 Zeichen, davon jeweils min 2 Zahlen, kleine und große Buchstaben, Sonderzeichen sind optional).'
, smsc: 'Sie beötigen für diese Funktion einen SMS-Code.\nSoll dieser nun versandt werden?'
, wdc: 'Doppelt klicken, um die Box zu aktualisieren.'
, wdg: {}
});
$t.rspf = { sms: 'Der SMS-Code konnte nicht bestätigt werden', valid: 'Das alte Passwort ist nicht korrekt', requirements: 'Das Passwort entspricht nicht den Anforderungen.\n' + $t.pwr}
$fd = {
rsp: new fields_definition('', '', [
{ name: 'opw', label: 'aktuelles Passwort', type: 'password', required: true, attr: { 'auto-complete': 'current-password' }}
, {
name: 'npw', label: 'neues Passwort', type: 'password', required: true, pattern: '(.{6,})', attr: { 'auto-complete': 'new-password' }}
, { name: 'npwc', label: 'neues Passwort (Bestätigung)', type: 'password', required: true, attr: { 'auto-complete': 'new-password' }, note: $t.pwr}
, { name: 'code', label: 'SMS-Code', type: 'string', required: true, attr: { 'auto-complete': 'one-time-code' }}
])
};
+319
View File
@@ -0,0 +1,319 @@
let gi = (n, c) => $$.sc(`glyphicon glyphicon-${n}`).aC(c);
let $bam = {
init2: function (type, options) {
type = type || 'bam';
options = options || {};
$ocms.getScript([
//{ script: 'web/jstree.min.js', css: 'web/jstree.min.css', condition: typeof $.fn.jstree !== 'function' }
//, { script: 'web/jquery.qtip.min.js', css: 'web/jquery.qtip.min.css', condition: typeof $.fn.qtip !== 'function' }
//, { script: 'web/typeahead.min.js', css: '', condition: typeof $.fn.typeahead !== 'function' }
//, { script: 'web/fullcalendar.min.js', module: 'FullCalendar', css: 'web/fullcalendar.min.css', condition: typeof FullCalendar !== 'object' }
], function () {
//FullCalendar = $vm.FullCalendar;
$bam.init3(type, options);
});
}, init3: async function (type, options) {
$fis.cf(true);
let lf = $fis.lf(true);
$bam.eM();
$('#activemodule').text($bct.mdl);
await $fis.prepAuth('fds_bam,fds_inv,fds_reminder');
let pa = [(async () => {
if ($fis.isAuth('fds_bam', 1) === true) {
$bam.prepLst('');
lf.aC('fix'); //initially should be shown - for convenience
}
})(), (async () => {
if ($fis.isAuth('fds_bam', 1) === true) {
$bam.renderLst(false);
//lf.aC('fix'); //initially should be shown - for convenience
}
})(), new Promise((resolve, reject) => {
//$bam.123()
})];
await Promise.all(pa);
}, iMn: (ix) => {
let fds = bool(ix.fds, false), id = ix.taID, m = [];
m.push({ lbl: $bct.smd, fnc: () => { $bam.smd(id); } });
m.push({ lbl: $bct.ati, fnc: () => { $bam.ati(id); } });
return $('#topbar').ocmsmenu(m);
}, eM : (r, re, opt) => {
let m = [];
if ($fis.isAuth('fds_bam', 2) === true) {
m.push({ lbl: $bct.upl, fnc: $bam.ubs});
}
if (bool(r, false) === true) {
m.push({ lbl: $bct.rel, fnc: $bam.renderLst });
}
return $('#topbar').ocmsmenu(m); /* empty Array => empty menu */
}, prepLst: function (includes) {
let td = new Date();
let lf = $fis.lf(true).ldng(1), sd = new Date('2021-01-01');
let frm = $fis.frm_list();
frm.IN(function () { });
let osb = $$.i({ placeholder: $bct.in }).appendTo($$.dc('mth ivn', lf)).enterKey(function (ev) {
let mth = $(this), v = mth.val() || '';
ev.stopPropagation();
mth.parent().siblings().rC('selected');
if (v.length > 3) {
mth.parent().aC('selected');
$bam.renderbt('i:' + v, 's');
mth.val('');
}
});
let osb2 = $$.i({ placeholder: $bct.bt }).appendTo($$.dc('mth ivn', lf)).enterKey(function (ev) {
let mth = $(this), v = mth.val() || '';
ev.stopPropagation();
mth.parent().siblings().rC('selected');
if (v.length > 3) {
mth.parent().aC('selected');
$bam.renderbt('b:' + v, 's');
mth.val('');
}
});
let osb3 = $$.i({ placeholder: $bct.bv }).appendTo($$.dc('mth ivn', lf)).enterKey(function (ev) {
let mth = $(this), v = mth.val() || '';
ev.stopPropagation();
mth.parent().siblings().rC('selected');
if (v.length > 3) {
mth.parent().aC('selected');
$bam.renderbt(`v:${v}`, 's');
mth.val('');
}
});
let opn = $$.dc('mth oreq', lf).text($bct.dqb).click(function (ev) {
let mth = $(this);
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.tC('selected');
$bam.renderLst(false);
}
mth.aC('selected');
});
lf.append('<hr />');
let mthl = $$.dc('mthl', lf), thisyear = td.getFullYear(), thismonth = td.getMonth() + 1;
for (let tyr = sd.getFullYear(); tyr <= thisyear; tyr++) {
let yr = $$.dc('yr').prependTo(mthl).text(`${$bct.iov[includes]} - ${tyr.toString()}`).toggleClass('selected', tyr === thisyear);
yr.click({
yr: tyr
}, function (ev) {
ev.stopPropagation();
yr.siblings().rC('selected');
yr.aC('selected');
});
let mfrm = $$.dc('mfrm', yr);
for (let tmt = 0; tmt < (tyr !== thisyear ? 12 : thismonth); tmt++) {
sd = new Date(tyr, tmt, 1);
let mth = $$.dc('mth').prependTo(mfrm).text(`${$bct.iov[includes]} - ${fdt(sd, 'MMM yyyy')}`);
mth.click({
yr: tyr, mt: tmt
}, function (ev) {
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.tC('selected');
let tgt = fdt(new Date(ev.data.yr, ev.data.mt, 1), 'yy-MM-dd');
$bam.renderbt(tgt, 'm');
}
mth.aC('selected');
});
let fwf = getMonday(sd), rd = fwf, lwf = new Date(sd);
lwf.setMonth(lwf.getMonth() + 1);
lwf.setDate(0);
lwf = getMonday(lwf);
let wfrm = $$.dc('wfrm', mth);
while (rd <= lwf) {
let wk = $$.dc('wk', wfrm).text(`${($bct.wk || "W")} ${fdt(rd, "dd.MM.yy")}`);
wk.click({
rd: new Date(rd)
}, function (ev) {
ev.stopPropagation();
let tgt = fdt(ev.data.rd, 'yy-MM-dd');
$bam.renderbt(tgt, 'w');
mth.siblings().rC('selected').find('.wk').rC('selected');
mth.aC('selected').find('.wk').rC('selected');
wk.aC('selected');
});
rd.setDate(rd.getDate() + 7);
}
}
}
lf.ldng(0);
}, renderbt: function (tgt, mode) {
let invlst = $fis.frm_list().ldng(1), invfrm = $$.dc('invfrm', invlst).aC('md' + mode);
let lf = $fis.lf();
$ocms.postXT({
url: $ocms.url('bam/btl'), data: { mode: mode, tgt: tgt }, success: (response) => {
lf.rC('fix').aC('hd');
$$.dc('ovhd', invfrm).append($$.s(response.admin.title)).appendIf($$.sc('note', response.admin.note), ne(response.admin.note, '') !== '');
let ts = $$.tblset({}, invfrm), fd = $bcol.qtl;
let thr = $$.tr(ts.hd), haux = $$.th(thr);
$.each(fd.fields || [], (ci, cx) => {
$$.th(thr).text(cx.label);
if (cx.name === 'vat') {
$$.th(thr);
}
});
let ctr = 0, cst = false;
$.each(response.bank || [], (ri, rw) => {
if (ctr > 0) { cst = !cst; }
let tr = $$.tr(ts.bdy).tC('alt', cst);
tr.click(function () {
lf.rC('fix').aC('hd');
tr.tC('selected').siblings().rC('selected').find('td.av').rC('av');
tr.find('td.av').rC('av');
});
let raux = $$.td(tr, { class: 'raux' });
$.each(fd.fields || [], (ci, cx) => {
let td = $$.td(tr).aC(cx.dtype), val = rw[cx.name];
if (typeof cx.dfnc === 'function') {
cx.dfnc.call(td, val, rw);
} else {
switch (cx.type || '') {
case 'date':
td.text(fdt(rw[cx.name], 'dd.MM.yy'));
break;
case 'datetime':
td.text(fdt(rw[cx.name]));
break;
case 'html':
td.append($$.dc('ctw').html(val));
td.append($$.dc('ttip').html(val));
break;
default:
td.text(rw[cx.name]);
}
}
switch (typeof cx.title) {
case 'function':
cx.title.call(td, rw);
break;
case 'string':
td.attr('title', cs.title);
}
});
});
}, complete: () => { invlst.ldng(0); }
});
}, renderLst: function () {
let mode = 'l'; //dummy for now
let bslst = $fis.frm_list(true, true).ldng(1), bamfrm = $$.dc('bamfrm', bslst).aC('md' + mode);
let lf = $fis.lf();
$bam.eM(true);
$ocms.postXT({
url: $ocms.url('bam/qtl'), data: { mode: mode }, success: (response) => {
lf.rC('fix').aC('hd');
$$.dc('ovhd', bamfrm).append($$.s(response.admin.title)).appendIf($$.sc('note', response.admin.note), ne(response.admin.note, '') !== '');
let ts = $$.tblset({}, bamfrm), fd = $bcol.qtl;
let thr = $$.tr(ts.hd);
let haux = $$.th(thr);
$.each(fd.fields || [], (ci, cx) => {
$$.th(thr).text(cx.label);
});
$.each(response.bs || [], (ri, rw) => {
let tr = $$.tr(ts.bdy, { id: `bt${rw.taID}` });
tr.click(function () {
lf.rC('fix').aC('hd');
tr.toggleClass('selected').siblings().rC('selected').find('td.av').rC('av');
tr.find('td.av').rC('av');
if (tr.is('.selected') === true) {
$bam.iMn(rw);
} else {
$bam.eM(true);
}
});
let raux = $$.td(tr, { class: 'raux' });
$.each(fd.fields || [], (ci, cx) => {
let td = $$.td(tr).aC(cx.dtype), sel, o;
if ((cx.type || '') === 'select') {
td.text((cx.url || {})[rw[cx.name]] || '');
} else {
td.text(rw[cx.name])
}
});
});
}, complete: () => { bslst.ldng(0); }
});
}, ubs : function () {
$ocms.dlgform($bcol.bsu, {
title: $bcol.bsu.label_sng || '',
submit: function (e) {
var c = $(this).ldng(1);
var qs = new FormData();
let fi = c.find(':input[name="bsu"]');
if (fi.length > 0 && fi[0].files.length > 0) {
$.each(fi[0].files, function (f, fl) {
qs.append('bsu', fl);
});
$ocms.postXT({
url: $ocms.url('bam/up'), data: qs, success: function (response) {
c.trigger('modal_close');
}, error: function () {
alert($t.l17);
}, complete: function () {
c.ldng(0);
$bam.renderLst();
}, timeout: 0
});
} else {
options.success.call(this, qs);
c.trigger('modal_close');
}
}, typedvalues: true
});
}, smd: (taid) => {
if (confirm($bct.smdc)) {
$ocms.postXT({
url: $ocms.url('bam/smd'), data: { taid: taid }, success: (response) => {
$(`#bt${taid}`).aC('mdone');
}
});
}
}, ati: (taid) => {
let f = $$.dc('form'), fb = $$.dc('form-body',f), fg = $$.dc('form-group', fb), kl = $$.lbl($bct.ino, { for: 'rno' }).appendTo(fg), i = $$.i({ id: 'rno', placeholder: 'Rechnungs-Nummer' }).appendTo(fg);
let r = $$.dc('rfrm bam', fb);
i.change(function (ev) {
$ocms.postXT({
url: $ocms.url('bam/vfi'), data: { invid: i.val() }, success: (response) => {
r.empty();
if (response.length > 0) {
$$.dc('nfo', r, $bct.fi);
$.each(response, function (ri, rx) {
let v = $$.dc('rinv', r, rx.InvoiceId).data('inv', rx).click(function (ex) { $(this).addClass('selected').siblings('.rinv').removeClass('selected'); });
$$.dc('invsta', v).rwText(rx.SendToAddress);
});
} else {
r.text($bct.ni);
}
}
});
});
$ocms.dlg(f, {
title: $bct.ati, size: [500, 700], confirm: function (e) {
let c = $(this), inv = c.find('.rinv.selected:first');
if (inv.length === 1) {
let rx = inv.data('inv') || {};
if (confirm(string($bct.atic, [rx.InvoiceId]))) {
$ocms.postXT({
url: $ocms.url('bam/ati'), data: { taid: taid, iid: rx.Id }, success: (response) => {
$(`#bt${taid}`).aC('mdone');
c.trigger('modal_close');
}
});
}
}
}
});
}
}
let $$bam = { init2: $bam.init2, auth: {} };
export default $$bam;
+100
View File
@@ -0,0 +1,100 @@
.bamfrm {
> table {
border-collapse: collapse;
margin: 2rem;
th {
padding: 0.2rem 0.35rem;
border: 1px solid #CCC;
}
td {
padding: 0.2rem 0.35rem;
border: 1px solid #CCC;
&.hl {
background-color: lightyellow;
}
&.raux {
min-width: #{1.5rem * 1.6 * 2 + 0.5rem};
}
&.currency {
text-align: right;
white-space: nowrap;
}
&.num, &.keep {
white-space: nowrap;
}
}
tr {
&.mdone {
text-decoration: line-through red .2rem;
}
&:nth-child(2n+1) td {
background-color: #EEE;
&.hl {
background-color: lightyellow;
}
}
&.selected td {
background-color: lightblue;
&.hl {
background-color: lightyellow;
}
/*input, select {
display: block;
}*/
.ilbtn {
display: inline-block;
}
}
}
}
.ovhd {
font-size: 1.5rem;
margin: 1rem 2rem;
font-weight: bold;
text-decoration: underline;
text-decoration-style: double;
}
}
.rfrm.bam {
padding: 1rem;
border-top: 3px double #CCC;
margin-top: 1rem;
> .nfo {
display: block;
font-size: 1rem;
margin-bottom: 1rem;
}
.rinv {
border: 1px solid #CCC;
border-radius: 0.2rem;
background: #FFF;
padding: 0.5rem 1rem;
display: block;
&.selected {
background-color: #e6f2eb;
}
.invsta {
font-size: 60%;
margin: 0.5rem 0.5rem 0.5rem 1rem;
}
}
}
@@ -0,0 +1,41 @@
let $bct = {
wk: 'Woche',
nd: 'Keine Daten gefunden.',
h: 'Uhr',
mdl: 'BankBuchungen',
upl: 'BuchungsExport hochladen',
rel: 'Neu Laden',
smd: 'Buchung als erledigt markieren',
smdc: 'Buchung wirklich als erledigt markieren?\nDie Buchung wird nicht mehr in den auffälligen Buchungen angezeigt.',
ati: 'Buchung einer Rechnung zuordnen',
ni: 'Es wurden keine Rechnungen mit dieser ID gefunden.',
ino: 'Rechnungsnummer',
fi: 'Folgende Rechnungen wurden gefunden',
atic: 'Buchung wirklich der Rechnung {0} zuordnen?',
dqb: 'Auffällige Zahlungen anzeigen',
iov: {
all: 'Buchungsübersicht (alle)', '': 'Buchungsübersicht'
},
in: 'Rechnungsnummer',
bt: 'Buchungstexte',
bv: 'Buchungswert (volle €)'
};
let $bcol = {
qtl: new fields_definition('Kontobericht', 'Kontoberichte', [
{ name: 'InvoiceId', label: 'RechnungsNr', type: 'string' },
{ name: 'ValueDate', label: 'Valuta', type: 'date' },
{ name: 'InvoiceBalance', label: 'Rechnungsbetrag', type: 'string' },
{ name: 'IsCanceled', label: 'Storno', type: 'bool' },
{ name: 'Amount', label: 'Gutschrift', type: 'string' },
{ name: 'Skonto', label: 'Skonto ?', type: 'bool' },
{ name: 'Deviation', label: 'Abweichung [%]', type: 'bool' },
{ name: 'AccountNumberOfPayer', label: 'IBAN', type: 'string' },
{ name: 'NameOfPayer', label: 'Name', type: 'string' },
{ name: 'SepaRemittanceInformation', label: 'Verwendungszweck', type: 'string' },
{ name: 'EndToEndReference', label: 'Referenz', type: 'string' }
]),
bsu: new fields_definition('Kontobericht', 'Kontoberichte', [
{ name: 'bsu', label: 'Export der Buchungen', type: 'file', required: true, prop: { multiple: true } }
])
};
+306
View File
@@ -0,0 +1,306 @@

let gi = (n, c) => $$.sc('glyphicon glyphicon-' + n).aC(c);
let $inv = {
init2: function (type, options) {
type = type || 'inv';
options = options || {};
$ocms.getScript([
//{ script: 'web/jstree.min.js', css: 'web/jstree.min.css', condition: typeof $.fn.jstree !== 'function' }
//, { script: 'web/jquery.qtip.min.js', css: 'web/jquery.qtip.min.css', condition: typeof $.fn.qtip !== 'function' }
//, { script: 'web/typeahead.min.js', css: '', condition: typeof $.fn.typeahead !== 'function' }
//, { script: 'web/fullcalendar.min.js', module: 'FullCalendar', css: 'web/fullcalendar.min.css', condition: typeof FullCalendar !== 'object' }
], function () {
//FullCalendar = $vm.FullCalendar;
$inv.init3(type, options);
});
}, init3: async function (type, options) {
$fis.cf(true);
let lf = $fis.lf(true);
$('#topbar').ocmsmenu([]); //{ lbl: 'home', fnc: $inv.init3 }
$('#activemodule').text($ict.mdl);
let pa = [(async () => {
if (await $fis.getAuth('fds_inv') > 0) {
$inv.prepLst('');
lf.aC('fix'); //initially should be shown - for convenience
}
})(), new Promise((resolve, reject) => {
$fis.prepAuth(['fds_reminder']);
})];
await Promise.all(pa);
}, prepLst: function (includes) {
let td = new Date();
let lf = $fis.lf(true).ldng(1), sd = new Date('2021-01-01');
let frm = $fis.frm_list();
frm.IN(function () { });
let mitm = []
$.each($ict.iov, (ic, il) => {
mitm.push({ lbl: il, fnc: () => { $inv.prepLst(ic); lf.aC('fix'); } });
});
$fis.lfm().ocmsmenu([{ lbl: 'Filter', itm: mitm }]);
let osb = $$.i({ placeholder: $ict.in }).appendTo($$.dc('mth ivn', lf)).enterKey(function (ev) {
let mth = $(this), v = mth.val() || '';
ev.stopPropagation();
mth.parent().siblings().rC('selected');
if (v.length > 3) {
mth.parent().aC('selected');
$inv.renderinv('i:' + v, 's', 'all');
mth.val('');
}
});
let osb2 = $$.i({ placeholder: $ict.cc }).appendTo($$.dc('mth ivc', lf)).enterKey(function (ev) {
let mth = $(this), v = mth.val() || '';
ev.stopPropagation();
mth.parent().siblings().rC('selected');
if (v.length >= 3) {
mth.parent().aC('selected');
$inv.renderinv('c:' + v, 's', 'all');
mth.val('');
}
});
if (includes.substr(0,1) === '#') {
$$.dc('mth extra', lf).text($ict.iov[includes].replace(')',$ict.uba)).click(function (ev) {
let mth = $(this);
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.toggleClass('selected');
let tgt = fdt(new Date(), 'yy-MM-dd');
$inv.renderinv(tgt, 'a', includes);
}
mth.aC('selected');
});
}
lf.append('<hr />');
let mthl = $$.dc('mthl', lf), thisyear = td.getFullYear(), thismonth = td.getMonth() + 1;
for (let tyr = sd.getFullYear(); tyr <= thisyear; tyr++) {
let yr = $$.dc('yr').prependTo(mthl).text($ict.iov[includes] + ' - ' + tyr.toString()).toggleClass('selected', tyr === thisyear);
yr.click({
yr: tyr
}, function (ev) {
ev.stopPropagation();
yr.siblings().rC('selected');
yr.aC('selected');
});
let mfrm = $$.dc('mfrm', yr);
for (let tmt = 0; tmt < (tyr !== thisyear ? 12 : thismonth); tmt++) {
sd = new Date(tyr, tmt, 1);
let mth = $$.dc('mth').prependTo(mfrm).text($ict.iov[includes] + ' - ' + fdt(sd, 'MMM yyyy'));
mth.click({
yr: tyr, mt: tmt
}, function (ev) {
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.toggleClass('selected');
let tgt = fdt(new Date(ev.data.yr, ev.data.mt, 1), 'yy-MM-dd');
$inv.renderinv(tgt, 'm', includes);
}
mth.aC('selected');
});
if (includes === '') { // only for combi of final invoices
let mthdl = $$.dc('mthdl', mth).append(gi('compressed', 'ico'));
mthdl.click({
yr: tyr, mt: tmt
}, function (ev) {
ev.stopPropagation();
let tgt = fdt(new Date(ev.data.yr, ev.data.mt, 1), 'yy-MM-dd');
$inv.downloadzip(tgt, 'm');
});
}
let fwf = getMonday(sd), rd = fwf, lwf = new Date(sd);
lwf.setMonth(lwf.getMonth() + 1);
lwf.setDate(0);
lwf = getMonday(lwf);
let wfrm = $$.dc('wfrm', mth);
while (rd <= lwf) {
let wk = $$.dc('wk', wfrm).text(($ict.wk || 'W') + ' ' + fdt(rd, 'dd.MM.yy'));
wk.click({
rd: new Date(rd)
}, function (ev) {
ev.stopPropagation();
let tgt = fdt(ev.data.rd, 'yy-MM-dd');
$inv.renderinv(tgt, 'w', includes);
mth.siblings().rC('selected').find('.wk').rC('selected');
mth.aC('selected').find('.wk').rC('selected');
wk.aC('selected');
});
let wkdl = $$.dc('wkdl', wk).append(gi('compressed', 'ico'));
wkdl.click({
rd: new Date(rd)
}, function (ev) {
ev.stopPropagation();
let tgt = fdt(ev.data.rd, 'yy-MM-dd');
$inv.downloadzip(tgt, 'w');
});
rd.setDate(rd.getDate() + 7);
}
}
}
lf.ldng(0);
}, rerenderinv: function () {
let invfrm = $('#contentframe .invfrm:first');
if (invfrm.length > 0) {
let sets = invfrm.data('sets') || {};
if (sets.mode) {
$inv.renderinv(sets.tgt, sets.mode, sets.includes);
}
}
}, renderinv: function (tgt, mode, includes) {
let invlst = $fis.frm_list(true, true).ldng(1), invfrm = $$.dc('invfrm', invlst).aC('md' + mode).data('sets', $.extend({}, { tgt: tgt, mode: mode, includes: includes }));
let lf = $fis.lf();
$ocms.postXT({
url: $ocms.url('inv/invl'), data: { mode: mode, tgt: tgt, includes: includes }, success: (response) => {
lf.rC('fix').aC('hd');
$$.dc('ovhd', invfrm).text(response.admin.title);
let ts = $$.tblset({}, invfrm), fd = $invcol.inv;
let thr = $$.tr(ts.hd);
let haux = $$.th(thr);
$.each(fd.fields || [], (ci, cx) => {
$$.th(thr).text(cx.label);
if (cx.name === 'vat') {
$$.th(thr);
}
});
$.each(response.invoices || [], (ri, rw) => {
let tr = $$.tr(ts.bdy);
tr.click(function () {
lf.rC('fix').aC('hd');
tr.toggleClass('selected').siblings().rC('selected').find('td.av').rC('av');
tr.find('td.av').rC('av');
if (tr.is('.selected') === true) {
$inv.iMn(rw);
} else {
$inv.eM();
}
});
let raux = $$.td(tr, { class: 'raux' });
if (rw.hasFile) {
$$.dc('idl ilbtn', raux, { title: $ict.dl + '\n' + rw.DocumentName }).append(gi('save-file', 'ico')).click({ id: rw.Id }, $inv.downloadinv);
$$.dc('idl ilbtn', raux, { title: $ict.dsp + '\n' + rw.DocumentName }).append(gi('eye-open', 'ico')).click({ id: rw.Id, typ: 'inv' }, $inv.jdisp);
} else if (rw.isFinal === false && $fis.isAuth('fds_inv',2) === true) {
$$.dc('idl ilbtn', raux, { title: $ict.ed }).append(gi('edit', 'ico')).click({ id: rw.Id }, $inv.doContInv);
}
$$.dc('iitm ilbtn', raux, { title: $ict.sItm }).append(gi('list', 'ico')).click({ id: rw.Id }, $inv.showitm);
$$.dc('iitm ilbtn', raux, { title: $ict.sPay }).append(gi('euro', 'ico')).click({ id: rw.Id }, $inv.showpay);
$.each(fd.fields || [], (ci, cx) => {
let td = $$.td(tr).aC(cx.dtype), sel, o;
if ((cx.type || '') === 'select') {
td.text((cx.url || {})[rw[cx.name]] || '');
} else {
td.text(rw[cx.name])
}
switch (cx.name || '') {
case 'vat':
sel = $$.sel().appendTo($$.td(tr, { class: 'vsel' }));
o = (response.admin.ust_options || '19,0%;16,0%;0,0%').split(';');
$.each(o, (oi, oo) => { $$.opt(oo, oo).appendTo(sel); });
sel.click(function (ev) { ev.stopPropagation(); }).val(rw[cx.name]).change().change({ frm: invfrm, tgt: tgt, mode: mode, id: rw.Id, td: td, includes: includes }, $inv.setvat);
td.toggleClass('hl', rw[cx.name].substr(0, 2) !== o[0].substr(0, 2)).click(function (ev) {
ev.stopPropagation();
$(this).toggleClass('av');
});
break;
case 'balance':
td.aC('sh_' + (rw.SollHaben || '').toLowerCase());
break;
case 'invstatus': //drop through by intention
case 'reminderstatus':
td.aC((cx.name === 'invstatus' ? 'is_' : 'rs_') + rw[cx.name]);
break;
}
});
});
}, complete: () => { invlst.ldng(0); }
});
}, setvat: function (ev) {
let sel = $(this), data = ev.data || {};
$ocms.postXT({
url: $ocms.url('inv/setvat'), data: { id: data.id, val: sel.val() }, success: (response) => {
data.td.rC('av');
$inv.renderinv(data.tgt, data.mode, data.includes);
}
});
}, downloadzip: function (tgt, mode) {
let frm = $(this).empty();
window.open($ocms.url('inv/datevzip?mode=' + mode + '&tgt=' + encodeURIComponent(tgt)), '_blank');
}, showitm: function (ev) {
let tr = $(this).closest('tr');
ev.stopPropagation();
if (tr.is('.selected') === false) {
return;
}
$ocms.postXT({
url: $ocms.url('inv/rqi'), data: { id: ev.data.id }, success: (response) => {
let fr = $$.dc('rfrm');
if ((response.requests || []).length < 1) {
fr.text($ict.nd);
} else {
$.each(response.requests || [], function (ri, rx) {
let rq = $$.dc('srq', fr);
$$.dc('nme', rq).text(rx.name);
let rif = $$.tblset({ class: 'if' }, rq);
$.each(rx.items || [], (ii, ix) => {
let itr = $$.tr({ id: 'itm' + ix.Id }).appendTo(rif.bdy);
$$.td(itr).text(ix.NameOrNumber);
$$.td(itr).text(ix.Type);
$$.td(itr).aC('currency').text(ix.net_pos);
$$.td(itr).aC('currency').text(ix.bo_pos);
$$.td(itr).aC('num').text(ix.vat);
});
});
}
$ocms.dlg(fr, { width: 1000 });
}
});
}, showpay: function (ev) {
let tr = $(this).closest('tr');
ev.stopPropagation();
if (tr.is('.selected') === false) {
return;
}
$ocms.postXT({
url: $ocms.url('inv/pyi'), data: { id: ev.data.id }, success: (response) => {
let fr = $$.dc('rfrm');
if ((response.payments || []).length < 1) {
fr.text($ict.nd);
} else {
let rif = $$.tblset({ class: 'if' }, fr);
let hr = $$.tr(rif.hd);
$.each(['date','account', 'name', 'text', 'InvoiceID', 'amount', 'manual'], (hi, hx) => {
$$.th(hr, $ict.payi[hx]);
});
$.each(response.payments, (ii, ix) => {
let itr = $$.tr({ id: 'itm' + ix.banking_uid }).appendTo(rif.bdy);
$$.td(itr).aC('date').text(ix.date);
$$.td(itr).text(ix.account);
$$.td(itr).text(ix.name);
$$.td(itr).text(ix.text);
$$.td(itr).text(ix.InvoiceID);
$$.td(itr).aC('currency').text(ix.amount);
$$.td(itr).text(ix.manual);
});
}
$ocms.dlg(fr, { width: 1000, title: 'Übersicht der Zahlungen' });
}
});
}, downloadinv: function (ev) {
let tr = $(this).closest('tr');
ev.stopPropagation();
if (tr.is('.selected') === false) {
return;
}
window.open($ocms.url('inv/rdoc?id=' + ev.data.id), '_blank');
}, doContInv: function(ev) {
let tr = $(this).closest('tr');
ev.stopPropagation();
if (tr.is('.selected') === false) {
return;
}
$inv.cntInv({ id: ev.data.id });
}
}
let $$inv = { init2: $inv.init2, auth: {} };
export default $$inv;
+114
View File
@@ -0,0 +1,114 @@
.invfrm > table, table.invtbl {
td {
&.sh_s {
color: #bf4b06;
}
&.is_cc {
background-color: #777777 !important;
color: #FFF !important;
}
&.is_pyd {
color: #60cc08;
}
&.is_due {
background-color: #f2f23f !important;
}
&.is_ovd {
background-color: #de4e09 !important;
}
&.is_rem {
background-color: #ce1900 !important;
}
&.av {
border: 2px solid red;
+ td.vsel select {
display: block;
}
}
}
tr {
}
}
.rfrm {
min-width: 200px;
min-height: 200px;
}
table.if {
border-collapse: collapse;
margin: 1rem 0;
background: #FFF;
tr {
&:nth-child(2n+1) td {
background-color: #F9F9F9;
}
&.title td {
background-color: $fuchs_akzent;
color: white;
.eid {
font-weight: bold;
margin: 0 1rem 0 0.5rem;
font-size: 140%;
}
.nme {
font-size: 110%;
}
}
&.shd td {
font-style: italic;
color: #BBB;
background-color: #FFF;
background-color: #FFF !important;
font-size: 90%;
}
}
th {
padding: 0.2rem 0.35rem;
border: 1px solid #DDD;
}
td {
padding: 0.2rem 0.35rem;
border: 1px solid #DDD;
&.currency {
text-align: right;
white-space: nowrap;
}
&.num {
white-space: nowrap;
}
}
}
.pdfpreview .pdfp.ph > .note {
background: #FFF;
display: inline-block;
padding: 3rem;
margin: 0.2rem 0;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,129 @@
let $ict = {
mdl: 'Rechnungen',
iov: {
all: 'Rechnungen (alle)', '': 'Rechnungen (nur fertige)', '#d': 'Rechnungen (nur Entwürfe)', '#u': 'Rechnungen (nur unbezahlt)', '#r': 'Rechnungen (nur angemahnt)', '#a': 'Rechnungen (nur Akonto)', '#c': 'Rechnungen (nur Storno)', '#ru': 'Rechnungen (nur angemahnt + unbez.)'
},
uba: ', gesamter Zeitraum)',
req: 'Auftrag',
inv: 'Rechnung',
rem: 'Mahnung',
in: 'Rechnungsnummer',
cc: 'Kunde',
wk: 'Woche',
nd: 'Keine Daten gefunden.',
dl: 'Herunterladen',
ed: 'Bearbeiten',
ced: 'Bearbeitung fortsetzen',
sItm: 'Einzelheiten anzeigen',
sPay: 'Zahlungen anzeigen',
cdI: 'Entwurf der Rechnung löschen?',
rel: 'Neu Laden',
relm: 'Bitte laden Sie Liste manuell neu, um die Änderungen zu sehen.',
dsp: 'Rechnung anzeigen',
storno: 'Storno-Rechnung erstellen',
credit: 'Gutschrift erstellen',
remd: 'Mahnung erstellen',
remdt: 'Mahnung erstellen zur Rechnung {0}',
remlst: 'Mahnungen anzeigen',
remdsp: 'Mahnung anzeigen',
remres: 'Mahnung erneut senden',
remresc: 'Mahnung {0} wirklich erneut senden?',
remresr: 'Mahnung {0} wurde erfolgreich versandt.',
setpyd: 'Bezahlt markieren',
cpyd: 'Rechnung wirklich als bezahlt markieren?',
setupd: 'Bezahlt-Markierung aufheben',
cupd: 'Bezahlt-Markierung wirklich aufheben?',
ivE: 'Die Email-Adresse ist vermutlich nicht gültig.',
ivEc: '\nMöchten Sie fortfahren?',
pna: 'Diese Seite ist in der Vorschau nicht verfügbar',
tpe: 'Die Anzahl von {0} Seiten wird aktuell nicht unterstützt',
eis: 'Der Rechnungsentwurf konnte nicht gespeichert werden.',
iss: 'Zwischenstand speichern.',
p13b: 'USt -> §13b',
ctp: 'Ansprechpartner festlegen',
mfr: 'Von MFR neu abrufen',
rq1: 'Auftragsdaten werden von MFR abgerufen.\nDer Vorgang kann bis zu 90Sek dauern.',
rq2: 'Auftragsdaten werden geladen',
iq1: 'Rechnungsdaten werden von MFR abgerufen.\nDer Vorgang kann bis zu 90Sek dauern.',
iq2: 'Rechnungsdaten werden geladen',
sis: 'Rechnung als versandt markieren',
srs: 'Mahnung als versandt markieren',
sisc: 'Rechnung wirklich als versandt markieren?',
srsc: 'Mahnung wirklich als versandt markieren?',
iSt: {dft: 'Entwurf', uns: 'nicht versandt', pyd: 'bezahlt', cc: 'storniert', op: 'offen', due: 'fällig', ovd: 'überfällig', rem: 'angemahnt' },
rSt: ['', 'Überfällig', '2. Mahnung', '3. Stufe'],
pSt: { 'a': 'Vollst.', 'p': 'Teilz.' },
ivT: { i: 'AbschlagsR.', f: 'SchlussR', r: 'Rechnung', c: 'StornoR.' },
rovlh: 'Übersicht der bisherigen Mahnungen',
rovl: ['Betreff', 'Betrag', 'Betrag gezahlt', 'fertiggestellt am'],
remHR: ['Rechnung', 'vom', 'Rechnungsbetrag', 'bereits bezahlt', 'noch offen'],
remt: {
f: ['Sehr geehrte Damen und Herren,', 'ein Mahnschreiben sollte kurz, freundlich und erfolgreich sein. Kurz ist es, freundlich sowieso; ob es auch erfolgreich ist, hängt von Ihnen ab.']
, m: ['Sehr geehrte Damen und Herren,', 'nun müssen wir Sie noch einmal anschreiben.', 'Wahrscheinlich haben Sie triftige Gründe dafür, warum Sie die Zahlung unserer Forderung nicht vornehmen und auch nicht auf unsere Mahnung reagieren. Sollten wir darüber nicht einmal sprechen?', 'Bitte nehmen Sie umgehend in dieser Sache mit uns Kontakt auf.']
, l: ['Sehr geehrte Damen und Herren,', 'Eine DRITTE MAHNUNG zu erhalten bereitet Ihnen bestimmt ebenso wenig Freude wie uns, sie zu verschicken. Leider haben wir auf unsere zweite Mahnung noch keine Antwort von Ihnen erhalten.", "Wir bitten Sie, den offenen Betrag innerhalb der nächsten 7 Werktage nach Erhalt dieses Schreibens zu begleichen. Nach Ablauf dieser Frist erfolgt keine weitere Mahnung mehr.', 'Sollte die Forderung bis dahin nicht beglichen sein, eröffnen wir das gerichtliche Mahnverfahren. Sollten Sie die Rechnung inzwischen beglichen haben, so betrachten Sie bitte dieses Schreiben als gegenstandslos.']
},
remt2: {
f: ['Wir bitten Sie, den noch offenen Rechnungsbetrag innerhalb einer Woche auf unser Konto zu überweisen.', 'Sollten Sie den Betrag bereits überwiesen haben, so bitten wir Sie, diese Zahlungserinnerung als gegenstandslos zu betrachten.']
, m: ['Um Ihnen zusätzliche Kosten für weitere Mahnungen zu ersparen, bitten wir Sie nunmehr um die Überweisung des noch zu zahlenden Gesamtbetrages inklusive der ggf. bereits fälligen Mahnzinsen und Mahngebühren innerhalb von einer Woche.']
, l: []
}, payi: { account: 'Konto', name: 'Zahler', text: 'Verw.Zweck', InvoiceID: 'Rechnung', amount: 'Betrag', date: 'Datum', manual: 'Typ'}
}, $invcol = {
datev: new fields_definition('Rechnung', 'Rechnungen', [
{ name: 'Umsatz (ohne Soll/Haben-Kz)', label: 'Umsatz (ohne Soll/Haben-Kz)', type: 'string' },
/*{ name: 'EINZELPOS_brutto', label: 'EINZELPOS_brutto', type: 'string' },
{ name: 'EINZELPOS_netto', label: 'EINZELPOS_netto', type: 'string' },*/
{ name: 'vf', label: 'vf', type: 'string' },
{ name: 'Soll/Haben-Kennzeichen', label: 'Soll/Haben-Kennzeichen', type: 'string' },
{ name: 'Konto', label: 'Konto', type: 'string' },
{ name: 'Gegenkonto', label: 'Gegenkonto', type: 'string' },
{ name: 'BU-Schlüssel', label: 'BU-Schlüssel', type: 'string' },
{ name: 'Belegdatum', label: 'Belegdatum', type: 'string' },
{ name: 'Belegfeld 1', label: 'Belegfeld 1', type: 'string' },
{ name: 'Belegfeld 2', label: 'Belegfeld 2', type: 'string' },
{ name: 'Buchungstext', label: 'Buchungstext', type: 'string' }
])
, inv: new fields_definition('Rechnung', 'Rechnungen', [
{ name: 'invstatus', label: 'Status', type: 'select', url: $ict.iSt },
{ name: 'balance', label: 'Umsatz', type: 'string', dtype: 'currency' },
{ name: 'CustomerName', label: 'Kunde', type: 'string' },
{ name: 'InvoiceId', label: 'RNummer', type: 'string' },
{ name: 'InvoiceType', label: 'Typ', type: 'select', url: $ict.ivT },
//{ name: 'requestcount', label: 'Anz. Aufträge', type: 'string', dtype: 'num' },
{ name: 'request', label: 'Auftrag', type: 'string', dtype: 'num' },
/*{ name: 'EINZELPOS_brutto', label: 'EINZELPOS_brutto', type: 'string', dtype: 'currency' },
{ name: 'EINZELPOS_netto', label: 'EINZELPOS_netto', type: 'string', dtype: 'currency' },*/
{ name: 'vat', label: 'MwSt', type: 'string', dtype: 'num' },
{ name: 'deb_cred', label: 'Soll/Haben', type: 'string' },
{ name: 'customer', label: 'Konto', type: 'string', dtype: 'num' },
{ name: 'contra_account', label: 'Gegenkonto', type: 'string', dtype: 'num' },
{ name: 'Belegdatum', label: 'Belegdatum', type: 'date' },
{ name: 'reminderstatus', label: 'MahnStatus', type: 'select', url: $ict.rSt },
{ name: 'reminder', label: '# Mahnungen', type: 'integer' },
{ name: 'Buchungstext', label: 'Buchungstext', type: 'string' },
{ name: 'Payment', label: 'Zahlung', type: 'string' }
/*{ name: 'PaymentStatus', label: 'Zahlungsstatus', type: 'select', url: $ict.pSt}*/
])
, rem: new fields_definition('Zahlungserinnerung', 'Zahlungserinnerung', [
{ name: 'amount', label: 'Rechnungsbetrag', type: 'number', precision: '0.01', value: 1 },
{ name: 'amount_payed', label: 'bereits bezahlt', type: 'number', precision: '0.01', value: 1 }
])
, rem2: new fields_definition('Zahlungserinnerung', 'Zahlungserinnerung', [
{ name: 'DocumentName', label: 'Name', type: 'string' },
{ name: 'subject', label: 'Betreff', type: 'string' },
{ name: 'DateSent', label: 'Versanddatum', type: 'date' },
{ name: 'status', label: 'Status', type: 'string' },
//{ name: 'IsDraft', label: 'Entwurf', type: 'boolean' },
{ name: 'amount_open', label: 'offener Betrag', type: 'number', precision: '0.01' },
{ name: 'InvoiceId', label: 'RNummer', type: 'string' },
//{ name: 'InvoiceDocumentName', label: 'RechnungName', type: 'string' }
])
, rid: new fields_definition('Zahlungserinnerung', 'Zahlungserinnerung', [
{ name: 'type', label: 'Typ', type: 'select', url: [['f', 'einfache Zahlungserinnerung'],[ 'm', 'Mahnung'],[ 'l', 'letzte Mahnung']], required: true},
{ name: 'level', label: 'Stufe', type: 'select', url: [['1', 'Stufe 1'], ['2', 'Stufe 2'], ['3', 'Stufe 3'], ['4', 'Stufe 4'], ['5', 'Stufe 5'], ['6', 'Stufe 6']], required: true }
])
, ctp: new fields_definition('Ansprechpartner', 'Ansprechpartner', [
{ name: 'name', label: 'Name', type: 'string' },
{ name: 'email', label: 'Email', type: 'string' }
])
};
+82
View File
@@ -0,0 +1,82 @@
function getMonday(d) {
d = new Date(d);
var day = d.getDay(),
diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
return new Date(d.setDate(diff));
}
let $rep = {
init2: function (type, options) {
//console.debug('inv.init2');
type = type || 'inv';
options = options || {};
$ocms.getScript([
//{ script: 'web/jstree.min.js', css: 'web/jstree.min.css', condition: typeof $.fn.jstree !== 'function' }
//, { script: 'web/jquery.qtip.min.js', css: 'web/jquery.qtip.min.css', condition: typeof $.fn.qtip !== 'function' }
//, { script: 'web/typeahead.min.js', css: '', condition: typeof $.fn.typeahead !== 'function' }
//, { script: 'web/fullcalendar.min.js', module: 'FullCalendar', css: 'web/fullcalendar.min.css', condition: typeof FullCalendar !== 'object' }
], function () {
//FullCalendar = $vm.FullCalendar;
$rep.init3(type, options);
});
}, init3: async function (type, options) {
//console.debug('inv.init3');
let cf = $('#contentframe').empty(), cf2 = $$.dc('cfrm hd').appendTo(cf), frm = $$.dc('init_frm', cf);
let tbar = $('#topbar').ocmsmenu([]); //{ lbl: 'home', fnc: $rep.init3 }
$('#activemodule').text($ct.mdl);
let repfrm = $$.dc('repfrm', frm);
let td = new Date();
let pa = [(async () => {
if (await $fis.getAuth('fds_reports') > 0) {
frm.IN(function () { });
let lf = $('#listframe').empty().aC('fix').rC('hd');
let scp = function (rx) {
let itm = $(this);
if ((rx.params || []).length > 0) {
let ifrm = $$.dc('ipf', itm).click(function (ev) {
ev.stopPropagation();
});
$.each(rx.params, (pi, px) => {
let ig = $$.dc('ig', ifrm).append($$.lbl(px.name)), i;
if ((px.valuelist || '') === '') {
i = $$.i({ name: px.name, placeholder: px.placeholder }).appendTo(ig);
if ((px.default || '') !== '') {
i.val(px.default);
}
}
});
}
};
let scl = function (ev) {
//console.debug(ev);
let btn = $(this), rx = ev.data;
$ocms.postXT({
url: $ocms.url('rep/gct/' + rx.name), data: btn.serializeObject(), success: (response) => {
btn.addClass('selected').siblings().removeClass('selected');
$('#listframe').rC('fix').aC('hd');
repfrm.html(response);
}, datatype: 'html'
});
};
$ocms.postXT({
url: $ocms.url('rep/catalog'), data: {}, success: (response) => {
$.each(response.reports, (ri, rx) => {
let i = $$.dc('repitm', lf).text(rx.label).click(rx, scl);
scp.call(i, rx);
});
}
});
}
})(), new Promise((resolve, reject) => {
//$rep.123()
/*
let tgt = fdt(new Date(td.getFullYear(), (td.getMonth() - 1), 1), 'yy-MM-dd');
$rep.renderinv.call(invfrm, tgt, 'm');
*/
})];
await Promise.all(pa);
}
}
let $$rep = { init2: $rep.init2, auth: {} };
export default $$rep;
+172
View File
@@ -0,0 +1,172 @@
.repfrm {
padding: 2rem;
> table {
border-collapse: collapse;
margin: 2rem;
th {
padding: 0.2rem 0.35rem;
border: 1px solid #CCC;
}
td {
padding: 0.2rem 0.35rem;
border: 1px solid #CCC;
&.hl {
background-color: lightyellow;
}
&.sh_s {
color: #bf4b06;
}
input, select {
display: none;
}
&.raux {
min-width: 4.6rem;
}
&.av {
border: 2px solid red;
+ td.vsel select {
display: block;
}
}
&.currency {
text-align: right;
white-space: nowrap;
}
&.num {
white-space: nowrap;
}
}
tr {
&:nth-child(2n+1) td {
background-color: #EEE;
&.hl {
background-color: lightyellow;
}
}
&.selected td {
background-color: lightblue;
&.hl {
background-color: lightyellow;
}
/*input, select {
display: block;
}*/
.ilbtn {
display: inline-block;
}
}
}
}
.ovhd {
font-size: 1.5rem;
margin: 1rem 2rem;
font-weight: bold;
text-decoration: underline;
text-decoration-style: double;
}
&.mdw .ovhd {
text-decoration-color: lightblue;
}
&.mdm .ovhd {
text-decoration-color: lightgreen;
}
}
#listframe {
.repitm {
display: block;
padding: 0.35rem 0.5rem;
border: 1px solid #FFF;
border-radius: 0.2rem;
margin: 0.35rem;
cursor: pointer;
background-color: #CCC;
}
}
.ilbtn {
cursor: pointer;
border-radius: 0.28rem;
display: none;
padding: 0.1rem;
margin-bottom: 0;
font-size: 1rem;
letter-spacing: 0.025rem;
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-color: $oci_white;
background-image: none;
border: 1px solid #ababab;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-shadow: 1px 1px 3px rgba(50, 50, 50, 0.3);
box-shadow: 1px 1px 3px rgba(50, 50, 50, 0.3);
min-width: 1.8rem;
}
table.if {
border-collapse: collapse;
margin: 1rem 0;
background: #FFF;
tr {
&:nth-child(2n+1) td {
background-color: #F9F9F9;
}
}
td {
padding: 0.2rem 0.35rem;
border: 1px solid #DDD;
}
}
#listframe {
.ipf {
display: table;
margin: 1rem 0.6rem 0.6rem 0.6rem;
background-color: #EEE;
padding: 0.2rem;
border-radius: 0.35rem;
width: 100%;
width: calc(100% - 1.2rem);
cursor: default;
.ig + .ig {
margin-top: 0.4rem;
}
label {
min-width: 7rem;
display: inline-block;
}
}
}
@@ -0,0 +1,5 @@
let $ct = {
mdl: 'Berichte'
}, $ccol = {
};
+287
View File
@@ -0,0 +1,287 @@

let gi = (n, c) => $$.sc('glyphicon glyphicon-' + n).aC(c);
let $inv = {}, $req = {
init2: function (type, options) {
type = type || 'inv';
options = options || {};
$ocms.getScript([
//{ script: 'web/jstree.min.js', css: 'web/jstree.min.css', condition: typeof $.fn.jstree !== 'function' }
//, { script: 'web/jquery.qtip.min.js', css: 'web/jquery.qtip.min.css', condition: typeof $.fn.qtip !== 'function' }
//, { script: 'web/typeahead.min.js', css: '', condition: typeof $.fn.typeahead !== 'function' }
//, { script: 'web/fullcalendar.min.js', module: 'FullCalendar', css: 'web/fullcalendar.min.css', condition: typeof FullCalendar !== 'object' }
], function () {
//FullCalendar = $vm.FullCalendar;
$req.init3(type, options);
});
}, init3: async function (type, options) {
let cf = $fis.cf(true), lf = $fis.lf(true);
$('#topbar').ocmsmenu([]); //{ lbl: 'home', fnc: $inv.init3 }
$('#activemodule').text($rct.mdl);
await $fis.prepAuth('fds_req,fds_inv,fds_reminder');
let pa = [(async () => {
if ($fis.isAuth('fds_req', 1) === true) {
$req.prepLst('');
lf.aC('fix'); //initially should be shown - for convenience
}
})(), new Promise((resolve, reject) => {
lf.find('div.oreq2').aC('selected');
$req.renderreq(fdt(new Date(), 'yy-MM-dd'), 'r');
resolve();
})];
await Promise.all(pa);
}, prepLst: function (includes) {
let td = new Date();
let lf = $fis.lf(true).ldng(1), sd = new Date('2021-01-01');
let frm = $fis.frm_list();
frm.IN(function () { });
let opn = $$.dc('mth oreq', lf).text($rct.or).click(function (ev) {
let mth = $(this);
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.tC('selected');
$req.renderreq(fdt(new Date(), 'yy-MM-dd'), 'o');
}
mth.aC('selected');
});
let opnr = $$.dc('mth oreq2', lf).text($rct.orr).click(function (ev) {
let mth = $(this);
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.tC('selected');
$req.renderreq(fdt(new Date(), 'yy-MM-dd'), 'r');
}
mth.aC('selected');
});
let osb = $$.i({ placeholder: $rct.rn }).appendTo($$.dc('mth oreqn', lf)).enterKey(function (ev) {
let mth = $(this), v = mth.val() ||'';
ev.stopPropagation();
mth.parent().siblings().rC('selected');
if (v.length > 3) {
mth.parent().aC('selected');
$req.renderreq('n:' + v, 's');
mth.val('');
}
});
lf.append('<hr />');
let mthl = $$.dc('mthl', lf), thisyear = td.getFullYear(), thismonth = td.getMonth() + 1;
for (let tyr = sd.getFullYear(); tyr <= thisyear; tyr++) {
let yr = $$.dc('yr').prependTo(mthl).text($rct.iov[includes] + ' - ' + tyr.toString()).toggleClass('selected', tyr === thisyear);
yr.click({
yr: tyr
}, function (ev) {
ev.stopPropagation();
yr.siblings().rC('selected');
yr.aC('selected');
});
let mfrm = $$.dc('mfrm', yr);
for (let tmt = 0; tmt < (tyr !== thisyear ? 12 : thismonth); tmt++) {
sd = new Date(tyr, tmt, 1);
let mth = $$.dc('mth').prependTo(mfrm).text($rct.iov[includes] + ' - ' + fdt(sd, 'MMM yyyy'));
mth.click({
yr: tyr, mt: tmt
}, function (ev) {
ev.stopPropagation();
mth.siblings().rC('selected');
if (mth.is('.selected') === true) {
mth.tC('selected');
let tgt = fdt(new Date(ev.data.yr, ev.data.mt, 1), 'yy-MM-dd');
$req.renderreq(tgt, 'm');
}
mth.aC('selected');
});
let fwf = getMonday(sd), rd = fwf, lwf = new Date(sd);
lwf.setMonth(lwf.getMonth() + 1);
lwf.setDate(0);
lwf = getMonday(lwf);
let wfrm = $$.dc('wfrm', mth);
while (rd <= lwf) {
let wk = $$.dc('wk', wfrm).text(($rct.wk || 'W') + ' ' + fdt(rd, 'dd.MM.yy'));
wk.click({
rd: new Date(rd)
}, function (ev) {
ev.stopPropagation();
let tgt = fdt(ev.data.rd, 'yy-MM-dd');
$req.renderreq(tgt, 'w');
mth.siblings().rC('selected').find('.wk').rC('selected');
mth.aC('selected').find('.wk').rC('selected');
wk.aC('selected');
});
let wkdl = $$.dc('wkdl', wk).append($$.sc('ico glyphicon glyphicon-compressed'));
if ($fis.isAuth('fds_inv', 2) === true) {
wkdl.click({
rd: new Date(rd)
}, function (ev) {
ev.stopPropagation();
let tgt = fdt(ev.data.rd, 'yy-MM-dd');
$req.downloadzip.call(tgt, 'w');
});
}
rd.setDate(rd.getDate() + 7);
}
}
}
lf.ldng(0);
}, renderreq: function (tgt, mode) {
let invlst = $fis.frm_list().ldng(1), invfrm = $$.dc('invfrm', invlst).aC('md' + mode);
let lf = $fis.lf();
$ocms.postXT({
url: $ocms.url('req/reql'), data: { mode: mode, tgt: tgt }, success: (response) => {
lf.rC('fix').aC('hd');
$$.dc('ovhd', invfrm).append($$.s(response.admin.title)).appendIf($$.sc('note', response.admin.note), ne(response.admin.note, '') !== '');
let ts = $$.tblset({}, invfrm), fd = $rcol.req;
let thr = $$.tr(ts.hd), haux = $$.th(thr);
$.each(fd.fields || [], (ci, cx) => {
$$.th(thr).text(cx.label);
if (cx.name === 'vat') {
$$.th(thr);
}
});
let ctr = 0, cst = false;
$.each(response.requests || [], (ri, rw) => {
if (ctr > 0 && ctr !== rw.ParentServiceRequestId) {
cst = !cst;
}
let tr = $$.tr(ts.bdy).tC('alt', cst);
ctr = rw.ParentServiceRequestId;
tr.click(function () {
lf.rC('fix').aC('hd');
tr.tC('selected').siblings().rC('selected').find('td.av').rC('av');
tr.find('td.av').rC('av');
});
tr.tC('child', rw.isChild);
let raux = $$.td(tr, { class: 'raux' });
if (bool(rw.open, false) === true) {
$$.dc('ihd ilbtn', raux).append(gi('eye-close', 'ico')).click({ id: rw.Id }, $req.tHd);
}
$$.dc('iitm ilbtn', raux).append(gi('list', 'ico')).click({ id: rw.Id }, $req.showitm);
if ($fis.isAuth('fds_inv', 2) === true) {
$$.dc('invc ilbtn', raux).append(gi('edit', 'ico')).click({ id: rw.Id }, $inv.cInv);
}
$.each(fd.fields || [], (ci, cx) => {
let td = $$.td(tr).aC(cx.dtype), val = rw[cx.name];
if (typeof cx.dfnc === 'function') {
cx.dfnc.call(td, val, rw);
} else {
switch (cx.type || '') {
case 'date':
td.text(fdt(rw[cx.name], 'dd.MM.yy'));
break;
case 'datetime':
td.text(fdt(rw[cx.name]));
break;
case 'html':
td.append($$.dc('ctw').html(val));
td.append($$.dc('ttip').html(val));
break;
default:
td.text(rw[cx.name]);
}
}
switch (cx.name || '') {
case 'State':
td.text($rct.sts[val || '-']);
break;
case 'Name':
td.aC(cx.name.toLowerCase());
break;
case 'vat':
$$.sel().appendTo($$.td(tr, { class: 'vsel' })).click(function (ev) { ev.stopPropagation(); }).append([$$.opt('19,0 %', '19,0 %'), $$.opt('16,0 %', '16,0 %'), $$.opt('0,0 %', '0,0 %')]).val(rw[cx.name]).change().change({ frm: invfrm, tgt: tgt, mode: mode, id: rw.Id, td: td }, $req.setvat);
td.tC('hl', rw[cx.name].substr(0, 2) !== '19').click(function (ev) {
ev.stopPropagation();
$(this).tC('av');
});
break;
case 'balance':
td.aC('sh_' + (rw.SollHaben || '').toLowerCase());
break;
case 'InvoiceId':
td.aC('keep');
break;
}
switch (typeof cx.title) {
case 'function':
cx.title.call(td, rw);
break;
case 'string':
td.attr('title', cs.title);
}
});
});
}, complete: () => { invlst.ldng(0); }
});
}, tHd: function (ev) {
let tr = $(this).closest('tr');
ev.stopPropagation();
if (tr.is('.selected') === false) {
return;
} else if (confirm($rct.cthd)){
$ocms.postXT({
url: $ocms.url('req/rthd'), data: { id: ev.data.id }, success: (response) => {
if (response.id === ev.data.id && bool(response.visible, true) === false) {
if (tr.is('.tbhd') === false) {
setTimeout(() => { tr.filter('.tbhd').remove(); }, 15000); // by the filter, it can be prevented by removing the class
}
tr.aC('tbhd');
} else if (response.id === ev.data.id) {
tr.rC('tbhd');
}
}
});
}
}, showitm: function (ev) {
let tr = $(this).closest('tr');
ev.stopPropagation();
if (tr.is('.selected') === false) {
return;
}
let fr = $$.dc('rfrm').ldng(1);
$ocms.postXT({
url: $ocms.url('req/pget'), data: { id: ev.data.id }, success: (response) => {
$ocms.postXT({
url: $ocms.url('req/get'), data: { id: ev.data.id, mode: 'ful' }, success: (response) => {
let rqa = {};
if ((response.requests || []).length < 1) {
fr.text($rct.nd);
} else {
let rq = $$.dc('srq', fr);
let rif = $$.tblset({ class: 'if' }, rq);
$.each(response.requests || [], function (ri, rx) {
if (ri > 0) {
$$.tr(rif.bdy).aC('sep').append($$.td({ colspan: 6 }));
}
let rtr = $$.tr(rif.bdy).aC('title'), cl = $rcol.itm.lbl();
let worknotes = $inv.worknotes(rx);
$$.td(rtr, { colspan: 6 }).append([$$.s($rcol.req.label_sng), $$.sc('eid', rx.ExternalId), $$.sc('nme', fdt(rx.WorkDoneAt,'dd.MM.yy') + ': ' + worknotes.ne(rx.Name))]);
let sdh = $$.tr(rif.bdy).aC('shd').append([$$.td(), $$.td(cl.NameOrNumber), $$.td(cl.Type), $$.td(cl.net_pos), $$.td(cl.bo_pos), $$.td(cl.vat)]); /* header row for items */
$.each(rx.items || [], (ii, ix) => {
let sid = ix.ServiceRequestId;
let itr = $$.tr(rif.bdy, { id: 'itm' + ix.Id }).aC(ix.Type);
$$.td(itr).aC('ico');
$$.td(itr).text(ix.NameOrNumber);
$$.td(itr).text(ix.Type);
$$.td(itr).aC('currency').text(ix.net_pos);
$$.td(itr).aC('currency').text(ix.bo_pos);
$$.td(itr).aC('num').text(ix.vat);
});
});
}
}, error: () => {
fr.text($t.t12);
}, complete: () => {
fr.ldng(0);
}
});
}, error: () => {
fr.text($t.t12);
fr.ldng(0);
}
});
$ocms.dlg(fr, { width: 1000 });
}
}
let $$req = { init2: $req.init2, auth: {} };
export default $$req;
+281
View File
@@ -0,0 +1,281 @@

span.cla, td.cla{
cursor: pointer;
}
.invfrm {
> table {
td {
max-height: 2.5rem;
background-color: #F4F4F4;
&.sh_s {
color: #bf4b06;
}
&.av {
border: 2px solid red;
+ td.vsel select {
display: block;
}
}
&.tags .tag {
display: inline-block;
padding: 0.1rem 0.3rem;
background: #FFF;
margin-top: 0.2rem;
border: 1px solid #CCC;
border-radius: 0.3rem;
font-weight: 300;
font-size: 0.8rem;
text-rendering: geometricprecision;
&.abrechnung_projekt {
background-color: #1A237E;
color: #FFF;
}
&.angebot_erstellt {
background-color: #1A237E;
color: #FFF;
}
&.auftrag_erhalten {
background-color: #427323;
}
&.folgeauftrag {
background-color: #00ACC1;
color: #FFF;
}
&.gutschrift {
background-color: #D81B60;
}
&.korrektur {
background-color: #D81B60;
}
&.rechnung_erledigt {
background-color: #427323;
color: #FFF;
}
&.topkunde__vip_kunde {
background-color: #000000;
color: #FFF;
}
&.zur_rechnungsstellung {
background-color: #ffd600;
}
&.fibu_bitte_mit_doris_abstimmen {
background-color: #D81B60;
font-size: 1rem;
padding: 0.15rem 0.5rem;
}
}
> .ctw {
display: block;
position: relative;
max-height: 2.5rem;
overflow: hidden;
text-overflow: ellipsis;
}
}
tr {
&.tbhd td {
opacity: 0.3;
}
&:not(.alt) + tr.alt td, &.alt + tr:not(.alt) td {
border-top: 1px solid #727272;
}
th {
background-color: $fuchs_blau_60;
color: $fuchs_weiss;
text-align: left;
}
&:hover td {
border-top-color: orangered !important;
border-top-width: 2px;
}
&.alt td { //&:nth-child(2n+1) td {
background-color: #E5E5E5;
border-color: #CCC;
&.hl {
background-color: lightyellow;
}
}
&.child td.name {
color: $fuchs_akzent;
position: relative;
padding-left: 1.8rem;
&::after {
content: '';
background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pjxzdmcgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjx0aXRsZS8+PGcgZGF0YS1uYW1lPSIxNS1BcnJvdy1kaXJlY3Rpb24tcG9pbnRlciIgaWQ9Il8xNS1BcnJvdy1kaXJlY3Rpb24tcG9pbnRlciI+PHBvbHlsaW5lIHBvaW50cz0iMjEgMzEgMjcgMjQgMjEgMTYiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS13aWR0aDoycHgiLz48cG9seWxpbmUgcG9pbnRzPSIyNiAyNCA1IDI0IDUgMSIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjJweCIvPjwvZz48L3N2Zz4=') no-repeat center center;
position: absolute;
left: 0.3rem;
width: 1rem;
height: 1rem;
top: 0.7rem;
}
}
}
}
}
.rfrm {
min-width: 200px;
min-height: 200px;
}
table.if {
border-collapse: collapse;
margin: 1rem 0;
background: #FFF;
tr {
&:nth-child(2n+1) td {
background-color: #F9F9F9;
}
&.title td {
background-color: $fuchs_akzent;
color: white;
.eid {
font-weight: bold;
margin: 0 1rem 0 0.5rem;
font-size: 140%;
}
.nme {
font-size: 110%;
}
}
&.shd td {
font-style: italic;
color: #BBB;
background-color: #FFF;
background-color: #FFF !important;
font-size: 90%;
}
}
td {
padding: 0.2rem 0.35rem;
border: 1px solid #DDD;
}
th, td {
&.currency, &.num {
text-align: right;
white-space: nowrap;
}
&.keep {
white-space: nowrap;
}
}
}
#listframe {
.lh {
margin: 1.5rem 0 1.25rem 1.5rem;
text-decoration: underline;
font-size: 1rem;
font-weight: bolder;
}
li.cli {
border-bottom: 1px solid #CCC;
margin-bottom: 1rem;
list-style: none;
.lihd, .lidt {
padding: 0 0.5rem 0.5rem 3rem;
position: relative;
display: block;
.nme {
display: block;
margin-top: 0.5rem;
}
}
.lidt > div {
display: block;
&.ivn{
max-width: 30rem;
}
}
.cbox {
height: .85rem;
width: .85rem;
display: inline-block;
position: absolute;
left: 0;
top: 0;
&::before {
content: '\e157';
font-family: 'Glyphicons Halflings';
font-size: 24px;
font-style: normal;
font-weight: 400;
line-height: 1;
cursor: pointer;
}
}
.dli {
height: .85rem;
width: .85rem;
display: inline-block;
position: absolute;
left: 0;
top: 0;
&::before {
content: '\e166';
font-family: 'Glyphicons Halflings';
font-size: 24px;
font-style: normal;
font-weight: 400;
line-height: 1;
cursor: pointer;
}
}
&.checked .cbox::before {
content: '\e067';
}
}
}
@@ -0,0 +1,106 @@
let $rct = {
mdl: 'Aufträge',
or: 'offene Aufträge',
orr: 'offene Aufträge (4 W)',
rn: 'Auftragsnummer',
iov: { all: 'Auftragsübersicht (alle)', '': 'Auftragsübersicht' },
wk: 'Woche',
nd: 'Keine Daten gefunden.',
h: 'Uhr',
rq1: 'Auftragsdaten werden von MFR abgerufen.\nDer Vorgang kann bis zu 90Sek dauern.',
rq2: 'Auftragsdaten werden geladen',
rq1f: 'Die Auftragsdaten von MFR konnten nicht oder nicht schnell genug abgerufen werde.\nMöchten Sie mit den bestehenden Daten trotzdem weitermachen?',
note1: 'Im Bruttobetrag sind {0} Lohnkosten enthalten (netto {1}). Die darin enthaltene Umsatzsteuer beträgt {2}.',
note2: 'Bitte beachten Sie, nach §14 Abs. 1 Umsatzsteuergesetz ist diese Rechnung ein Zahlungsbeleg oder eine andere beweiskräftige Unterlage für 2 Jahre nach Ablauf des Kalenderjahres der Ausstellung dieser Rechnung aufzubewahren, soweit nicht aufgrund anderer gesetzlicher Regelungen andere ggf.längere Aufbewahrungsfristen gelten.',
note3: 'Privathaushalten erstattet das Finanzamt bis zu {0} des Arbeitslohns mit der nächsten Steuererklärung.',
note4: 'Für bereits erbrachte Arbeiten, Dienstleistungen, Materiallieferungen und getätigte Bestellvorgänge zum oben genannten Bauvorhaben, die sich aus dem mit Ihnen geschlossenen Vertrag ergeben, stellen wir Ihnen vertragsgemäß unsere Akontozahlung in Rechnung. ' +
'Eine Endabrechnung erhalten Sie als Schlussrechnung nach Abschluss des gesamten Bauvorhabens. Das Ausführungsdatum entnehmen Sie bitte dem Schlusstext dieser Rechnung. Wir danken Ihnen herzlich für das entgegengebrachte Vertrauen und bitten Sie um kurzfristigen Ausgleich der Akontorechnung.',
note13b: 'Gem. §13b Umsatzsteuergesetz unterliegen Sie der Steuerschuldnerschaft des Leistungsempfängers zur Umsatzsteuer aus dieser Rechnung mit einem Steuersatz von 19%.',
crI: 'Rechnung erstellen',
crII: 'Abschlagsrechnung erstellen',
dII: 'Für eine Abschlagsrechnung darf nur ein Auftrag gewählt werden.',
dnS: 'Für eine Rechnung muss mindestens ein Auftrag gewählt werden.',
inv: 'Rechnung',
invs: 'Rechnungen',
req: 'Auftrag',
provP: 'Leistungszeitraum',
provD: 'Leistungsdatum',
cP: 'Position ändern',
iRb: 'Zeile darunter einfügen',
dR: 'Zeile löschen',
sV: 'USt festlegen',
cD: 'Löschen?',
mR: 'Zeile verschieben',
svcPart: 'Service-Anteil',
vat: 'Umsatzsteuer',
combP: 'Positionen zusammenfassen',
iSum: 'Zwischensumme',
dtRel: 'Freigegeben am: ',
dtCr: 'Erstellt am: ',
rqV: 'USt des Auftrags?',
cthd: 'wirklich aus-/einblenden ?',
cst: { style: 'currency', currency: 'EUR' },
sts: {
IsWorkDone: 'Arbeiten erledigt'
, Closed: 'Auftrag geschlossen'
, SubcontractorPendingConfirmation: 'Warten auf Bestätigung (Unterauftrag)'
, Scheduled: 'Geplant'
, OfferIsRejected: 'Angebot abgelehnt'
, OfferIsSend: 'Offen (Angebot versandt)'
, CollaborationWaitingConfirmation: 'Warten auf Bestätigung (Zusammenarbeit)'
, Released: 'Freigegeben'
, OfferIsConfirmed: 'Bestätigt'
, InProgress: 'In Bearbeitung'
, ReadyForScheduling: 'Zur Planung'
, Created: 'Erstellt'
, Rejected: 'Abgebrochen'
, Invoiced: 'Rechnung gestellt'
, '-': '-'
}, invHR: ['Pos.', 'Menge', 'Artikelbezeichnung', 'VK', 'Summe']
, frm: {
invoiceaddress: 'Adresse'
, loc: 'Leistungsort / Lieferadresse'
, invoiceemail: 'Email'
}
}, $rcol = {
req: new fields_definition('Auftrag', 'Aufträge', [
{
name: 'tags', label: '', type: 'string', dfnc: function (i, x) {
if ((i || '') !== '') {
$(this).aC('tags');
i.split(',').forEach((j) => {
if (j !== '') {
$(this).append($$.sc('tag ' + j.replace(' ', '_').replace('\/', '_').toLowerCase(), j));
}
})
}
}
},
{ name: 'DateOfCreation', label: 'Datum', type: 'date', title: function (x) { $(this).attr('title', $rct.dtCr + fdt(x.DateOfCreation).ne('-') + ' \n' + $rct.dtRel + fdt(x.DateReleased).ne('-')); } },
{ name: 'CustomerName', label: 'Kunde (Firma)', type: 'string' },
{ name: 'Name', label: 'Auftragsname', type: 'string' },
{ name: 'ExternalId', label: 'Auftragsnummer', type: 'string' },
{ name: 'ParentExtenalId', label: 'PAuftrag', type: 'string' },
{ name: 'InvoiceId', label: 'RNummer', type: 'string', dfnc: function (i, x) { $(this).rwText(i, ' ').find('span').each(function () { $(this).aC('cla').click({ id: $(this).text() }, $inv.jdbn); }) } },
{ name: 'State', label: 'Status', type: 'string' },
{ name: 'WorkDoneAt', label: 'Erledigt am', type: 'date' },
{ name: 'Description', label: 'Beschreibung', type: 'html' }
]),
itm: new fields_definition('Auftragsposition', 'Auftragspositionen', [
{ name: 'NameOrNumber', label: 'Bezeichnung', type: 'string' },
{ name: 'Type', label: 'Typ', type: 'select', required: true, value: 'Text', url: [{ value: 'Text', label: 'Text' }, { value: 'Equipment', label: 'Ausrüstung' }, { value: 'Material', label: 'Material' }, { value: 'Service', label: 'Arbeitsleistung' }], change: function (x) { $req.quantChange.call(this, x); } },
{ name: 'quantityhours', label: 'Anzahl / Menge', type: 'number', precision: '0.01', value: 1, change: function (x) { $inv.quantChange.call(this, x); } },
{ name: 'UnitString', label: 'Einheit', type: 'select', url: ['LFDM', 'Stck', 'Std.', 'QM', 'AW', 'Pauschal'], change: function (x) { $inv.quantChange.call(this, x); } },
{ name: 'net', label: 'EinzelPreis netto', type: 'number', precision: '0.01', value: 0, change: function (x) { $inv.quantChange.call(this, x); }},
{ name: 'net_val', label: 'GesamtPreis netto', type: 'number', precision: '0.01', value: 0 },
{ name: 'vat_val', label: 'GesamtPreis USt', type: 'number', precision: '0.01', value: 0 },
{ name: 'svcnet_val', label: 'Arbeitslohn netto', type: 'number', precision: '0.01', value: 0 },
{ name: 'svcvat_val', label: 'Arbeitslohn USt', type: 'number', precision: '0.01', value: 0 },
{ name: 'net_pos', label: 'Netto', type: 'string' },
{ name: 'bo_pos', label: 'Brutto', type: 'string' },
{ name: 'vat', label: 'USt', type: 'string', value: '19,0%', change: function (x) { $inv.quantChange.call(this, x); } },
{ name: 'Note', label: 'Details', type: 'html', tinymce: true }
])
};
+857
View File
@@ -0,0 +1,857 @@
const isIE = /MSIE\/|Trident/ig.test(window.navigator.userAgent) || typeof window.document.documentMode !== 'undefined';
const isfileapi = (window.File && window.FileReader && window.FileList && window.Blob) ? true : false;
var $ocms = {
auth: {}, no: function (e) {
e.stopPropagation();
}, vmin: function (f) {
var w = $(window).width * (f || 1), h = $(window).height * (f || 1);
return w < h ? w : h;
}, rpx: function (rem) {
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
}, pattern: {
date_ger: '^(0?[1-9]|[12][0-9]|3[01])[\\.\\-](0?[1-9]|1[012])[\\.\\-]\\d{4}$',
date_us: '^(0?[1-9]|1[012])[\\\\](0?[1-9]|[12][0-9]|3[01])[\\\\]\\d{4}$',
date_serial: '\\d{4}[\\-]^(0?[1-9]|1[012])[\\-](0?[1-9]|[12][0-9]|3[01])$'
}, rdm: function (ln) {
var c = typeof ln === 'number' ? ln : (typeof ln === 'string' ? parseInt(ln) : 7);
if (isNaN(c) === true || typeof c === 'undefined') {
c = 7;
}
return Math.random().toString(36).substring(c);
}, login: {}, t: {
dn: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], mn: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], ma: ['Jan', 'Feb', 'Mrz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez']
}, failure: function (jqXHR) {
alert($t.f1 + '\n' + (jqXHR.internalText || ''));
}, baseurl: '/intranet/do', url: (c) => ($ocms.baseurl + '/' + (c || '')).replace(/\/\//, '/'),
cexi: null
};
function deepCopy (inObject) {
var outObject, value, key
if (typeof inObject !== "object" || inObject === null) {
return inObject // Return the value if inObject is not an object
}
// Create an array or object to hold the values
outObject = Array.isArray(inObject) ? [] : {};
for (key in inObject) {
value = inObject[key];
// Recursively (deep) copy for nested objects, including arrays
outObject[key] = deepCopy(value);
}
return outObject;
};
function fields_definition(p1, label_pl, flds) {
this.label_sng = Array.isArray(p1) === true ? '' : p1 ||'';
this.label_pl = Array.isArray(p1) === true ? '' : label_pl || '';
this.fields = Array.isArray(p1) === true ? p1 : (flds || []);
this.itm = function (name) {
for (var fi = 0; fi < this.fields.length; fi++) {
if (this.fields[fi].name === name) {
return this.fields[fi];
}
}
return null;
}
this.lbl = function (name) {
var ld = {}, n = typeof name === 'string';
for (var fi = 0; fi < this.fields.length; fi++) {
if (n ===true) {
if (this.fields[fi].name === name) {
return this.fields[fi];
}
} else {
ld[this.fields[fi].name] = this.fields[fi].label;
}
}
return (n === true ? null : ld);
}
this.contains = function (name) {
for (var fi = 0; fi < this.fields.length; fi++) {
if (this.fields[fi].name === name) {
return true;
}
}
return false;
}
this.rem = function (name) {
var r = false, f = function (nme) {
for (var fi = 0; fi < this.fields.length; fi++) {
if (this.fields[fi].name === nme) {
this.fields.splice(fi, 1);
r = true;
break;
}
}
}
if (typeof (name) === 'string') {
f.call(this, name);
} else if (Array.isArray(name) === true) {
for (var ai = 0; ai < name.length; ai++) {
f.call(this, name[ai]);
}
}
return r;
}
this.replace = function (name, newfield) {
for (var fi = 0; fi < this.fields.length; fi++) {
if (this.fields[fi].name === name) {
this.fields.splice(fi, 1, newfield);
return newfield;
}
}
return null;
}
this.set = function (name, value, prop) {
prop = prop || 'value';
for (var fi = 0; fi < this.fields.length; fi++) { /* loop through array */
if (this.fields[fi].name === name) {
this.fields[fi][prop] = value;
return this.fields[fi]; /* return if found = break loop */
}
}
return null;
}
this.sets = function (name, obj) {
if (typeof obj === 'object' && Object.keys(obj).length > 0) {
for (var fi = 0; fi < this.fields.length; fi++) { /* loop through array */
if (this.fields[fi].name === name) {
$.extend(this.fields[fi], obj);
return this.fields[fi]; /* return if found = break loop */
}
}
}
return null;
}
this.applyValues = function (vals) {
var t = this;
$.each(vals || {}, function (ri, rx) {
t.set(ri, rx);
});
return t;
}
this.clone = function (names) {
let c = [];
if (Array.isArray(names || '')) {
let value, key;
for (key in (this.fields || [])) {
value = this.fields[key];
if ((value.name ||'') !== '' && names.includes(value.name) === true) {
// Recursively (deep) copy for nested objects, including arrays
c.push(deepCopy(value));
}
}
} else {
c = deepCopy(this.fields || []);
}
return new fields_definition(this.label_sng || '', this.label_pl || '', c);
}
}
function rpx(rem) {
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
}
function vw(f) {
return $(window).width() * (f || 1);
}
function vh(f) {
return $(window).height() * (f || 1);
}
function hh() {
return $('header:first').height() || 0;
}
function ne(inp, alt) {
return (inp || '') === '' ? (alt || '') : inp;
}
function pad(i, n) { return (i || '').toString().padStart(n, '0').substr(-1 * n); }
function parseISO(s) {
let si = s || '';
if (si === '') { return null };
if (/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/.test(si) === true) {
return new Date(si);
} else {
var b = s.split(/\D/);
return new Date(b[0], b[1] - 1, b[2], b[3], b[4], b[5]);
}
}
function parseISOLocal(s) {
let si = s || '';
if (si === '') { return null };
var b = s.split(/\D/);
return new Date(b[0], b[1] - 1, b[2], b[3], b[4], b[5]);
}
function fnum(i, style) {
/* { style: 'decimal/currency/percent', currency: 'USD/EUR', currencyDisplay: 'symbol/code/name', minimumIntegerDigits: 1, minimumFractionDigits: 2, maximumFractionDigits: 3, useGrouping: true } */
return new Intl.NumberFormat(($t.lng || 'de-DE'), style || {}).format(i);
}
function fdt(i, fmt) {
if (typeof i === 'undefined') { return ''; }
try {
var f = fmt || 'DD.MM.YYYY HH:mm';
if (f === 'dts') {
f = 'yyyy-MM-dd';
}
if (f === 'iso') {
if (typeof i === 'string') { i = parseISO(i); }
return i.toISOString();
} else if (typeof moment === 'function') {
return (typeof i !== 'undefined' && (typeof i === 'string' && i !== '')) ? moment(i).format(f) : '';
} else {
if (typeof i === 'string') { i = parseISO(i); }
var pd = function (i, n) { var t = ('0000' + i.toString()); return t.slice(t.length - (n || 2)); }
var t = f + '';
t = t.replace(/ddd/ig, ($t.dn || $ocms.t.dn)[i.getDay()]);
t = t.replace(/dd/ig, pd(i.getDate()));
t = t.replace(/MMMM/g, ($t.mn || $ocms.t.mn)[i.getMonth()]);
t = t.replace(/MMM/g, ($t.ma || $ocms.t.ma)[i.getMonth()]);
t = t.replace(/MM/g, pd(i.getMonth() + 1));//January is 0!
t = t.replace(/yyyy/ig, pd(i.getFullYear(), 4));
t = t.replace(/yy/ig, pd(i.getFullYear()));
t = t.replace(/hh/ig, pd(i.getHours()));
t = t.replace(/mm/g, pd(i.getMinutes()));
t = t.replace(/ss/ig, pd(i.getSeconds()));
return t;
}
} catch (e) {
return '';
}
}
Date.prototype.isValid = function () {
return !isNaN(this);
};
Date.prototype.format = function (fmt) {
return fdt(this,fmt);
};
Date.prototype.addDays = function (days) {
this.setDate(this.getDate() + days);
return this;
};
Date.prototype.isBetween = function (date1, date2) {
return this > date1 && this < date2;
};
Date.prototype.diff = function (date1) {
var diffTime = Math.abs(date1 - this), diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
return diffDays;
};
Date.prototype.year = function () {
return this.getFullYear();
};
Date.prototype.month = function () {
return this.getMonth() + 1;
};
Date.prototype.date = function () {
return this.getDate();
};
String.prototype.ne = function (alt) {
let t = (this || '').trim();
return t === '' ? (alt || '') : t;
};
/* eine = extend if not empty */
String.prototype.eine = function(pre, su) {
let t = (this || '').trim();
return t === '' ? '' : ((pre || '') + t + (su || ''));
};
function jine(a, sep) { return a.map((v, i) => (v || '')).filter((v, i) => v !== '').join(sep) };
function parseDt(datestring, format, newformat) {
datestring = (datestring || '').substr(0, format.length);
var cvalid = function (fmt) {
var result, reg = /[^yMdhms0-9]/ig, valid = true;
while ((result = reg.exec(fmt)) !== null) {
valid = valid && fmt.substr(result.index, 1) === datestring.substr(result.index, 1);
}
var vr = (datestring.length === fmt.length) && valid;
if (vr === true) {
vfmt = fmt;
}
return vr;
}, vfmt = format, isvalid = datestring.length > 0 && format.split(';').some(cvalid);
if (isvalid === true) {
var ndt = [0, 0, 0, 0, 0, 0, 0], np = 'yMdhms';
var result, reg = /(mm{1,2}|dd{1,2}|MM{1,2}|(yy){2,4}|ss{1,2}|hh{1,2})(?!\w)/g, valid = true;
while ((result = reg.exec(vfmt)) !== null) {
ndt[np.indexOf(result[0].substr(0, 1))] = parseInt((result[0] === 'yy' ? '20' : '') + datestring.substr(result.index, result[0].length)) - (result[0].substr(0, 1) === 'M' ? 1 : 0);
}
var dt = new (Function.prototype.bind.apply(Date, [null].concat(ndt)))();
return (typeof newformat === 'string') ? fdt(dt, newformat) : dt;
} else {
return false;
}
}
function bool(i, alt) {
return typeof i === 'boolean' ? i : (typeof alt === 'boolean' ? alt : false);
}
function booln(i, alt) {
var r = false;
if (typeof i === 'boolean') {
r = i;
} else if (typeof i === 'number') {
r = (i === 1);
} else {
r = (typeof alt === 'boolean' ? alt : false);
}
return r;
}
/* set getHash method, IE9 safe */
var h = (typeof window.location.hash === 'undefined');
$ocms.getHash = h ? function () {
return document.URL.substr(document.URL.indexOf('#'));
} : function () { return window.location.hash; };
$ocms.initNav = function () {
$('body').click(function (e) {
$('#toggle-nav').removeClass('active');
});
var nbtn = $('#toggle-nav');
$('.nav_menu').click(function (e) {
if (nbtn.hasClass('active') === true) {
e.stopPropagation();
}
});
nbtn.click(function (e) {
e.stopPropagation();
$(this).toggleClass('active');
});
};
$ocms.initScroll = function () {
let hd = $('header');
let initialHeaderHeight = hd.height(), sec = $('main > section');
$(window).scroll(function (e) {
let scrollTop = $(window).scrollTop(), b = $('body');
b.toggleClass('unfocus', scrollTop > (vh() - initialHeaderHeight * 1.2));
b.toggleClass('btb', scrollTop > (vh() * 0.5 - initialHeaderHeight));
});
};
$ocms.cf_reset = function () {
return $('#contentframe').empty();
};
(function ($) {
/* @description: jQuery - scrollTo
* @author: Dr. Stefan Ott
* @version: 1.0
*/
$.fn.scrollTo = function (key) {
if ($(this).length > 0) {
var ost = $(this).offset().top || 0;
if (ost > 0) {
$('html, body').animate({
scrollTop: ost - hh()
}, 2000);
}
}
};
$.fn.ldng = function (onoff) {
var st = true;
if (typeof onoff === 'boolean') {
st = onoff;
} else if (typeof onoff === 'number') {
st = onoff > 0;
}
return $(this).toggleClass('loading', st);
};
if (typeof $.noop !== 'function') {
$.noop = function () {};
}
/* @description: determines if element has the attribute
* @author: Dr. Stefan Ott
* @version: 1.0
*/
$.fn.hasAttr = function (AttName) {
var attr = $(this).attr(AttName);
return (typeof attr !== 'undefined' && attr !== false);
};
$.fn.parseCssPx = function (key) {
try {
return parseFloat($(this).css(key).replace('px', '') || 0);
} catch (e) {
return 0.0;
}
};
/* @description: returns the higher value
* @author: Dr. Stefan Ott
* @version: 1.0
*/
$.max = function (val1, val2) {
if (isNaN(val1) && isNaN(val2)) { return null; }
else if (isNaN(val1) && !isNaN(val2)) { return val2; }
else if (!isNaN(val2) && isNaN(val2)) { return val1; }
else if (val1 >= val2) { return val1; }
else { return val2; }
};
/* @description: returns the lower value
* @author: Dr. Stefan Ott
* @version: 1.0
*/
$.min = function (val1, val2) {
if (isNaN(val1) && isNaN(val2)) { return null; }
else if (isNaN(val1) && !isNaN(val2)) { return val2; }
else if (!isNaN(val2) && isNaN(val2)) { return val1; }
else if (val1 <= val2) { return val1; }
else { return val2; }
};
/* @description: returns the value to the limit
* @author: Dr. Stefan Ott
* @version: 1.0
*/
$.lim = function (val, lim) {
if (isNaN(val)) { return null; }
else if (isNaN(lim)) { return val; }
else if (lim <= val) { return lim; }
else { return val; }
};
$.fn.enterKey = function (fnc) {
return this.each(function () {
$(this).keypress(function (ev) {
var keycode = (ev.keyCode ? ev.keyCode : ev.which).toString();
if (keycode === '13') {
fnc.call(this, ev);
}
})
})
};
})(jQuery);
/*_________ ajax ________________________________________________*/
$ocms.defaultTimeout = 30000; /* 30s */
/* @description: processes jqXHR from Ajax response and adds new infos (needs to be called with jqXHR as context)
* @author: Dr. Stefan Ott
* @version: 2.0
*/
$ocms.AjaxEX = function (textStatus) {
var jqXHR = this;
jqXHR.responseText = jqXHR.responseText || '';
var ic = jqXHR.getResponseHeader('x-ocms-code') || '';
jqXHR.internalCode = (ic !== '' && isNaN(ic) === false) ? parseInt(ic) : -1;
jqXHR.isInternal = jqXHR.internalCode > -1;
jqXHR.internalText = decodeURIComponent((jqXHR.getResponseHeader('x-ocms-desc') ||'').replace(/\+/g, '%20') || '');
var t = jqXHR.internalText || textStatus;
var c = jqXHR.internalCode || jqXHR.status;
jqXHR.logtext = t + ' (' + c + ')';
};
/* @description: custom jquery ajax post for simplification
* @author: Dr. Stefan Ott
* @version: 1.0
*/
$ocms.postXTS = function (options) {
$ocms.postXT.call(this, $.extend(options, { sync: true }));
};
/* @description: custom jquery ajax post for simplification
* @author: Dr. Stefan Ott
* @version: 2.0
*/
$ocms.postXT = function (options) {
options = options || {};
options.trycount = options.trycount || 0;
if ((options.url || '') === '') { return; }
options.url = (options.url.indexOf('&yy=') !== -1) ? options.url : ((options.url.indexOf('?') > -1) ? (options.url + '&yy=' + (new Date()).getTime()) : (options.url + '?yy=' + (new Date()).getTime()));
var context = options.context || this;
options.context = context;
options.retryLimit = options.retryLimit || 0;
options.timeout = options.timeout || $ocms.defaultTimeout;
if (options.timeout < 100) { options.timeout = options.timeout * 1000; }
options.data = options.data || {};
options.contentType = options.contentType || 'multipart/form-data; charset=UTF-8';
options.islogin = typeof options.islogin === 'boolean' ? options.islogin : false; /* this is used to prevent loop */
switch (options.contentType) {
case '':
case 'json':
options.contentType = 'application/json; charset=utf-8';
break;
case 'form':
options.contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
break;
case 'multi':
options.contentType = 'multipart/form-data';
break;
case 'text':
options.contentType = 'text/plain; charset=UTF-8';
break;
/* default = leave as defined */
}
if (options.form instanceof jQuery) {
options.data = options.form.serializeObject();
options.contentType = 'form-data';
} else if (options.lzw instanceof jQuery) {
options.data.lzw = $.ccLZW(options.lzw.serializeAnything(true)).join(',');
}
var senddata;
if ((options.contentType.substr(0, 19) === 'multipart/form-data' || options.contentType.substr(0, 9) === 'form-data') && options.data instanceof FormData === false) {
options.contentType = false;
var fd = new FormData();
$.each(options.files || [], function (fi, file) {
fd.append('upload_file', file);
});
$.each(options.data || {}, function (di, dx) {
fd.append(di, encodeURIComponent(dx));
});
options.data = fd;
options.processData = false;
} else if (options.data instanceof FormData) {
options.contentType = false;
options.processData = false;
}
var ajo = {
type: options.method || 'post',
url: options.url,
data: options.data,
processData: typeof options.processData !== 'boolean' ? true : options.processData,
contentType: options.contentType,
cache: options.cache || false,
timeout: options.timeout,
beforeSend: function (jqXHR) {
$(options.loading).ldng();
$('body').addClass('ldng');
if (typeof options.beforesend === 'function') { options.beforesend.apply(context, [jqXHR]); }
},
success: function (response, textStatus, jqXHR) {
if (response === 'false' || response === 'not authorized') {
if (typeof options.error === 'function') { options.error.apply(context, [jqXHR, textStatus, response]); }
if (typeof $.status === 'function') { $.status(textStatus + ' - ' + response); }
} else {
if (typeof options.success === 'function') { options.success.apply(context, [response, textStatus, jqXHR]); }
}
},
error: function (jqXHR, textStatus, response) {
$ocms.AjaxEX.call(jqXHR, textStatus);
if (options.url.indexOf('doc.ashx') !== -1 && options.url.indexOf('ftest') === -1) { return; }
if (jqXHR.status === 401 && jqXHR.internalCode === 111 && options.islogin === false && typeof $ocms.login.dlg === 'function') {
$ocms.login.dlg({ ajo: options });
} else if (textStatus === 'timeout' || jqXHR.status === 302) {
options.tryCount++;
if (options.tryCount <= options.retryLimit) {
/* try again */
$ocms.postXT(options);
return;
}
return;
}
/*if (typeof $.log === 'function' && (jqXHR.internalCode + '') !== '1101') { $.log('Server error: ' + jqXHR.logtext + '', 'error', options.url); }*/
if (typeof options.error === 'function') {
options.error.apply(context, [jqXHR, textStatus, response]);
} else if (typeof $ocms.failure === 'function') {
$ocms.failure.apply(context, [jqXHR]);
} else if (typeof $.status === 'function') {
$.status('Server error: ' + textStatus + ' - ' + response + '');
}
},
dataType: options.datatype || 'json',
complete: function (jqXHR, textStatus) {
if (typeof options.complete === 'function') { options.complete.apply(context, [jqXHR, textStatus]); }
$(options.loading).ldng(0);
$('body').removeClass('ldng');
let tm = $('body > .timer');
if (tm.length > 0) {
let cec = new Date(jqXHR.getResponseHeader('ocms_cec') || ''), cex = new Date(jqXHR.getResponseHeader('ocms_cex') || '');
if (cec.isValid() && cex.isValid()) {
let d = new Date(), dd = Math.abs(cex - cec);
d.setMilliseconds(d.getMilliseconds() + dd);
tm.data({ 'cex': d, 'ctt': dd });
$ocms.cex_timer();
}
}
},
context: context,
async: true
};
if (typeof options.sync === 'boolean') {
ajo.async = (options.sync === false);
}
if ((typeof options.contentType === 'boolean' ? options.contentType === false : false) === true) {
ajo.contentType = false; /* needed for file uploads */
}
$.ajax(ajo);
};
$ocms.cex_timer = function () {
if (!$ocms.cexi) {
$ocms.cexi = setInterval($ocms.cex_timer, 15000);
}
let tm = $('body > .timer'), c = tm.data('cex'), t = tm.data('ctt'), n = new Date();
if (c instanceof Date && c.isValid() && typeof t === 'number' && t > 0 && c > n) {
let p = (Math.abs(n - c) / t * 100);
tm.css('width', p.toString() + '%');
if (p < 98 && (!$ocms.cex_lp || Math.abs(n - $ocms.cex_lp) > 600000 )) {
$ocms.postXT({ url: $ocms.url('ping'), success: () => { $ocms.cex_lp = n; }, timeout: 5000, error: () => { }});
}
}
};
$ocms.vbl_send = function (ev) {
var options = ev.data || {};
if ((options.url || '') === '') { return; }
var frm = $('#contentframe form:first');
var postoptions = {
url: options.url, data: new FormData(), success: function (response) {
if (typeof options.success === 'function') { options.success(response); } else if (typeof options.success === 'string') { alert(options.success); }
}, error: function (jqXHR, textStatus, response) {
if (typeof options.error === 'function') { options.error(response); } else if (typeof options.error === 'string') { alert(options.error); }
}, complete: function () {
frm.ldng(0);
}
};
var valid = true;
frm.find('input').each(function () {
var t = $(this), nm = t.nza('name'), val = t.val(), req = $(this).prop('required') || false;
if (nm !== '') {
var tv = (val !== '' || req === false);
valid = valid && tv;
if (tv === true) {
postoptions.data.append(nm, encodeURIComponent(val));
t[0].setCustomValidity('');
} else if ($(this).nza('ocms-nvnote') !== '') {
t[0].setCustomValidity($(this).nza('ocms-nvnote'));
}
}
});
if (valid === true) {
frm.ldng(1);
$ocms.postXT.call(this, postoptions);
}
};
(function ($) {
$.fn.nza = function (attributeName, alternative) {
var attr = $(this).attr(attributeName);
return (typeof attr !== 'undefined' && attr !== false) ? attr : (alternative || '');
};
$.fn.serializeObject = function (checkvalidity, options) {
var
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
rsubmittable = /^(?:input|select|textarea|keygen)/i,
rcheckableType = (/^(?:checkbox|radio)$/i);
options = options || {};
var typedvalues = bool(options.typedvalues, false);
var result = {}, c= $(this), inp = c.find(':input:not([nosend],[type="file"])').addBack(':input'), valid = true;
$.each(inp.not('.tinymce').get(), function (i, ii) {
var t = $(this), e = this, type = (this.type || '').toLowerCase(), req = t.prop('required') || false;
if ((e.name && !t.is(':disabled') && rsubmittable.test(e.nodeName) && !rsubmitterTypes.test(type)) === true) {
var val = t.val(), nme = e.name, dtf = t.nza('data-format').split(':'), pattern = t.nza('pattern') || '.*', cat = false;
if (rcheckableType.test(type) === true) {
val = e.checked ? (val !== '' ? val : 'true') : '';
}
if (dtf[0].substr(0, 4) === 'date' && dtf.length > 1) {
val = parseDt(val, dtf.slice(1).join(':')); /* should result in date object */
if (typeof val === 'boolean') {
val = null;
}
if (val === null && t.prop('type').substr(0, 4) === 'date' && isNaN(new Date(t.val())) === false) { /* is can be parsed by Date object */
val = new Date(t.val());
}
if (val instanceof Date === true && typeof val.getMonth === 'function') { /* if really a Date */
if (typedvalues === false) { val = fdt(val, dtf[0] === 'date' ? 'dts' : 'iso'); } /* if string result awaited, format to string */
} else {
val = null;
}
} else if (type === 'number' && typedvalues === true ) {
let v;
if (dtf[0] === 'integer') {
v = parseInt(val);
} else {
v = parseFloat(val);
}
val = isNaN(v) ? val : v;
}
if (req === true && ((val || '') === '' || (val.match(pattern) === null))) {
if (cat === false && bool(checkvalidity, false) === true) { e.setCustomValidity(t.nza('ocms-nvnote', $ocms.t.inv || 'Invalid field')); }
val = null;
} else if (cat=== false && bool(checkvalidity, false) === true) {
e.setCustomValidity('');
}
if (typeof val !=='undefined' && val !== null && typeof val === 'string') {
let node = result[nme];
if (typeof node !== 'undefined' && node !== null) {
if (Array.isArray(node)) {
node.push(val.replace(rCRLF, '\r\n'));
} else {
result[nme] = [node, val.replace(rCRLF, '\r\n')];
}
} else {
result[nme] = val.replace(rCRLF, '\r\n');
}
} else if (typeof val !== 'undefined' && val !== null) {
let node = result[nme];
if (typeof node !== 'undefined' && node !== null) {
if (Array.isArray(node)) {
node.push(val);
} else {
result[nme] = [node, val];
}
} else {
result[nme] = val;
}
} else {
valid = false;
}
}
});
inp.filter('.tinymce').each(function (ei, ex) {
var t = $(this), e = this, type = (this.type || '').toLowerCase(), req = t.prop('required') || false
try {
var te = tinymce.get($(ex).attr('id'));
if (te) {
var enm = $(ex).attr('name');
var val = te.getContent();
if (req === false || (val || '') !== '') {
result[enm] = val;
} else {
valid = false;
}
}
} catch (ee) { $.noop(); }
});
c.toggleClass('invalid', !valid);
return valid ? result : null;
};
$.fn.sendForm = function (url, success, options) {
var form = $(this);
options = options || {};
var postoptions = {
url: url, success: function (response) {
options.response = response;
if (typeof success === 'function') {
var _e = success(response);
}
form.closest('div.modal').remove();
}, error: function (jqXHR, textStatus, response) {
if (typeof options.error === 'function') { options.error.call(this, jqXHR); } else {
$ocms.failure.call(this, jqXHR);
}
}, complete: function () {
form.ldng(0);
if (typeof options.complete === 'function') { options.complete.call(this, jqXHR); }
}
};
var fle = form.find('input[type="file"]');
postoptions.data = new FormData();
if (fle.length > 0) {
$.each(fle[0].files, function (key, value) {
postoptions.data.append(key, value);
postoptions.data.append('file_lastmodified', $ocms.isodt(value.lastModifiedDate));
});
}
var formdata = form.serializeObject();
$.each(formdata || {}, function (di, dx) {
postoptions.data.append(di, encodeURIComponent(dx));
});
form.ldng();
$ocms.postXT.call(this, postoptions);
};
$.fn.checkValidity = function () {
var t = $(this), valid = true;
t.each(function (i,e) {
valid = valid && e.checkValidity();
});
return valid;
};
$.fn.wrap = function (cls, attr) {
var t = $(this), n = $$.dc(cls).attr(attr || {}).insertAfter(t);
t.append(n);
return n;
};
})(jQuery);
$ocms.logout = function () {
$ocms.postXT({
url: $ocms.url('logout'), complete: function () { window.location.reload(); }
});
};
$ocms.login = {
send: function (e) {
e.preventDefault();
var f = $(this);
if (f.find('#dbtn-confirm').hasClass('disabled') === true) {
return false;
} else {
var qs = f.serializeObject();
qs.loginaccount = ne(qs.loginaccount, $ocms.auth.account || $ocms.auth.requestedaccount || '');
qs.loginaccount = ne(qs.loginaccount, $ocms.auth.account || $ocms.auth.requestedaccount || '');
if (ne(qs.loginaccount) === '' && bool($ocms.auth.accountrequired, true) === true ) {
alert($t.l16);
return false;
} else {
$ocms.postXT({ url: $ocms.url('login'), data: qs, success: function () { window.location.reload(); }});
return false;
}
}
}, uichange: function () {
let inp_ui = $(this), form = inp_ui.closest('form'), accountrequired = bool($ocms.auth.accountrequired, true);
let loginaccount = ne(form.find('[name="loginaccount"]').val(), $ocms.auth.account || $ocms.auth.requestedaccount || '');
if (loginaccount !== '' || accountrequired === false) {
var ul = form.find('[name="userlogin"]').empty().val('');
var un = form.find('[name="username"]').empty().val('');
var nsel = $('#dlg_userlogin_sel').empty().val('');
var ui = inp_ui.val() || '';
if (inp_ui.checkValidity() === false && ui === '') { return; }
var ftbl = inp_ui.closest('table').ldng();
$ocms.postXT.call(this, {
url: $ocms.url('auth'), data: { 'userinfo': ui, account: (loginaccount ||'') }, success: function (response, textStatus, jqXHR) {
if (response.length === 1) {
var sx = response[0];
ul.val(sx.login).change().attr('required', '').removeAttr('nosend');
un.val(sx.name).change().attr('required', '').show();
nsel.removeAttr('required').attr('nosend', '').hide();
} else if (response.length > 0) {
un.hide().removeAttr('required');
ul.removeAttr('required').attr('nosend', '');
if (nsel.length === 0) {
nsel = $('<select></select>').attr({ name: 'userlogin', size: response.length, id: 'dlg_userlogin_sel', class: 'form-control', required: '' }).css({ width: '100%', 'max-width': '100%', padding: '2px' }).insertAfter(un);
}
$.each(response, function (ni, sx) {
var io = $('<option></option>').attr({ value: sx.login, style: 'padding-top: 2px; padding-bottom: 5px;', 'border-bottom': '1px solid #EEE;' }).text(sx.name).appendTo(nsel);
if (ni % 2 === 0) { io.css({ 'background-color': '#F9F9F9' }); }
});
nsel.attr('required', '').removeAttr('nosend');
} else {
nsel.hide().attr('nosend', '');
un.attr('required', '').show();
ul.attr('required', '').removeAttr('nosend');
alert($t.l9);
}
}, error: function (jqXHR) {
$ocms.failure.call(this, jqXHR);
}, complete: function () {
ftbl.ldng(0);
}
});
} else {
alert($t.l18);
}
}, sendpassword: function (ev) {
var d = $('<div class="modal"><div class="modal-dialog in" style="height: 500px; width: 600px;"><div class="modal-content" style="height: auto;" novalidate="true"><div class="modal-header"><h3>Vereinsmanager</h3></div></div><div class="modal-close"></div><div class="modal-content"><form role="form"><div class="modal-header"><h3></h3></div><div class="modal-body"><div class="frm"><div class="form-body stacked"><div class="form-group"><div class="form-itm"><label for="dlg_lastname">Nachname<span class="ind_required">*</span></label></div><div class="form-itm"><input id="dlg_lastname" name="lastname" type="string" class="form-control" required=""></div></div><div class="form-group"><div class="form-itm"><label for="dlg_email">Email<span class="ind_required">*</span></label></div><div class="form-itm"><input id="dlg_email" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$" type="string" class="form-control" required=""></div></div></div></div></div><div class="modal-footer"><div class="note_required"><span class="ind_required">*</span><span>Eingabe erforderlich</span></div><button type="submit" class="btn confirm" role="confirm">Senden</button></div><div class="modal-note"></div></form></div></div></div>');
var fb = d.find('.form-body'), code = null;
d.find('form').submit(function (e) {
e.preventDefault();
var qs = $(this).serializeObject(true), s2 = code === null, u = s2 ?'spwc':'spw';
$ocms.postXT.call(this, {
url: $ocms.url(u), data: qs, complete: function () {
if (s2) {
fb.append('<div class="form-group"><div class="form-itm"></div><div class="form-itm">Ihnen wurde ein Code per SMS zugesandt. <br />Bitte tragen Sie den hier ein:</div></div>');
code = $('<div class="form-group"><div class="form-itm"><label for="dlg_code">SMS-Code<span class="ind_required">*</span></label></div><div class="form-itm"><input id="dlg_code" name="code" type="string" class="form-control" required></div></div>').appendTo(fb);
} else {
alert($t.l13);
d.remove();
}
}, error: () => { } /* prevent default */
});
return false;
});
d.find('.modal-close').click(function () {
d.remove();
});
var l17a = [];
$.each($t.l7a.split('\n'), (i, t) => {
Array.prototype.push.apply(l17a, [$('<br/>'), $('<span></span>').text(t)]);
});
d.find('.modal-note').append($('<span style="text-decoration: underline;"></span>').text($t.alert)).append(l17a);
d.appendTo('body');
setTimeout(function () {
$('.modal').find('input[name="lastname"]').focus();
}, 600);
}
};
+3
View File
@@ -0,0 +1,3 @@
$(document).ready(function () {
$('#loginform').submit($ocms.login.send)
});
+48
View File
@@ -0,0 +1,48 @@

(function ($) {
$.fn.draggable = function (controlelement) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
var elmnt = $(this), ce = controlelement instanceof jQuery ? controlelement : elmnt.find(controlelement);
function dragMouseDown(e) {
e.stopPropagation();
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.css('top', (elmnt.offset().top - pos2) + 'px');
elmnt.css('left', (elmnt.offset().left - pos1) + 'px');
}
function closeDragElement() {
// stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
if (typeof controlelement !== 'undefined' && ce.length > 0) {
ce.mousedown(dragMouseDown).addClass('dctrl');
} else {
elmnt.mousedown(dragMouseDown).addClass('dctrl');
}
return $(this);
}
})(jQuery);
+42
View File
@@ -0,0 +1,42 @@
/* this is content of the language specific texts js e.g. ocms.ex_txt_de.js */
let $ct = {
mdl: 'Examplemodule'
}, $ccol = {
test: new fields_definition([
{ name: 'booking_guid', label: 'ID', type: 'hidden' },
{ name: 'Res', label: 'Resourcen', type: 'select', url: [], required: true, value: '' }
])
};
/* this is content of the main js e.g. ocms.ex.js */
/* both are to be merged and minified and put to target location */
let $example = {
init2: function (type, options) {
type = type || 'cal';
options = options || {};
$ocms.getScript([
//{ script: 'web/jstree.min.js', css: 'web/jstree.min.css', condition: typeof $.fn.jstree !== 'function' }
//, { script: 'web/jquery.qtip.min.js', css: 'web/jquery.qtip.min.css', condition: typeof $.fn.qtip !== 'function' }
//, { script: 'web/typeahead.min.js', css: '', condition: typeof $.fn.typeahead !== 'function' }
//, { script: 'web/fullcalendar.min.js', module: 'FullCalendar', css: 'web/fullcalendar.min.css', condition: typeof FullCalendar !== 'object' }
], function () {
//FullCalendar = $vm.FullCalendar;
$example.init3(type, options);
});
}, init3: async function (type, options) {
let cf = $('#contentframe').empty(), cf2 = $$.dc('cfrm hd').appendTo(cf), frm = $$.dc('vcal init_frm', cf);
let tbar = $('#topbar').ocmsmenu([]); //{ lbl: 'home', fnc: $example.init3 }
$('#activemodule').text($ct.mdl);
let calfrm = $$.dc('calfrm', frm);
let pa = [new Promise((resolve, reject) => {
frm.IN(function () { });
}), new Promise((resolve, reject) => {
//$example.lst3m()
})];
await Promise.all(pa);
}
}
let $$example = { init2: $example.init2, auth: {} };
export default $$example;
+13
View File
@@ -0,0 +1,13 @@

$(document).ready(function () {
$('html').click(function (e) {
$nuf();
});
$('#listframe').click(function (e) {
e.stopPropagation();
$nuf();
});
$('#mainmenu').ocmsmenu($ocms.ocmsmenu);
$('#mainmenu').activatemenu();
//$ocms.init('cal');
});
+686
View File
@@ -0,0 +1,686 @@
(function ($ocms) {
$ocms.multline = function (txt) {
let s = txt.split('\n'), div = $$.d();
$.each(s, (si, sx) => {
div.append($$.s(sx));
});
return div.html();
};
$ocms.tooltip_hidden = function (event, api) {
/*console.log('%o', [event, api, this]);*/
$(this).remove();
api.rendered = false;
};
$ocms.isDateString = function (inp) {
if (typeof inp !== 'string') { return false; } else {
return isNaN(new Date(inp)) === false;
}
}
$ocms.failure = function (jqXHR) {
if ((jqXHR.internalCode || -1) === 11110) { /* not authenticated */
$ocms.login.dlg();
} else {
alert($t.f1 + '\n' + (jqXHR.internalText || ''));
}
}
$ocms.getScript = function (def, success) {
var cu = [], su = [], validstring = function (obj) { return (typeof obj === 'string' && (obj || '') !== ''); }, adddef = function (di, dx) {
if (bool(dx.condition, true) === true) {
if ((dx.script || '') !== '') {
su.push({ url: dx.script, module: dx.module || '' });
}
if (validstring(dx.css || '') === true) {
cu.push(dx.css);
} else if (Array.isArray(dx.css) === true) {
Array.prototype.push.apply(cu, dx.css.filter(validstring));
}
}
};
if (validstring(def || '') === true) {
su.push(def);
} else if (Array.isArray(def) === true) {
$.each(def, adddef);
} else if (typeof def === 'object' && (def.script || '') !== '') {
adddef(0, def);
}
let cssarray = [];
$.each(cu, function (ci, cui) {
if ((cui || '') !== '') {
cssarray.push(loadCSS(cui));
}
});
let spa = su.map(
function (sx, si) {
let url = sx.url, mdl = sx.module || '';
if (mdl === '') {
let p = new Promise(function (resolve, reject) {
try {
(async function () {
$.ajax({
url: url,
dataType: 'script',
success: function () { resolve(su); }, error: function () { reject(su) }, timeout: 30000
});
})();
} catch (e) {
console.debug(e.message + '%o', e);
}
});
return p;
} else {
let p = $ocms.loadmodule(mdl, url, sx.alias);
return p;
}
});
Promise.all(spa).then(success);
};
$ocms.loadmodule = function (module, url, alias) {
let p = new Promise(function (resolve, reject) {
(async function () {
try {
let url2 = (url.startsWith('/') || url.startsWith('.') ? '' : '/') + url;
import(url2).then(x => { $ocms[module] = x[alias ||'default']; resolve(module); }).catch(e2 => { console.debug(e2.message + '%o', e2); reject(module); });
} catch (e) {
console.debug(e.message + '%o', e);
}
})()
});
return p
};
$ocms.ocms_auth = function (module, min, person_guid, fnc) {
var r = false;
if ($.isPlainObject($ocms.auth.modules) === false) { $ocms.auth.modules = {}; }
var ma = 0;
if ($ocms.auth.modules[module + (person_guid || '')] || false) {
ma = $ocms.auth.modules[module + (person_guid || '')];
if (ma < 2 && (person_guid || '') === auth.guid) {
ma = 2;
}
if (ma >= (min || 0)) { fnc(r); };
} else {
$ocms.postXT({
url: $ocms.url('auth'), data: { module: module, person_guid: (person_guid || '') }, success: function (res) {
ma = res[module];
$ocms.auth.modules[module + (person_guid || '')] = ma;
if (ma < 2 && (person_guid || '') === $ocms.auth.person_guid) {
ma = 2;
}
if (ma >= (min || 0)) { fnc(r); };
}, error: function (jqXHR) {
$ocms.failure.call(this, jqXHR);
}
});
}
};
$ocms.auth.locale = 'de';
$ocms.ocms_prepauth = function (modules, person_guid, fnc) {
$ocms.postXT({
url: $ocms.url('auth'), data: { fn: 'csv', modules: modules, person_guid: (person_guid || '') }, success: function (res) {
$ocms.ocms_regauth(res);
}, error: function (jqXHR) {
$ocms.failure.call(this, jqXHR);
}, complete: function () { fnc(); }
});
};
$ocms.ocms_regauth = function (object) {
$.each(object || {}, function (module, res) { auth.modules[module] = parseInt(res); });
};
$ocms.init = function (ev) {
var mdl = typeof ev === 'string' ? ev : ((ev.data || {}).fn || '');
if (mdl === '') {
return;
} else if (mdl === 'home') {
$cfr(); $lfr();
$('#topbar').ocmsmenu([], true);
$('#activemodule').text($t.ov);
$ocms.ov.call($('#contentframe'));
} else {
$cfr(); $lfr();
$('#topbar').ocmsmenu([]);
$ocms.postXT({
url: $ocms.url(mdl + '/auth'), success: function (auth) {
if (typeof $ocms[mdl] === 'undefined') {
$ocms[mdl] = {};
}
$ocms[mdl].auth = auth;
if (auth.manage > 0) {
$ocms.getScript({
module: mdl, script: ['web/imdl', mdl, $ocms.auth.locale || 'de', 'js'].join('.'), css: ['web/imdl', mdl, 'css'].join('.'), condition: typeof $ocms[mdl].init2 !== 'function' }, function () { $ocms[mdl].init2(); });
}
}, error: function () {
$('#contentframe').empty();
}
});
}
};
$ocms.menuarray = function (itm) {
this.array = [];
this.sep = function () {
if (this.length > 0 && this.array[array.length - 1].fnc !== 'separator') {
this.push({ fnc: 'separator' });
}
};
this.push = function (newitm) {
if (typeof newitm === 'undefined') {
return null;
} else if (Array.isArray(newitm) === true) {
Array.prototype.push.apply(this.array, newitm);
} else if (typeof newitm === 'object') {
this.array.push(newitm);
}
return newitm;
};
this.unshift = function (newitm) {
if (typeof newitm === 'undefined') {
return null;
} else if (Array.isArray(newitm) === true) {
Array.prototype.unshift.apply(this.array, newitm);
} else if (typeof newitm === 'object') {
this.array.unshift(newitm);
}
return newitm;
};
this.push(itm);
};
$ocms.menu = function (menu, empty) {
/*
* create menu based on definition in form of [ { id: '', lbl: '', ico: '', fnc: function() { }, itm: [ ], data: {} } ]
*/
menu = menu || [];
var bar = $(this).removeClass('vis');
if (bool(empty, true) === true && bar.is('#mainmenu') === false) { bar.empty(); }
if (bool(empty, false) === false && bar.is('#sidebar,#topbar')) { menu.unshift({ id: 'sbctrl', glyph: 'glyphicon-th-list', aclass: 'fbtn', fnc: function () { $lf(); } }); $lf(0); }
if ((menu || []).length === 0) {
bar.empty().addClass('hd');
} else {
bar.removeClass('hd');
var nav = bar.is('nav') === true ? bar : bar.children('nav');
if (nav.length !== 1) {
nav = $('<nav></nav>').tC('nv', bar.is('#sidebar')).tC('ctxt', bar.is('#topbar')).appendTo(bar);
}
var nul = $$.ul().appendTo(nav);
var subi, subm = function (la, ix) {
var li = $(this).addClass('dropdown submenu');
la.append($$.sc('caret dd')).addClass('dds dropdown-toggle').attr({ 'aria-expanded': 'false' });
if ((ix.ico || '') !== '') { la.prepend($$.sc('ico ' + ix.ico)); }
var lul = $$.ul({ class: 'dropdown-menu', role: 'menu' }).appendTo(li);
$.each(ix.itm || [], function (mi, mx) {
subi.call(lul, mx);
});
};
var dis = function (ix) {
$(this).tC('disabled', (typeof ix.disabled === 'boolean' ? ix.disabled : (typeof ix.disabled === 'string' && ix.disabled === 'subs' && (ix.itm || []).length === 0 ? true : false)))
};
subi = function (mx) {
var ml = $$.li({ id: mx.id }).attr(mx.attr || {}).addClass(mx.lclass).appendTo($(this)), ma, role = (typeof mx.fnc === 'string' && mx.fnc !== '') ? mx.fnc.split(':')[0] : '';
if (role !== '' && role !== 'init') {
ml.attr('role', role).appendIf($$.s(mx.lbl), ne(mx.lbl) !== '');
} else {
ma = $$.a({ class: 'on', role: 'button' }).addClass(mx.aclass).appendTo(ml).append($$.s(mx.lbl));
dis.call(ma, mx);
if ((mx.itm || []).length > 0) {
subm.call(ml, ma, mx);
}
ma.click($nuf);
if (typeof mx.fnc === 'function') {
ma.click(mx.data || {}, mx.fnc);
} else if (role === 'init') {
ma.click($.extend({}, mx.data || {}, { fn: mx.fnc.split(':')[1] }), $ocms.init);
}
}
};
$.each(menu, function (ii, ix) {
var li = $$.li({ id: ix.id }).attr(ix.attr || {}).addClass(ix.lclass), la, role = (typeof ix.fnc === 'string' && ix.fnc !== '') ? ix.fnc.split(':')[0] : '';
if (role !== '' && role !== 'init') {
li.attr('role', role).appendIf($$.s(ix.lbl), ne(ix.lbl) !== '');
} else {
la = $$.a({ class: 'on', role: 'button' }).addClass(ix.aclass).appendTo(li);
dis.call(la, ix);
if ((ix.lbl || '') !== '') { la.append($$.s(ix.lbl)); }
if ((ix.ico || '') !== '') { la.prepend($$.sc('ico ' + ix.ico)); }
if ((ix.glyph || '') !== '') { la.prepend($$.sc('glyphicon ' + ix.glyph)); }
if ((ix.itm || []).length > 0) {
li.addClass('dropdown');
la.append($$.sc('caret dd')).addClass('dds dropdown-toggle').attr({ 'aria-expanded': 'false' });
var lul = $$.ul({ class: 'dropdown-menu', role: 'menu' }).appendTo(li);
$.each(ix.itm || [], function (mi, mx) {
subi.call(lul, mx);
});
}
if ((ix.sel || []).length > 0) {
} else {
la.click($nuf);
if (typeof ix.fnc === 'function') {
la.click(ix.data || {}, ix.fnc);
} else if (role === 'init') {
la.click($.extend({}, ix.data || {}, { fn: ix.fnc.split(':')[1] }), $ocms.init);
}
}
}
li.appendTo(nul);
});
nav.activatemenu();
}
};
/* DIALOGS & POPUPS ********************************************************************************************************************************/
$ocms.easytbl = (array, options) => {
options = options || {};
let tbl = $$.tbl().addClass(options.class).css('border-collapse', 'collapse'), bdy = $$.tbody(tbl), basecss = (bool(options.frame, false) === true) ? { padding: '5px', border: '1px solid #727272' } : {};
if (Array.isArray(options.header) === true) {
let hd = $$.thead(tbl);
$.each(options.header, (hi, hx) => $$.th(hd).css(options.cellcss || basecss).rwText(hx));
} else if (bool(options.header, false) === true && (array || []).length > 0) {
let hd = $$.thead(tbl);
$.each(Object.keys(array[0]), (hi, hx) => $$.th(hd).css(options.cellcss || basecss).rwText(hx));
}
$.each(array || [], (ai, ax) => {
let tr = $$.tr();
$.each(ax, (bi, bx) => {
bx = bx || '';
let td = $$.td(tr).css(options.cellcss || basecss);
if (bx instanceof jQuery) {
td.append(bx);
} else if (typeof bx === 'string') {
if (bx.substring(0, 1) === '<') {
td.append(bx);
} else { td.text(bx); }
}
});
tbl.append(tr);
});
return tbl;
};
$ocms.dlgtbl = (array, title, options) => {
options = options || {};
let tbl = $ocms.easytbl(array, options)
$ocms.dlg(tbl, $.extend({ title: title }, options));
};
$ocms.dlg = function (content, options) {
options = options || {}
let mexist = $('body > .modal').length > 0;
let t = (n) => typeof options[n], f = (n) => t(n) === 'function';
if (bool(options.exclusive, true) === true && mexist === true) {
alert($t.dbldlg || 'Es ist bereits ein Dialog geöffnet');
return;
}
let modal = $$.dc('modal', $('body')), dlg = $$.dc('modal-dialog', modal);
if (isNaN(options.zindex) === false) {
modal.css('zIndex', options.zindex);
} else if (mexist === true) {
modal.css('zIndex', parseInt($('body > .modal:last').cssValue('zIndex')) + 200);
}
if (isNaN(options.zindex_min) === false) {
if (modal.cssValue('zIndex') < options.zindex_min) {
modal.css('zIndex', options.zindex_min);
}
}
if (t('size') === 'string') {
dlg.addClass('sz' + ne(options.size));
} else if (Array.isArray(options.size)) {
dlg.css('height', (options.size[0] || -1) < 0 ? null : options.size[0].toString() + 'px');
dlg.css('width', (options.size[1] || -1) < 0 ? null : options.size[1].toString() + 'px');
}
let clbtn = $$.dc('modal-close').appendTo(dlg), ct = $$.dc('modal-content', dlg);
let c = ct, hd, isform = bool(options.form, false);
if (isform === true) { /* squeeze in a form */
c = $('<form role="form"></form>').appendTo(c);
}
if (ne(options.title) !== '') {
hd = $$.dc('modal-header', c);
$('<h3></h3>').text(options.title).appendTo(hd);
}
let bdy = $$.dc('modal-body', c), ft = $$.dc('modal-footer', c);
if ((content instanceof jQuery) === true) {
bdy.append(content);
}
let close = function (be) {
if (!!be && typeof be.stopPropagation === 'function') {
be.stopPropagation();
}
dlg.removeClass('in');
if (f('closing')===true) {
options.closing.call(c);
}
bdy.hide().emptyWithEditors();
modal.remove();
if (f('close') === true) {
options.close.call(c);
}
};
if (c.find(':input[required]').length > 0) {
$$.dc('note_required', ft).append($$.sc('ind_required', '*')).append($$.s($t.t1 || 'Eingabe erforderlich'));
$$.dc('note_invalid', ft).append($$.s($t.t2 || 'Bitte überprüfen Sie Ihre Eingaben im Formular.'));
}
if (f('cancel') === true) {
let ccb = $$.bbtn(options.cancelbutton || 'Abbrechen', 'cancel').attr({ type: 'button', role: 'cancel' }).appendTo(ft);
ccb.click(function (e) {
var r = options.cancel.call(c, e);
e.stopPropagation();
close();
});
}
if (f('confirm') === true) {
let cfb = $$.bbtn(options.button || 'OK', 'confirm').attr({ type: bool(options.form, false) === true ? 'submit' : 'button', role: 'confirm' }).appendTo(ft);
if (isform === true) {
c.submit(function (e) {
try {
var r = options.confirm.call(c, e);
} finally {
e.preventDefault();
}
return false;
});
c.on('modal_submit', function () {
var r = options.confirm.call(c, e);
});
} else {
cfb.click(function (e) {
var r = options.confirm.call(c, e);
e.stopPropagation();
});
c.on('modal_submit', function () {
cfb.click()
});
}
} else if (isform === true) {
c.submit(function (e) { e.preventDefault(); return false; });
}
c.on('modal_close', function () {
close();
});
clbtn.click(close);
if (f('opening') === true) {
options.opening.call(c);
}
dlg.addClass('in');
if (ne(options.mode).indexOf('maxbody') > -1) {
bdy.css('min-height', (ct.height() - hd.outerHeight() - ft.outerHeight()).toString() + 'px');
}
if (f('open') === true) {
options.open.call(c);
}
return { hd: hd, bdy: bdy, ft: ft, ct: ct, dlg: dlg, c: c };
};
$ocms.mform = function (fields) { /* modal form */
let fb = $$.dc('form-body');
let flds = Array.isArray(fields) ? fields : (fields instanceof fields_definition ? fields.fields : []);
/* EXAMPLE !!
var flds = [
{ name: 'userinfo', label: $t.l1, type: 'string', value: $ocms.auth.login, change: $ocms.login.uichange, required: true },
{ name: 'userlogin', type: 'hidden', required: true, value: $ocms.auth.login },
{ name: 'username', type: 'string', label: $t.l4, required: true, readonly: true, placeholder: $t.l5, value: $ocms.auth.fullname_rev },
{ name: 'userpass', type: 'password', label: $t.l3, required: true, placeholder: $t.l3 },
];
*/
$.each(flds || [], function (ff, f) {
let ftyp = f.type || '';
if (ftyp === 'ignore') {
return true;
}
let fg = $$.dc('form-group', fb), id = f.id || 'dlg_' + (f.name || '') + (f.type === 'html' ? '_' + (((1 + Math.random()) * 0x10000) || 0).toString(16).substr(9) : '');
let lbl = $$.lbl(f.label || f.name, { for: id }).appendTo($$.dc('form-itm', fg));
let fi = $$.dc('form-itm', fg), inp = $$.i({ id: id, name: f.name, placeholder: f.placeholder, type: f.type });
switch (ftyp) {
case 'email':
f.pattern = ne(f.pattern, '[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$');
break;
case 'url':
f.pattern = ne(f.pattern, 'https?://.+');
break;
case 'number':
f.pattern = ne(f.pattern, '[-+]?[0-9]*[.,]?[0-9]*');
inp.attr('step', f.precision || 'any');
inp.attr('data-format', 'float');
break;
case 'integer':
case 'int':
f.pattern = ne(f.pattern, '[-+]?[0-9]*');
inp.attr('type', 'number');
inp.attr('data-format', 'integer');
break;
case 'date':
var dbp = '|([0-9]{4}.(0[1-9]|1[012]).(0[1-9]|1[0-9]|2[0-9]|3[01]))'
if (ne(f.pattern, $t.datepattern) !== '') {
f.pattern = ne(f.pattern, '(' + $t.datepattern + ')' + dbp);
}
if (ne(f.placeholder, $t.dateplaceholder) !== '') {
inp.attr('placeholder', ne(f.placeholder, $t.dateplaceholder))
}
if (typeof f.value === 'string') {
var dtv = f.value.substr(0, 10);
f.value = inp.prop('type') !== 'date' ? fdt(dtv + 'T00:00:00', ne(f.dateformat, $t.dateformat)) : dtv;
}
inp.attr('data-format', 'date:' + ne(f.dateformat, $t.dateformat) + ';yyyy-MM-dd'); /* alternative format, bc some browsers internally use english standard */
break;
case 'datetime':
var dtbp = '|([0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])\\s([0-5][0-9]):([0-5][0-9]))'
inp.attr('type', 'datetime-local');
if (ne(f.pattern, $t.datetimepattern) !== '') {
f.pattern = ne(f.pattern, '(' + $t.datetimepattern + ')' + dtbp);
}
if (ne(f.placeholder, $t.datetimeplaceholder) !== '') {
inp.attr('placeholder', ne(f.placeholder, $t.datetimeplaceholder))
}
if (typeof f.value === 'string' && f.value.substr(10, 1) === 'T') {
f.value = inp.prop('type').substr(0, 8) !== 'datetime' ? fdt(f.value, ne(f.datetimeformat, $t.datetimeformat)) : f.value;
}
inp.attr('data-format', 'datetime:' + ne(f.datetimeformat, $t.datetimeformat) + ';yyyy-MM-dd HH:mm:ss'); /* alternative format, bc some browsers internally use english standard */
break;
case 'hidden':
fg.addClass('hd');
break;
case 'html': /* dropthrough by intention */
case 'text':
inp = $$.txt({ id: id, name: f.name, placeholder: f.placeholder, type: f.type });
inp.tC('tinymce', f.type === 'html');
break;
case 'bool': /* dropthrough by intention */
case 'boolean':
f.url = [
{ value: 'true', label: ($t || {}).true || 'Yes' },
{ value: 'false', label: ($t || {}).false || 'No' }
];
if (typeof f.value === 'boolean') {
f.value = f.value ? 'true' : 'false';
} /* dropthrough by intention */
case 'select':
inp = $$.sel({ id: id, name: f.name, type: f.type });
if (bool(f.required, false) === false) {
$$.eOpt().appendTo(inp);
}
try {
var ffo = function (opt) {
if (Array.isArray(opt) === true) {
$.each(opt, function (oi, ox) {
if (typeof ox === 'string') {
$$.opt(ox, ox).appendTo(inp);
} else if (Array.isArray(ox) === true) {
$$.opt(ox[0], ox[1]).appendTo(inp);
} else if (typeof ox === 'object') {
$$.opt(ox.value, ox.label || ox.text).appendTo(inp);
}
});
}
}
if (Array.isArray(f.url) === true) {
ffo(f.url);
} else if (typeof f.url === 'function') {
f.url.call(inp);
} else if (typeof f.url === 'string') {
$ocms.postXT({
url: f.url, success: ffo
});
}
} catch (eo) {
$.noop();
}
break;
default:
if (ne(f['max-length']) !== '') { inp.attr('max-length', f['max-length']); }
}
if (ne(f.pattern) !== '') { inp.attr('pattern', f.pattern); }
inp.val(f.value).change();
inp.change(function () { $(this)[0].setCustomValidity(''); }); /* reset invalidity state on change */
inp.addClass('form-control').prop('required', bool(f.required, false)).prop('readonly', bool(f.readonly, false)).appendTo(fi); /* not too early so that inp can be replaced */
if (bool(f.required, false) === true) { lbl.append($$.sc('ind_required', '*')); }
if (typeof f.attr === 'object') { inp.attr(f.attr); }
if (typeof f.prop === 'object') { inp.prop(f.prop); }
if (typeof f.class === 'string') { inp.addClass(f.class); }
if (typeof f.change === 'function') {
inp.change(f.change);
if (bool(f.applychange, false) === true && typeof f.value !== 'undefined') {
inp.change();
}
}
if ((f.note || '') !== '') {
$$.dc('form-note', fi).rwText(f.note);
}
if (typeof f.complete === 'function') {
f.complete.call(inp);
}
});
//let tinys = fb.find('.tinymce');
//if (tinys.length > 0) {
// pa = [new Promise((resolve, reject) => {
// $ocms.initMCE(tinys);
// resolve();
// })];
// await Promise.all(pa);
//}
return fb;
};
$ocms.initMCE = function (tgt, options) {
//if ($vm.nl.option_individualized) { $vm.nl.nkit_custMCE_plugins.push('nkit_vm_variables'); }
tgt = $(tgt);
options = options || {};
try {
let sets = {
target: tgt[0],
inline: false,
width: options.width || '100%',
statusbar: false,
//valid_children: '+p[ph]',
//custom_elements: 'ph',
//extended_valid_elements: 'span[class,style,title],div[class,style,title]',
document_base_url: window.location.origin + '/',
//file_picker_callback: function (callback, value, meta) {
// if (meta.filetype === 'image') {
// $nkit.imageFilePicker(callback, value, meta);
// }
//},
content_style: 'ph:before {content: \'«\'; color: #BBB; font-style:italic; } ph:after {content: \'»\'; color: #BBB; font-style:italic; } ph { color: #AAA; font-style:italic; }',
relative_urls: false,
remove_script_host: false,
//plugins: ($nkit.nkit_custMCE_plugins || []).join(' ')
};
if (bool(options.hidemenu, false) === true) {
sets.menubar = false;
sets.menu = {};
}
if (bool(options.hidetoolbar, false) === true) {
sets.toolbar = false
}
$.extend(sets, options || {}); /* merge options into settings -> allows to overwrite these defaults */
tinymce.init(sets);
} catch (e) {
alert(e.message);
}
};
$ocms.dlgform = function (flds, options) {
options = options || {};
let gf1 = $$.dc('frm').append($ocms.mform(flds || []).addClass('stacked'));
if (options.addcontent instanceof jQuery) { gf1.append(options.addcontent); }
let cfm;
if (typeof options.submit === 'function') {
cfm = options.submit;
} else if (typeof options.success === 'function') {
cfm = function (e) {
var c = $(this).ldng(1);
var qs = $.extend({ loginaccount: $ocms.auth.account || '' }, c.serializeObject(bool(options.checkvalidity, true), { typedvalues: bool(options.typedvalues, false) }));
if ((options.url || '') !== ''){
$ocms.postXT({
url: options.url, data: qs, success: function (response) {
options.success.call(this, response);
c.trigger('modal_close');
}, error: function () {
alert($t.l17);
}, complete: function () {
c.ldng(0);
}, timeout: 60000
});
} else {
options.success.call(this, qs);
c.trigger('modal_close');
}
};
}
let opt = {
form: true, title: options.title || '', button: options.button || $t.submit, confirm: cfm, size: options.size || [500, 600], open: function () {
let c = $(this);
let tinys = c.find('.tinymce');
if (tinys.length > 0) {
$ocms.initMCE(tinys, options.tinymce || {});
}
}
};
let d = $ocms.dlg.call(this, gf1, opt);
return d;
};
$ocms.login.dlg = function (options) {
options = options || {};
let flds = [
{ name: 'userinfo', label: $t.l1, type: 'string', value: $ocms.auth.login, change: $ocms.login.uichange, required: true },
{ name: 'userlogin', type: 'hidden', required: true, value: $ocms.auth.login },
{ name: 'username', type: 'string', label: $t.l4, required: true, readonly: true, placeholder: $t.l5, value: $ocms.auth.fullname_rev },
{ name: 'userpass', type: 'password', label: $t.l3, required: true, placeholder: $t.l3 },
];
if (($ocms.auth.account || '') === '') {
flds.unshift({ id: 'dlg_loginaccount', name: 'loginaccount', type: 'string', required: true, value: $ocms.auth.account });
}
let gf1 = $$.dc('frm').append($ocms.mform(flds).addClass('stacked'));
let f_submit = function (e) {
var c = $(this).ldng(1);
var qs = $.extend({ loginaccount: $ocms.auth.account || '' }, c.serializeObject());
$ocms.postXT({
url: '/vt/login', data: qs, success: function (response) {
if (((response || {}).login || '') !== '') {
c.trigger('modal_close');
$ocms.auth = response;
/* try to resend the rejected post*/
if (typeof options.ajo === 'object') {
options.ajo.islogin === true; /* prevent loop */
$.ajax(options.ajo);
}
}
}, error: function () {
alert($t.l17);
}, complete: function () {
c.ldng(0);
}, timeout: 60000
});
};
let d = $ocms.dlg.call(this, gf1, { form: true, title: $t.l0, button: $t.submit, confirm: f_submit, size: [500, 600] });
let ah = $$.dc('modal-content').css('height', 'auto').attr('novalidate', 'true').append($$.dc('modal-header').appendIf($('<h2></h2>').text($ocms.auth.accountname), ($ocms.auth.accountname || '') !== '').append($('<h3>Vereinsmanager</h3>')));
d.dlg.prepend(ah);
};
$ocms.addNoEntryInfo = function (txt) {
$(this).append($$.dc('noentryinfo').text(txt || $t.t11));
};
})($ocms);
+8
View File
@@ -0,0 +1,8 @@
(function () {
$ocms.ocmsmenu = [
{ lbl: '', id: 'm_home', ico: 'glyphicon glyphicon-home', fnc: 'init:home' }
, { fnc: 'separator' }
//, { fnc: 'separator' }
//, { lbl: $t.m_efa, id: 'm_efa', fnc: 'init:efa' }
];
})();
+663
View File
@@ -0,0 +1,663 @@
var $$ = {
s: function (ct) { return $('<span></span>').text(ct); },
br: function () { return $('<br />'); },
sc: function (cls, ct) { return $('<span></span>').addClass(cls).text(ct); },
td: function (param1, param2) {
var td = $('<td></td>');
if ((param1 instanceof jQuery) === true) {
td.appendTo(param1);
} else if (typeof param1 === 'object') {
td.attr(param1);
} else if (typeof param1 === 'string') {
td.text(param1);
}
if (typeof param2 === 'object') {
td.attr(param2);
} else if (typeof param2 === 'string') {
td.text(param2);
}
return td;
},
th: function (param1, param2) {
var th = $('<th></th>');
if ((param1 instanceof jQuery) === true) {
th.appendTo(param1);
} else if (typeof param1 === 'object') {
th.attr(param1);
} else if (typeof param1 === 'string') {
th.text(param1);
}
if (typeof param2 === 'object') {
th.attr(param2);
} else if (typeof param2 === 'string') {
th.text(param2);
}
return th;
},
tdc: function (cls, param1, param2) { return $$.td(param1, param2).addClass(cls); },
td2: function (ct) {
var _td3 = $('<td colspan="2" />');
if ($.type(ct) === 'string') { _td3.text(ct); } else if (ct instanceof jQuery) { _td3.append(ct); } else if (typeof ct === 'function') { ct.call(_td3); } else { _td3.html('&nbsp;'); }
return _td3;
},
td3: function (ct) {
var _td3 = $('<td colspan="3" />');
if ($.type(ct) === 'string') { _td3.text(ct); } else if (ct instanceof jQuery) { _td3.append(ct); } else if (typeof ct === 'function') { ct.call(_td3); } else { _td3.html('&nbsp;'); }
return _td3;
},
tdtr: function (ct, tbl) {
var tr = $$.tr().appendTo(tbl);
if ((ct instanceof jQuery) === true || typeof ct === 'string') {
ct.appendTo($$.td().appendTo(tr));
} else if (Array.isArray(ct) === true) {
$.each(ct, function (ci, cx) {
$(cx).appendTo($$.td().appendTo(tr));
});
}
return tr;
},
tr: function (param1, param2) {
var tr = $('<tr></tr>');
if ((param1 instanceof jQuery) === true) {
tr.appendTo(param1);
} else if (typeof param1 === 'object') {
tr.attr(param1);
}
if (typeof param2 === 'object') {
tr.attr(param2);
}
return tr;
},
trc: function (cls, param1) {
var tr = $('<tr></tr>').addClass(cls);
if ((param1 instanceof jQuery) === true) {
tr.appendTo(param1);
} else if (typeof param1 === 'object') {
tr.attr(param1);
}
return tr
},
d: function (att) { return $('<div></div>').attr(att || {}); },
dc: function (cls, param1, param2, param3) {
var d = $('<div></div>').addClass(cls);
if ((param1 instanceof jQuery) === true) {
d.appendTo(param1);
} else if (typeof param1 === 'object') {
d.attr(param1);
} else if (typeof param1 === 'function') {
d.click(param1);
} else if (typeof param1 === 'string') {
d.text(param1);
}
if (typeof param2 === 'string') {
d.text(param2);
} else if (typeof param2 === 'object') {
d.attr(param2);
} else if (typeof param2 === 'function') {
d.click(param2);
}
if (typeof param3 === 'string') {
d.text(param3);
} else if (typeof param3 === 'object') {
d.attr(param3);
} else if (typeof param3 === 'function') {
d.click(param3);
}
return d;
},
df: function (att) { return $('<div>&nbsp;</div>').attr(att || {}); },
opt: function (param1, param2, param3) {
var d = $('<option></option>');
if (typeof param1 === 'string') {
d.attr('value', param1);
} else if (typeof param1 === 'object') {
d.attr(param1);
}
if (typeof param2 === 'string') {
d.text(param2);
} else if (typeof param2 === 'object') {
d.attr(param2);
}
if (typeof param3 === 'object') {
d.attr(param3);
}
return d;
},
eOpt: function (selected) {
var _eOpt = $('<option value="">&nbsp;</option>');
if (selected || false) { _eOpt.attr('selected', 'selected'); }
return _eOpt;
},
tbl: function (att) { return $('<table></table>').attr(att || {}); },
tblc: function (cls) { return $('<table></table>').addClass(cls); },
thead: function (tbl) { let h = $('<thead></thead>'); if (tbl instanceof jQuery) { h.prependTo(tbl); } return h; },
tbody: function (tbl) { let b = $('<tbody></tbody>'); if (tbl instanceof jQuery) { b.appendTo(tbl); } return b; },
tblset: function (att, parent) {
let b = $$.tbl(att || {});
if (parent instanceof jQuery) {
parent.append(b);
}
return { tbl: b, hd: $$.thead().appendTo(b), bdy: $$.tbody().appendTo(b) };
},
i: function (att) { return $('<input />').attr(att || {}); },
img: function (src, att) { return $('<img />').attr('src', src).attr(att || {}); },
sel: function (att) { return $('<select></select>').attr(att || {}); },
btn: function (att) { return $('<button></button>').attr(att || {}); },
a: function (att) { return $('<a></a>').attr(att || {}); },
li: function (att) { return $('<li></li>').attr(att || {}); },
ul: function (att) { return $('<ul></ul>').attr(att || {}); },
nav: function (att) { return $('<nav></nav>').attr(att || {}); },
lbl: function (ct, att) {
var l = $('<label></label>');
if (typeof ct === 'string') {
l.text(ct);
}
if (typeof ct === 'object') {
l.attr(ct);
} else if (typeof att === 'object') {
l.attr(att);
}
return l;
},
txt: function (att) { return $('<textarea></textarea>').attr(att || {}); },
0: function (tag, att) { return $('<' + tag + '></' + tag + '>').attr(att || {}); },
/* bootstrap */
bbtn: function (txt, cls) { return $$.btn({ type: 'button', class: 'btn' }).addClass(cls).text(txt); },
svg: (tag) => {
return $(document.createElementNS('http://www.w3.org/2000/svg', tag));
}
};
String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, ''); };
String.prototype.left = function (n) {
if ($.type(n) === 'string') {
var i = this.indexOf(n);
if (i > 0)
return this.slice(0, i);
else
return "";
} else {
return this.substring(0, n);
}
};
String.prototype.right = function (n) {
if ($.type(n) === 'string') {
var i = this.indexOf(n);
if (i > 0)
return this.substring(this.length - i);
else
return "";
} else {
return this.substring(this.length - n);
}
};
Array.prototype.move = function (old_index, new_index) {
if (new_index >= this.length) {
var k = new_index - this.length;
while ((k--) + 1) {
this.push(undefined);
}
}
this.splice(new_index, 0, this.splice(old_index, 1)[0]);
return this; // for testing purposes
};
function getMonday(d) {
d = new Date(d);
var day = d.getDay(),
diff = d.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
return new Date(d.setDate(diff));
}
(function ($) {
$.fn.appendToIf = function (target, condition) {
var t = $(this), c = (typeof condition === 'function' ? condition(t) : condition);
if ((typeof c === 'boolean' ? c : true) === true) {
t.appendTo(target);
}
return t;
};
$.fn.appendIf = function (content, condition) {
var t = $(this), c = (typeof condition === 'function' ? condition(t) : condition);
if ((typeof c === 'boolean' ? c : true) === true) {
t.append(content);
}
return t;
};
$.fn.rwText = function (text, addtitle, options) {
var tgt = $(this).empty();
options = $.extend({ wrap: true }, options);
var sa = Array.isArray(text) === true ? text : (text || '').split('\n');
$.each(sa, function (ti, tx) {
if ((tx || '') !== '') {
if (ti > 0) {
tgt.append($$.br());
}
tgt.append(options.wrap === true ? $$.s(tx) : tx);
}
});
if (addtitle || false) { tgt.attr('title', addtitle); }
return tgt;
};
$.fn.loadSel = function (url, data, complete) {
if ($(this).prop('tagName').toUpperCase() === 'SELECT') {
var sel = $(this);
$ocms.postXT.call(this, {
url: url, data: data || {}, success: function (response) {
$.each(response, function () {
sel.append($$.opt(response.value, response.text));
});
}, complete: function () {
sel.ldng(0);
if (typeof complete === 'function') {
complete.call(sel);
}
}
});
}
};
$.fn.emptyWithEditors = function (parent) {
var t = $(this);
t.find(':input.tinymce').each(function (ei, ex) {
try {
var te = tinymce.get($(ex).attr('id'));
if (te) { te.remove(); }
} catch (ee) {
$.noop();
}
});
return t.empty();
};
$.fn.cssValue = function (styleName) {
if (this.length > 0) {
var cv = this.css(styleName) || '';
if (cv === '') {
return 0;
} else {
var v, r = (/(^[\d\.]*)(\D{1,3}$)/ig).exec(cv);
if (r !== null) {
switch (r[2]) {
case 'rem':
return $ocms.rpx(parseFloat(r[1]));
default:
return parseFloat(r[1]);
}
} else if (isNaN(cv) === false) {
return parseFloat(cv)
} else { return 0; }
}
} else { return 0; }
};
/* @description: gets very inner height excluding borders and padding */
$.fn.veryInnerHeight = function () {
let c = (p) => $(this).cssValue(p);
return ($(this).innerHeight() - c('padding-top') - c('padding-bottom'));
};
/* @description: gets very inner width excluding borders and padding */
$.fn.veryInnerWidth = function () {
let c = (p) => $(this).cssValue(p);
return ($(this).innerWidth() - c('padding-left') - c('padding-right'));
};
$.fn.marginWidth = function() {
let c = (p) => $(this).cssValue(p);
return (c('margin-left') + c('margin-right'));
};
$.fn.marginHeight = function () {
let c = (p) => $(this).cssValue(p);
return (c('margin-top') + c('margin-bottom'));
};
$.inArrayRegEx = function (search, array, start) {
var regex = (($.type(search) === 'regexp') ? search : (new RegExp(search)));
if (!array) return -1;
start = start || 0;
for (var i = start; i < array.length; i++) {
if (regex.test(array[i])) {
return i;
}
}
return -1;
};
/* @Desciption: Programmatically Lighten or Darken a hex color (or rgb, and blend colors)
* @author: Pimp Trizkit
* @source: internet http://stackoverflow.com/a/13542669
*
* usage:
* var color1 = "#FF343B";
* var color2 = "#343BFF";
* var color3 = "rgb(234,47,120)";
* var color4 = "rgb(120,99,248)";
* var shadedcolor1 = shadeBlend(0.75,color1);
* var shadedcolor3 = shadeBlend(-0.5,color3);
* var blendedcolor1 = shadeBlend(0.333,color1,color2);
* var blendedcolor34 = shadeBlend(-0.8,color3,color4); // Same as using 0.8
*/
$.shadeBlend = function (p, c0, c1) {
var n = p < 0 ? p * -1 : p, u = Math.round, w = parseInt;
var f, t;
if (c0.length > 7) {
f = c0.split(',');
t = (c1 ? c1 : p < 0 ? 'rgb(0,0,0)' : 'rgb(255,255,255)').split(',');
var R = w(f[0].slice(4)), G = w(f[1]), B = w(f[2]);
return 'rgb(' + (u((w(t[0].slice(4)) - R) * n) + R) + ',' + (u((w(t[1]) - G) * n) + G) + ',' + (u((w(t[2]) - B) * n) + B) + ')';
} else {
f = w(c0.slice(1), 16);
t = w((c1 ? c1 : p < 0 ? '#000000' : '#FFFFFF').slice(1), 16);
var R1 = f >> 16, G1 = f >> 8 & 0x00FF, B1 = f & 0x0000FF;
return '#' + (0x1000000 + (u(((t >> 16) - R1) * n) + R1) * 0x10000 + (u(((t >> 8 & 0x00FF) - G1) * n) + G1) * 0x100 + (u(((t & 0x0000FF) - B1) * n) + B1)).toString(16).slice(1);
}
};
$.fn.IN = function (complete) {
$(this).fadeIn(400, complete);
return $(this);
};
$.fn.OUT = function (complete) {
$(this).fadeOut(400, complete);
return $(this);
};
$.fn.tooltip = function (mouse, tree) {
var target = (typeof mouse === 'boolean' ? mouse : false) === true ? 'mouse' : false;
var cascade = typeof tree === 'boolean' ? tree : false;
var t = $(this);
t.each(function () {
var elem = cascade ? $(this).find('.tooltiptext') : $(this).children('.tooltiptext');
if ($(elem).length > 0) {
elem.each(function () {
var e = $(this), p = $(this).filter(':not(:empty)').parent();
p.qtip({
suppress: false,
content: {
text: e.clone()
},
position: {
target: target,
adjust: { x: 2, y: 2 },
viewport: true
},
events: {
hidden: $ocms.tooltip_hidden
}, show: { effect: false }, hide: { effect: false }
});
e.remove()
});
} else {
$(this).qtip({
position: {
target: target,
adjust: { x: 2, y: 2 },
viewport: true
},
events: {
hidden: $ocms.tooltip_hidden
}, effect: false
});
}
});
return t;
};
$.fn.rC = function (arg) {
return $(this).removeClass(arg);
};
$.fn.aC = function (arg) {
return $(this).addClass(arg);
};
$.fn.tC = function (arg, state) {
return $(this).toggleClass(arg, state);
};
})(jQuery);
function $lf(vis) {
var ts = typeof vis === 'undefined' ? null : ((typeof vis === 'number' && vis !== 1) || (typeof cl === 'boolean' && vis === false));
return $('#listframe').tC('hd', ts).is('.hd');
};
function $nuf(e) {
if (e) { e.stopPropagation(); }
if ($(this).is('.disabled')) {
return;
}
/* close any nav */
var f = function (nav) { nav.removeClass('vis').find('li.dropdown').removeClass('open').removeClass('vis').attr('aria-expanded', 'false'); }
var p = $(this).parent('li.dropdown');
if (p.length > 0) {
p.tC('open'), navs = p.is('.open') === true ? 'true' : 'false';
p.attr('aria-expanded', navs);
/* close any other branch */
var thisnav = p.closest('nav');
thisnav.find('li.dropdown').not(p.parentsUntil('nav')).not(p).removeClass('open').attr('aria-expanded', 'false');
if (p.is('.open') === false) {
p.find('li.dropdown').removeClass('open').attr('aria-expanded', 'false');
}
f($('nav').not(thisnav));
} else {
f($('nav'));
}
};
function $tbr() {
$lf(0);
return $('#topbar').ocmsmenu([]);
};
//function $sbr(empty) {
// return $('#sidebar').ocmsmenu([], empty);
//};
function $lfr() {
$('#sidebar').empty();
return $('#listframe').removeClass('fix').addClass('hd').empty();
};
function $cfr() {
$tbr();
return $('#contentframe').empty();
};
function jObj(jsstr, key) {
let jo = {};
if ((jsstr || '').substr(0, 1) === '{') {
try {
jo = JSON.parse(jsstr);
} catch (e) {
jo = {};
}
}
return jo[key] || '';
};
(function ($) {
$.fn.ocmsmenu = function (menu, empty) {
var tgt = $(this);
$ocms.menu.call(tgt, menu, empty);
return tgt;
};
$.fn.activatemenu = function () {
var tgt = $(this).filter('nav');
tgt.find('a').not('.on').addClass('on').click($nuf);
tgt.find('.nav-btn').not('.on').addClass('on').click(function (e) {
e.stopPropagation();
var t = $(this); $(t.attr('data-target')).tC(t.attr('data-toggle'));
});
return tgt;
};
})(jQuery);
function string(inp, vals) {
var ret = inp || '', rx;
$.each(vals || [], function (vi, vx) {
rx = new RegExp('\\{' + vi.toString() + '\\}', 'ig');
ret = ret.replace(rx, vx);
});
return ret;
};
function init_tooltip(mouse) {
var target = (typeof mouse === 'boolean' ? mouse : false) === true ? 'mouse' : false;
$('[title]').qtip({
position: {
target: target,
adjust: { x: 2, y: 2 },
viewport: true
},
events: {
hidden: $ocms.tooltip_hidden
}, effect: false
});
$('div.tooltiptext').each(function () {
var p = $(this).filter(':not(:empty)').parent();
p.qtip({
suppress: false,
content: {
text: $(this).clone()
},
position: {
target: target,
adjust: { x: 2, y: 2 },
viewport: true
},
events: {
hidden: $ocms.tooltip_hidden
}
});
});
}
class ObjectArray extends Array {
/**
* Get whether the Array is empty
* */
isEmpty() {
return this[0].length === 0;
}
// built-in methods will use this as the constructor
static get [Symbol.species]() {
return Array;
}
/**
* returns a new new array of items where function applied to currentvalue returns true
* @param {function(currentValue[, index[, array]])} fnc
*/
filter(fnc) {
if (typeof fnc === 'function') {
return new ObjectArray(this[0].filter(fnc));
} else {
return this;
}
}
/**
* removes items where function applied to currentvalue is true
* changes the ObjectArray itself and returns it
* @param {function(currentValue[, index[, array]])} fnc
*/
remove(fnc) {
if (typeof fnc === 'function') {
let i = this[0].findIndex(fnc);
while (i > -1) {
this[0].splice(i);
i = this[0].findIndex(fnc);
};
} else {
return this;
}
}
/**
* sorts the ObjectArray using the Array.sort function and returns it
* @param {function(element)} fnc
*/
sortBy(fnc) {
if (typeof fnc === 'function') {
this[0].sort(fnc);
}
return this;
}
/**
* sorts the ObjectArray using the Array.sort function and String.localeCompare function and returns it
* The compared strings are converted to upper case to make function case-insensitive
* undefined values are treated as empty strings
* @param {string} property
*/
sortString(property) {
this[0].sort((a, b) => {
let nameA = (a[property] || '').toString().toUpperCase(); // ignore upper and lowercase
let nameB = (b[property] || '').toString().toUpperCase(); // ignore upper and lowercase
console.debug(nameA.localeCompare(nameB));
return nameA.localeCompare(nameB);
});
return this;
}
/**
* sorts the ObjectArray using the Array.sort function and value comparison and returns it
* empty or non-numeric values are identified by isNaN and put to End of array
* @param {string} property
*/
sortNum(property) {
this[0].sort((a, b) => {
let nameA = a[property], nameB = b[property];
if ((isNaN(nameB) === true && isNaN(nameA) === false) || nameA < nameB) {
return -1;
} else if ((isNaN(nameB) === false && isNaN(nameA) === true) || nameA > nameB) {
return 1;
} else {
// names must be equal
return 0;
}
});
return this;
}
/**
* sums the value of the objects parameter, if value is valid number
* @param {string} property
*/
sum(property) {
return this[0].reduce((accumulator, currentValue) => accumulator + (isNaN(currentValue[property]) === true ? 0 : currentValue[property]), 0)
}
/**
* returns new object with array by named property value
* @param {string} property
*/
groupBy(property) {
return this[0].reduce(function (acc, obj) {
let key = obj[property];
if (!acc[key]) {
acc[key] = [];
}
acc[key].push(obj);
return acc;
}, {});
}
/**
*
* @param {function(value, index, array)} fnc
*/
each(fnc) {
if (typeof fnc === 'function') {
let stop = false;
this[0].forEach((value, index, array) =>{
if (stop === false) {
let r = fnc(value, index, array);
if (typeof r === 'boolean' && r === false) {
stop = true;
}
}
});
}
}
get toArray() {
return this[0];
}
}
class NumArray extends Array {
sum() {
return this.reduce((accumulator, currentValue) => accumulator + currentValue);
};
first() {
return this[0];
};
last() {
return this[this.length - 1];
};
average() {
return this.sum() / this.length;
};
range() {
let self = this.map(x => x).sort(); /* do not change original */
return {
min: self[0],
max: self[this.length - 1]
}
};
// built-in methods will use this as the constructor
static get [Symbol.species]() {
return Array;
}
}

Some files were not shown because too many files have changed in this diff Show More