refactor vat lookup

This commit is contained in:
Frede Hundewadt 2022-09-14 13:45:55 +02:00
parent 551c338fcb
commit 2e8deb6bb6
20 changed files with 357 additions and 156 deletions

View file

@ -19,7 +19,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Components; namespace Wonky.Client.Components;
public partial class OfficeAvisorTableComponent public partial class OfficeAdvisorTableComponent
{ {
[Parameter] public List<UserListAdminView> UserList { get; set; } [Parameter] public List<UserListAdminView> UserList { get; set; }
} }

View file

@ -111,7 +111,7 @@
</tr> </tr>
} }
<tr> <tr>
<td colspan="4"></td> <td colspan="5"></td>
<td>Ordresum</td> <td>Ordresum</td>
<td class="text-end">@ReportItem.OrderAmount</td> <td class="text-end">@ReportItem.OrderAmount</td>
</tr> </tr>
@ -129,4 +129,11 @@
@code{ @code{
[Parameter] public ReportItemView ReportItem { get; set; } = new(); [Parameter] public ReportItemView ReportItem { get; set; } = new();
protected override void OnParametersSet()
{
var lines = ReportItem.Lines.OrderBy(x => x.Location).ToList();
ReportItem.Lines = lines;
}
} }

View file

@ -0,0 +1,30 @@
@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
*@
<EditForm EditContext="_editName" OnValidSubmit="SubmitForm">
<DataAnnotationsValidator/>
<div class="row">
<div class="col">
<InputText id="vatNumber" class="form-control" placeholder="26991765"
@bind-Value="@EntityName"/>
<ValidationMessage For="@(() => EntityName)"/>
</div>
<div class="col">
<button class="btn btn-primary" type="submit" disabled="@_formInvalid">HENT</button>
</div>
</div>
</EditForm>

View file

@ -0,0 +1,47 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Wonky.Client.Models;
namespace Wonky.Client.Components;
public partial class VatEntityNameInputComponent : IDisposable
{
[Parameter] public string EntityName { get; set; } = "";
private EditContext _editName { get; set; }
private bool _formInvalid = true;
[Parameter] public EventCallback<string> OnValidSubmit { get; set; }
protected override void OnInitialized()
{
_editName = new EditContext(EntityName);
_editName.OnFieldChanged += HandleFieldChanged;
}
private async Task SubmitForm()
{
await OnValidSubmit.InvokeAsync(EntityName);
}
private void HandleFieldChanged(object? sender, FieldChangedEventArgs e)
{
_formInvalid = !_editName.Validate();
StateHasChanged();
}
public void Dispose()
{
_editName!.OnFieldChanged -= HandleFieldChanged;
}
}

View file

@ -1,35 +0,0 @@
@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
*@
<div class="row">
<div class="col-md-3">
<button class="btn btn-primary text-nowrap" @onclick="GetCvrData" disabled="@CvrInvalid">Vis CVR data</button>
</div>
<div class="col-md-9">
<div style="@(_hideMe ? "display:none" : "display:block")">
<div class="alert @(_currentState == "NORMAL" ? "alert-success" : "alert-warning")">
<strong>CVR status @_currentState</strong>
</div>
<ul class="list-group list-group-flush small">
<li class="list-group-item">@VirkRegInfo.Name</li>
<li class="list-group-item">@VirkRegInfo.CoName</li>
<li class="list-group-item">@VirkRegInfo.Address</li>
<li class="list-group-item">@VirkRegInfo.ZipCode @VirkRegInfo.City</li>
</ul>
</div>
</div>
</div>

View file

@ -1,45 +0,0 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using Microsoft.AspNetCore.Components;
using Wonky.Client.Services;
using Wonky.Entity.Models;
using Wonky.Entity.Requests;
namespace Wonky.Client.Components;
public partial class VatInfoComponent
{
[Inject] public VatInfoLookupService VatInfoLookupService { get; set; } = null!;
[Parameter] public string VatNumber { get; set; } = "";
private VirkRegInfo VirkRegInfo { get; set; } = new();
private bool _hideMe = true;
private bool CvrInvalid => string.IsNullOrEmpty(VatNumber);
private readonly VirkParams _virkParams = new();
private string _currentState = "";
private async Task GetCvrData()
{
_virkParams.VatNumber = VatNumber;
if (string.IsNullOrWhiteSpace(VirkRegInfo.VatNumber))
{
var result = await VatInfoLookupService.QueryVirkRegistry(_virkParams);
if (result.Any())
{
_currentState = VirkRegInfo.States[^1].State;
}
}
_hideMe = !_hideMe;
}
}

View file

