Skip to content

Commit

Permalink
Merge pull request #184 from erpnet/Add-Daisy-SubTotalAmountModifiers
Browse files Browse the repository at this point in the history
v1.1.0.1111
  • Loading branch information
o-ivanov committed Feb 2, 2024
2 parents 42d083d + ba5cb40 commit 5d520ea
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 6,605 deletions.
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<NullableContextOptions>enable</NullableContextOptions>
<NullableReferenceTypes>true</NullableReferenceTypes>
Expand All @@ -13,9 +13,9 @@
<Authors>ErpNet and Contributors</Authors>
<PackageLicenseFile>$(SolutionDir)LICENSE.txt</PackageLicenseFile>
<Copyright>(c) ErpNet and Contributors</Copyright>
<AssemblyVersion>1.1.0.721</AssemblyVersion>
<FileVersion>1.1.0.721</FileVersion>
<Version>1.1.0.721</Version>
<AssemblyVersion>1.1.0.1110</AssemblyVersion>
<FileVersion>1.1.0.1110</FileVersion>
<Version>1.1.0.1110</Version>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ protected const byte
return Request(DaisyCommandFiscalReceiptSaleDepartment, itemData.ToString());
}

public override (string, DeviceStatus) SubtotalChangeAmount(Decimal amount)
{
return Request(CommandSubtotal, $"10${amount.ToString("F2", CultureInfo.InvariantCulture)}");
}

public override (string, DeviceStatus) AbortReceipt()
{
return Request(DaisyCommandAbortFiscalReceipt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class BgDaisyIslFiscalPrinterDriver : FiscalPrinterDriver
var (TaxIdentificationNumber, _) = fiscalPrinter.GetTaxIdentificationNumber();
fiscalPrinter.Info.TaxIdentificationNumber = TaxIdentificationNumber;
fiscalPrinter.Info.SupportedPaymentTypes = fiscalPrinter.GetSupportedPaymentTypes();
fiscalPrinter.Info.SupportsSubTotalAmountModifiers = false;
fiscalPrinter.Info.SupportsSubTotalAmountModifiers = true;
serviceOptions.ReconfigurePrinterConstants(fiscalPrinter.Info);
return fiscalPrinter;
}
Expand Down
12 changes: 6 additions & 6 deletions ErpNet.FP.Core/ErpNet.FP.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>ErpNet.FP.Core</RootNamespace>
<AssemblyName>ErpNet.FP.Core</AssemblyName>
</PropertyGroup>
Expand All @@ -11,11 +11,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="System.IO.Ports" Version="7.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="System.IO.Ports" Version="8.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
</ItemGroup>

<ProjectExtensions><VisualStudio><UserProperties BuildVersion_StartDate="2000/1/1" /></VisualStudio></ProjectExtensions>
Expand Down
18 changes: 9 additions & 9 deletions ErpNet.FP.Server/ErpNet.FP.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>ErpNet.FP.Server</AssemblyName>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<ApplicationIcon>ErpNet.FP.ico</ApplicationIcon>
</PropertyGroup>

Expand Down Expand Up @@ -39,14 +39,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="7.0.0" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.0" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>

Expand Down
71 changes: 32 additions & 39 deletions ErpNet.FP.Setup/ErpNet.FP.Setup.wixproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="wixtoolset.sdk/4.0.3">
<ItemGroup>
<ProjectReference Include="..\ErpNet.FP.Server\ErpNet.FP.Server.csproj" HarvestOutputGroups="BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WixToolset.Heat" Version="4.0.3" />
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.3" />
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.3" />
</ItemGroup>
<PropertyGroup>
<DefineSolutionProperties>false</DefineSolutionProperties>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>6c8ef156-4fd1-46d5-92e9-a2f45516044e</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>ErpNet.FP.Setup</OutputName>
<OutputType>Package</OutputType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup>
<DefineConstants>OUTPUT=$(ProjectDir)..\Published\win-x86;Version=$(Version);WixHeatBinDir=$(WixHeatBinDir);</DefineConstants>
<OutputPath>$(ProjectDir)..\Output\</OutputPath>
<CompilerAdditionalOptions>-ext WixToolset.UI.wixext -ext WixToolset.Util.wixext</CompilerAdditionalOptions>
</PropertyGroup>
<PropertyGroup>
<Cultures>en-US;bg-BG</Cultures>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>$(ProjectDir)..\Output\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;OUTPUT=$(ProjectDir)..\Published\win-x86</DefineConstants>
<DefineConstants>OUTPUT=..\Published\win-x86;Version=$(Version)</DefineConstants>
<SuppressPdbOutput>True</SuppressPdbOutput>
<SuppressAllWarnings>False</SuppressAllWarnings>
<Pedantic>True</Pedantic>
<VerboseOutput>True</VerboseOutput>
<CompilerAdditionalOptions>-ext WixToolset.UI.wixext -ext WixToolset.Util.wixext</CompilerAdditionalOptions>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>$(ProjectDir)..\Output\</OutputPath>
<DefineConstants>OUTPUT=$(ProjectDir)..\Published\win-x86</DefineConstants>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>OUTPUT=..\Published\win-x86;Version=$(Version)</DefineConstants>
<CompilerAdditionalOptions>-ext WixToolset.UI.wixext -ext WixToolset.Util.wixext</CompilerAdditionalOptions>
</PropertyGroup>
<ItemGroup>
<Compile Include="Product.wxs" />
Expand All @@ -34,29 +40,16 @@
<Content Include="LICENSE.rtf" />
<Content Include="RemoveExeAndPdbTransform.xslt" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixToolPath)WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
</WixExtension>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixToolPath)WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
</ItemGroup>
<PropertyGroup>
<WixToolPath>$(Wix)bin\</WixToolPath>
<WixTargetsPath>Wix.targets</WixTargetsPath>
<WixTasksPath>$(WixToolPath)wixtasks.dll</WixTasksPath>
<InstallerPlatform>$(Platform)</InstallerPlatform>
<Platform>$(Platform)</Platform>
<OutputType>Package</OutputType>
<PreBuildEvent>$(USERPROFILE)\.nuget\packages\wixtoolset.heat\4.0.3\tools\net472\x86\heat.exe dir ..\Published\win-x86 -cg ProductFilesComponentGroup -dr INSTALLFOLDER -scom -sreg -srd -var var.OUTPUT -nologo -ag -nologo -t ..\ErpNet.FP.Setup\RemoveExeAndPdbTransform.xslt -out ..\ErpNet.FP.Setup\ProductInstallFiles.wxs</PreBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<CompilerAdditionalOptions>-ext WixToolset.UI.wixext -ext WixToolset.Util.wixext</CompilerAdditionalOptions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<CompilerAdditionalOptions>-ext WixToolset.UI.wixext -ext WixToolset.Util.wixext</CompilerAdditionalOptions>
</PropertyGroup>
<Import Project="$(WixTargetsPath)" />
<PropertyGroup>
<InstallerPlatform>$(Platform)</InstallerPlatform>
<Platform>$(Platform)</Platform>
</PropertyGroup>
<Target Name="BeforeBuild">
<Exec Command='"$(WIX)bin\heat.exe" dir "$(ProjectDir)..\Published\win-$(Platform)" -cg ProductFilesComponentGroup -dr INSTALLFOLDER -scom -sreg -srd -var var.OUTPUT -nologo -ag -nologo -t "$(ProjectDir)RemoveExeAndPdbTransform.xslt" -out "$(ProjectDir)ProductInstallFiles.wxs"'/>
</Target>
<Target Name="AfterBuild">
</Target>
</Project>
Loading

0 comments on commit 5d520ea

Please sign in to comment.