Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21b5551373 | |||
| fbb0dfe2a6 | |||
| 5a03166621 | |||
| 0029b9f38b | |||
| a008bb10de | |||
| 319ac972fb |
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.0.2401.0413</Version>
|
||||
<Version>2.0.2401.3015</Version>
|
||||
<Copyright>Egalware 2021+</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -125,19 +125,22 @@ else
|
||||
</td>
|
||||
<td class="text-right text-nowrap" title="Fatturato">
|
||||
@{
|
||||
string fattTitle = "Fatturato 100%";
|
||||
string fatCss = "text-success";
|
||||
if (record.AmountReq != record.BillTot)
|
||||
{
|
||||
if (record.PaidTot == 0)
|
||||
{
|
||||
fattTitle = "Fatturazione non iniziata";
|
||||
fatCss = "text-warning";
|
||||
}
|
||||
else
|
||||
{
|
||||
fattTitle = "Fatturazione iniziata ma NON completa fino ad importo ordine";
|
||||
fatCss = "text-danger";
|
||||
}
|
||||
}
|
||||
<div title="Fatturato" class="@fatCss">
|
||||
<div title="@fattTitle" class="@fatCss">
|
||||
F: <b>@record.BillTot.ToString("C2")</b>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -181,20 +181,30 @@ namespace SHERPA.BBM.UI.Pages
|
||||
|
||||
protected void CreateNew()
|
||||
{
|
||||
string BaseCode = "EGW";
|
||||
//string BaseCode = "EGW";
|
||||
// preset anno
|
||||
int yearRef = SelectData.YearSel > 0 ? SelectData.YearSel : DateTime.Today.Year;
|
||||
DateTime dataIns = DateTime.Now;
|
||||
string codDoc = "";
|
||||
// recupero selected negotiation...
|
||||
var CurrNegotiation = BBMService.NegotiationGetByKey(SelNegotiationId);
|
||||
var CurrNegotiation = BBMService.NegotiationGetByKey(SelNegotiationId).Result;
|
||||
if (CurrNegotiation != null)
|
||||
{
|
||||
string codNegot = CurrNegotiation.Result.CodNegotiation;
|
||||
BaseCode = codNegot.Substring(0, codNegot.IndexOf("."));
|
||||
// leggo anno e codice doc dalla negoziazione...
|
||||
yearRef = CurrNegotiation.Anno;
|
||||
string codNegot = CurrNegotiation.CodNegotiation;
|
||||
codDoc = codNegot.Replace(".N.", ".D.");
|
||||
dataIns = CurrNegotiation.DataIns;
|
||||
//BaseCode = codNegot.Substring(0, codNegot.IndexOf("."));
|
||||
}
|
||||
// recupero counter
|
||||
string newCode = BBMService.CounterGetNext($"{BaseCode}.D.{DateTime.Today.Year}", 4);
|
||||
//string newCode = BBMService.CounterGetNext($"{BaseCode}.D.{DateTime.Today.Year}", 4);
|
||||
string newCode = BBMService.CounterGetNext(codDoc, 2);
|
||||
DocsModel newRecord = new DocsModel()
|
||||
{
|
||||
CodDoc = $"{newCode}.01",
|
||||
DataIns = DateTime.Now,
|
||||
CodDoc = $"{newCode}",
|
||||
Anno = yearRef,
|
||||
DataIns = dataIns,
|
||||
NegotiationId = SelectData.NegotiationId,
|
||||
NumDoc = 1,
|
||||
DocType = BbmDocType.Quotazione,
|
||||
|
||||
@@ -115,11 +115,13 @@ namespace SHERPA.BBM.UI.Pages
|
||||
|
||||
protected void CreateNew()
|
||||
{
|
||||
// recupero counter
|
||||
string newCode = BBMService.CounterGetNext($"{SelectData.Company}.N.{DateTime.Today.Year}", 6);
|
||||
int yearRef = SelectData.YearSel > 0 ? SelectData.YearSel : DateTime.Today.Year;
|
||||
// recupero counter da anno selezionato
|
||||
string newCode = BBMService.CounterGetNext($"{SelectData.Company}.N.{yearRef}", 6);
|
||||
NegotiationsModel newRecord = new NegotiationsModel()
|
||||
{
|
||||
CodNegotiation = newCode,
|
||||
Anno = yearRef,
|
||||
DataIns = DateTime.Now,
|
||||
BasketId = SelBasketId,
|
||||
CustomerId = SelCustomerId,
|
||||
@@ -150,15 +152,18 @@ namespace SHERPA.BBM.UI.Pages
|
||||
// verifico di avere la company selezionata...
|
||||
if (!string.IsNullOrEmpty(SelectData.Company))
|
||||
{
|
||||
int yearRef = SelectData.YearSel > 0 ? SelectData.YearSel : DateTime.Today.Year;
|
||||
// recupero counter
|
||||
string newCode = BBMService.CounterGetNext($"{SelectData.Company}.N.{DateTime.Today.Year}", 6);
|
||||
string newCode = BBMService.CounterGetNext($"{SelectData.Company}.N.{yearRef}", 6);
|
||||
NegotiationsModel newRecord = new NegotiationsModel()
|
||||
{
|
||||
CodNegotiation = newCode,
|
||||
Anno = yearRef,
|
||||
DataIns = DateTime.Now,
|
||||
Descript = "COPIA di " + currRecord.Descript,
|
||||
BasePath = currRecord.BasePath,
|
||||
BasketId = SelBasketId
|
||||
BasketId = SelBasketId,
|
||||
CustomerId = currRecord.CustomerId
|
||||
};
|
||||
currItem = newRecord;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,9 @@ namespace SHERPA.BBM.UI.Pages
|
||||
if (AccMovSel != null && AccMovSel.AccMovId > 0)
|
||||
{
|
||||
// era intero pagato, ora prendo il valore del movimento
|
||||
//decimal pagato = (BillPaid == BillNetTot || BillPaid == BillAmountTot) ? BillPaid : 0;
|
||||
decimal pagato = AccMovSel.Amount;
|
||||
// decimal pagato = (BillPaid == BillNetTot || BillPaid == BillAmountTot) ? BillPaid : 0;
|
||||
//decimal pagato = AccMovSel.Amount;
|
||||
decimal pagato = AccMovSel.Paid;
|
||||
await BBMService.AccMovUpdateBill(AccMovSel.AccMovId, SelIdxBill, pagato);
|
||||
}
|
||||
MService.SearchVal = "";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<UserSecretsId>60fcdaab-6c1e-4bec-9d88-f7727ef1c12c</UserSecretsId>
|
||||
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
|
||||
<Version>2.0.2401.0413</Version>
|
||||
<Version>2.0.2401.3116</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Copyright>Egalware 2021+</Copyright>
|
||||
|
||||
Reference in New Issue
Block a user