Merge branch 'release/UpdateDisplayMovePages'
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.0.2402.1308</Version>
|
||||
<Version>2.0.2402.1310</Version>
|
||||
<Copyright>Egalware 2021+</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -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; } = "";
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@ namespace SHERPA.BBM.CORE.DbModels
|
||||
[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";
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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,10 +7,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Cod</th>
|
||||
<th>Cli/Bask/Trat</th>
|
||||
<th>Descrizione</th>
|
||||
<th class="text-right">Importo</th>
|
||||
<th class="text-right">Fatturazione</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -20,17 +19,26 @@
|
||||
<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>
|
||||
<td class="text-nowrap">
|
||||
<div>@record.RagSoc</div>
|
||||
<div>@record.CodNegotiation</div>
|
||||
<div class="small">@record.DataIns.ToString("ddd yyyy.MM.dd HH:mm")</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">@record.NumDocs</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>
|
||||
<td class="text-right text-nowrap" title="Importo"><b>@record.Importo.ToString("C2")</b></td>
|
||||
<td class="text-right text-nowrap" title="Fatturato"><b>@record.Fatturato.ToString("C2")</b></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
@@ -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.ResTypeId</td>
|
||||
<td>@record.ResName</td>
|
||||
<td>@record.UM</td>
|
||||
<td>@record.Descript</td>
|
||||
<td class="text-right">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<UserSecretsId>60fcdaab-6c1e-4bec-9d88-f7727ef1c12c</UserSecretsId>
|
||||
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
|
||||
<Version>2.0.2402.1308</Version>
|
||||
<Version>2.0.2402.1310</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Copyright>Egalware 2021+</Copyright>
|
||||
|
||||
Reference in New Issue
Block a user