@ -111,12 +111,7 @@ public partial class CrmNewActivityPage : IDisposable
_company.Phone = _company.Account[..8]; _company.Phone = _company.Account[..8];
} }
// set up identification
_draft.CompanyId = _company.CompanyId;
_draft.BcId = _company.BcId; _draft.BcId = _company.BcId;
_draft.SalesRepId = _ux.Id;
_draft.SalesRep = _ux.Advisor;
_draft.ActivityStatusEnum = "noSale"; _draft.ActivityStatusEnum = "noSale";
_draft.VisitTypeEnum = _company.Account is "" or "NY" ? "new" : "recall"; _draft.VisitTypeEnum = _company.Account is "" or "NY" ? "new" : "recall";
@ -124,7 +119,11 @@ public partial class CrmNewActivityPage : IDisposable
_draft.OrderMessage = "Virksomheden er ophørt."; _draft.OrderMessage = "Virksomheden er ophørt.";
// permanent identifications // permanent identifications
_draft.SalesRep = _ux.Advisor; _draft.CompanyId = _company.CompanyId;
_draft.SalesRepId = _company.SalesRepId;
_draft.SalesRep = _company.SalesRep;
_draft.CountryCode = _company.CountryCode;
_draft.Account = _company.Account; _draft.Account = _company.Account;
_draft.VatNumber = _company.VatNumber; _draft.VatNumber = _company.VatNumber;
_draft.Email = _company.Email; _draft.Email = _company.Email;
@ -244,8 +243,8 @@ public partial class CrmNewActivityPage : IDisposable
if (_phone != _draft.Phone) if (_phone != _draft.Phone)
{ {
_company.Phone = _draft.Phone; _company.Phone = _draft.Phone;
// update company phone record
await _companyRepo.UpdateCompany(_company.CompanyId, _company); await _companyRepo.UpdateCompany(_company.CompanyId, _company);
// _toast.ShowInfo("Kunde telefon nummer er opdateret.");
} }
// post to api // post to api
var result = await CrmActivityRepo.CreateActivity(_draft); var result = await CrmActivityRepo.CreateActivity(_draft);

View file

@ -27,10 +27,14 @@
<div class="card-header bg-dark text-white"> <div class="card-header bg-dark text-white">
<h3>@_company.Account - @_company.Name</h3> <h3>@_company.Account - @_company.Name</h3>
</div> </div>
@*
@if (_dk) @if (_dk)
{ {
<div class="card-body"> <div class="card-body">
<VatAddressInputComponent Address="_vatAddress" OnValidSubmit="GetInfoFromAddress"/> <VatAddressInputComponent Address="_vatAddress" OnValidSubmit="GetInfoFromAddress"/>
</div>
<div class="card-body">
</div> </div>
@if (_vInfos.Any()) @if (_vInfos.Any())
{ {
@ -63,10 +67,11 @@
</table> </table>
} }
} }
*@
<EditForm EditContext="_editContext" OnValidSubmit="SubmitUpdate"> <EditForm EditContext="_editContext" OnValidSubmit="SubmitUpdate">
<DataAnnotationsValidator/> <DataAnnotationsValidator/>
<div class="card-body"> <div class="card-body">
<table class="table"> <table class="table table-sm">
<tbody> <tbody>
<tr class="align-middle"> <tr class="align-middle">
<th> <th>
@ -78,6 +83,7 @@
<td> <td>
<InputText id="vatNumber" class="form-control" @bind-Value="_company.VatNumber"/> <InputText id="vatNumber" class="form-control" @bind-Value="_company.VatNumber"/>
<ValidationMessage For="@(() => _company.VatNumber)"></ValidationMessage> <ValidationMessage For="@(() => _company.VatNumber)"></ValidationMessage>
<button class="btn btn-warning" type="button" @onclick="CallVatLookupModal">CVR opslag</button>
</td> </td>
<th> <th>
Telefon Telefon
@ -224,3 +230,5 @@ else
{ {
<LoaderThreeDots /> <LoaderThreeDots />
} }
<VatLookupDkModal VatAddress="_vatAddress" OnSelectedCompany="OnSelectedCompany" @ref="_vatLookupModal" />

View file

