41 Commits

Author SHA1 Message Date
Samuele Locatelli cb8424fbf2 Merge branch 'release/FixRedisSentinel_01' 2025-05-13 15:37:25 +02:00
Samuele Locatelli 33c7821f79 Old nuget package cleanup 2025-05-13 15:21:22 +02:00
Samuele Locatelli d973f6171b Typo fix 2025-05-13 15:17:17 +02:00
Samuele Locatelli 3d235b66a5 Update conf redis x sentinel 2025-05-13 15:08:36 +02:00
Samuele Locatelli edab2a7aef Merge tag 'UpdateRedisSentinel01' into develop
Update nuget + uptade redis con sentinel
2024-03-18 10:17:28 +01:00
Samuele Locatelli 93d025622a Merge branch 'release/UpdateRedisSentinel01' 2024-03-18 10:17:15 +01:00
Samuele Locatelli 3427e7da33 Ancora update nuget 2024-03-18 10:17:02 +01:00
Samuele Locatelli d2d29ff7f4 Update nuget vari 2024-03-18 10:15:33 +01:00
Samuele Locatelli 568d8ce6db Update Redix s BBM 2024-03-18 10:11:14 +01:00
Samuele Locatelli 042429e776 Merge tag 'UpdateDisplayMovePages' into develop
Update display x pagine move + views
2024-02-13 10:32:17 +01:00
Samuele Locatelli a6fbd66d98 Merge branch 'release/UpdateDisplayMovePages' 2024-02-13 10:32:00 +01:00
Samuele Locatelli f48a622696 refresh views 2024-02-13 10:31:39 +01:00
Samuele Locatelli 6e08fda57f Fix display info x NegotDocMover 2024-02-13 10:27:36 +01:00
Samuele Locatelli ed6259cdfe Merge tag 'UpdateCategoryPageOnRefresh' into develop
update pag categorie su refresh
2024-02-13 08:59:15 +01:00
Samuele Locatelli 4ae8baccb8 Merge branch 'release/UpdateCategoryPageOnRefresh' 2024-02-13 08:59:06 +01:00
Samuele Locatelli b581511e73 Fix reload pagina categorie su update 2024-02-13 08:58:42 +01:00
Samuele Locatelli eadaa05b8b Merge tag 'AddMoveItemCat' into develop
Aggiunta gestione spostamento item in categorie
2024-02-12 19:25:36 +01:00
Samuele Locatelli 2a5fa60e5f Merge branch 'release/AddMoveItemCat' 2024-02-12 19:25:17 +01:00
Samuele Locatelli 38ba4c2ca2 Completato sposta item tra Categorie 2024-02-12 19:24:54 +01:00
Samuele Locatelli b3ffbf1635 Inizio gestione spostamento categorie 2024-02-12 19:09:46 +01:00
Samuele Locatelli 2e90a1b081 Aggiunta gestione categorie (new/edit/delete 2024-02-12 18:54:08 +01:00
Samuele Locatelli 38c4e20553 Merge tag 'AddAnagCategorie01' into develop
Aggiunta gestione preliminare anagrafica categorie
2024-02-12 17:46:01 +01:00
Samuele Locatelli bcfdc47665 Merge branch 'release/AddAnagCategorie01' 2024-02-12 17:45:45 +01:00
Samuele Locatelli fda3f58009 Update x gestione AnagCategorie 2024-02-12 17:45:06 +01:00
Samuele Locatelli b6010d7aae Merge tag 'FixFiltroCliNegotiations01' into develop
Update filtro clienti in sposta trattative
2024-02-12 15:14:42 +01:00
Samuele Locatelli 7a8bb704cb Merge branch 'release/FixFiltroCliNegotiations01' 2024-02-12 15:14:33 +01:00
Samuele Locatelli 69062db26e Fix filtro cliente in sposta trattative 2024-02-12 15:14:04 +01:00
Samuele Locatelli c7745f77b5 Fix migration (iniziale9 x nuova tab 2024-02-12 15:13:58 +01:00
Samuele Locatelli 5655c5e558 Merge tag 'ShowDeltaFixBillExt' into develop
fix display delta fatt non riconciliate totalmente
2024-02-12 10:10:56 +01:00
Samuele Locatelli 9a3aed51be Merge branch 'release/ShowDeltaFixBillExt' 2024-02-12 10:10:36 +01:00
Samuele Locatelli d79703c5d9 Aggiunta visualizzazione delta fatture da chiudere 2024-02-12 10:09:56 +01:00
Samuele Locatelli 0a8831d7bc Merge tag 'UpdateOnRebuild2021' into develop
Aggiornamenti da revuild 2021...
2024-02-10 12:33:37 +01:00
Samuele Locatelli 1915c84195 Merge branch 'release/UpdateOnRebuild2021' 2024-02-10 12:33:22 +01:00
Samuele Locatelli 341abbfcc0 Update generali gestione ordine 2024-02-10 12:32:38 +01:00
Samuele Locatelli f810f0bdee Update gestione spsotamento negoziazioni 2024-02-10 12:32:32 +01:00
Samuele Locatelli a3c8f0b65a Fix sel anno da jump trattativa --> DOC 2024-02-09 10:35:39 +01:00
Samuele Locatelli 7e9545d412 Aggiunto calcolo ammontare fatturato x billExt 2024-02-09 10:34:52 +01:00
Samuele Locatelli a0b2c7a526 Merge tag 'FixPIvaNumerica' into develop
Fix PIva numerica x edit
2024-02-02 17:14:24 +01:00
Samuele Locatelli 33b3c41663 Merge branch 'release/FixPIvaNumerica' 2024-02-02 17:13:59 +01:00
Samuele Locatelli b858211be3 Fix edit PIva come numero in BBM 2024-02-02 17:12:54 +01:00
Samuele Locatelli 67ead965e4 Fix gestione P.Iva numerica in AD 2024-02-02 16:52:04 +01:00
341 changed files with 5854 additions and 680520 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ namespace SHERPA.AD.Components
#region Protected Properties
[Inject]
protected AuthenticationStateProvider AuthenticationStateProvider { get; set; } = null!;
protected AuthenticationStateProvider AuthStateProvider { get; set; } = null!;
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
@@ -277,7 +277,7 @@ namespace SHERPA.AD.Components
{
isLoading = true;
await Task.Delay(1);
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
var authState = await AuthStateProvider.GetAuthenticationStateAsync();
var user = authState.User;
if (user.Identity != null && user.Identity.IsAuthenticated)
{
+12 -12
View File
@@ -7,7 +7,7 @@ else
<div class="row g-1">
<div class="col-6">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.CodiceCliente">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.CodiceCliente">
<label>Codice Cliente</label>
</div>
</div>
@@ -24,7 +24,7 @@ else
</div>
<div class="col-10">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.RagSoc">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.RagSoc">
<label>Ragione Sociale</label>
</div>
</div>
@@ -38,61 +38,61 @@ else
</div>
<div class="col-6">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.CodUnivoco">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.CodUnivoco">
<label>Codice Univoco</label>
</div>
</div>
<div class="col-6">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.Pec">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.Pec">
<label>PEC</label>
</div>
</div>
<div class="col-6">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.CFisc">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.CFisc">
<label>Codice Fiscale (10+)</label>
</div>
</div>
<div class="col-6">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.PIva">
<input type="number" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.PIva">
<label>P.Iva (10+)</label>
</div>
</div>
<div class="col-12">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.Via">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.Via">
<label>Via</label>
</div>
</div>
<div class="col-4">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.Localita">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.Localita">
<label>Localita</label>
</div>
</div>
<div class="col-4">
<div class="form-floating">
<input type="num" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.Cap">
<input type="num" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.Cap">
<label>Cap</label>
</div>
</div>
<div class="col-4">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.Provincia">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.Provincia">
<label>Provincia</label>
</div>
</div>
<div class="col-8">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.Pagamento">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.Pagamento">
<label>Pagamento</label>
</div>
</div>
<div class="col-4">
<div class="form-floating">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind-value="@CurrRecord.IdExt">
<input type="text" class="form-control" placeholder="Rag Sociale" @bind="@CurrRecord.IdExt">
<label>Cloud ID</label>
</div>
</div>
-1
View File
@@ -35,5 +35,4 @@
<DocsStats CurrFilter="@SelFilter" UpdateReq="DocUpdated"></DocsStats>
</div>
}
}
</div>
+2
View File
@@ -132,7 +132,9 @@ namespace SHERPA.AD.Pages
{
isLoading = true;
SelRecord = null;
currPage = 0;
await Task.Delay(1);
currPage = 1;
isLoading = false;
}
await Task.Delay(1);
+9 -3
View File
@@ -31,14 +31,19 @@
</div>
<script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="_framework/blazor.server.js"></script>
<script src="_framework/blazor.server.js" autostart="false"></script>
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
<script>
Blazor.start({
reconnectionOptions: {
maxRetries: 300,
retryIntervalMilliseconds: 2000
maxRetries: 600,
retryIntervalMilliseconds: 1000
},
reconnectionHandler: {
onConnectionDown: (options, error) => console.error(error),
onConnectionUp: () => console.log("Client reconnected!")
}
}).then(() => {
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
@@ -55,5 +60,6 @@
});
});
</script>
</body>
</html>
+7 -7
View File
@@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.0.2401.3015</Version>
<Version>2.0.2505.1315</Version>
<Copyright>Egalware 2021+</Copyright>
</PropertyGroup>
@@ -30,18 +30,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2308.216" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2308.216" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2402.2411" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2402.2411" />
<PackageReference Include="It.FattureInCloud.Sdk" Version="2.0.18" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.13" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="6.0.21" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="6.0.21" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -13,7 +13,7 @@
"JumpUrl": "https://office.egalware.com/SHERPA-AD/index"
},
"ConnectionStrings": {
"Redis": "localhost:6379,DefaultDatabase=4,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Redis": "redis.ufficio:26379,serviceName=prod,DefaultDatabase=4,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
}
}
+3 -4
View File
@@ -9,11 +9,10 @@
"CodApp": "SHERPA",
"Modulo": "SHERPA",
"ConnectionStrings": {
"Redis": "localhost:6379,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=4,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Sherpa.Anagr": "Data Source=W2019-SQL-STEAM;Initial Catalog=SteamWare_Anagrafica;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=SQL2016DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
//"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
//"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
},
"Application": {
"ContactText": "Our contacts and support sites",
+192 -10
View File
@@ -8,6 +8,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace SHERPA.BBM.CORE.Controllers
{
@@ -1493,16 +1494,16 @@ namespace SHERPA.BBM.CORE.Controllers
/// <summary>
/// Elenco Items x tipo risorsa da view
/// </summary>
/// <param name="ResType"></param>
/// <param name="ResTypeId"></param>
/// <returns></returns>
public List<vItemsDataModel> ItemGetFilt(BbmResType ResType = BbmResType.ND)
public List<vItemsDataModel> ItemGetFilt(int ResTypeId = 0)
{
List<vItemsDataModel> dbResult = new List<vItemsDataModel>();
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
dbResult = dbCtx
.DbSetItemData
.Where(x => x.ResType != BbmResType.ND && (x.ResType == ResType || ResType == BbmResType.ND))
.Where(x => x.ResTypeId != 0 && (x.ResTypeId == ResTypeId || ResTypeId == 0))
.Include(i => i.TagNav)
//.OrderByDescending(x => x.CodItem)
.ToList();
@@ -1529,6 +1530,126 @@ namespace SHERPA.BBM.CORE.Controllers
return numDone;
}
/// <summary>
/// Sposta Item nella categoria indicata
/// </summary>
/// <param name="ItemId">Item</param>
/// <param name="ResTypeId">Categoria</param>
/// <returns></returns>
public bool ItemMoveResType(int itemId, int resTypeId)
{
bool done = false;
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
try
{
var currData = dbCtx
.DbSetItems
.Where(x => x.ItemId == itemId)
.FirstOrDefault();
if (currData != null)
{
currData.ResTypeId = resTypeId;
dbCtx.Entry(currData).State = EntityState.Modified;
}
dbCtx.SaveChanges();
done = true;
}
catch (Exception exc)
{
LogException("Eccezione in ItemMoveResType", exc);
}
}
return done;
}
/// <summary>
/// Eliminazione record
/// </summary>
/// <param name="currRecord"></param>
/// <returns></returns>
public bool ItemResTypeDelete(ItemResTypeModel currRecord)
{
bool done = false;
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
try
{
var item2del = dbCtx
.DbSetItemResType
.Where(x => x.ResTypeId == currRecord.ResTypeId)
.FirstOrDefault();
if (item2del != null)
{
dbCtx.DbSetItemResType.Remove(item2del);
dbCtx.SaveChanges();
done = true;
}
}
catch (Exception exc)
{
LogException("Eccezione in ItemResTypeDelete", exc);
}
}
return done;
}
/// <summary>
/// Elenco tipi risorse/item
/// </summary>
/// <returns></returns>
public List<ItemResTypeModel> ItemResTypeGetAll()
{
List<ItemResTypeModel> dbResult = new List<ItemResTypeModel>();
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
dbResult = dbCtx
.DbSetItemResType
.Include(x => x.ItemNav)
.OrderBy(x => x.Name)
.ToList();
}
return dbResult;
}
/// <summary>
/// Update categoria su DB
/// </summary>
/// <param name="updItem"></param>
/// <returns></returns>
public bool ItemResTypeUpdate(ItemResTypeModel updItem)
{
bool done = false;
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
try
{
var currData = dbCtx
.DbSetItemResType
.Where(x => x.ResTypeId == updItem.ResTypeId && updItem.ResTypeId > 0)
.FirstOrDefault();
if (currData != null)
{
currData.Name = updItem.Name;
dbCtx.Entry(currData).State = EntityState.Modified;
}
else
{
dbCtx
.DbSetItemResType
.Add(updItem);
}
dbCtx.SaveChanges();
done = true;
}
catch (Exception exc)
{
LogException("Eccezione in ItemResTypeUpdate", exc);
}
}
return done;
}
public int ItemsCount()
{
int answ = 0;
@@ -1561,7 +1682,7 @@ namespace SHERPA.BBM.CORE.Controllers
{
currData.CodItem = updItem.CodItem;
currData.Descript = updItem.Descript;
currData.ResType = updItem.ResType;
currData.ResTypeId = updItem.ResTypeId;
currData.UM = updItem.UM;
currData.UnitPrice = updItem.UnitPrice;
dbCtx.Entry(currData).State = EntityState.Modified;
@@ -1696,6 +1817,51 @@ namespace SHERPA.BBM.CORE.Controllers
return dbResult;
}
/// <summary>
/// Sposta negoziazione nel basket indicato
/// </summary>
/// <param name="NegotiationId"></param>
/// <param name="BasketId"></param>
/// <returns></returns>
public bool NegotiationMoveBasket(int negotiationId, int basketId)
{
bool done = false;
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
try
{
var currData = dbCtx
.DbSetNegotiations
.Where(x => x.NegotiationId == negotiationId)
.FirstOrDefault();
if (currData != null)
{
// recupero eventuali ordini di questa negoziazione
var orderAssociated = dbCtx
.DbSetOrders
.Where(x => x.NegotiationId == currData.NegotiationId)
.ToList();
// aggiorno ordini al NUOVO basket!
foreach (var item in orderAssociated)
{
item.BasketId = basketId;
dbCtx.Entry(item).State = EntityState.Modified;
}
currData.BasketId = basketId;
dbCtx.Entry(currData).State = EntityState.Modified;
}
dbCtx.SaveChanges();
done = true;
}
catch (Exception exc)
{
LogException("Eccezione in NegotiationMoveBasket", exc);
}
}
return done;
}
public int NegotiationsCount()
{
int answ = 0;
@@ -1766,6 +1932,10 @@ namespace SHERPA.BBM.CORE.Controllers
return done;
}
/// <summary>
/// Elenco annualità con negoziazioni presenti
/// </summary>
/// <returns></returns>
public List<int> NegotYears()
{
List<int> dbResult = new List<int>();
@@ -2281,20 +2451,22 @@ namespace SHERPA.BBM.CORE.Controllers
}
/// <summary>
/// Elenco ultimi Items
/// Elenco Risorse da filtro
/// </summary>
/// <param name="docId"></param>
/// <param name="ResType"></param>
/// <param name="numRecord"></param>
/// <param name="anno">Anno</param>
/// <param name="baskId">Basket</param>
/// <param name="negoId">Negoziazione</param>
/// <param name="docId">Documento</param>
/// <param name="ResTypeId">Tipo risorsa</param>
/// <returns></returns>
public List<ResourcesModel> ResourceGetLastDesc(int anno, int baskId, int negoId, int docId, BbmResType ResType = BbmResType.ND)
public List<ResourcesModel> ResourceGetLastDesc(int anno, int baskId, int negoId, int docId, int ResTypeId = 0)
{
List<ResourcesModel> dbResult = new List<ResourcesModel>();
using (SHERPABBMContext dbCtx = new SHERPABBMContext(_configuration))
{
dbResult = dbCtx
.DbSetResources
.Where(x => (x.Anno == anno || anno == 0) && (x.Item.ResType == ResType || ResType == BbmResType.ND) && (x.DocNav.NegotNav.BasketId == baskId || baskId <= 1) && (x.DocNav.NegotiationId == negoId || negoId <= 1) && (x.DocId == docId || docId <= 1) && (docId > 0 || x.DocNav.IsActive))
.Where(x => (x.Anno == anno || anno == 0) && (x.Item.ResTypeId == ResTypeId || ResTypeId == 0) && (x.DocNav.NegotNav.BasketId == baskId || baskId <= 1) && (x.DocNav.NegotiationId == negoId || negoId <= 1) && (x.DocId == docId || docId <= 1) && (docId > 0 || x.DocNav.IsActive))
.Include(r => r.Item)
.OrderByDescending(x => x.Ordinal)
.ToList();
@@ -2554,6 +2726,11 @@ namespace SHERPA.BBM.CORE.Controllers
return answ;
}
/// <summary>
/// Eliminazione record dato ID
/// </summary>
/// <param name="tagId"></param>
/// <returns></returns>
public bool TagDelete(int tagId)
{
bool done = false;
@@ -2577,6 +2754,11 @@ namespace SHERPA.BBM.CORE.Controllers
return done;
}
/// <summary>
/// Eliminazione record
/// </summary>
/// <param name="delItem"></param>
/// <returns></returns>
public bool TagItemDelete(TagItemModel delItem)
{
bool done = false;
@@ -91,6 +91,20 @@ namespace SHERPA.BBM.CORE.DbModels
}
}
[NotMapped]
public decimal AccMovAmount
{
get
{
decimal answ = 0;
if (B2ONav != null && B2ONav.Count > 0)
{
answ = B2ONav.Sum(x => x.Amount);
}
return answ;
}
}
public virtual ICollection<AccMovModel> B2ONav { get; set; }
[ForeignKey("CustExtId")]
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHERPA.BBM.CORE.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
/// <summary>
/// Tabella dei tipi di Items/Risorsa (upgrade da enum)
/// </summary>
[Table("ResType")]
public partial class ItemResTypeModel
{
public ItemResTypeModel()
{
ItemNav = new HashSet<ItemsModel>();
}
[Key, Column("ResTypeId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ResTypeId { get; set; }
[Column("Name"), MaxLength(250)]
public string Name { get; set; } = "ND";
public virtual ICollection<ItemsModel> ItemNav { get; set; }
}
}
+6 -2
View File
@@ -28,8 +28,8 @@ namespace SHERPA.BBM.CORE.DbModels
[Column("CodItem"), MaxLength(50)]
public string CodItem { get; set; } = "ITEM.000000";
[Column("ResType")]
public BbmResType ResType { get; set; } = BbmResType.ND;
[Column("ResTypeId")]
public int ResTypeId { get; set; } = 0;
[Column("UM"), MaxLength(50)]
public string UM { get; set; } = "nr";
@@ -62,8 +62,12 @@ namespace SHERPA.BBM.CORE.DbModels
}
[ForeignKey("ResTypeId")]
public virtual ItemResTypeModel ResTypeNav { get; set; }
public virtual ICollection<OrderResModel> OrdResNav { get; set; }
public virtual ICollection<ResourcesModel> ResNav { get; set; }
public virtual ICollection<TagItemModel> TagNav { get; set; }
}
}
+3 -3
View File
@@ -78,7 +78,7 @@ namespace SHERPA.BBM.CORE.DbModels
{
answ = (decimal)ResNav.Sum(r => r.FinalPrice);
}
return answ;
return Math.Round(answ, 2);
}
}
@@ -99,13 +99,13 @@ namespace SHERPA.BBM.CORE.DbModels
answ = B2ONav.Sum(f => f.Amount);
//answ = B2ONav.Sum(f => f.BillNav.Amount);
}
return answ;
return Math.Round(answ, 2);
}
}
[NotMapped]
public decimal AmountOpen
{
get => AmountReq - BillTot;
get => Math.Round(AmountReq - BillTot, 2);
}
[NotMapped]
@@ -57,6 +57,12 @@ namespace SHERPA.BBM.CORE.DbModels
[Column("BasketId")]
public int BasketId { get; set; } = 0;
[Column("CodBasket")]
public string CodBasket { get; set; } = "";
[Column("DescBasket")]
public string DescBasket { get; set; } = "";
[Column("RagSoc")]
public string RagSoc { get; set; } = "";
+5 -2
View File
@@ -24,8 +24,11 @@ namespace SHERPA.BBM.CORE.DbModels
[Column("CodItem"), MaxLength(50)]
public string CodItem { get; set; } = "ITEM.000000";
[Column("ResType")]
public BbmResType ResType { get; set; } = BbmResType.ND;
[Column("ResTypeId")]
public int ResTypeId { get; set; } = 0;
[Column("ResName")]
public string ResName { get; set; } = "";
[Column("UM"), MaxLength(50)]
public string UM { get; set; } = "nr";
-12
View File
@@ -20,18 +20,6 @@ namespace SHERPA.BBM
Licenza = 10000
}
/// <summary>
/// Tipo Risorsa BBM
/// </summary>
public enum BbmResType
{
ND = 0,
HR = 1,
License = 2,
HW = 3,
Service = 4
}
/// <summary>
/// Tipo Tag
/// </summary>
+51
View File
@@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SHERPA.BBM.CORE.DbModels;
namespace SHERPA.BBM.CORE
{
public class ItemResTypeConfig : IEntityTypeConfiguration<ItemResTypeModel>
{
#region Public Methods
public void Configure(EntityTypeBuilder<ItemResTypeModel> builder)
{
//// sistemo identity
//builder.Property(prop => prop.NegotTypeId)
// .UseIdentityColumn(1, 1);
builder.Property(prop => prop.ResTypeId)
.ValueGeneratedOnAdd();
// Default seeded users
builder.HasData(
seedRecord(-1,"ND"),
seedRecord(1, "HR"),
seedRecord(2, "License"),
seedRecord(3, "HW"),
seedRecord(4, "Service"),
seedRecord(5, "Lic_CMS"),
seedRecord(6, "Lic_ESSETRE"),
seedRecord(7, "Lic_MULTIAX"),
seedRecord(8, "Lic_OMAG"),
seedRecord(9, "Lic_SAOMAD"),
seedRecord(10, "Lic_MES")
);
}
#endregion Public Methods
#region Protected Methods
protected ItemResTypeModel seedRecord(int id, string name)
{
var newRec = new ItemResTypeModel()
{
ResTypeId = id,
Name = name };
return newRec;
}
#endregion Protected Methods
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SHERPA.BBM.CORE.Migrations
{
public partial class AddItemResTypeModel : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ResType",
columns: table => new
{
ResTypeId = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ResType", x => x.ResTypeId);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ResType");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,46 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SHERPA.BBM.CORE.Migrations
{
public partial class AddFK_ResType : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "ResType",
table: "Items",
newName: "ResTypeId");
migrationBuilder.CreateIndex(
name: "IX_Items_ResTypeId",
table: "Items",
column: "ResTypeId");
migrationBuilder.AddForeignKey(
name: "FK_Items_ResType_ResTypeId",
table: "Items",
column: "ResTypeId",
principalTable: "ResType",
principalColumn: "ResTypeId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Items_ResType_ResTypeId",
table: "Items");
migrationBuilder.DropIndex(
name: "IX_Items_ResTypeId",
table: "Items");
migrationBuilder.RenameColumn(
name: "ResTypeId",
table: "Items",
newName: "ResType");
}
}
}
@@ -56,7 +56,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("OrdId");
b.ToTable("AccMov", (string)null);
b.ToTable("AccMov");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.BasketsModel", b =>
@@ -102,7 +102,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("CompanyId");
b.ToTable("Baskets", (string)null);
b.ToTable("Baskets");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.BillingExtModel", b =>
@@ -187,7 +187,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("CustExtId");
b.ToTable("BillingExt", (string)null);
b.ToTable("BillingExt");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.BillingModel", b =>
@@ -237,7 +237,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("OrdId");
b.ToTable("Billing", (string)null);
b.ToTable("Billing");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.CompanyModel", b =>
@@ -261,7 +261,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CompanyId");
b.ToTable("Company", (string)null);
b.ToTable("Company");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.CustDecodModel", b =>
@@ -293,7 +293,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CustExtId");
b.ToTable("CustDecod", (string)null);
b.ToTable("CustDecod");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.CustomersModel", b =>
@@ -328,7 +328,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CustomerId");
b.ToTable("Customers", (string)null);
b.ToTable("Customers");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.DocsModel", b =>
@@ -396,7 +396,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("NegotiationId");
b.ToTable("Docs", (string)null);
b.ToTable("Docs");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.Fatt2DocModel", b =>
@@ -440,7 +440,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("DocId");
b.ToTable("Fatt2Doc", (string)null);
b.ToTable("Fatt2Doc");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.FluxCountersModel", b =>
@@ -456,7 +456,26 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CodCounter");
b.ToTable("FluxCounters", (string)null);
b.ToTable("FluxCounters");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ItemResTypeModel", b =>
{
b.Property<int>("ResTypeId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("ResTypeId");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ResTypeId"), 1L, 1);
b.Property<string>("Name")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)")
.HasColumnName("Name");
b.HasKey("ResTypeId");
b.ToTable("ResType");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ItemsModel", b =>
@@ -478,9 +497,9 @@ namespace SHERPA.BBM.CORE.Migrations
.HasColumnType("nvarchar(250)")
.HasColumnName("Descript");
b.Property<int>("ResType")
b.Property<int>("ResTypeId")
.HasColumnType("int")
.HasColumnName("ResType");
.HasColumnName("ResTypeId");
b.Property<string>("UM")
.HasMaxLength(50)
@@ -493,7 +512,9 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("ItemId");
b.ToTable("Items", (string)null);
b.HasIndex("ResTypeId");
b.ToTable("Items");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.MTypeModel", b =>
@@ -510,7 +531,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CodMType");
b.ToTable("MTypeModel", (string)null);
b.ToTable("MTypeModel");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.NegotiationsModel", b =>
@@ -558,7 +579,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("CustomerId");
b.ToTable("Negotiations", (string)null);
b.ToTable("Negotiations");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.NegotTypeModel", b =>
@@ -590,7 +611,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("NegotTypeId");
b.ToTable("NegotType", (string)null);
b.ToTable("NegotType");
b.HasData(
new
@@ -703,7 +724,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("NegotiationId");
b.ToTable("Orders", (string)null);
b.ToTable("Orders");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.OrderResModel", b =>
@@ -757,7 +778,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("OrdId");
b.ToTable("OrderRes", (string)null);
b.ToTable("OrderRes");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ResourcesModel", b =>
@@ -811,7 +832,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("ItemId");
b.ToTable("Resources", (string)null);
b.ToTable("Resources");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.TagItemModel", b =>
@@ -829,7 +850,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("TagId");
b.ToTable("Tag2Item", (string)null);
b.ToTable("Tag2Item");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.TagModel", b =>
@@ -857,7 +878,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("TagId");
b.ToTable("Tags", (string)null);
b.ToTable("Tags");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.vBasketsDataModel", b =>
@@ -1051,7 +1072,7 @@ namespace SHERPA.BBM.CORE.Migrations
.HasColumnType("int")
.HasColumnName("OrdNumRef");
b.Property<int>("ResType")
b.Property<int>("ResTypeId")
.HasColumnType("int")
.HasColumnName("ResType");
@@ -1148,11 +1169,131 @@ namespace SHERPA.BBM.CORE.Migrations
.HasColumnType("decimal(18,6)")
.HasColumnName("Ordinato");
b.Property<string>("RagSoc")
.HasColumnType("nvarchar(max)")
.HasColumnName("RagSoc");
b.HasKey("NegotiationId");
b.ToView("v_NegotData");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.vOrderDataModel", b =>
{
b.Property<int>("OrdId")
.HasColumnType("int")
.HasColumnName("OrdId")
.HasColumnOrder(0);
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrdId"), 1L, 1);
b.Property<decimal>("AmountTot")
.HasPrecision(18, 6)
.HasColumnType("decimal(18,6)")
.HasColumnName("AmountTot");
b.Property<string>("BaskDescript")
.HasColumnType("nvarchar(max)")
.HasColumnName("BaskDescript");
b.Property<int>("BasketId")
.HasColumnType("int")
.HasColumnName("BasketId");
b.Property<decimal>("BillTot")
.HasPrecision(18, 6)
.HasColumnType("decimal(18,6)")
.HasColumnName("BillTot");
b.Property<string>("CodBasket")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodBasket");
b.Property<string>("CodDoc")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodDoc");
b.Property<string>("CodMType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodMType");
b.Property<string>("CodNegotiation")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodNegotiation");
b.Property<int>("CustomerId")
.HasColumnType("int")
.HasColumnName("CustomerId");
b.Property<DateTime>("DateIns")
.HasColumnType("datetime2")
.HasColumnName("DateIns");
b.Property<string>("Descript")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)")
.HasColumnName("Descript");
b.Property<int>("DocId")
.HasColumnType("int")
.HasColumnName("DocId");
b.Property<bool>("HasBill")
.HasColumnType("bit")
.HasColumnName("HasBill");
b.Property<bool>("MovOpen")
.HasColumnType("bit")
.HasColumnName("MovOpen");
b.Property<string>("NegotDescript")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)")
.HasColumnName("NegotDescript");
b.Property<int>("NegotiationId")
.HasColumnType("int")
.HasColumnName("NegotiationId");
b.Property<string>("Note")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)")
.HasColumnName("Note");
b.Property<int>("Num")
.HasColumnType("int")
.HasColumnName("Num");
b.Property<int>("OrdStatus")
.HasColumnType("int")
.HasColumnName("OrdStatus");
b.Property<int>("OrdType")
.HasColumnType("int")
.HasColumnName("OrdType");
b.Property<decimal>("PaidTot")
.HasPrecision(18, 6)
.HasColumnType("decimal(18,6)")
.HasColumnName("PaidTot");
b.Property<string>("RagSoc")
.HasColumnType("nvarchar(max)")
.HasColumnName("RagSoc");
b.Property<int>("YearRef")
.HasColumnType("int")
.HasColumnName("YearRef");
b.HasKey("OrdId");
b.ToView("v_OrderData");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.vTrendDataModel", b =>
{
b.Property<int>("YearRef")
@@ -1290,6 +1431,17 @@ namespace SHERPA.BBM.CORE.Migrations
b.Navigation("Document");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ItemsModel", b =>
{
b.HasOne("SHERPA.BBM.CORE.DbModels.ItemResTypeModel", "ResTypeNav")
.WithMany()
.HasForeignKey("ResTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ResTypeNav");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.NegotiationsModel", b =>
{
b.HasOne("SHERPA.BBM.CORE.DbModels.BasketsModel", "Basket")
+2 -2
View File
@@ -16,8 +16,8 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
</ItemGroup>
<ItemGroup>
+2 -4
View File
@@ -64,6 +64,7 @@ namespace SHERPA.BBM.CORE
public virtual DbSet<vYearDataModel> DbSetYearData { get; set; } = null!;
public virtual DbSet<vDocsDataModel> DbSetDocsData { get; set; } = null!;
public virtual DbSet<vOrderDataModel> DbSetOrderData { get; set; } = null!;
public virtual DbSet<ItemResTypeModel> DbSetItemResType { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
@@ -81,9 +82,6 @@ namespace SHERPA.BBM.CORE
// PROD
//optionsBuilder.UseSqlServer("Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM;Trusted_Connection=True;");
// DEV 2016
//optionsBuilder.UseSqlServer("Data Source=SQL2016DEV;Initial Catalog=SHERPA.BBM;Trusted_Connection=True;");
}
}
}
@@ -321,7 +319,7 @@ namespace SHERPA.BBM.CORE
if (!disableMigrate)
{
modelBuilder.ApplyConfiguration(new NegotConfig());
//modelBuilder.ApplyConfiguration(new ItemResTypeConfig());
}
OnModelCreatingPartial(modelBuilder);
@@ -28,11 +28,14 @@ WITH cteOrd AS
,SUM(ISNULL(f.Paid,0)) AS PaidSum
FROM Orders o
LEFT OUTER JOIN dbo.AccMov AS f ON o.OrdId = f.OrdId
WHERE f.IdxBillExt > 0
GROUP BY o.DocId
)
SELECT d.*
,n.BasketId
,bk.CodBasket
,bk.Descript as DescBasket
,c.RagSoc
,n.CodNegotiation
,n.Descript AS NegotDescript
@@ -42,10 +45,12 @@ SELECT d.*
,CAST(ISNULL(b.PaidSum,0) AS decimal(18,6)) AS Incassato
FROM dbo.Docs AS d
INNER JOIN Negotiations AS n ON n.NegotiationId = d.NegotiationId
INNER JOIN Baskets AS bk ON n.BasketId = bk.BasketId
INNER JOIN Customers AS c ON n.CustomerId = c.CustomerId
LEFT OUTER JOIN cteOrd AS o ON d.DocId = o.DocId
LEFT OUTER JOIN cteRes AS r ON d.DocId = r.DocId
LEFT OUTER JOIN cteBill AS b ON d.DocId = b.DocId
GO
@@ -28,6 +28,7 @@ WITH cteOrdRes AS
)
SELECT i.*
,ISNULL(r.Name, i.ResTypeId) AS ResName
,ISNULL(d.DocNum,0) AS DocNumRef
,ISNULL(o.OrdNum,0) AS OrdNumRef
,ISNULL(t.TagNum,0) AS TagsNumRef
@@ -35,6 +36,7 @@ FROM dbo.Items AS i
LEFT OUTER JOIN cteOrdRes AS o ON i.ItemId = o.ItemId
LEFT OUTER JOIN cteDoc AS d ON i.ItemId = d.ItemId
LEFT OUTER JOIN cteTag AS t ON i.ItemId = t.ItemId
LEFT OUTER JOIN ResType AS r ON i.ResTypeId = r.ResTypeId
GO
@@ -18,7 +18,9 @@ WITH cteDocs AS
,SUM(ISNULL(r.FinalPrice,0)) AS PriceSum
FROM Docs d
LEFT OUTER JOIN dbo.Resources AS r ON d.DocId = r.DocId
WHERE d.IsActive = 1 AND IsDraft = 0
WHERE d.IsActive = 1
AND d.IsDraft = 0
AND d.IsLocked = 0
GROUP BY d.NegotiationId
)
, cteOrd AS
@@ -27,6 +29,7 @@ WITH cteDocs AS
,SUM(ISNULL(r.FinalPrice,0)) AS OrdSum
FROM Orders o
LEFT OUTER JOIN dbo.OrderRes AS r ON o.OrdId = r.OrdId
WHERE o.OrdStatus >= 0
GROUP BY o.NegotiationId
)
, cteBill AS
@@ -42,6 +45,7 @@ SELECT t.NegotiationId
, b.CompanyId
, t.BasketId
, b.CodBasket
, cst.RagSoc
, b.Descript AS BaskDescript
, t.CustomerId
, t.Anno
@@ -56,6 +60,7 @@ SELECT t.NegotiationId
,ISNULL(bl.PaidSum,0) AS Incassato
FROM Negotiations AS t
INNER JOIN Baskets AS b ON b.BasketId = t.BasketId
INNER JOIN Customers AS cst ON t.CustomerId = cst.CustomerId
LEFT OUTER JOIN cteDocs AS d ON t.NegotiationId = d.NegotiationId
LEFT OUTER JOIN cteOff AS n ON t.NegotiationId = n.NegotiationId
LEFT OUTER JOIN cteOrd AS o ON t.NegotiationId = o.NegotiationId
@@ -15,7 +15,7 @@ WITH cteRes AS
,cteBill AS
(
SELECT o.DocId
,SUM(ISNULL(f.Amount,0)) AS AmountSum
,SUM(CASE WHEN ISNULL(f.IdxBillExt,0) > 0 AND f.OrdId > 0 THEN ISNULL(f.Amount,0) ELSE 0 END) AS AmountSum
,SUM(ISNULL(f.Paid,0)) AS PaidSum
,COUNT(f.AccMovId) AS NumMov
,SUM(CASE WHEN f.IdxBillExt IS NULL AND f.OrdId > 0 THEN 1 ELSE 0 END) AS MovOpen
@@ -44,6 +44,7 @@ FROM cteTratt t
LEFT OUTER JOIN cteOrd o ON t.YearRef = o.YearRef AND t.MonthRef = o.MonthRef
LEFT OUTER JOIN cteFatt f ON t.YearRef = f.YearRef AND t.MonthRef = f.MonthRef
--ORDER BY YearRef, MonthRef
GO
@@ -40,6 +40,7 @@ FROM cteTratt t
LEFT OUTER JOIN cteOrd o ON t.YearRef = o.YearRef
LEFT OUTER JOIN cteFatt f ON t.YearRef = f.YearRef
--ORDER BY YearRef
GO
@@ -103,6 +103,12 @@ else
<div>
I: <b>@($"{record.Paid:C2}")</b>
</div>
@if(record.AccMovAmount != record.Net)
{
<div class="text-danger">
&Delta; @($"{record.AccMovAmount - record.Net:C3}")
</div>
}
</td>
</tr>
}
@@ -338,7 +338,7 @@ namespace SHERPA.BBM.UI.Components
}
else if (ShowDetails == -1)
{
SearchRecords = SearchRecords.Where(x => !x.HasBill).ToList();
SearchRecords = SearchRecords.Where(x => !x.HasBill || x.AccMovAmount != x.Net).ToList();
}
}
if (!string.IsNullOrEmpty(lastSearch))
@@ -12,20 +12,20 @@
<div class="col-6 col-lg-3">
<div class="form-group">
<label for="codNeg">Rag.Sociale:</label>
<InputText id="RagSoc" @bind-Value="_currItem.RagSoc" class="form-control form-control-sm" />
<input typeof="text" @bind="_currItem.RagSoc" class="form-control form-control-sm" />
</div>
</div>
<div class="col-6 col-lg-3">
<label for="dataIns">Descr:</label>
<InputText id="Descript" @bind-Value="_currItem.Descript" class="form-control form-control-sm" />
<input type="text" @bind="_currItem.Descript" class="form-control form-control-sm" />
</div>
<div class="col-6 col-lg-3">
<label for="dataIns">P.Iva:</label>
<InputText id="PI" @bind-Value="_currItem.PI" class="form-control form-control-sm" />
<input type="number" @bind="_currItem.PI" class="form-control form-control-sm" />
</div>
<div class="col-6 col-lg-3">
<label for="dataIns">C.Fisc:</label>
<InputText id="CF" @bind-Value="_currItem.CF" class="form-control form-control-sm" />
<input type="text" @bind="_currItem.CF" class="form-control form-control-sm" />
</div>
<div class="col-6 col-lg-3">
<input type="submit" class="btn btn-success btn-block" value="Save" @onclick="saveUpdate" />
@@ -9,7 +9,7 @@ namespace SHERPA.BBM.UI.Components
#region Public Properties
[Parameter]
public CORE.DbModels.CustomersModel currItem
public CustomersModel currItem
{
get
{
@@ -32,7 +32,7 @@ namespace SHERPA.BBM.UI.Components
#region Protected Fields
protected CORE.DbModels.CustomersModel _currItem = new CustomersModel();
protected CustomersModel _currItem = new CustomersModel();
#endregion Protected Fields
+9 -9
View File
@@ -10,7 +10,6 @@
<th>Cod</th>
<th>Descrizione</th>
<th class="text-right">Importo</th>
<th class="text-right">Fatturazione</th>
</tr>
</thead>
<tbody>
@@ -20,20 +19,21 @@
<td class="text-nowrap">
<button class="btn btn-sm btn-info" @onclick="() => Move(record)"><span class="fas fa-arrows-alt-h"></span></button>
</td>
<td>
<div title="@record.NegotDescript">@record.CodNegotiation</div>
<div>@record.CodDoc</div>
@*<div class="small">@record.DataIns.ToString("ddd yyyy.MM.dd HH:mm")</div>*@
<td class="text-nowrap">
<div>@record.RagSoc</div>
<div class="small" title="@record.DescBasket">@record.CodBasket</div>
<div class="small" title="@record.NegotDescript">@record.CodNegotiation</div>
<div class="small">@record.CodDoc</div>
</td>
<td>
<div>@record.Descript</div>
<div class="small">@record.Note</div>
</td>
<td class="text-right text-nowrap" title="Importo"><b>@record.Importo.ToString("C2")</b></td>
<td class="text-right text-nowrap">
@if (record.DocType == BbmDocType.ConfermaOrdine)
<td class="text-right text-nowrap" title="Importo">
<b>@record.Importo.ToString("C2")</b>
@if (record.Fatturato > 0)
{
<div title="Fatturato"><b>@record.Fatturato.ToString("C2")</b> [F]</div>
<div title="Fatturato" class="small">@record.Fatturato.ToString("C2") [F]</div>
<div title="Incassato" class="small">@record.Incassato.ToString("C2") [I]</div>
}
</td>
+7 -2
View File
@@ -51,8 +51,7 @@ namespace SHERPA.BBM.UI.Components
answ = (currItem.DocId == DocId) ? "table-info" : "";
}
catch
{
}
{ }
}
return answ;
@@ -81,6 +80,12 @@ namespace SHERPA.BBM.UI.Components
#endregion Protected Fields
#region Protected Properties
#endregion Protected Properties
#region Protected Methods
protected async Task ForceReload(int newNum)
@@ -0,0 +1,38 @@
@using SHERPA.BBM.UI.Data
@inject BBM_EFService BBMService
@inject MessageService MessageService
<table class="table table-sm table-striped ">
<thead>
<tr>
<th></th>
<th>Cod</th>
<th>Descrizione</th>
<th class="text-right">Importo</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr class="@checkSelect(@record.ItemId)">
<td class="text-nowrap">
<button class="btn btn-sm btn-info" @onclick="() => Move(record)"><span class="fas fa-arrows-alt-h"></span></button>
</td>
<td class="small">
<div>@record.CodItem</div>
<div>@record.UM</div>
</td>
<td>
<div>@record.Descript</div>
</td>
<td class="text-right text-nowrap" title="Importo"><b>@record.UnitPrice.ToString("C2")</b></td>
</tr>
}
</tbody>
</table>
<div class="small">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
@@ -0,0 +1,166 @@
using Microsoft.AspNetCore.Components;
using SHERPA.BBM.CORE.DbModels;
namespace SHERPA.BBM.UI.Components
{
public partial class ItemMovList
{
#region Public Properties
[Parameter]
public int ResTypeId
{
get => baskIdSour;
set
{
baskIdSour = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
[Parameter]
public EventCallback<int> MoveRequested { get; set; }
#endregion Public Properties
#region Public Methods
public string btnFromState(bool isActive)
{
string answ = isActive ? "btn-success" : "btn-outline-warning";
return answ;
}
public string checkSelect(int ItemId)
{
string answ = "";
if (currItem != null)
{
try
{
answ = (currItem.ItemId == ItemId) ? "table-info" : "";
}
catch
{
}
}
return answ;
}
public async void OnSeachUpdated()
{
await InvokeAsync(() =>
{
Task task = UpdateData();
StateHasChanged();
});
}
public string tooltipFromState(bool isActive)
{
string answ = isActive ? "Attivo" : "Imposta Attivo";
return answ;
}
#endregion Public Methods
#region Protected Fields
protected int totalCount = 0;
#endregion Protected Fields
#region Protected Methods
protected async Task ForceReload(int newNum)
{
numRecord = newNum;
await ReloadAllData();
}
protected async Task ForceReloadPage(int newNum)
{
currPage = newNum;
await ReloadAllData();
}
protected async Task Move(vItemsDataModel currRecord)
{
// riporto richiesta spostamento
await MoveRequested.InvokeAsync(currRecord.ItemId);
}
protected override async Task OnInitializedAsync()
{
MessageService.ShowSearch = true;
MessageService.SearchVal = "";
MessageService.EA_SearchUpdated += OnSeachUpdated;
await ReloadAllData();
}
protected async Task ReloadAllData()
{
await updateTable();
}
protected void ResetData()
{
if (currItem != null)
{
BBMService.rollBackEdit(currItem);
}
currItem = null;
}
protected async Task UpdateData()
{
currItem = null;
await ReloadAllData();
}
protected async Task updateTable()
{
SearchRecords = await BBMService.ItemsGetFilt(ResTypeId, MessageService.SearchVal);
totalCount = SearchRecords.Count();
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
}
#endregion Protected Methods
#region Private Fields
private bool _showAllDoc = false;
private vItemsDataModel? currItem = null;
private bool isLoading = false;
private List<vItemsDataModel> ListRecords = new List<vItemsDataModel>();
private List<vItemsDataModel> SearchRecords = new List<vItemsDataModel>();
#endregion Private Fields
#region Private Properties
private int baskIdSour { get; set; } = 0;
private int currPage { get; set; } = 1;
private int custId { get; set; } = 0;
private int numRecord { get; set; } = 10;
private bool ShowAllDoc
{
get
{
return _showAllDoc;
}
set
{
_showAllDoc = value;
updateTable().ConfigureAwait(false);
}
}
#endregion Private Properties
}
}
+3 -3
View File
@@ -16,10 +16,10 @@
</div>
</div><div class="col-6 col-lg-3">
<label for="dataIns">Tipo:</label>
<InputSelect @bind-Value="@_currItem.ResType" class="form-control form-control-sm">
@foreach (var value in Enum.GetValues(typeof(BbmResType)))
<InputSelect @bind-Value="@_currItem.ResTypeId" class="form-control form-control-sm">
@foreach (var item in ResTypeList)
{
<option>@value</option>
<option value="@item.ResTypeId">@item.Name</option>
}
</InputSelect>
</div>
@@ -28,6 +28,9 @@ namespace SHERPA.BBM.UI.Components
[Parameter]
public EventCallback<int> DataUpdated { get; set; }
[Parameter]
public List<ItemResTypeModel> ResTypeList { get; set; } = null!;
#endregion Public Properties
#region Protected Fields
@@ -0,0 +1,50 @@
@using SHERPA.BBM.UI.Data
@inject BBM_EFService BBMService
@inject MessageService MessageService
<table class="table table-sm table-striped ">
<thead>
<tr>
<th></th>
<th>Cli/Bask/Trat</th>
<th>Descrizione</th>
<th class="text-right">Importo</th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr class="@checkSelect(@record.NegotiationId)">
<td class="text-nowrap">
<button class="btn btn-sm btn-info" @onclick="() => Move(record)"><span class="fas fa-arrows-alt-h"></span></button>
</td>
<td class="text-nowrap">
<div>@record.RagSoc</div>
<div class="small" title="@record.BaskDescript">@record.CodBasket</div>
<div class="small">@record.CodNegotiation</div>
</td>
<td>
<div>@record.Descript</div>
<div class="small d-flex justify-content-between">
<div>
@record.DataIns.ToString("ddd yyyy.MM.dd HH:mm")
</div>
<div>
#doc: <b>@record.NumDocs</b>
</div>
</div>
</td>
<td class="text-right text-nowrap" title="Importo">
<b>@record.Importo.ToString("C2")</b>
<div title="Fatturato" class="small">@record.Fatturato.ToString("C2") [F]</div>
</td>
</tr>
}
</tbody>
</table>
<div class="small">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
@@ -0,0 +1,183 @@
using Microsoft.AspNetCore.Components;
using SHERPA.BBM.CORE.DbModels;
namespace SHERPA.BBM.UI.Components
{
public partial class NegotMovList
{
#region Public Properties
[Parameter]
public int AnnoSel { get; set; } = 0;
[Parameter]
public int CustomerId
{
get => custId;
set
{
custId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
[Parameter]
public EventCallback<int> MoveRequested { get; set; }
[Parameter]
public int BaskIdSour
{
get => baskIdSour;
set
{
baskIdSour = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
#endregion Public Properties
#region Public Methods
public string btnFromState(bool isActive)
{
string answ = isActive ? "btn-success" : "btn-outline-warning";
return answ;
}
public string checkSelect(int NegotId)
{
string answ = "";
if (currItem != null)
{
try
{
answ = (currItem.NegotiationId == NegotId) ? "table-info" : "";
}
catch
{
}
}
return answ;
}
public async void OnSeachUpdated()
{
await InvokeAsync(() =>
{
Task task = UpdateData();
StateHasChanged();
});
}
public string tooltipFromState(bool isActive)
{
string answ = isActive ? "Attivo" : "Imposta Attivo";
return answ;
}
#endregion Public Methods
#region Protected Fields
protected int totalCount = 0;
#endregion Protected Fields
#region Protected Methods
protected async Task ForceReload(int newNum)
{
numRecord = newNum;
await ReloadAllData();
}
protected async Task ForceReloadPage(int newNum)
{
currPage = newNum;
await ReloadAllData();
}
protected async Task Move(vNegotiationsDataModel currRecord)
{
// riporto richiesta spostamento
await MoveRequested.InvokeAsync(currRecord.NegotiationId);
}
protected override async Task OnInitializedAsync()
{
MessageService.ShowSearch = true;
MessageService.SearchVal = "";
MessageService.EA_SearchUpdated += OnSeachUpdated;
await ReloadAllData();
}
protected async Task ReloadAllData()
{
await updateTable();
}
protected void ResetData()
{
if (currItem != null)
{
BBMService.rollBackEdit(currItem);
}
currItem = null;
}
protected async Task UpdateData()
{
currItem = null;
await ReloadAllData();
}
protected async Task updateTable()
{
SearchRecords = await BBMService.NegotiationsGetAsync(AnnoSel, 0, CustomerId, BaskIdSour, MessageService.SearchVal);
totalCount = SearchRecords.Count();
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
}
#endregion Protected Methods
#region Private Fields
private bool _showAllDoc = false;
private vNegotiationsDataModel? currItem = null;
private bool isLoading = false;
private List<vNegotiationsDataModel> ListRecords = new List<vNegotiationsDataModel>();
private List<vNegotiationsDataModel> SearchRecords = new List<vNegotiationsDataModel>();
#endregion Private Fields
#region Private Properties
private int custId { get; set; } = 0;
private int baskIdSour { get; set; } = 0;
private int currPage { get; set; } = 1;
private int numRecord { get; set; } = 10;
private bool ShowAllDoc
{
get
{
return _showAllDoc;
}
set
{
_showAllDoc = value;
updateTable().ConfigureAwait(false);
}
}
#endregion Private Properties
}
}
@@ -0,0 +1,26 @@
<div class="card shadow">
<div class="card-header bg-info text-light">
<b>Modifica</b>
</div>
<div class="card-body small">
<EditForm Model="@_currItem">
<DataAnnotationsValidator />
<ValidationSummary />
<div class="row">
<div class="col-12 col-lg-6">
<div class="form-group">
<label for="codTag">Codice:</label>
<InputText id="codTag" @bind-Value="_currItem.Name" class="form-control form-control-sm" />
</div>
</div>
<div class="col-6 col-lg-3">
<input type="submit" class="btn btn-success btn-block" value="Save" @onclick="saveUpdate" />
</div>
<div class="col-6 col-lg-3">
<button type="button" class="btn btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel</button>
</div>
</div>
</EditForm>
</div>
</div>
@@ -0,0 +1,64 @@
using Microsoft.AspNetCore.Components;
using SHERPA.BBM.CORE.DbModels;
using SHERPA.BBM.UI.Data;
namespace SHERPA.BBM.UI.Components
{
public partial class ResTypeEditor
{
#region Public Properties
[Parameter]
public ItemResTypeModel currItem
{
get
{
return _currItem;
}
set
{
_currItem = value;
}
}
[Parameter]
public EventCallback<int> DataReset { get; set; }
[Parameter]
public EventCallback<int> DataUpdated { get; set; }
#endregion Public Properties
#region Protected Fields
protected ItemResTypeModel _currItem = new ItemResTypeModel();
#endregion Protected Fields
#region Protected Properties
[Inject]
protected BBM_EFService BBMService { get; set; } = null!;
#endregion Protected Properties
#region Private Methods
private async Task cancelUpdate()
{
await DataReset.InvokeAsync(0);
}
private async Task saveUpdate()
{
if (_currItem != null)
{
await BBMService.ItemResTypeUpdate(_currItem);
await DataUpdated.InvokeAsync(1);
}
}
#endregion Private Methods
}
}
@@ -19,10 +19,10 @@
<span class="oi oi-tag" aria-hidden="true"></span>
</span>
</div>
<select @bind="@currResType" class="form-control form-control-sm">
@foreach (var value in Enum.GetValues(typeof(BbmResType)))
<select @bind="@currResTypeId" class="form-control form-control-sm">
@foreach (var item in ListResType)
{
<option>@value</option>
<option value="@item.ResTypeId">@item.Name</option>
}
</select>
</div>
@@ -53,7 +53,7 @@
{
@foreach (var item in itemsList)
{
<option value="@item.ItemId">@item.ResType | @item.Descript | @item.UnitPrice.ToString("C2")/@item.UM</option>
<option value="@item.ItemId">@item.ResTypeId | @item.Descript | @item.UnitPrice.ToString("C2")/@item.UM</option>
}
}
</InputSelect>
@@ -22,18 +22,18 @@ namespace SHERPA.BBM.UI.Components
}
[Parameter]
public BbmResType currResType
public int currResTypeId
{
get
{
return _currResType;
return _currResTypeId;
}
set
{
if (!_currResType.Equals(value))
if (!_currResTypeId.Equals(value))
{
_currResType = value;
_currResTypeId = value;
ReloadAllData().ConfigureAwait(false);
}
}
@@ -50,7 +50,7 @@ namespace SHERPA.BBM.UI.Components
#region Protected Fields
protected ResourcesModel _currItem = new ResourcesModel();
protected BbmResType _currResType = BbmResType.ND;
protected int _currResTypeId = 0;
protected int _selTagId = 0;
#endregion Protected Fields
@@ -184,7 +184,8 @@ namespace SHERPA.BBM.UI.Components
protected async Task ReloadAllData()
{
tagsList = await BBMService.TagsGetAll(TagType.Items);
var rawItems = await BBMService.ItemsGetFilt(currResType, "");
ListResType = await BBMService.ItemResTypeGetAll();
var rawItems = await BBMService.ItemsGetFilt(currResTypeId, "");
// filtro x tag se necessario...
if (SelTagId != 0)
{
@@ -194,6 +195,8 @@ namespace SHERPA.BBM.UI.Components
{
itemsList = rawItems;
}
// ordino x importo
itemsList = itemsList.OrderByDescending(x => x.UnitPrice).ToList();
}
#endregion Protected Methods
@@ -201,6 +204,7 @@ namespace SHERPA.BBM.UI.Components
#region Private Fields
private List<vItemsDataModel>? itemsList;
private List<ItemResTypeModel> ListResType = new List<ItemResTypeModel>();
private List<TagModel>? tagsList;
#endregion Private Fields
+143 -10
View File
@@ -44,7 +44,7 @@ namespace SHERPA.BBM.UI.Data
#region Public Events
/// <summary>
/// Evento richeista rilettura dati pagina (x refresh pagine aperte)
/// Evento richiesta rilettura dati pagina (x refresh pagine aperte)
/// </summary>
public event EventHandler ReloadRequest = delegate { };
@@ -203,6 +203,8 @@ namespace SHERPA.BBM.UI.Data
{
dbResult = dbResult.Where(x => x.Descript.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase)).ToList();
}
// riordino x codice...
dbResult = dbResult.OrderByDescending(x => x.CodBasket).ToList();
stopWatch.Stop();
LogDebug($"BasketsGetAsync | {source} ", stopWatch.Elapsed);
return Task.FromResult(dbResult);
@@ -802,7 +804,7 @@ namespace SHERPA.BBM.UI.Data
dbController.CustomerUpdate(currItem);
await FlushRedisCache();
}
catch(Exception exc)
catch (Exception exc)
{
Log.Error($"Eccezione in CustomerUpdate{Environment.NewLine}{exc}");
}
@@ -922,6 +924,12 @@ namespace SHERPA.BBM.UI.Data
return dbResult;
}
/// <summary>
/// sposta documento nella negoziazione richiesta
/// </summary>
/// <param name="DocId"></param>
/// <param name="NegotiationId"></param>
/// <returns></returns>
public async Task<bool> DocsMoveNegot(int DocId, int NegotiationId)
{
bool answ = false;
@@ -1061,13 +1069,105 @@ namespace SHERPA.BBM.UI.Data
}
}
/// <summary>
/// Sposta Item nella categoria indicata
/// </summary>
/// <param name="ItemId">Item</param>
/// <param name="ResTypeId">Categoria</param>
/// <returns></returns>
public async Task<bool> ItemMoveResType(int ItemId, int ResTypeId)
{
bool answ = false;
try
{
answ = dbController.ItemMoveResType(ItemId, ResTypeId);
await FlushRedisCache();
}
catch (Exception exc)
{
LogException("Eccezione durante ItemMoveResType", exc);
}
return answ;
}
/// <summary>
/// Eliminazione record
/// </summary>
/// <returns></returns>
public bool ItemResTypeDelete(ItemResTypeModel currRecord)
{
return dbController.ItemResTypeDelete(currRecord);
}
/// <summary>
/// Elenco tipi risorse/item
/// </summary>
/// <returns></returns>
public Task<List<ItemResTypeModel>> ItemResTypeGetAll()
{
string source = "DB";
List<ItemResTypeModel>? dbResult = new List<ItemResTypeModel>();
string currKey = $"{rKeyListSel}:ItemResType";
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
string? rawData = redisDb.StringGet(currKey);
if (!string.IsNullOrEmpty(rawData))
{
source = "REDIS";
try
{
dbResult = JsonConvert.DeserializeObject<List<ItemResTypeModel>>(rawData);
}
catch
{ }
}
else
{
dbResult = dbController.ItemResTypeGetAll();
rawData = JsonConvert.SerializeObject(dbResult, JSSettings);
redisDb.StringSet(currKey, rawData, UltraLongCache);
}
if (dbResult == null)
{
dbResult = new List<ItemResTypeModel>();
}
stopWatch.Stop();
LogDebug($"ItemResTypeGetAll | {source} ", stopWatch.Elapsed);
return Task.FromResult(dbResult);
}
/// <summary>
/// Update Categoria
/// </summary>
/// <param name="currItem"></param>
/// <returns></returns>
public async Task ItemResTypeUpdate(ItemResTypeModel currItem)
{
try
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
bool fatto = dbController.ItemResTypeUpdate(currItem);
if (fatto)
{
await FlushRedisCache();
}
stopWatch.Stop();
LogDebug($"ItemResTypeUpdate", stopWatch.Elapsed);
}
catch (Exception exc)
{
LogException("Eccezione in ItemResTypeUpdate", exc);
}
}
/// <summary>
/// Gestione items con cache redis x tipo...
/// </summary>
/// <param name="ResType"></param>
/// <param name="searchVal"></param>
/// <returns></returns>
public Task<List<vItemsDataModel>> ItemsGetFilt(BbmResType ResType, string searchVal)
public Task<List<vItemsDataModel>> ItemsGetFilt(int ResType, string searchVal)
{
string source = "DB";
List<vItemsDataModel>? dbResult = new List<vItemsDataModel>();
@@ -1373,6 +1473,27 @@ namespace SHERPA.BBM.UI.Data
return Task.FromResult(dbController.NegotGetByKey(NegotId));
}
/// <summary>
/// Sposta negoziazione nel basket indicato
/// </summary>
/// <param name="NegotiationId"></param>
/// <param name="BasketId"></param>
/// <returns></returns>
public async Task<bool> NegotiationMoveBasket(int NegotiationId, int BasketId)
{
bool answ = false;
try
{
answ = dbController.NegotiationMoveBasket(NegotiationId, BasketId);
await FlushRedisCache();
}
catch (Exception exc)
{
LogException("Eccezione durante NegotiationMoveBasket", exc);
}
return answ;
}
public Task<List<NegotiationsModel>> NegotiationsGetAllAsync()
{
return Task.FromResult(dbController.NegotGetAllDesc());
@@ -1790,10 +1911,18 @@ namespace SHERPA.BBM.UI.Data
return Task.FromResult(dbController.ResourceGetLastDesc(anno, numRec));
}
public Task<List<ResourcesModel>> ResourcesGetAsync(int anno, int baskId, int negoId, int docId, BbmResType resType)
/// <summary>
/// Elenco Risorse da filtro
/// </summary>
/// <param name="anno">Anno</param>
/// <param name="baskId">Basket</param>
/// <param name="negoId">Negoziazione</param>
/// <param name="docId">Documento</param>
/// <param name="ResTypeId">Tipo risorsa</param>
/// <returns></returns>
public Task<List<ResourcesModel>> ResourcesGetAsync(int anno, int baskId, int negoId, int docId, int resTypeId)
{
//baskId, negoId,
return Task.FromResult(dbController.ResourceGetLastDesc(anno, baskId, negoId, docId, resType));
return Task.FromResult(dbController.ResourceGetLastDesc(anno, baskId, negoId, docId, resTypeId));
}
public Task<double> ResourcesGetGrandTotal(int DocId)
@@ -1992,18 +2121,22 @@ namespace SHERPA.BBM.UI.Data
return Task.FromResult(dbResult);
}
public void TagDelete(TagModel currRecord)
/// <summary>
/// Eliminazione record
/// </summary>
/// <param name="currRecord"></param>
public bool TagDelete(TagModel currRecord)
{
dbController.TagDelete(currRecord.TagId);
return dbController.TagDelete(currRecord.TagId);
}
/// <summary>
/// Delete Tag2Item
/// </summary>
/// <param name="currRecord"></param>
public void TagItemDelete(TagItemModel currRecord)
public bool TagItemDelete(TagItemModel currRecord)
{
dbController.TagItemDelete(currRecord);
return dbController.TagItemDelete(currRecord);
}
/// <summary>
+3 -1
View File
@@ -124,6 +124,7 @@ namespace SHERPA.BBM.UI.Pages
CodBasket = newCode,
DataIns = DateTime.Now,
Descript = "New Basket",
Anno = DateTime.Today.Year,
IsActive = true
};
currItem = newRecord;
@@ -450,7 +451,8 @@ namespace SHERPA.BBM.UI.Pages
{
// init variabili
var filtSelData = new BBM_SelectData();
filtSelData.YearSel = 0;
filtSelData.YearSel = currRecord.Anno;
//filtSelData.YearSel = 0;
filtSelData.CompanyId = currRecord.CompanyId;
// salvo codice company...
var currComp = CompanyList.Where(x => x.CompanyId == currRecord.CompanyId).FirstOrDefault();
+1 -1
View File
@@ -71,6 +71,6 @@
</div>
</div>
<div class="card-footer py-1">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="totalCount" showLoading="isLoading" />
</div>
</div>
+4 -3
View File
@@ -97,13 +97,13 @@ namespace SHERPA.BBM.UI.Pages
currItem = currRecord;
}
protected async Task ForceReload(int newNum)
protected async Task SetNumRec(int newNum)
{
numRecord = newNum;
await ReloadAllData();
}
protected async Task ForceReloadPage(int newNum)
protected async Task SetPage(int newNum)
{
currPage = newNum;
await ReloadAllData();
@@ -122,13 +122,14 @@ namespace SHERPA.BBM.UI.Pages
await updateTable();
}
protected void ResetData()
protected async Task ResetData()
{
if (currItem != null)
{
BBMService.rollBackEdit(currItem);
}
currItem = null;
await ReloadAllData();
}
protected async Task UpdateData()
+18 -4
View File
@@ -34,6 +34,21 @@ namespace SHERPA.BBM.UI.Pages
protected int SelNegIdDx { get; set; }
protected int SelNegIdSx { get; set; }
protected int YearSel
{
get => yearSel;
set
{
if (yearSel != value)
{
yearSel = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
}
#endregion Protected Properties
#region Protected Methods
@@ -69,14 +84,14 @@ namespace SHERPA.BBM.UI.Pages
protected async Task ReloadDataDx()
{
CustomersList = await BBMService.CustomersGetAll("");
BasketListDx = await BBMService.BasketsGetAsync(1, 0);
BasketListDx = await BBMService.BasketsGetAsync(1, YearSel);
NegotiationListDx = await BBMService.NegotiationsGetAsync(YearSel, 1, SelCustomerIdDx, SelBasketIdDx, "");
}
protected async Task ReloadDataSx()
{
CustomersList = await BBMService.CustomersGetAll("");
BasketListSx = await BBMService.BasketsGetAsync(1, 0);
BasketListSx = await BBMService.BasketsGetAsync(1, YearSel);
NegotiationListSx = await BBMService.NegotiationsGetAsync(YearSel, 1, SelCustomerIdSx, SelBasketIdSx, "");
}
@@ -93,8 +108,7 @@ namespace SHERPA.BBM.UI.Pages
private List<vNegotiationsDataModel> NegotiationListDx = new List<vNegotiationsDataModel>();
private List<vNegotiationsDataModel> NegotiationListSx = new List<vNegotiationsDataModel>();
private int YearSel = 0;
private int yearSel = 0;
private List<int> yearsList = new List<int>();
+1 -1
View File
@@ -146,7 +146,7 @@ namespace SHERPA.BBM.UI.Pages
listReplace.Add("{{DATA_DOC}}", $"{DateTime.Today:ddd dd/MM/yyyy}");
officeXmlMan.replaceDocxText(destPath, listReplace);
// aggiungo tab risorse ordine
var listDocRes = await BBMService.ResourcesGetAsync(0, 0, 0, currRecord.DocId, BbmResType.ND);
var listDocRes = await BBMService.ResourcesGetAsync(0, 0, 0, currRecord.DocId, 0);
officeXmlMan.InsertOrderResTable(destPath, "BMARK_RISORSE", listDocRes);
}
catch (Exception exc)
+93
View File
@@ -0,0 +1,93 @@
@page "/ItemMover"
@using SHERPA.BBM.UI.Components
@using SHERPA.BBM.UI.Data
@using CORE.DbModels
@inject BBM_EFService BBMService
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-12">
<h4><span class="fas fa-exchange-alt pr-3" aria-hidden="true"></span> Spostamento Item (in Categorie)</h4>
</div>
</div>
</div>
<div class="card-body">
@if (isLoading)
{
<div class="w-100">
<LoadingData DisplayMode="LoadingData.SpinMode.Normal" DisplaySize="LoadingData.CtrlSize.Large"></LoadingData>
</div>
}
else
{
<div class="row">
<div class="col-6">
<div class="d-flex flex-column small">
<div class="py-1">
<div class="row">
<div class="col-12">
<label>Categoria:</label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="fas fa-hashtag" aria-hidden="true"></span>
</span>
</div>
<select @bind="@SelResTypeIdSx" class="form-control form-control">
@* <option value="1">-- Tutti ---</option> *@
@foreach (var item in ResTypeList)
{
<option value="@item.ResTypeId">@item.Name</option>
}
</select>
<div class="input-group-append">
<button class="@cssBtnResBaskSx" @onclick="ResetResTypeSx"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<ItemMovList ResTypeId="@SelResTypeIdSx" MoveRequested="moveRight"></ItemMovList>
</div>
<div class="col-6">
<div class="d-flex flex-column small">
<div class="py-1">
<div class="row">
<div class="col-12">
<label>Categoria:</label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="fas fa-hashtag" aria-hidden="true"></span>
</span>
</div>
<select @bind="@SelResTypeIdDx" class="form-control form-control">
@* <option value="1">--- Tutti ---</option> *@
@if (ResTypeList != null)
{
@foreach (var item in ResTypeList)
{
<option value="@item.ResTypeId">@item.Name</option>
}
}
</select>
<div class="input-group-append">
<button class="@cssBtnResBaskDx" @onclick="ResetResTypeDx"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<ItemMovList ResTypeId="@SelResTypeIdDx" MoveRequested="moveRight"></ItemMovList>
</div>
</div>
}
</div>
</div>
+172
View File
@@ -0,0 +1,172 @@
using Microsoft.AspNetCore.Components;
using SHERPA.BBM.CORE.DbModels;
using SHERPA.BBM.UI.Data;
namespace SHERPA.BBM.UI.Pages
{
public partial class ItemMover : IDisposable
{
#region Public Methods
public void Dispose()
{
BBMService.ReloadRequest -= BBMService_ReloadRequest;
}
#endregion Public Methods
#region Protected Fields
protected int _dxNegoId = 1;
protected int _dxResTypeId = 0;
protected int _sxNegoId = 1;
protected int _sxResTypeId = 0;
#endregion Protected Fields
#region Protected Properties
[Inject]
protected MessageService MService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected async Task moveLeft(int currIdx)
{
if (SelResTypeIdSx > 0)
{
// eseguo spostamento...
await BBMService.ItemMoveResType(currIdx, SelResTypeIdSx);
}
}
protected async Task moveRight(int currIdx)
{
if (SelResTypeIdDx > 0)
{
// eseguo spostamento...
await BBMService.ItemMoveResType(currIdx, SelResTypeIdDx);
}
}
protected override async Task OnInitializedAsync()
{
isLoading = true;
BBMService.ReloadRequest += BBMService_ReloadRequest;
await Task.Delay(1);
MService.NotifyHeadChanged();
await ReloadAllData();
isLoading = false;
}
#endregion Protected Methods
#region Private Fields
private List<ItemResTypeModel> ResTypeList = new List<ItemResTypeModel>();
private List<ItemResTypeModel> CatListSx = new List<ItemResTypeModel>();
#endregion Private Fields
#region Private Properties
private string cssBtnResBaskDx
{
get => SelResTypeIdDx == 0 ? "btn btn-secondary" : "btn btn-primary";
}
private string cssBtnResBaskSx
{
get => SelResTypeIdSx == 0 ? "btn btn-secondary" : "btn btn-primary";
}
private bool isLoading { get; set; } = false;
private int SelResTypeIdDx
{
get
{
return _dxResTypeId;
}
set
{
_dxResTypeId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
private int SelResTypeIdSx
{
get
{
return _sxResTypeId;
}
set
{
_sxResTypeId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
#endregion Private Properties
#region Private Methods
private async void BBMService_ReloadRequest(object? sender, EventArgs e)
{
ReloadEventArgs currArgs = (ReloadEventArgs)e;
if (!string.IsNullOrEmpty(currArgs.ReloadMessage))
{
await ReloadAllData();
await InvokeAsync(StateHasChanged);
}
}
private async Task ReloadAllData()
{
ResTypeList = await BBMService.ItemResTypeGetAll();
}
private async Task ResetResTypeDx()
{
if (SelResTypeIdDx != 1)
{
SelResTypeIdDx = 0;
await Task.Delay(1);
}
}
private async Task ResetResTypeSx()
{
if (SelResTypeIdSx != 1)
{
SelResTypeIdSx = 0;
await Task.Delay(1);
}
}
private string trimTxt(string txtOrig, int maxChar)
{
string answ = txtOrig;
if (txtOrig.Length > maxChar)
{
answ = $"{txtOrig.Substring(0, maxChar - 3)}...";
}
return answ;
}
#endregion Private Methods
}
}
+5 -5
View File
@@ -34,9 +34,9 @@
</span>
</div>
<select @bind="@SelResType" class="form-control form-control-sm">
@foreach (var value in Enum.GetValues(typeof(BbmResType)))
@foreach (var item in ListResType)
{
<option>@value</option>
<option value="@item.ResTypeId">@item.Name</option>
}
</select>
<div class="input-group-append">
@@ -52,7 +52,7 @@
<div class="card-body">
@if (currItem != null && EditMode)
{
<ItemsEditor currItem="@currItem" DataReset="ResetData" DataUpdated="ForceReloadData"></ItemsEditor>
<ItemsEditor currItem="@currItem" DataReset="ResetData" DataUpdated="ForceReloadData" ResTypeList="@ListResType"></ItemsEditor>
}
@if (ListRecords == null)
{
@@ -75,7 +75,7 @@
<Sorter ParamName="Cod" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
</th>
<th>
Tipo
Categoria
<Sorter ParamName="Tipo" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter>
</th>
<th>
@@ -119,7 +119,7 @@
}
</td>
<td>@record.CodItem</td>
<td>@record.ResType</td>
<td>@record.ResName</td>
<td>@record.UM</td>
<td>@record.Descript</td>
<td class="text-right">
+107 -101
View File
@@ -49,6 +49,15 @@ namespace SHERPA.BBM.UI.Pages
[Inject]
protected BBM_EFService BBMService { get; set; } = null!;
protected bool EditMode { get; set; } = true;
protected string EditModeMsg
{
get => EditMode ? "Standard Edit" : "Merge Item";
}
protected List<int> Item2Merge { get; set; } = new List<int>();
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
@@ -68,7 +77,7 @@ namespace SHERPA.BBM.UI.Pages
ItemsModel newRecord = new ItemsModel()
{
CodItem = newCode,
ResType = BbmResType.ND,
ResTypeId = 0,
UM = "NR",
UnitPrice = 1,
Descript = "Nuovo Item"
@@ -84,6 +93,27 @@ namespace SHERPA.BBM.UI.Pages
await BBMService.ItemDelete(currRecord.ItemId);
await ForceReloadData();
}
/// <summary>
/// Esegue merge degli item selezionati..
/// </summary>
/// <returns></returns>
protected async Task DoMerge()
{
if (currItem != null)
{
await BBMService.ItemMerge(currItem.ItemId, Item2Merge);
DoReset();
}
await ForceReloadData();
}
protected void DoReset()
{
currItem = null;
Item2Merge = new List<int>();
}
/// <summary>
/// Edit record
/// </summary>
@@ -92,6 +122,69 @@ namespace SHERPA.BBM.UI.Pages
{
currItem = await BBMService.ItemFind(currRecord.ItemId);
}
protected async Task ForceReloadData()
{
currItem = null;
await Task.Delay(1);
await ReloadAllData();
}
protected async Task NewRelease(vItemsDataModel currRecord)
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler clonare l'item corrente?"))
return;
// recupero counter
int lastDot = currRecord.CodItem.LastIndexOf(".");
string oldCode = currRecord.CodItem.Substring(0, lastDot);
string newCode = BBMService.CounterGetNext(oldCode, 2);
ItemsModel newRecord = new ItemsModel()
{
CodItem = newCode,
ResTypeId = currRecord.ResTypeId,
UM = currRecord.UM,
UnitPrice = currRecord.UnitPrice,
Descript = "COPIA di " + currRecord.Descript
};
currItem = newRecord;
}
protected override async Task OnInitializedAsync()
{
MService.NotifyHeadChanged();
MService.ShowSearch = true;
MService.SearchVal = "";
MService.EA_SearchUpdated += OnSeachUpdated;
await ReloadAllData();
}
protected async void OnSeachUpdated()
{
currPage = 1;
Log.Trace($"SearchVal: {MService.SearchVal}");
await ReloadAllData();
await InvokeAsync(StateHasChanged);
}
protected async Task ReloadAllData()
{
ListResType = await BBMService.ItemResTypeGetAll();
SearchRecords = await BBMService.ItemsGetFilt(SelResType, MService.SearchVal);
TotalCount = SearchRecords.Count();
SortTable();
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
}
protected void ResetData()
{
if (currItem != null)
{
BBMService.rollBackEdit(currItem);
}
currItem = null;
}
/// <summary>
/// Selezione x Merge
/// </summary>
@@ -124,102 +217,18 @@ namespace SHERPA.BBM.UI.Pages
}
}
/// <summary>
/// Esegue merge degli item selezionati..
/// </summary>
/// <returns></returns>
protected async Task DoMerge()
{
if (currItem != null)
{
await BBMService.ItemMerge(currItem.ItemId, Item2Merge);
DoReset();
}
await ForceReloadData();
}
protected void DoReset()
{
currItem = null;
Item2Merge = new List<int>();
}
protected List<int> Item2Merge { get; set; } = new List<int>();
protected async Task SetNumRec(int newNum)
{
numRecord = newNum;
await ReloadAllData();
}
protected async Task ForceReloadData()
{
currItem = null;
await Task.Delay(1);
await ReloadAllData();
}
protected async Task SetNumPage(int newNum)
{
currPage = newNum;
await ReloadAllData();
}
protected async Task NewRelease(vItemsDataModel currRecord)
protected async Task SetNumRec(int newNum)
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler clonare l'item corrente?"))
return;
// recupero counter
int lastDot = currRecord.CodItem.LastIndexOf(".");
string oldCode = currRecord.CodItem.Substring(0, lastDot);
string newCode = BBMService.CounterGetNext(oldCode, 2);
ItemsModel newRecord = new ItemsModel()
{
CodItem = newCode,
ResType = currRecord.ResType,
UM = currRecord.UM,
UnitPrice = currRecord.UnitPrice,
Descript = "COPIA di " + currRecord.Descript
};
currItem = newRecord;
}
protected override async Task OnInitializedAsync()
{
MService.NotifyHeadChanged();
MService.ShowSearch = true;
MService.SearchVal = "";
MService.EA_SearchUpdated += OnSeachUpdated;
numRecord = newNum;
await ReloadAllData();
}
protected async void OnSeachUpdated()
{
currPage = 1;
Log.Trace($"SearchVal: {MService.SearchVal}");
await ReloadAllData();
await InvokeAsync(StateHasChanged);
}
protected async Task ReloadAllData()
{
SearchRecords = await BBMService.ItemsGetFilt(SelResType, MService.SearchVal);
TotalCount = SearchRecords.Count();
SortTable();
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
}
protected void ResetData()
{
if (currItem != null)
{
BBMService.rollBackEdit(currItem);
}
currItem = null;
}
protected async Task SortRequested(SortCallBack e)
{
sortField = e.ParamName;
@@ -227,13 +236,6 @@ namespace SHERPA.BBM.UI.Pages
await ReloadAllData();
}
protected bool EditMode { get; set; } = true;
protected string EditModeMsg
{
get => EditMode ? "Standard Edit" : "Merge Item";
}
#endregion Protected Methods
#region Private Fields
@@ -241,6 +243,7 @@ namespace SHERPA.BBM.UI.Pages
private static Logger Log = LogManager.GetCurrentClassLogger();
private ItemsModel? currItem = null;
private List<vItemsDataModel> ListRecords = new List<vItemsDataModel>();
private List<ItemResTypeModel> ListResType = new List<ItemResTypeModel>();
private List<vItemsDataModel> SearchRecords = new List<vItemsDataModel>();
private bool sortAsc = true;
@@ -250,7 +253,7 @@ namespace SHERPA.BBM.UI.Pages
#region Private Properties
private BbmResType _SelResType { get; set; } = BbmResType.ND;
private int _SelResType { get; set; } = 0;
private string cssBtnResRType
{
@@ -263,7 +266,7 @@ namespace SHERPA.BBM.UI.Pages
private int numRecord { get; set; } = 10;
private BbmResType SelResType
private int SelResType
{
get
{
@@ -271,9 +274,12 @@ namespace SHERPA.BBM.UI.Pages
}
set
{
_SelResType = value;
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
if (_SelResType != value)
{
_SelResType = value;
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
}
@@ -344,11 +350,11 @@ namespace SHERPA.BBM.UI.Pages
case "Tipo":
if (sortAsc)
{
SearchRecords = SearchRecords.OrderBy(x => x.ResType).ToList();
SearchRecords = SearchRecords.OrderBy(x => x.ResTypeId).ToList();
}
else
{
SearchRecords = SearchRecords.OrderByDescending(x => x.ResType).ToList();
SearchRecords = SearchRecords.OrderByDescending(x => x.ResTypeId).ToList();
}
break;
+150
View File
@@ -0,0 +1,150 @@
@page "/NegotMover"
@using SHERPA.BBM.UI.Components
@using SHERPA.BBM.UI.Data
@using CORE.DbModels
@inject BBM_EFService BBMService
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-8">
<h4><span class="fas fa-exchange-alt pr-3" aria-hidden="true"></span> Spostamento Trattative</h4>
</div>
<div class="col-4 text-right">
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="oi oi-calendar" aria-hidden="true"></span>
</span>
</div>
<select @bind="@YearSel" class="form-control form-control-sm">
<option value="0">--- Tutti ---</option>
@foreach (var item in yearsList)
{
<option value="@item">@item</option>
}
</select>
<div class="input-group-append">
<button class="@cssBtnResYear" @onclick="ResetYear"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
</div>
</div>
<div class="card-body">
@if (isLoading)
{
<div class="w-100">
<LoadingData DisplayMode="LoadingData.SpinMode.Normal" DisplaySize="LoadingData.CtrlSize.Large"></LoadingData>
</div>
}
else
{
<div class="row">
<div class="col-6">
<div class="d-flex flex-column small">
<div class="py-1">
<div class="row">
<div class="col-4">
<label>Cliente:</label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="fas fa-users" aria-hidden="true"></span>
</span>
</div>
<select @bind="@SelCustomerIdSx" class="form-control form-control">
@foreach (var item in CustomersList)
{
<option value="@item.CustomerId">@item.RagSoc</option>
}
</select>
<div class="input-group-append">
<button class="@cssBtnResCustSx" @onclick="ResetCustSx"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
<div class="col-8">
<label>Basket:</label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="oi oi-basket" aria-hidden="true"></span>
</span>
</div>
<select @bind="@SelBasketIdSx" class="form-control form-control">
<option value="1">-- Tutti ---</option>
@foreach (var item in BasketListSx)
{
<option value="@item.BasketId">@item.CodBasket - @item.Descript</option>
}
</select>
<div class="input-group-append">
<button class="@cssBtnResBaskSx" @onclick="ResetBasketSx"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<NegotMovList AnnoSel="@YearSel" BaskIdSour="@SelBasketIdSx" MoveRequested="moveRight" CustomerId="SelCustomerIdSx"></NegotMovList>
</div>
<div class="col-6">
<div class="d-flex flex-column small">
<div class="py-1">
<div class="row">
<div class="col-4">
<label>Cliente:</label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="fas fa-users" aria-hidden="true"></span>
</span>
</div>
<select @bind="@SelCustomerIdDx" class="form-control form-control">
@foreach (var item in CustomersList)
{
<option value="@item.CustomerId">@item.RagSoc</option>
}
</select>
<div class="input-group-append">
<button class="@cssBtnResCustDx" @onclick="ResetCustDx"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
<div class="col-8">
<label>Basket:</label>
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text">
<span class="oi oi-basket" aria-hidden="true"></span>
</span>
</div>
<select @bind="@SelBasketIdDx" class="form-control form-control">
<option value="1">--- Tutti ---</option>
@if (BasketListDx != null)
{
@foreach (var item in BasketListDx)
{
<option value="@item.BasketId">@item.CodBasket - @item.Descript</option>
}
}
</select>
<div class="input-group-append">
<button class="@cssBtnResBaskDx" @onclick="ResetBasketDx"><i class="fas fa-undo"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
<NegotMovList AnnoSel="@YearSel" BaskIdSour="@SelBasketIdDx" MoveRequested="moveLeft" CustomerId="SelCustomerIdDx"></NegotMovList>
</div>
</div>
}
</div>
</div>
+279
View File
@@ -0,0 +1,279 @@
using Microsoft.AspNetCore.Components;
using SHERPA.BBM.CORE.DbModels;
using SHERPA.BBM.UI.Data;
namespace SHERPA.BBM.UI.Pages
{
public partial class NegotMover : IDisposable
{
#region Public Methods
public void Dispose()
{
BBMService.ReloadRequest -= BBMService_ReloadRequest;
}
#endregion Public Methods
#region Protected Fields
protected int _dxBaskId = 1;
protected int _dxCustId = 1;
protected int _dxNegoId = 1;
protected int _sxBaskId = 1;
protected int _sxCustId = 1;
protected int _sxNegoId = 1;
#endregion Protected Fields
#region Protected Properties
[Inject]
protected MessageService MService { get; set; } = null!;
protected int YearSel
{
get => yearSel;
set
{
if (yearSel != value)
{
yearSel = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
}
#endregion Protected Properties
#region Protected Methods
protected async Task moveLeft(int currIdx)
{
if (SelBasketIdSx > 0)
{
// eseguo spostamento...
await BBMService.NegotiationMoveBasket(currIdx, SelBasketIdSx);
}
}
protected async Task moveRight(int currIdx)
{
if (SelBasketIdDx > 0)
{
// eseguo spostamento...
await BBMService.NegotiationMoveBasket(currIdx, SelBasketIdDx);
}
}
protected override async Task OnInitializedAsync()
{
isLoading = true;
BBMService.ReloadRequest += BBMService_ReloadRequest;
await Task.Delay(1);
MService.NotifyHeadChanged();
await ReloadAllData();
isLoading = false;
}
protected async Task ReloadDataDx()
{
CustomersList = await BBMService.CustomersGetAll("");
BasketListDx = await BBMService.BasketsGetAsync(1, YearSel);
}
protected async Task ReloadDataSx()
{
CustomersList = await BBMService.CustomersGetAll("");
BasketListSx = await BBMService.BasketsGetAsync(1, YearSel);
}
#endregion Protected Methods
#region Private Fields
private List<vBasketsDataModel> BasketListDx = new List<vBasketsDataModel>();
private List<vBasketsDataModel> BasketListSx = new List<vBasketsDataModel>();
private List<CustomersModel> CustomersList = new List<CustomersModel>();
private int yearSel = 0;
private List<int> yearsList = new List<int>();
#endregion Private Fields
#region Private Properties
private string cssBtnResBaskDx
{
get => SelBasketIdDx == 1 ? "btn btn-secondary" : "btn btn-primary";
}
private string cssBtnResBaskSx
{
get => SelBasketIdSx == 1 ? "btn btn-secondary" : "btn btn-primary";
}
private string cssBtnResCustDx
{
get => SelCustomerIdDx == 1 ? "btn btn-secondary" : "btn btn-primary";
}
private string cssBtnResCustSx
{
get => SelCustomerIdSx == 1 ? "btn btn-secondary" : "btn btn-primary";
}
private string cssBtnResYear
{
get => YearSel == 0 ? "btn btn-secondary" : "btn btn-primary";
}
private bool isLoading { get; set; } = false;
private int SelBasketIdDx
{
get
{
return _dxBaskId;
}
set
{
_dxBaskId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadDataDx());
pUpd.Wait();
}
}
private int SelBasketIdSx
{
get
{
return _sxBaskId;
}
set
{
_sxBaskId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadDataSx());
pUpd.Wait();
}
}
private int SelCustomerIdDx
{
get
{
return _dxCustId;
}
set
{
_dxCustId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadDataDx());
pUpd.Wait();
}
}
private int SelCustomerIdSx
{
get
{
return _sxCustId;
}
set
{
_sxCustId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadDataSx());
pUpd.Wait();
}
}
#endregion Private Properties
#region Private Methods
private async void BBMService_ReloadRequest(object? sender, EventArgs e)
{
ReloadEventArgs currArgs = (ReloadEventArgs)e;
if (!string.IsNullOrEmpty(currArgs.ReloadMessage))
{
await ReloadAllData();
await InvokeAsync(StateHasChanged);
}
}
private async Task ReloadAllData()
{
yearsList = await BBMService.DocsYears();
await ReloadDataSx();
await ReloadDataDx();
}
private async Task ResetBasketDx()
{
if (SelBasketIdDx != 1)
{
SelBasketIdDx = 1;
await Task.Delay(1);
}
}
private async Task ResetBasketSx()
{
if (SelBasketIdSx != 1)
{
SelBasketIdSx = 1;
await Task.Delay(1);
}
}
private async Task ResetCustDx()
{
if (SelCustomerIdDx != 1)
{
SelCustomerIdDx = 1;
await Task.Delay(1);
}
}
private async Task ResetCustSx()
{
if (SelCustomerIdSx != 1)
{
SelCustomerIdSx = 1;
await Task.Delay(1);
}
}
private async Task ResetYear()
{
if (YearSel != 0)
{
YearSel = 0;
await Task.Delay(1);
}
}
private string trimTxt(string txtOrig, int maxChar)
{
string answ = txtOrig;
if (txtOrig.Length > maxChar)
{
answ = $"{txtOrig.Substring(0, maxChar - 3)}...";
}
return answ;
}
#endregion Private Methods
}
}
+2 -1
View File
@@ -587,7 +587,8 @@ namespace SHERPA.BBM.UI.Pages
{
// init variabili
var filtSelData = new BBM_SelectData();
filtSelData.YearSel = 0;
filtSelData.YearSel = currRecord.Anno;
//filtSelData.YearSel = 0;
filtSelData.CompanyId = currRecord.CompanyId;
// salvo codice company...
var currComp = CompanyList.Where(x => x.CompanyId == currRecord.CompanyId).FirstOrDefault();
+1 -1
View File
@@ -9,7 +9,7 @@ else
{
<div class="card">
<div class="card-header bg-dark text-light">
<OrderFilt FilterUpdated="SetFilter" Title="Riconciliazione" SelCustId="SelCustId" SelBaskId="SelBaskId"></OrderFilt>
<OrderFilt FilterUpdated="SetFilter" Title="Riconciliazione" SelCustId="SelCustId" SelBaskId="SelBaskId" SelYearRef="@SelFilter.YearSel"></OrderFilt>
</div>
<div class="card-body p-1">
<div class="row small">
+7 -2
View File
@@ -50,7 +50,8 @@ namespace SHERPA.BBM.UI.Pages
// era intero pagato, ora prendo il valore del movimento
// decimal pagato = (BillPaid == BillNetTot || BillPaid == BillAmountTot) ? BillPaid : 0;
//decimal pagato = AccMovSel.Amount;
decimal pagato = AccMovSel.Paid;
//decimal pagato = AccMovSel.Paid;
decimal pagato = (BillPaid == BillNetTot || BillPaid == BillAmountTot) ? AccMovSel.Amount : AccMovSel.Paid;
await BBMService.AccMovUpdateBill(AccMovSel.AccMovId, SelIdxBill, pagato);
}
MService.SearchVal = "";
@@ -175,7 +176,11 @@ namespace SHERPA.BBM.UI.Pages
private bool LinkEnabled
{
get => OrdAmountTot != 0 && ((OrdAmountTot == BillAmountTot || OrdAmountTot == BillNetTot) || (forceLink && (Math.Abs(OrdAmountTot) <= Math.Abs(BillNetTot))));
get
{
bool answ = OrdAmountTot != 0 && ((OrdAmountTot == BillAmountTot || OrdAmountTot == BillNetTot) || (forceLink && (Math.Abs(OrdAmountTot) <= Math.Abs(BillNetTot))));
return answ;
}
}
private decimal OrdAmountTot
+74
View File
@@ -0,0 +1,74 @@
@page "/ResType"
@using SHERPA.BBM.UI.Components
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-6 col-lg-3">
<h3><span class="fas fa-hashtag" aria-hidden="true"></span> Categorie</h3>
</div>
<div class="col-6 col-lg-3">
</div>
<div class="col-6 col-lg-3">
</div>
<div class="col-6 col-lg-3">
<button class="btn btn-block btn-success btn-sm" @onclick="CreateNew">NUOVO</button>
</div>
</div>
</div>
<div class="card-body">
@if (currItem != null)
{
<ResTypeEditor currItem="@currItem" DataReset="ResetData" DataUpdated="UpdateData"></ResTypeEditor>
}
@if (ListRecords == null)
{
<LoadingData></LoadingData>
}
else if (totalCount == 0)
{
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
}
else
{
<table class="table table-sm table-striped">
<thead>
<tr>
<th></th>
<th>Cod</th>
<th>Nome</th>
<th class="text-right"># rif</th>
<th class="text-right"></th>
</tr>
</thead>
<tbody>
@foreach (var record in ListRecords)
{
<tr class="@checkSelect(@record.ResTypeId)">
<td class="text-nowrap">
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="fas fa-pen"></span></button>
</td>
<td>@record.ResTypeId</td>
<td>@record.Name</td>
<td class="text-right">@record.ItemNav?.Count()</td>
<td class="text-right">
@if (@record.ItemNav?.Count() == 0)
{
<button class="btn btn-sm btn-danger" @onclick="() => Delete(record)"><span class="oi oi-trash"></span></button>
}
else
{
<button class="btn btn-sm btn-secondary" disabled><span class="oi oi-trash"></span></button>
}
</td>
</tr>
}
</tbody>
</table>
}
</div>
<div class="card-footer py-1">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
</div>
+182
View File
@@ -0,0 +1,182 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using SHERPA.BBM.CORE.DbModels;
using SHERPA.BBM.UI.Data;
namespace SHERPA.BBM.UI.Pages
{
public partial class ResType : ComponentBase, IDisposable
{
#region Public Methods
public string checkSelect(int resTypeId)
{
string answ = "";
if (currItem != null)
{
try
{
answ = (currItem.ResTypeId == resTypeId) ? "table-info" : "";
}
catch
{ }
}
return answ;
}
public void Dispose()
{
MService.EA_SearchUpdated -= OnSeachUpdated;
BBMService.ReloadRequest -= BBMService_ReloadRequest;
}
public async void OnSeachUpdated()
{
await InvokeAsync(() =>
{
currPage = 1;
Task task = UpdateData();
StateHasChanged();
});
}
#endregion Public Methods
#region Protected Properties
[Inject]
protected BBM_EFService BBMService { get; set; } = null!;
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
[Inject]
protected MessageService MService { get; set; } = null!;
protected int totalCount
{
get
{
int answ = 0;
if (SearchRecords != null)
{
answ = SearchRecords.Count;
}
return answ;
}
}
#endregion Protected Properties
#region Protected Methods
protected void CreateNew()
{
// recupero counter
string newCode = BBMService.CounterGetNext($"ITEM", 6);
ItemResTypeModel newRecord = new ItemResTypeModel()
{
Name = $"Nuova Categoria - {DateTime.Now:yyyy/mm/dd HH:mm:ss}"
};
currItem = newRecord;
}
protected async Task Delete(ItemResTypeModel currRecord)
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler eliminare la categoria '{currRecord.ResTypeId} - {currRecord.Name}'?"))
return;
BBMService.ItemResTypeDelete(currRecord);
await UpdateData();
}
protected void Edit(ItemResTypeModel currRecord)
{
currItem = currRecord;
}
protected async Task ForceReload(int newNum)
{
numRecord = newNum;
await ReloadAllData();
}
protected async Task ForceReloadPage(int newNum)
{
currPage = newNum;
await ReloadAllData();
}
protected override async Task OnInitializedAsync()
{
MService.NotifyHeadChanged();
MService.ShowSearch = true;
MService.SearchVal = "";
MService.EA_SearchUpdated += OnSeachUpdated;
BBMService.ReloadRequest += BBMService_ReloadRequest;
await ReloadAllData();
}
private async void BBMService_ReloadRequest(object? sender, EventArgs e)
{
ReloadEventArgs currArgs = (ReloadEventArgs)e;
if (!string.IsNullOrEmpty(currArgs.ReloadMessage))
{
await ReloadAllData();
await InvokeAsync(StateHasChanged);
}
}
protected async Task ReloadAllData()
{
await updateTable();
}
protected void ResetData()
{
if (currItem != null)
{
BBMService.rollBackEdit(currItem);
}
currItem = null;
}
protected async Task UpdateData()
{
currItem = null;
await ReloadAllData();
}
protected async Task updateTable()
{
SearchRecords = await BBMService.ItemResTypeGetAll();
if (!string.IsNullOrEmpty(MService.SearchVal))
{
SearchRecords = SearchRecords.Where(x => x.Name.Contains(MService.SearchVal, StringComparison.InvariantCultureIgnoreCase)).ToList();
}
SearchRecords = SearchRecords.OrderBy(x => x.ResTypeId).ToList();
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
}
#endregion Protected Methods
#region Private Fields
private ItemResTypeModel? currItem = null;
private List<ItemResTypeModel> ListRecords = new List<ItemResTypeModel>();
private List<ItemResTypeModel> SearchRecords = new List<ItemResTypeModel>();
#endregion Private Fields
#region Private Properties
private string _SelUM { get; set; } = "";
private int currPage { get; set; } = 1;
private bool isLoading { get; set; } = false;
private int numRecord { get; set; } = 10;
#endregion Private Properties
}
}
+4 -4
View File
@@ -29,9 +29,9 @@
</span>
</div>
<select @bind="@SelResType" class="form-control form-control-sm">
@foreach (var value in Enum.GetValues(typeof(BbmResType)))
@foreach (var item in ListResType)
{
<option>@value</option>
<option value="@item.ResTypeId">@item.Name</option>
}
</select>
</div>
@@ -44,7 +44,7 @@
<div class="card-body">
@if (currItem != null)
{
<ResourcesEditor currItem="@currItem" currResType="@SelResType" DataReset="ResetData" DataUpdated="UpdateData"></ResourcesEditor>
<ResourcesEditor currItem="@currItem" currResTypeId="@SelResType" DataReset="ResetData" DataUpdated="UpdateData"></ResourcesEditor>
}
@if (ListRecords == null)
{
@@ -74,8 +74,8 @@
<tr class="@checkSelect(@record.ResourceId)">
<td>
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="fas fa-pen"></span></button>
<button class="btn btn-sm btn-outline-info" @onclick="() => Move(record, 1)"><span class="oi oi-arrow-top"></span></button>&nbsp;<button class="btn btn-sm btn-outline-info" @onclick="() => Move(record, -1)"><span class="oi oi-arrow-bottom"></span></button>
<button class="btn btn-sm btn-info" @onclick="() => Clone(record)"><span class="fas fa-magic"></span></button>
</td>
<td>
<div class="d-flex justify-content-between font-weight-bold">
+55 -31
View File
@@ -9,25 +9,6 @@ namespace SHERPA.BBM.UI.Pages
{
public partial class Resources : ComponentBase
{
#region Public Methods
private string checkSelect(int ResourceId)
{
string answ = "";
if (currItem != null)
{
try
{
answ = (currItem.ResourceId == ResourceId) ? "table-info" : "";
}
catch
{ }
}
return answ;
}
#endregion Public Methods
#region Protected Fields
protected int totalCount = 0;
@@ -57,13 +38,29 @@ namespace SHERPA.BBM.UI.Pages
#region Protected Methods
protected void Clone(ResourcesModel currRecord)
{
int newOrd = SearchRecords != null ? SearchRecords.Count + 1 : 1;
currItem = new ResourcesModel()
{
DocId = currRecord.DocId,
ItemId = currRecord.ItemId,
Anno = currRecord.Anno,
Note = currRecord.Note,
QtyPrev = currRecord.QtyPrev,
QtyOff = currRecord.QtyOff,
UnitPriceOff = currRecord.UnitPriceOff,
Ordinal = newOrd
};
}
protected void CreateNew()
{
int newOrd = SearchRecords != null ? SearchRecords.Count + 1 : 1;
if (currDoc != null)
{
// nuovo record risorsa
CORE.DbModels.ResourcesModel newRecord = new CORE.DbModels.ResourcesModel()
ResourcesModel newRecord = new ResourcesModel()
{
DocId = currDoc.DocId,
ItemId = 0,
@@ -77,7 +74,7 @@ namespace SHERPA.BBM.UI.Pages
}
}
protected async Task Delete(CORE.DbModels.ResourcesModel currRecord)
protected async Task Delete(ResourcesModel currRecord)
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler eliminare il Documento '{currRecord.ResourceId}'?"))
return;
@@ -86,7 +83,7 @@ namespace SHERPA.BBM.UI.Pages
await UpdateData();
}
protected void Edit(CORE.DbModels.ResourcesModel currRecord)
protected void Edit(ResourcesModel currRecord)
{
currItem = currRecord;
}
@@ -127,7 +124,7 @@ namespace SHERPA.BBM.UI.Pages
return grandTot;
}
protected async Task Move(CORE.DbModels.ResourcesModel currRecord, int move)
protected async Task Move(ResourcesModel currRecord, int move)
{
await BBMService.ResourceUpdateOrder(currRecord.ResourceId, move);
await updateTable();
@@ -151,6 +148,7 @@ namespace SHERPA.BBM.UI.Pages
protected async Task ReloadAllData()
{
ListResType = await BBMService.ItemResTypeGetAll();
await updateTable();
}
@@ -183,26 +181,31 @@ namespace SHERPA.BBM.UI.Pages
#region Private Fields
private CORE.DbModels.DocsModel? currDoc = null;
private DocsModel? currDoc = null;
private CORE.DbModels.ResourcesModel? currItem = null;
private ResourcesModel? currItem = null;
private List<CORE.DbModels.ResourcesModel> ListRecords = new List<CORE.DbModels.ResourcesModel>();
private List<CORE.DbModels.ResourcesModel> SearchRecords = new List<CORE.DbModels.ResourcesModel>();
private List<ResourcesModel> ListRecords = new List<ResourcesModel>();
private List<ItemResTypeModel> ListResType = new List<ItemResTypeModel>();
private List<ResourcesModel> SearchRecords = new List<ResourcesModel>();
#endregion Private Fields
#region Private Properties
private BbmResType _SelResType { get; set; } = BbmResType.ND;
private int _SelResType { get; set; } = 0;
private string _SelUM { get; set; } = "";
private int currPage { get; set; } = 1;
private bool isLoading { get; set; } = false;
private int numRecord { get; set; } = 10;
private BbmResType SelResType
private int SelResType
{
get
{
@@ -210,8 +213,11 @@ namespace SHERPA.BBM.UI.Pages
}
set
{
_SelResType = value;
updateTable().ConfigureAwait(false);
if (_SelResType != value)
{
_SelResType = value;
updateTable().ConfigureAwait(false);
}
}
}
@@ -230,5 +236,23 @@ namespace SHERPA.BBM.UI.Pages
#endregion Private Properties
#region Private Methods
private string checkSelect(int ResourceId)
{
string answ = "";
if (currItem != null)
{
try
{
answ = (currItem.ResourceId == ResourceId) ? "table-info" : "";
}
catch
{ }
}
return answ;
}
#endregion Private Methods
}
}
+6 -1
View File
@@ -81,7 +81,12 @@ else
</div>
<div class="px-2 flex-fill h3 text-right">
<b>@item.Incassato.ToString("C2")</b>
<div class="small" title="Fatture Incassate"><sub>@((item.Incassato / item.Fatturato).ToString("P1"))</sub></div>
<div class="small" title="Fatture Incassate"><sub>
@if (item.Fatturato > 0)
{
@((item.Incassato / item.Fatturato).ToString("P1"))
}
</sub></div>
</div>
</div>
</div>
+29 -1
View File
@@ -43,7 +43,35 @@
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
<script src="_framework/blazor.server.js" autostart="false"></script>
@*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@
<script>
Blazor.start({
reconnectionOptions: {
maxRetries: 600,
retryIntervalMilliseconds: 1000
},
reconnectionHandler: {
onConnectionDown: (options, error) => console.error(error),
onConnectionUp: () => console.log("Client reconnected!")
}
}).then(() => {
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
get() {
return this.__reconnectionDisplay;
},
set(value) {
this.__reconnectionDisplay = {
show: () => value.show(),
update: (d) => value.update(d),
rejected: (d) => document.location.reload()
}
}
});
});
</script>
<script src="js/external.js"></script>
<script src="~/lib/Chart.js/chart.js"></script>
</body>
+8 -7
View File
@@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<UserSecretsId>60fcdaab-6c1e-4bec-9d88-f7727ef1c12c</UserSecretsId>
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
<Version>2.0.2401.3116</Version>
<Version>2.0.2505.1315</Version>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Copyright>Egalware 2021+</Copyright>
@@ -163,10 +163,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2308.216" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2308.216" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2402.2411" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2402.2411" />
<PackageReference Include="ElmahCore" Version="2.1.2" />
<PackageReference Include="ElmahCore.Common" Version="2.1.2" />
<PackageReference Include="ElmahCore.Sql" Version="2.1.2" />
@@ -175,9 +175,10 @@
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="6.0.21" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.4" />
</ItemGroup>
<ItemGroup>
+23 -1
View File
@@ -45,6 +45,14 @@
</span>
</NavLink>
</div>
<div class="nav-item px-2">
<NavLink class="nav-link" href="NegotMover">
<span title="Spostamento Trattative">
<i class="fas fa-exchange-alt px-3" aria-hidden="true"></i>
<span class="@hideText">Sposta Tratt.</span>
</span>
</NavLink>
</div>
<div class="nav-item px-2">
<NavLink class="nav-link" href="Docs">
<span title="Documenti, Offerte, Conferme">
@@ -56,7 +64,7 @@
<div class="nav-item px-2">
<NavLink class="nav-link" href="DocMover">
<span title="Spostamento Documenti">
<i class="fas fa-exchange-alt pr-3" aria-hidden="true"></i>
<i class="fas fa-exchange-alt px-3" aria-hidden="true"></i>
<span class="@hideText">Sposta Docs</span>
</span>
</NavLink>
@@ -69,6 +77,14 @@
</span>
</NavLink>
</div>
<div class="nav-item px-2">
<NavLink class="nav-link" href="ItemMover">
<span title="Spostamento Items in categorie">
<i class="fas fa-exchange-alt px-3" aria-hidden="true"></i>
<span class="@hideText">Sposta Items</span>
</span>
</NavLink>
</div>
<div class="nav-item px-2">
<NavLink class="nav-link" href="Orders">
<span title="Gestione Ordini">
@@ -85,6 +101,12 @@
</span>
</NavLink>
</div>
<div class="nav-item px-2">
<NavLink class="nav-link" href="ResType">
<i class="fas fa-hashtag pr-3" aria-hidden="true"></i>
<span class="@hideText">Categorie Item</span>
</NavLink>
</div>
<div class="nav-item px-2">
<NavLink class="nav-link" href="Tags">
<i class="fas fa-tags pr-3" aria-hidden="true"></i>
+1 -1
View File
@@ -40,7 +40,7 @@
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
padding-bottom: 0.2rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
+1 -1
View File
@@ -46,7 +46,7 @@
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
padding-bottom: 0.2rem;
}
.nav-item:first-of-type {
+1 -1
View File
@@ -1 +1 @@
.navbar-toggler{background-color:rgba(255,255,255,.1);}.navbar-home{background-color:#f7dfc7;}.top-row{height:3.5rem;background:linear-gradient(90deg,#000 0%,#212121 60%,#2e2e2e 100%);}.navbar{padding:.25rem .25rem;}.navbar-brand{font-size:1.5rem;font-weight:bold;background:-webkit-linear-gradient(135deg,#d8951c,#faf2a2,#c8850c);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400% 400%;animation:gradient-bg 8s linear infinite;}@keyframes gradient-bg{0%,80%{background-position:0% 50%;}90%{background-position:100% 50%;}100%{background-position:0% 50%;}}.oi{width:2rem;font-size:1.1rem;vertical-align:text-top;top:-2px;}.nav-item{font-size:.9rem;padding-bottom:.5rem;}.nav-item:first-of-type{padding-top:1rem;}.nav-item:last-of-type{padding-bottom:1rem;}.nav-item ::deep a{color:#d7d7d7;border-radius:4px;height:3rem;display:flex;align-items:center;line-height:3rem;}.nav-item ::deep a.active{background-color:rgba(255,255,255,.25);color:#fff;}.nav-item ::deep a:hover{background-color:rgba(255,255,255,.1);color:#fff;}@media(min-width:641px){.navbar-toggler{display:none;}.collapse{display:block;}}
.navbar-toggler{background-color:rgba(255,255,255,.1);}.navbar-home{background-color:#f7dfc7;}.top-row{height:3.5rem;background:linear-gradient(90deg,#000 0%,#212121 60%,#2e2e2e 100%);}.navbar{padding:.25rem .25rem;}.navbar-brand{font-size:1.5rem;font-weight:bold;background:-webkit-linear-gradient(135deg,#d8951c,#faf2a2,#c8850c);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400% 400%;animation:gradient-bg 8s linear infinite;}@keyframes gradient-bg{0%,80%{background-position:0% 50%;}90%{background-position:100% 50%;}100%{background-position:0% 50%;}}.oi{width:2rem;font-size:1.1rem;vertical-align:text-top;top:-2px;}.nav-item{font-size:.9rem;padding-bottom:.2rem;}.nav-item:first-of-type{padding-top:1rem;}.nav-item:last-of-type{padding-bottom:1rem;}.nav-item ::deep a{color:#d7d7d7;border-radius:4px;height:3rem;display:flex;align-items:center;line-height:3rem;}.nav-item ::deep a.active{background-color:rgba(255,255,255,.25);color:#fff;}.nav-item ::deep a:hover{background-color:rgba(255,255,255,.1);color:#fff;}@media(min-width:641px){.navbar-toggler{display:none;}.collapse{display:block;}}
+1 -1
View File
@@ -11,4 +11,4 @@
@using SHERPA.BBM.UI.Shared
@using SHERPA.BBM.UI.Data
@using SHERPA.BBM.UI.Components
@using EgwCoreLib.Razor
@using EgwCoreLib.Razor
+1 -1
View File
@@ -9,7 +9,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Redis": "localhost:6379,DefaultDatabase=4,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Redis": "redis.ufficio:26379,serviceName=prod,DefaultDatabase=4,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
"Sherpa.BBM": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
},
+5 -8
View File
@@ -10,15 +10,12 @@
"CodApp": "SHERPA",
"Modulo": "SHERPA",
"ConnectionStrings": {
"Redis": "localhost:6379,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Redis": "redis.ufficio:26379,serviceName=devel,DefaultDatabase=4,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Sherpa.Anagr": "Data Source=W2019-SQL-STEAM;Initial Catalog=SteamWare_Anagrafica;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.BBM": "Data Source=SQL2016DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=SQL2016DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
//"Sherpa.BBM": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
"Sherpa.BBM": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
"Sherpa.BBM": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
//"Sherpa.BBM": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
},
"Application": {
"Name": "SHERPA Basket Budget Management",
+4 -4
View File
@@ -7,10 +7,6 @@
"outputFile": "wwwroot/css/fonts.css",
"inputFile": "wwwroot/css/fonts.less"
},
{
"outputFile": "Shared/NavMenu.razor.css",
"inputFile": "Shared/NavMenu.razor.less"
},
{
"outputFile": "Shared/MainLayout.razor.css",
"inputFile": "Shared/MainLayout.razor.less"
@@ -26,5 +22,9 @@
{
"outputFile": "Pages/Unauthorized.razor.css",
"inputFile": "Pages/Unauthorized.razor.less"
},
{
"outputFile": "Shared/NavMenu.razor.css",
"inputFile": "Shared/NavMenu.razor.less"
}
]
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -16,8 +16,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Blazored.SessionStorage" Version="2.4.0" />
<PackageReference Include="MailKit" Version="3.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.13" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.13" />
@@ -32,8 +32,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.2" />
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="StackExchange.Redis" Version="2.7.33" />
</ItemGroup>
</Project>
-1
View File
@@ -1041,7 +1041,6 @@ namespace SHERPA.Data.Services
if (!string.IsNullOrEmpty(rawData))
{
source = "REDIS";
//source += $" | {cFilt.Anno}:{cFilt.IdxCli}:{cFilt.IdxTipo}:{cFilt.IdxGruppo}:{cFilt.RagSoc}:{cFilt.Aperta}:{cFilt.Inizio:yyyyMMdd}:{cFilt.Fine:yyyyMMdd}";
var tempResult = JsonConvert.DeserializeObject<List<vDocsExplModel>>(rawData);
if (tempResult == null)
{
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
</configuration>
Binary file not shown.
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
</configuration>
Binary file not shown.
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
</configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMin" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinBundleTask" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinManifestTask" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinManifestCleanTask" />
<PropertyGroup>
<!-- if the project has a Content folder, we want that to be the root output; otherwise just dump everything relative to the project root -->
<AjaxMinOutputFolder Condition="$(AjaxMinOutputFolder)=='' and Exists('$(ProjectDir)Content\')">$(ProjectDir)Content\</AjaxMinOutputFolder>
<AjaxMinOutputFolder Condition="$(AjaxMinOutputFolder)==''">$(ProjectDir)</AjaxMinOutputFolder>
<!-- default is to NOT treat warnings as errors -->
<AjaxMinTreatWarningsAsErrors Condition="$(AjaxMinTreatWarningsAsErrors)==''">false</AjaxMinTreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<AjaxMinManifests Include="**/*.ajaxmin"/>
</ItemGroup>
<!-- target to clean output for all ajaxmin manifest files in the project -->
<Target Name="CleanAjaxMinManifests" AfterTargets="Clean" Inputs="@AjaxMinManifests" Outputs="@(AjaxMinManifests->'%(FullPath).cleantrigger')">
<Message Text="Cleaning AjaxMin Manifests" Importance="high" />
<AjaxMinManifestCleanTask OutputFolder="$(AjaxMinOutputFolder)" Manifests="@(AjaxMinManifests)" />
</Target>
<!-- target to build all ajaxmin manifest files in the project -->
<Target Name="BuildAjaxMinManifests" AfterTargets="Build" Inputs="@AjaxMinManifests" Outputs="@(AjaxMinManifests->'%(FullPath).buildtrigger')">
<Message Text="Processing AjaxMin Manifests" Importance="high" />
<AjaxMinManifestTask ProjectDefaultSwitches="-define:$(DefineConstants) $(AjaxMinProjectDefaultSwitches)"
Configuration="$(Configuration)"
TreatWarningsAsErrors="$(AjaxMinTreatWarningsAsErrors)"
InputFolder="$(ProjectDir)"
OutputFolder="$(AjaxMinOutputFolder)"
Manifests="@(AjaxMinManifests)" />
</Target>
</Project>
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More