Aggiunto calcolo ammontare fatturato x billExt

This commit is contained in:
Samuele Locatelli
2024-02-09 10:34:52 +01:00
parent a0b2c7a526
commit 7e9545d412
2 changed files with 15 additions and 1 deletions
@@ -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")]
@@ -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))