@ -27,6 +27,7 @@ using Wonky.Client.Helpers;
using Wonky.Client.HttpInterfaces; using Wonky.Client.HttpInterfaces;
using Wonky.Client.Models; using Wonky.Client.Models;
using Wonky.Client.Services; using Wonky.Client.Services;
using Wonky.Client.Shared;
using Wonky.Entity.DTO; using Wonky.Entity.DTO;
using Wonky.Entity.Models; using Wonky.Entity.Models;
using Wonky.Entity.Requests; using Wonky.Entity.Requests;
@ -67,6 +68,7 @@ public partial class CrmViewCompanyPage : IDisposable
private bool _dk { get; set; } = true; private bool _dk { get; set; } = true;
private int _isDirty { get; set; } private int _isDirty { get; set; }
private int _vatUpdated { get; set; } private int _vatUpdated { get; set; }
private VatLookupDkModal _vatLookupModal { get; set; } = new();
private readonly JsonSerializerOptions _options = new () private readonly JsonSerializerOptions _options = new ()
{ {
@ -201,55 +203,6 @@ public partial class CrmViewCompanyPage : IDisposable
_hideButtons = false; _hideButtons = false;
} }
private async Task GetInfoFromAddress(VatAddress address)
{
_vInfos = await _vatService.QueryVirkRegistry(
new VirkParams
{
StreetName = address.StreetName.Trim(),
HouseNumber = address.HouseNumber.Trim(),
ZipCode = address.ZipCode.Trim()
});
if (!_vInfos.Any())
_toast.ShowError($"Ingen virksomheder fundet.");
}
private void SelectCompany(string vatNumber, bool syncAll)
{
_virkRegInfo = (from x in _vInfos where x.VatNumber == vatNumber select x).First();
_validVat = _virkRegInfo.States[0].State.ToLower() == "normal";
_company.HasFolded = _validVat ? 1 : 0;
_enableActivity = _validVat ? 1 : 0;
_vatState = _virkRegInfo.States[0].State.ToLower() == "normal" ? "the-good" : "the-dead";
if (syncAll)
{
_company.VatNumber = _virkRegInfo.VatNumber;
_company.Name = _virkRegInfo.Name;
_company.Address1 = _virkRegInfo.Address;
_company.Address2 = _virkRegInfo.CoName;
_company.ZipCode = _virkRegInfo.ZipCode;
_company.City = _virkRegInfo.City;
_isDirty = 1;
}
else
{
_company.VatNumber = _virkRegInfo.VatNumber;
_vatUpdated = 1;
}
// empty list
_vInfos = new List<VirkRegInfo>();
StateHasChanged();
}
public void Dispose()
{
_interceptor.DisposeEvent();
_editContext.OnFieldChanged -= HandleFieldChanged;
_editContext.OnValidationStateChanged -= ValidationChanged;
}
private static VatAddress PrepareVatAddress(CompanyDto model) private static VatAddress PrepareVatAddress(CompanyDto model)
{ {
var digits = "1234567890".ToCharArray(); var digits = "1234567890".ToCharArray();
@ -278,4 +231,68 @@ public partial class CrmViewCompanyPage : IDisposable
// return empty model // return empty model
return new VatAddress(); return new VatAddress();
} }
private void CallVatLookupModal()
{
_vatLookupModal.Show();
}
private void OnSelectedCompany(VirkRegInfo regInfo)
{
_validVat = regInfo.States[0].State.ToLower() == "normal";
_company.HasFolded = _validVat ? 1 : 0;
_enableActivity = _validVat ? 1 : 0;
_vatState = regInfo.States[0].State.ToLower() == "normal" ? "the-good" : "the-dead";
if (regInfo.SyncAll)
{
_company.VatNumber = this._virkRegInfo.VatNumber;
_company.Name = this._virkRegInfo.Name;
_company.Address1 = this._virkRegInfo.Address;
_company.Address2 = this._virkRegInfo.CoName;
_company.ZipCode = this._virkRegInfo.ZipCode;
_company.City = this._virkRegInfo.City;
_isDirty = 1;
}
else
{
_company.VatNumber = this._virkRegInfo.VatNumber;
_vatUpdated = 1;
}
StateHasChanged();
}
// private void SelectCompany(string vatNumber, bool syncAll)
// {
// _virkRegInfo = (from x in _vInfos where x.VatNumber == vatNumber select x).First();
// _validVat = _virkRegInfo.States[0].State.ToLower() == "normal";
// _company.HasFolded = _validVat ? 1 : 0;
// _enableActivity = _validVat ? 1 : 0;
// _vatState = _virkRegInfo.States[0].State.ToLower() == "normal" ? "the-good" : "the-dead";
//
// if (syncAll)
// {
// _company.VatNumber = _virkRegInfo.VatNumber;
// _company.Name = _virkRegInfo.Name;
// _company.Address1 = _virkRegInfo.Address;
// _company.Address2 = _virkRegInfo.CoName;
// _company.ZipCode = _virkRegInfo.ZipCode;
// _company.City = _virkRegInfo.City;
// _isDirty = 1;
// }
// else
// {
// _company.VatNumber = _virkRegInfo.VatNumber;
// _vatUpdated = 1;
// }
// // empty list
// _vInfos = new List<VirkRegInfo>();
// StateHasChanged();
// }
public void Dispose()
{
_interceptor.DisposeEvent();
_editContext.OnFieldChanged -= HandleFieldChanged;
_editContext.OnValidationStateChanged -= ValidationChanged;
}
} }

