Move logic out the the class libs
This commit is contained in:
15
PointOfSale/Pos.Models/AmountGridModel.cs
Normal file
15
PointOfSale/Pos.Models/AmountGridModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class AmountGridModel
|
||||
{
|
||||
public string PaymentMethodText { get; set; } = string.Empty;
|
||||
public decimal Amount { get; set; }
|
||||
public string AmountText { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
9
PointOfSale/Pos.Models/Enums.cs
Normal file
9
PointOfSale/Pos.Models/Enums.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Pos.Models;
|
||||
|
||||
public enum PaymentMethod
|
||||
{
|
||||
Cash,
|
||||
Card,
|
||||
GiftCard,
|
||||
MobilePay
|
||||
}
|
||||
18
PointOfSale/Pos.Models/Json/BodyModel.cs
Normal file
18
PointOfSale/Pos.Models/Json/BodyModel.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class BodyModel
|
||||
{
|
||||
public ProductModel[] products { get; set; } = Array.Empty<ProductModel>();
|
||||
public float totalPrice { get; set; }
|
||||
public float totalVat { get; set; }
|
||||
public int receiptNumber { get; set; }
|
||||
public string receiptTime { get; set; } = string.Empty;
|
||||
public string staff { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
16
PointOfSale/Pos.Models/Json/FooterModel.cs
Normal file
16
PointOfSale/Pos.Models/Json/FooterModel.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class FooterModel
|
||||
{
|
||||
public string value { get; set; } = string.Empty;
|
||||
public PrintStylesModel printStyles { get; set; } = new();
|
||||
public int textAlignment { get; set; }
|
||||
public int feedingLines { get; set; }
|
||||
}
|
||||
}
|
||||
16
PointOfSale/Pos.Models/Json/HeaderModel.cs
Normal file
16
PointOfSale/Pos.Models/Json/HeaderModel.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class HeaderModel
|
||||
{
|
||||
public string value { get; set; } = string.Empty;
|
||||
public PrintStylesModel printStyles { get; set; } = new();
|
||||
public int textAlignment { get; set; }
|
||||
public int feedingLines { get; set; }
|
||||
}
|
||||
}
|
||||
16
PointOfSale/Pos.Models/Json/PosReceipt.cs
Normal file
16
PointOfSale/Pos.Models/Json/PosReceipt.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class PosReceipt
|
||||
{
|
||||
public string logoBase64 { get; set; } = string.Empty;
|
||||
public HeaderModel[] header { get; set; } = Array.Empty<HeaderModel>();
|
||||
public BodyModel bodyModel { get; set; } = new();
|
||||
public FooterModel[] footer { get; set; } = Array.Empty<FooterModel>();
|
||||
}
|
||||
}
|
||||
17
PointOfSale/Pos.Models/Json/PrintStylesModel.cs
Normal file
17
PointOfSale/Pos.Models/Json/PrintStylesModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class PrintStylesModel
|
||||
{
|
||||
public bool fontB { get; set; }
|
||||
public bool bold { get; set; }
|
||||
public bool doubleHeight { get; set; }
|
||||
public bool doubleWidth { get; set; }
|
||||
public bool underline { get; set; }
|
||||
}
|
||||
}
|
||||
16
PointOfSale/Pos.Models/Json/ProductModel.cs
Normal file
16
PointOfSale/Pos.Models/Json/ProductModel.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class ProductModel
|
||||
{
|
||||
public string product { get; set; } = string.Empty;
|
||||
public string noOfProduct { get; set; } = string.Empty;
|
||||
public float price { get; set; }
|
||||
public float totalPrice { get; set; }
|
||||
}
|
||||
}
|
||||
19
PointOfSale/Pos.Models/Json/SaleOfDayModel.cs
Normal file
19
PointOfSale/Pos.Models/Json/SaleOfDayModel.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Pos.Json
|
||||
{
|
||||
public class SaleOfDayModel
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public int TotalCustomers { get; set; }
|
||||
public decimal TotalSale { get; set; }
|
||||
public List<SaleOfDayDetail> SaleOfDayDetail { get; set; } = new List<SaleOfDayDetail>();
|
||||
}
|
||||
|
||||
public class SaleOfDayDetail
|
||||
{
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public decimal TotalSale { get; set; }
|
||||
}
|
||||
}
|
||||
17
PointOfSale/Pos.Models/PriceLineModel.cs
Normal file
17
PointOfSale/Pos.Models/PriceLineModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class PriceLineModel
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public int NumberProducts { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Id { get; set; }
|
||||
public bool IsProductGroup { get; set; }
|
||||
}
|
||||
}
|
||||
15
PointOfSale/Pos.Models/SaleGridInternalModel.cs
Normal file
15
PointOfSale/Pos.Models/SaleGridInternalModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class SaleGridInternalModel
|
||||
{
|
||||
public decimal InternPrice { get; set; }
|
||||
public int InternPieces { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
17
PointOfSale/Pos.Models/SaleGridModel.cs
Normal file
17
PointOfSale/Pos.Models/SaleGridModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class SaleGridModel
|
||||
{
|
||||
public string Navn { get; set; } = string.Empty;
|
||||
public string Stk { get; set; } = string.Empty;
|
||||
public string Pris { get; set; } = string.Empty;
|
||||
public string Total { get; set; } = string.Empty;
|
||||
public SaleGridInternalModel SaleGridInternalModel { get; set; } = new();
|
||||
}
|
||||
}
|
||||
15
PointOfSale/Pos.Models/TotalSaleCategory.cs
Normal file
15
PointOfSale/Pos.Models/TotalSaleCategory.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class TotalSaleCategory
|
||||
{
|
||||
public string Category { get; set; } = string.Empty;
|
||||
public decimal Sale { get; set; }
|
||||
public string SaleString { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
15
PointOfSale/Pos.Models/TotalSaleDetail.cs
Normal file
15
PointOfSale/Pos.Models/TotalSaleDetail.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Pos.Models
|
||||
{
|
||||
public class TotalSaleDetail
|
||||
{
|
||||
public decimal TotalSale { get; set; }
|
||||
public int TotalCustomer { get; set; }
|
||||
public List<TotalSaleCategory> TotalSaleCategories { get; set; } = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user