fix ActivityVisitEnum - incorrectly assigned recall to new
This commit is contained in:
parent
c3f39d1b94
commit
07403c34de
4 changed files with 17 additions and 17 deletions
|
@ -132,17 +132,17 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
|||
Activity.OrderMessage = "BEMÆRK: CVR nummer er ophørt.";
|
||||
}
|
||||
//
|
||||
if (Company.CountryCode.ToLower() == "dk"
|
||||
&& string.IsNullOrWhiteSpace(Company.Phone)
|
||||
&& !string.IsNullOrWhiteSpace(Company.Account)
|
||||
&& !Company.Account.StartsWith("NY")
|
||||
&& Company.Account.Length > 7)
|
||||
{
|
||||
Company.Phone = Company.Account[..8];
|
||||
}
|
||||
// if (Company.CountryCode.ToLower() == "dk"
|
||||
// && string.IsNullOrWhiteSpace(Company.Phone)
|
||||
// && !string.IsNullOrWhiteSpace(Company.Account)
|
||||
// && !Company.Account.StartsWith("NY")
|
||||
// && Company.Account.Length > 7)
|
||||
// {
|
||||
// Company.Phone = Company.Account[..8];
|
||||
// }
|
||||
Activity.ActivityStatusEnum = "noSale";
|
||||
Activity.ActivityVisitEnum = string.IsNullOrWhiteSpace(Company.Account)
|
||||
|| Company.Account.StartsWith("NY")
|
||||
// decide if new or recall
|
||||
Activity.ActivityVisitEnum = Company.Account.StartsWith("NY")
|
||||
? "new" : "recall";
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
|||
{
|
||||
// check if new account
|
||||
if (string.IsNullOrWhiteSpace(Company.Account)
|
||||
|| Company.Account.ToLower() == "ny"
|
||||
|| Company.Account.StartsWith("NY")
|
||||
|| Activity.ActivityStatusEnum.ToLower() == "quote"
|
||||
|| Activity.ActivityStatusEnum.ToLower() == "canvas")
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
|||
Toaster.ShowInfo("Vent mens data synkroniseres ...");
|
||||
var ts = await HistoryRepo.InvoiceErpToCrmRpc(CompanyId, Company.HistorySync);
|
||||
while (string.IsNullOrWhiteSpace(ts))
|
||||
await Task.Delay(500);
|
||||
await Task.Delay(250);
|
||||
// save pDate
|
||||
await Storage.SetItemAsync($"{CompanyId}-pDate", ts);
|
||||
// request products from backend
|
||||
|
@ -444,7 +444,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
|||
Toaster.ShowError("Ved bestilling skal der være en eller flere linjer i kladden.");
|
||||
return;
|
||||
// phone number is required if first time customer
|
||||
case "order" when Company.Account.StartsWith("NY") || Company.Account.StartsWith("KANVAS") || string.IsNullOrWhiteSpace(Company.Account) && string.IsNullOrWhiteSpace(Activity.Phone):
|
||||
case "order" when Company.Account.StartsWith("NY") && string.IsNullOrWhiteSpace(Activity.Phone):
|
||||
Toaster.ShowError("Ved bestilling til ny kunde skal telefon nummer angives.");
|
||||
return;
|
||||
// verify email address is a valid address
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
@page "/advisor/customers/{CompanyId}/h/i"
|
||||
@attribute [Authorize(Roles = "Advisor")]
|
||||
<PageTitle>Produkt oversigt for @Company.Name</PageTitle>
|
||||
<div class="row pt-2 pb-1 rounded-2 bg-dark text-white">
|
||||
<div class="row ps-3 pt-2 pb-1 rounded-2 bg-dark text-white">
|
||||
<div class="col-sm-6">
|
||||
<h4 class="pt-1">@Company.Name</h4>
|
||||
<h4 class="pt-1">Produkt oversigt @Company.Name</h4>
|
||||
</div>
|
||||
<div class="col-sm-3 align-content-end d-print-none">
|
||||
<a class="btn btn-primary d-block" href="/advisor/customers/@CompanyId"><i class="bi-arrow-right"></i> Kundekort</a>
|
||||
|
|
|
@ -107,7 +107,7 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
// internal flag
|
||||
EnableActivity = Company.ValidVat;
|
||||
// override if canvas which has account property as empty string or "NY"
|
||||
if (Company.Account == "NY" || Company.Account.StartsWith("KANVAS") || string.IsNullOrWhiteSpace(Company.Account))
|
||||
if (Company.Account.StartsWith("NY") || Company.Account.StartsWith("KANVAS") || string.IsNullOrWhiteSpace(Company.Account))
|
||||
EnableActivity = 1;
|
||||
|
||||
if (Company.Account.StartsWith("KANVAS"))
|
||||
|
|
|
@ -259,7 +259,7 @@ public partial class OfficeOrderCreatePage : IDisposable
|
|||
Toaster.ShowError("Ved bestilling skal der være en eller flere linjer i kladden.");
|
||||
return;
|
||||
// phone number is required if first time customer
|
||||
case "order" when Company.Account is "NY" or "" && string.IsNullOrWhiteSpace(Activity.Phone):
|
||||
case "order" when Company.Account.StartsWith("NY") && string.IsNullOrWhiteSpace(Activity.Phone):
|
||||
Toaster.ShowError("Ved bestilling til ny kunde skal telefon nummer angives.");
|
||||
return;
|
||||
// verify email address is a valid address
|
||||
|
|
Loading…
Reference in a new issue