Fejl rettet
Print fejl i kr er rettet. Gavekort knap fjernet
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using EpsonPrinter.Model;
|
||||
@@ -53,7 +54,7 @@ namespace EpsonPrinter.Services
|
||||
}
|
||||
|
||||
PrintString printString = new PrintString();
|
||||
string totalPricePrint = printString.MakePrintString(printWidth, $"Total: ", $"{model.TotalPrice:F} DKK");
|
||||
string totalPricePrint = printString.MakePrintString(printWidth, $"Total: ", FormatCurrency(model.TotalPrice));
|
||||
byte[][] totalPrice =
|
||||
{
|
||||
_e.FeedLines(1),
|
||||
@@ -94,22 +95,26 @@ namespace EpsonPrinter.Services
|
||||
|
||||
private string MakeProductNumber(int noOfProduct, decimal price)
|
||||
{
|
||||
return $"{noOfProduct} á {price:F} DKK :";
|
||||
return $"{noOfProduct} á {FormatCurrency(price)} :";
|
||||
}
|
||||
|
||||
private string MakeTotalProductPrice(string buffer, decimal totalPrice, int printWidth)
|
||||
{
|
||||
PrintString printString = new PrintString();
|
||||
string p = $"{totalPrice:F} DKK";
|
||||
string p = FormatCurrency(totalPrice);
|
||||
string makePrintString = printString.MakePrintString(printWidth, buffer, p);
|
||||
return makePrintString;
|
||||
}
|
||||
|
||||
private static string FormatCurrency(decimal amount)
|
||||
{
|
||||
return amount.ToString("0.00", CultureInfo.GetCultureInfo("da-DK")) + " DKK";
|
||||
}
|
||||
private string MakeVat(int printWidth, decimal vat)
|
||||
{
|
||||
PrintString printString = new PrintString();
|
||||
string vatDesc = $"Moms udgør 25% :";
|
||||
string v = $"{vat:F} DKK";
|
||||
string v = FormatCurrency(vat);
|
||||
string vatString = printString.MakePrintString(printWidth, vatDesc, v);
|
||||
return vatString;
|
||||
}
|
||||
|
||||
13
PointOfSale/EpsonPrinterLinux/dotnet-tools.json
Normal file
13
PointOfSale/EpsonPrinterLinux/dotnet-tools.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "10.0.10",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@
|
||||
<Button Name="BtnCash" Content="Kontant" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="10,0,10,0" Margin="10,0,0,0" Click="Payment_Click" Tag="PaymentMethod.Cash"/>
|
||||
<Button Name="BtnCard" Content="Kort" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="10,0,10,0" Margin="10,0,0,0" Click="Payment_Click" Tag="PaymentMethod.Card"/>
|
||||
<Button Name="BtnMb" Content="MobilePay" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="10,0,10,0" Margin="10,0,0,0" Click="Payment_Click" Tag="PaymentMethod.MobilePay"/>
|
||||
<Button Name="BtnBuyGiftCard" Content="Gavekort" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="10,0,10,0" Margin="10,0,0,0" Click="Payment_Click" Tag="PaymentMethod.GiftCard"/>
|
||||
<!--<Button Name="BtnBuyGiftCard" Content="Gavekort" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Padding="10,0,10,0" Margin="10,0,0,0" Click="Payment_Click" Tag="PaymentMethod.GiftCard"/>-->
|
||||
</WrapPanel>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"PrintWidth": 48
|
||||
},
|
||||
"API": {
|
||||
"Url": "https://localhost:44334"
|
||||
"Url": "http://192.168.1.75:5000"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user