View file

@ -25,6 +25,6 @@
<h3>Sælgere</h3> <h3>Sælgere</h3>
</div> </div>
<div class="card-body"> <div class="card-body">
<OfficeAvisorTableComponent UserList="_salesReps"></OfficeAvisorTableComponent> <OfficeAdvisorTableComponent UserList="_salesReps"></OfficeAdvisorTableComponent>
</div> </div>
</div> </div>

View file

@ -24,6 +24,6 @@
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<OfficeCustomerTableComponent Companies="_companyList"></OfficeCustomerTableComponent> <OfficeCustomerTableComponent Companies="_companyList" />
</div> </div>
</div> </div>

View file

@ -72,13 +72,8 @@ public partial class OfficeNewOrderPage : IDisposable
// set up identification // set up identification
_draft.CompanyId = _company.CompanyId; _draft.CompanyId = _company.CompanyId;
_draft.BcId = _company.BcId; _draft.BcId = _company.BcId;
_draft.SalesRepId = _userInfo.UserId; _draft.SalesRepId = _company.SalesRepId;
_draft.SalesRep = _company.SalesRep;
_draft.ActivityStatusEnum = "noSale";
_draft.VisitTypeEnum = _company.Account is "" or "NY" ? "new" : "recall";
// permanent identifications
_draft.SalesRep = _userInfo.Advisor;
_draft.Account = _company.Account; _draft.Account = _company.Account;
_draft.VatNumber = _company.VatNumber; _draft.VatNumber = _company.VatNumber;
_draft.Email = _company.Email; _draft.Email = _company.Email;

View file

@ -101,7 +101,7 @@
} }
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<a class="btn btn-outline-primary text-nowrap" href="/warehouse/orders/none">Oversigt</a> <a class="btn btn-outline-danger text-nowrap" href="/warehouse/orders/none">Ubehandlet</a>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
</div> </div>

View file

@ -0,0 +1,67 @@
@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
*@
@using Wonky.Client.Components
<div class="modal" tabindex="-1" role="dialog" style="display:@_modalDisplay">
<div class="modal-dialog modal-dialog-scrollable modal-lg modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">CVR opslag</h5>
<button type="button" class="btn-close" @onclick="Hide" data-bs-dismiss="modal" aria-label="Luk"></button>
</div>
<div class="modal-body">
<VatNumberInputComponent OnValidSubmit="GetInfoFromVat"/>
<VatAddressInputComponent Address="VatAddress" OnValidSubmit="GetInfoFromAddress"/>
<VatEntityNameInputComponent OnValidSubmit="GetInfoFromName"/>
@if (_vInfos.Any())
{
<table class="table table-sm table-striped">
<thead>
<tr>
<th scope="col">CVR ORG</th>
<th scope="col">Navn</th>
<th scope="col">Status</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach (var info in _vInfos)
{
<tr>
<td class="align-middle">@info.VatNumber</td>
<td class="align-middle">@info.Name</td>
<td class="align-middle">@info.States[^1].State</td>
<td class="align-middle">
<button class="btn btn-primary" @onclick="@(() => SelectCompany(info.VatNumber, true))">OVERFØR</button>
</td>
<td class="align-middle">
<button class="btn btn-primary" @onclick="@(() => SelectCompany(info.VatNumber, false))">CVR/VAT</button>
</td>
</tr>
}
</tbody>
</table>
}
</div>
</div>
</div>
</div>
@if (_showBackdrop)
{
<div class="modal-backdrop fade show"></div>
}

View file

