new attempt to prevent doubled history
This commit is contained in:
parent
0b0be1a247
commit
743c96972d
4 changed files with 23 additions and 11 deletions
|
@ -53,7 +53,7 @@
|
|||
@product.Quantity
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<a class="btn btn-info d-block" type="button" @onclick="() => CallShowReorderModal(product.Sku)"><i class="bi-arrow-right-circle"></i> Se Historik</a>
|
||||
<a class="btn btn-info d-block" type="button" @onclick="() => CallShowReorderModal(product.Sku)"><i class="bi-pen"></i> Genbestil</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
|
|
@ -43,9 +43,15 @@ public partial class CrmCompanyInventoryPage : IDisposable
|
|||
Interceptor.RegisterBeforeSendEvent();
|
||||
|
||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||
|
||||
var _ = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||
|
||||
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||
while (string.IsNullOrWhiteSpace(ts))
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
await FetchInventory();
|
||||
Working = false;
|
||||
}
|
||||
|
|
|
@ -24,13 +24,19 @@ public partial class CrmCompanyInvoiceListPage : IDisposable
|
|||
{
|
||||
Interceptor.RegisterEvent();
|
||||
Interceptor.RegisterBeforeSendEvent();
|
||||
|
||||
|
||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||
|
||||
var _ = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||
|
||||
History = await HistoryRepo.FetchInvoiceList(CompanyId);
|
||||
|
||||
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||
while (string.IsNullOrWhiteSpace(ts))
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
History = await HistoryRepo.FetchInvoiceList(CompanyId);
|
||||
Working = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Client",
|
||||
"version": "0.84.1",
|
||||
"version": "0.84.3",
|
||||
"rc": true,
|
||||
"sandBox": false,
|
||||
"image": "grumpy-coder.png"
|
||||
},
|
||||
"apiConfig": {
|
||||
"baseUrl": "https://eta.innotec.dk",
|
||||
"baseUrl": "https://zeta.innotec.dk",
|
||||
"catalog": "api/v2/catalog",
|
||||
"crmCustomers": "api/v2/crm/companies",
|
||||
"crmInventoryExt": "history/inventory",
|
||||
|
|
Loading…
Reference in a new issue