From 7adc5b2b4983b5e00cdd30b91ca88cc7b0d0055b Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Tue, 4 Jul 2023 14:38:12 +0200 Subject: [PATCH] Added information on SAS for sales lines --- .../Components/ReportVisitComponent.razor | 2 + .../CustomerActivityViewOverlay.razor | 2 + .../CustomerInvoiceViewOverlay.razor | 2 + .../OfficeCustomerActivityViewOverlay.razor | 2 + .../OfficeCustomerInvoiceViewOverlay.razor | 2 + .../Pages/AdvisorActivityCreatePage.razor.cs | 4 ++ Wonky.Client/Pages/Login.razor | 4 +- Wonky.Client/Pages/OfficeOrderViewPage.razor | 2 + .../Pages/SystemUserCreatePage.razor.cs | 8 +-- Wonky.Client/wwwroot/appsettings.json | 2 +- Wonky.Entity/DTO/ActivityLineDto.cs | 66 +++++++++---------- Wonky.Entity/Views/InvoiceLineView.cs | 7 +- .../Views/ProductInventoryItemView.cs | 1 - Wonky.Entity/Views/ReportItemCustomer.cs | 56 +++++++++------- Wonky.Entity/Views/ReportItemLine.cs | 45 ++++++++----- 15 files changed, 119 insertions(+), 86 deletions(-) diff --git a/Wonky.Client/Components/ReportVisitComponent.razor b/Wonky.Client/Components/ReportVisitComponent.razor index ff359a68..46b2b3f1 100644 --- a/Wonky.Client/Components/ReportVisitComponent.razor +++ b/Wonky.Client/Components/ReportVisitComponent.razor @@ -104,6 +104,7 @@ Pris R% Beløb + SAS @@ -117,6 +118,7 @@ @($"{line.Price:N2}") @($"{line.Discount:N2}") @($"{line.LineSum:N2}") + } diff --git a/Wonky.Client/OverlayCustomer/CustomerActivityViewOverlay.razor b/Wonky.Client/OverlayCustomer/CustomerActivityViewOverlay.razor index a82e476c..b8a9f673 100644 --- a/Wonky.Client/OverlayCustomer/CustomerActivityViewOverlay.razor +++ b/Wonky.Client/OverlayCustomer/CustomerActivityViewOverlay.razor @@ -84,6 +84,7 @@ Antal Pris Rabat + SAS @@ -95,6 +96,7 @@ @line.Quantity @line.Price @line.Discount + } diff --git a/Wonky.Client/OverlayCustomer/CustomerInvoiceViewOverlay.razor b/Wonky.Client/OverlayCustomer/CustomerInvoiceViewOverlay.razor index a3364efd..430986da 100644 --- a/Wonky.Client/OverlayCustomer/CustomerInvoiceViewOverlay.razor +++ b/Wonky.Client/OverlayCustomer/CustomerInvoiceViewOverlay.razor @@ -72,6 +72,7 @@ Antal Pris Rabat + SAS @@ -83,6 +84,7 @@ @line.Qty @line.Price @line.Discount + } diff --git a/Wonky.Client/OverlayOffice/OfficeCustomerActivityViewOverlay.razor b/Wonky.Client/OverlayOffice/OfficeCustomerActivityViewOverlay.razor index ef269d5e..5dbbe123 100644 --- a/Wonky.Client/OverlayOffice/OfficeCustomerActivityViewOverlay.razor +++ b/Wonky.Client/OverlayOffice/OfficeCustomerActivityViewOverlay.razor @@ -80,6 +80,7 @@ Antal Pris Rabat + SAS @@ -91,6 +92,7 @@ @line.Quantity @line.Price @line.Discount + } diff --git a/Wonky.Client/OverlayOffice/OfficeCustomerInvoiceViewOverlay.razor b/Wonky.Client/OverlayOffice/OfficeCustomerInvoiceViewOverlay.razor index a117966e..ba1f954d 100644 --- a/Wonky.Client/OverlayOffice/OfficeCustomerInvoiceViewOverlay.razor +++ b/Wonky.Client/OverlayOffice/OfficeCustomerInvoiceViewOverlay.razor @@ -72,6 +72,7 @@ Antal Pris Rabat + SAS @@ -83,6 +84,7 @@ @line.Qty @line.Price @line.Discount + } diff --git a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs index 1c39ce3d..adc36797 100644 --- a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs +++ b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor.cs @@ -502,6 +502,10 @@ public partial class AdvisorActivityCreatePage : IDisposable .ToList(); _activity.Lines = lines; } + /* + * debug logging + */ + Logger.LogDebug("activity => {}", JsonSerializer.Serialize(_activity)); /* * send reqeust */ diff --git a/Wonky.Client/Pages/Login.razor b/Wonky.Client/Pages/Login.razor index fe1ea5bd..cf4bbba2 100644 --- a/Wonky.Client/Pages/Login.razor +++ b/Wonky.Client/Pages/Login.razor @@ -43,7 +43,7 @@ - @@ -52,7 +52,7 @@ - diff --git a/Wonky.Client/Pages/OfficeOrderViewPage.razor b/Wonky.Client/Pages/OfficeOrderViewPage.razor index 1e4d4d98..58fd8982 100644 --- a/Wonky.Client/Pages/OfficeOrderViewPage.razor +++ b/Wonky.Client/Pages/OfficeOrderViewPage.razor @@ -118,6 +118,7 @@ Pris R% Beløb + SAS @@ -130,6 +131,7 @@ @($"{line.Price:N2}") @($"{line.Discount:N2}") @($"{line.LineSum:N2}") + } diff --git a/Wonky.Client/Pages/SystemUserCreatePage.razor.cs b/Wonky.Client/Pages/SystemUserCreatePage.razor.cs index 176343c0..fc3109ab 100644 --- a/Wonky.Client/Pages/SystemUserCreatePage.razor.cs +++ b/Wonky.Client/Pages/SystemUserCreatePage.razor.cs @@ -43,7 +43,6 @@ public partial class SystemUserCreatePage : IDisposable private EditContext FormContext { get; set; } private bool _formInvalid = true; private bool Working { get; set; } = true; - private bool _readOnly; private PasswordInput PasswdInput { get; set; } = new(); private RoleAssignment AssignedRoles { get; set; } = new(); @@ -73,16 +72,12 @@ public partial class SystemUserCreatePage : IDisposable * UI message */ Toaster.ShowInfo("Sender data til server ..."); - /* - * Make fields reaonly - */ - _readOnly = true; /* * Raise working flag */ Working = true; /* - * ensure companyId is set correct + * ensure companyId is set if new user is eShop user */ UserForm.CompanyId = UserForm.EShop ? _company.CompanyId : ""; /* @@ -93,6 +88,7 @@ public partial class SystemUserCreatePage : IDisposable * Map form input to a model the backend expects */ NewUserDto = Mapper.MapCreateUser(UserForm); + Logger.LogDebug("NewUserDto {}", JsonSerializer.Serialize(NewUserDto)); /* * Send Post Request */ diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index c22f13bb..2081daa1 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -1,7 +1,7 @@ { "appInfo": { "name": "Wonky Online", - "version": "179.1", + "version": "181.0", "rc": true, "sandBox": true, "image": "grumpy-coder.png", diff --git a/Wonky.Entity/DTO/ActivityLineDto.cs b/Wonky.Entity/DTO/ActivityLineDto.cs index f0e085a1..5dd2b4ad 100644 --- a/Wonky.Entity/DTO/ActivityLineDto.cs +++ b/Wonky.Entity/DTO/ActivityLineDto.cs @@ -20,56 +20,56 @@ namespace Wonky.Entity.DTO; public class ActivityLineDto { - /// - /// Item Sku - /// - [MaxLength(30, ErrorMessage = "Højst 30 teng i varenummer")] - public string Sku { get; set; } = ""; - - /// - /// Description - /// - [MaxLength(50, ErrorMessage = "Højst 50 tegn i teksten")] - public string Text { get; set; } = ""; - - /// - /// ShortName - /// - [MaxLength(30, ErrorMessage = "Maks 30 tegn i forkortelse")] - public string ShortName { get; set; } = ""; - - /// - /// Quantity - /// - public int Qty { get; set; } - - /// - /// Line price - /// - public decimal Price { get; set; } - /// /// Line discount /// public decimal Discount { get; set; } - + /// /// Line amount /// public decimal LineAmount { get; set; } - + + /// + /// warehouse pick location + /// + public string Location { get; set; } = ""; + /// /// Line number /// public int LineNumber { get; set; } - + + /// + /// Line price + /// + public decimal Price { get; set; } + + /// + /// Quantity + /// + public int Qty { get; set; } + /// /// Sas indicator /// public bool Sas { get; set; } /// - /// warehouse pick location + /// ShortName /// - public string Location { get; set; } = ""; + [MaxLength(30, ErrorMessage = "Maks 30 tegn i forkortelse")] + public string ShortName { get; set; } = ""; + + /// + /// Item Sku + /// + [MaxLength(30, ErrorMessage = "Højst 30 teng i varenummer")] + public string Sku { get; set; } = ""; + + /// + /// Description + /// + [MaxLength(50, ErrorMessage = "Højst 50 tegn i teksten")] + public string Text { get; set; } = ""; } \ No newline at end of file diff --git a/Wonky.Entity/Views/InvoiceLineView.cs b/Wonky.Entity/Views/InvoiceLineView.cs index 1289c0ef..68d0f331 100644 --- a/Wonky.Entity/Views/InvoiceLineView.cs +++ b/Wonky.Entity/Views/InvoiceLineView.cs @@ -18,9 +18,10 @@ namespace Wonky.Entity.Views; public class InvoiceLineView { + public string Discount { get; set; } = ""; + public string Price { get; set; } = ""; + public string Qty { get; set; } = ""; public string Sku { get; set; } = ""; public string Text { get; set; } = ""; - public string Qty { get; set; } = ""; - public string Price { get; set; } = ""; - public string Discount { get; set; } = ""; + public bool Sas { get; set; } } \ No newline at end of file diff --git a/Wonky.Entity/Views/ProductInventoryItemView.cs b/Wonky.Entity/Views/ProductInventoryItemView.cs index 9d3f9910..3ae7c600 100644 --- a/Wonky.Entity/Views/ProductInventoryItemView.cs +++ b/Wonky.Entity/Views/ProductInventoryItemView.cs @@ -29,5 +29,4 @@ public class ProductInventoryItemView public string LastInvoiceDate { get; set; } = ""; public string Sku { get; set; } = ""; public string VendorItemNo { get; set; } = ""; - } \ No newline at end of file diff --git a/Wonky.Entity/Views/ReportItemCustomer.cs b/Wonky.Entity/Views/ReportItemCustomer.cs index 19813e75..97ed222b 100644 --- a/Wonky.Entity/Views/ReportItemCustomer.cs +++ b/Wonky.Entity/Views/ReportItemCustomer.cs @@ -18,45 +18,53 @@ namespace Wonky.Entity.Views; public class ReportItemCustomer { - /// - /// Company entity id - /// - public string CompanyId { get; set; } = ""; - /// - /// Company name - /// - public string Name { get; set; } = ""; /// /// Company account /// public string Account { get; set; } = ""; - /// - /// Company office phone - /// - public string Phone { get; set; } = ""; - /// - /// Company VAT registration number - /// - public string VatNumber { get; set; } = ""; - /// - /// Company address city name - /// - public string City { get; set; } = ""; - /// - /// Company address postal coce - /// - public string ZipCode { get; set; } = ""; + /// /// Company address line 1 /// public string Address1 { get; set; } = ""; + /// /// Company address address line 2 /// public string Address2 { get; set; } = ""; + /// + /// Company address city name + /// + public string City { get; set; } = ""; + + /// + /// Company entity id + /// + public string CompanyId { get; set; } = ""; + /// /// Company email address /// public string Email { get; set; } = ""; + + /// + /// Company name + /// + public string Name { get; set; } = ""; + + /// + /// Company office phone + /// + public string Phone { get; set; } = ""; + + /// + /// Company VAT registration number + /// + public string VatNumber { get; set; } = ""; + + /// + /// Company address postal coce + /// + public string ZipCode { get; set; } = ""; } \ No newline at end of file diff --git a/Wonky.Entity/Views/ReportItemLine.cs b/Wonky.Entity/Views/ReportItemLine.cs index 52aed60c..6cdea47c 100644 --- a/Wonky.Entity/Views/ReportItemLine.cs +++ b/Wonky.Entity/Views/ReportItemLine.cs @@ -22,36 +22,49 @@ public class ReportItemLine /// Line description /// public string Description { get; set; } = ""; - /// - /// Line item SKU - /// - public string Sku { get; set; } = ""; - /// - /// Line item quantity - /// - public int Quantity { get; set; } + /// /// Line item discount /// public decimal Discount { get; set; } - /// - /// Line item price - /// - public decimal Price { get; set; } + /// /// Line number /// public int LineNumber { get; set; } + /// /// Line sum /// public decimal LineSum { get; set; } - /// - /// Flag line as picked - /// - public bool Picked { get; set; } + /// /// Warehouse pick location /// public string Location { get; set; } = ""; + + /// + /// Flag line as picked + /// + public bool Picked { get; set; } + + /// + /// Line item price + /// + public decimal Price { get; set; } + + /// + /// Line item quantity + /// + public int Quantity { get; set; } + + /// + /// Sas flag + /// + public bool Sas { get; set; } + + /// + /// Line item SKU + /// + public string Sku { get; set; } = ""; } \ No newline at end of file