-
-
+
+ @DateTime.Now.ToLongDateString()
@@ -61,15 +61,11 @@
-
-
-
-
diff --git a/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs b/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs
index 3acc69c1..03119474 100644
--- a/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs
+++ b/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs
@@ -77,53 +77,53 @@ public partial class OfficeOrderCreatePage : IDisposable
// fetch customer
Customer = await CustomerRepo.GetByCustomerId(CountryCode, CompanyId);
Logger.LogDebug("Customer => {}", JsonSerializer.Serialize(Customer));
- //
- // var today = $"{DateTime.Now:yyyy-MM-dd}";
- //
- // // initiate a sync to ensure up-to-date product history
- // if (Customer.HistorySync != today)
- // Customer.HistorySync = await InventoryRepo.InvoiceErpToCrmRpc(CountryCode, CompanyId, Customer.HistorySync);
- //
- // // fetch customer inventory
- // CustomerInventory = await InventoryRepo.FetchInventory(CountryCode, CompanyId);
- // Logger.LogDebug("Inventory => {}", JsonSerializer.Serialize(CustomerInventory));
- //
- // // get sales rep info
- // SalesRep = await UserRepo.GetAdvisorInfo(Customer.SalesRepId);
- // Logger.LogDebug("SalesRep => {}", JsonSerializer.Serialize(SalesRep));
- //
- // // set activity salesRep and countryCode
- // Activity.SalesRep = SalesRep.Advisor;
- // Activity.CountryCode = SalesRep.CountryCode;
- //
- // // add customer info into activity properties
- // Activity.Account = Customer.Account;
- // Activity.VatNumber = Customer.VatNumber;
- // Activity.Email = Customer.Email;
- // Activity.Phone = Customer.Phone;
- // Activity.Mobile = Customer.Mobile;
- // Activity.Name = Customer.Name;
- // Activity.Address1 = Customer.Address1;
- // Activity.Address2 = Customer.Address2;
- // Activity.ZipCode = Customer.ZipCode;
- // Activity.City = Customer.City;
- // Activity.DlvName = Customer.Name;
- // Activity.DlvAddress1 = Customer.Address1;
- // Activity.DlvAddress2 = Customer.Address2;
- // Activity.DlvZipCode = Customer.ZipCode;
- // Activity.DlvCity = Customer.City;
- // Activity.BcId = Customer.BcId;
- // Activity.CompanyId = Customer.CompanyId;
- // Activity.SalesRepId = Customer.SalesRepId;
- //
- // // setting up activity properties
- // Activity.ActivityStatusEnum = "noSale";
- // Activity.VisitTypeEnum = "recall";
- // Activity.ActivityTypeEnum = "phone";
- // Activity.ActivityStatusEnum = "order";
- //
- // // Initialize date variable
- // SelectedDate = DateTime.Now;
+
+ var today = $"{DateTime.Now:yyyy-MM-dd}";
+
+ // initiate a sync to ensure up-to-date product history
+ if (Customer.HistorySync != today)
+ Customer.HistorySync = await InventoryRepo.RequestErpToCrmSync(CountryCode, CompanyId, Customer.HistorySync);
+
+ // fetch customer inventory
+ CustomerInventory = await InventoryRepo.RequestInventory(CountryCode, CompanyId);
+ Logger.LogDebug("Inventory => {}", JsonSerializer.Serialize(CustomerInventory));
+
+ // get sales rep info
+ SalesRep = await UserRepo.GetAdvisorInfo(Customer.SalesRepId);
+ Logger.LogDebug("SalesRep => {}", JsonSerializer.Serialize(SalesRep));
+
+ // set activity salesRep and countryCode
+ Activity.SalesRep = SalesRep.Advisor;
+ Activity.CountryCode = SalesRep.CountryCode;
+
+ // add customer info into activity properties
+ Activity.Account = Customer.Account;
+ Activity.VatNumber = Customer.VatNumber;
+ Activity.Email = Customer.Email;
+ Activity.Phone = Customer.Phone;
+ Activity.Mobile = Customer.Mobile;
+ Activity.Name = Customer.Name;
+ Activity.Address1 = Customer.Address1;
+ Activity.Address2 = Customer.Address2;
+ Activity.ZipCode = Customer.ZipCode;
+ Activity.City = Customer.City;
+ Activity.DlvName = Customer.Name;
+ Activity.DlvAddress1 = Customer.Address1;
+ Activity.DlvAddress2 = Customer.Address2;
+ Activity.DlvZipCode = Customer.ZipCode;
+ Activity.DlvCity = Customer.City;
+ Activity.BcId = Customer.BcId;
+ Activity.CompanyId = Customer.CompanyId;
+ Activity.SalesRepId = Customer.SalesRepId;
+
+ // setting up activity properties
+ Activity.ActivityStatusEnum = "noSale";
+ Activity.VisitTypeEnum = "recall";
+ Activity.ActivityTypeEnum = "phone";
+ Activity.ActivityStatusEnum = "order";
+
+ // Initialize date variable
+ SelectedDate = DateTime.Now;
}
private void CallPriceListModal()
diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json
index 7dad6bb7..b1d8cc89 100644
--- a/Wonky.Client/wwwroot/appsettings.json
+++ b/Wonky.Client/wwwroot/appsettings.json
@@ -1,7 +1,7 @@
{
"appInfo": {
"name": "Wonky Online",
- "version": "0.116.2",
+ "version": "0.117.0",
"rc": true,
"sandBox": false,
"image": "grumpy-coder.png"