@ -0,0 +1,98 @@
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using Blazored.Toast.Services;
using Microsoft.AspNetCore.Components;
using Wonky.Client.HttpInterceptors;
using Wonky.Client.HttpInterfaces;
using Wonky.Client.HttpRepository;
using Wonky.Client.Models;
using Wonky.Client.Services;
using Wonky.Entity.Models;
using Wonky.Entity.Requests;
using Wonky.Entity.Views;
namespace Wonky.Client.Shared;
public partial class VatLookupDkModal
{
private string _modalDisplay = "";
private bool _showBackdrop;
[Parameter] public VatAddress VatAddress { get; set; } = new();
[Parameter] public EventCallback<VirkRegInfo> OnSelectedCompany { get; set; }
[Inject] private VatInfoLookupService _vatService { get; set; }
[Inject] private IToastService _toast { get; set; }
private VirkRegInfo _virkRegInfo { get; set; } = new();
private List<VirkRegInfo> _vInfos { get; set; } = new();
private async Task SelectCompany(string vatNumber, bool syncAll)
{
_virkRegInfo = _vInfos.First(x => x.VatNumber == vatNumber);
_virkRegInfo.SyncAll = syncAll;
await OnSelectedCompany.InvokeAsync(_virkRegInfo);
}
private async Task GetInfoFromAddress(VatAddress address)
{
_toast.ShowInfo("Vent for adresse info ...");
_vInfos = await _vatService.QueryVirkRegistry(
new VirkParams
{
StreetName = address.StreetName,
HouseNumber = address.HouseNumber,
ZipCode = address.ZipCode
});
if (!_vInfos.Any())
{
_toast.ShowWarning($"Ingen data fundet ...");
}
}
private async Task GetInfoFromVat(string vatNumber)
{
_toast.ShowInfo("Vent for firma info ...");
_vInfos = await _vatService
.QueryVirkRegistry(new VirkParams {VatNumber = vatNumber});
if (!_vInfos.Any())
{
_toast.ShowError($"Firma med CVR '{vatNumber}' findes ikke.");
}
}
private async Task GetInfoFromName(string entityName)
{
_toast.ShowInfo("Vent for firma info ...");
_vInfos = await _vatService
.QueryVirkRegistry(new VirkParams {EntityName = entityName});
if (!_vInfos.Any())
{
_toast.ShowError($"Firma med nav '{entityName}' findes ikke.");
}
}
public void Show()
{
_modalDisplay = "block;";
_showBackdrop = true;
StateHasChanged();
}
private void Hide()
{
_modalDisplay = "none;";
_showBackdrop = false;
StateHasChanged();
}
}

View file

@ -1,7 +1,7 @@
{ {
"appInfo": { "appInfo": {
"name": "Wonky Client", "name": "Wonky Client",
"version": "0.16.1", "version": "0.19.1",
"rc": true, "rc": true,
"sandBox": true, "sandBox": true,
"image": "grumpy-coder.png" "image": "grumpy-coder.png"
@ -29,7 +29,7 @@
"officeUserPasswd": "api/v2/office/users/passwd", "officeUserPasswd": "api/v2/office/users/passwd",
"officeCustomers": "api/v2/office/customers", "officeCustomers": "api/v2/office/customers",
"officeReports": "api/v2/office/reports", "officeReports": "api/v2/office/reports",
"warehouse": "api/v2/warehouse/orders" "warehouse": "api/v2/warehouse/packages"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

View file

@ -23,18 +23,23 @@ public class ActivityDto
/// Activity entity id /// Activity entity id
/// </summary> /// </summary>
public string ActivityId { get; set; } = ""; public string ActivityId { get; set; } = "";
/// <summary> /// <summary>
/// Sales representative identification /// Sales representative identification
/// </summary> /// </summary>
public string SalesRep { get; set; } = ""; [Required] public string SalesRep { get; set; } = "";
/// <summary> /// <summary>
/// Sales representative entity Id /// Sales representative entity Id
/// </summary> /// </summary>
public string SalesRepId { get; set; } = ""; [Required] public string SalesRepId { get; set; } = "";
/// <summary>
/// Company countryCode (ensure correct code when office create ordre)
/// </summary>
[Required] public string CountryCode { get; set; } = "";
/// <summary> /// <summary>
/// Company entity Id /// Company entity Id
/// </summary> /// </summary>
public string CompanyId { get; set; } = ""; [Required] public string CompanyId { get; set; } = "";
/// <summary> /// <summary>
/// Business Central entity Id /// Business Central entity Id
/// </summary> /// </summary>

View file

@ -57,6 +57,12 @@ public class CompanyDto
/// Sales representative entity Id /// Sales representative entity Id
/// </summary> /// </summary>
public string SalesRepId { get; set; } = ""; public string SalesRepId { get; set; } = "";
/// <summary>
/// SalesRep ERP identifier
/// </summary>
public string SalesRep { get; set; } = "";
/// <summary> /// <summary>
/// Business Central entity Id /// Business Central entity Id
/// </summary> /// </summary>

View file

@ -60,4 +60,6 @@ public class VirkRegInfo
/// Date for last request of entity VAT state /// Date for last request of entity VAT state
/// </summary> /// </summary>
public string RequestDate { get; set; } = "" ; public string RequestDate { get; set; } = "" ;
public bool SyncAll { get; set; }
} }