...
This commit is contained in:
@@ -38,6 +38,7 @@ namespace Back.Services
|
|||||||
.Include(inc => inc.invoiceDetails)
|
.Include(inc => inc.invoiceDetails)
|
||||||
.ThenInclude(inc => inc.cODItem)
|
.ThenInclude(inc => inc.cODItem)
|
||||||
.ThenInclude(inc => inc.CODUnit)
|
.ThenInclude(inc => inc.CODUnit)
|
||||||
|
.Include(inc=>inc.sentTax)
|
||||||
//.Include(inc => inc.payments)
|
//.Include(inc => inc.payments)
|
||||||
//.Include(inc => inc.pattern)
|
//.Include(inc => inc.pattern)
|
||||||
.Select(s => new InvoiceDTO()
|
.Select(s => new InvoiceDTO()
|
||||||
@@ -60,6 +61,17 @@ namespace Back.Services
|
|||||||
tdis = s.tdis,
|
tdis = s.tdis,
|
||||||
tvam = s.tvam,
|
tvam = s.tvam,
|
||||||
Udate = s.Udate.ShamciToFormatShamci(),
|
Udate = s.Udate.ShamciToFormatShamci(),
|
||||||
|
InvoiceSendTaxs=s.sentTax.OrderBy(o => o.ID).Select(s=>new SentTaxDto()
|
||||||
|
{
|
||||||
|
Date = s.Date.ShamciToFormatShamci(),
|
||||||
|
Time = s.Time,
|
||||||
|
ID = s.ID,
|
||||||
|
InvoiceID = s.InvoiceID,
|
||||||
|
SentStatus = s.SentStatus,
|
||||||
|
InvoiceType= s.InvoiceType,
|
||||||
|
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
||||||
|
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
||||||
|
}).ToList(),
|
||||||
items = s.invoiceDetails.OrderBy(o => o.ID).Select(x => new InvoiceItemDTO()
|
items = s.invoiceDetails.OrderBy(o => o.ID).Select(x => new InvoiceItemDTO()
|
||||||
{
|
{
|
||||||
ID = x.ID,
|
ID = x.ID,
|
||||||
|
@@ -233,6 +233,7 @@ namespace Back.Services
|
|||||||
ID = s.ID,
|
ID = s.ID,
|
||||||
InvoiceID = s.InvoiceID,
|
InvoiceID = s.InvoiceID,
|
||||||
SentStatus=s.SentStatus,
|
SentStatus=s.SentStatus,
|
||||||
|
InvoiceType= s.InvoiceType,
|
||||||
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
||||||
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ namespace Shared.DTOs
|
|||||||
public ICollection<InvoiceItemDTO> items { get; set; }=new List<InvoiceItemDTO>();
|
public ICollection<InvoiceItemDTO> items { get; set; }=new List<InvoiceItemDTO>();
|
||||||
public ICollection<InvoicePaymentDTO> payments { get; set; } = new List<InvoicePaymentDTO>();
|
public ICollection<InvoicePaymentDTO> payments { get; set; } = new List<InvoicePaymentDTO>();
|
||||||
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
|
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
|
||||||
// public ICollection<InvoiceSendTaxDTO> InvoiceSendTaxs { get; set; }
|
public ICollection<SentTaxDto> InvoiceSendTaxs { get; set; }=new List<SentTaxDto> { };
|
||||||
|
|
||||||
}
|
}
|
||||||
public class InvoiceItemDTO
|
public class InvoiceItemDTO
|
||||||
|
@@ -19,6 +19,7 @@ namespace Shared.DTOs
|
|||||||
[Display(Name = "زمان")]
|
[Display(Name = "زمان")]
|
||||||
public string Time { get; set; }
|
public string Time { get; set; }
|
||||||
public SentStatus SentStatus { get; set; }
|
public SentStatus SentStatus { get; set; }
|
||||||
|
public InvoiceType InvoiceType { get; set; }
|
||||||
[Display(Name = "وضعیت صورتحساب")]
|
[Display(Name = "وضعیت صورتحساب")]
|
||||||
public string msgInvoiceType { get; set; }
|
public string msgInvoiceType { get; set; }
|
||||||
[Display(Name = "وضعیت ارسال")]
|
[Display(Name = "وضعیت ارسال")]
|
||||||
|
@@ -84,6 +84,48 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
@if (invoice.InvoiceSendTaxs.Count>0)
|
||||||
|
{
|
||||||
|
if (invoice.InvoiceSendTaxs.Any(a=>a.InvoiceType==invoice.invoiceType
|
||||||
|
&& a.SentStatus==SentStatus.Send))
|
||||||
|
{
|
||||||
|
<h6 >این صورتحساب با این وضعیت به سامانه مودیان ارسال شده ،برای اطلاع از وضعیت لطفا تعیین وضعیت کنید</h6>
|
||||||
|
}
|
||||||
|
else if (invoice.InvoiceSendTaxs.Any(a => a.InvoiceType == invoice.invoiceType
|
||||||
|
&& a.SentStatus == SentStatus.Successful))
|
||||||
|
{
|
||||||
|
<h6>
|
||||||
|
این صورتحساب با این وضعیت به سامانه مودیان ارسال و تائید شده
|
||||||
|
</h6>
|
||||||
|
}
|
||||||
|
else if (invoice.InvoiceSendTaxs.Any(a => a.InvoiceType == invoice.invoiceType
|
||||||
|
&& a.SentStatus == SentStatus.Unsuccessful))
|
||||||
|
{
|
||||||
|
SendInvoice = true;
|
||||||
|
<h6 style="color:red;">این صورتحساب با این وضعیت به سامانه مودیان ارسال ولی تائید نشده</h6>
|
||||||
|
}
|
||||||
|
else if (invoice.InvoiceSendTaxs.Any(a => a.InvoiceType == invoice.invoiceType
|
||||||
|
&& (a.SentStatus == SentStatus.pending || a.SentStatus == SentStatus.IN_PROGRESS)))
|
||||||
|
{
|
||||||
|
<h6 >
|
||||||
|
این صورتحساب با این وضعیت به سامانه مودیان ارسال و در حال بررسی می باشد
|
||||||
|
</h6>
|
||||||
|
}
|
||||||
|
else if (invoice.InvoiceSendTaxs.Any(a => a.InvoiceType == invoice.invoiceType
|
||||||
|
&& (a.SentStatus == SentStatus.NOT_FOUND || a.SentStatus == SentStatus.Unknown)))
|
||||||
|
{
|
||||||
|
<h6 >
|
||||||
|
این صورتحساب با این وضعیت به سامانه مودیان ارسال شده ولی وضعیت آن مشخص نیست
|
||||||
|
</h6>
|
||||||
|
}
|
||||||
|
else if (invoice.InvoiceSendTaxs.Any(a => a.InvoiceType != invoice.invoiceType))
|
||||||
|
{
|
||||||
|
SendInvoice = true;
|
||||||
|
<h6>این صورتحساب با این وضعیت به سامانه مودیان ارسال نشده</h6>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else SendInvoice = true;
|
||||||
|
|
||||||
<hr class="hr" />
|
<hr class="hr" />
|
||||||
}
|
}
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
@@ -238,7 +280,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
}
|
}
|
||||||
<br />
|
|
||||||
|
<br />
|
||||||
<hr class="hr" />
|
<hr class="hr" />
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
@@ -292,7 +335,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@if (invoice.invoiceType != InvoiceType.Bidding)
|
@if (invoice.invoiceType != InvoiceType.Bidding && SendInvoice)
|
||||||
{
|
{
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<br />
|
<br />
|
||||||
@@ -322,7 +365,7 @@
|
|||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
public bool SendInvoice { get; set; } = false;
|
||||||
List<ToastMessage> messages = new List<ToastMessage>();
|
List<ToastMessage> messages = new List<ToastMessage>();
|
||||||
private ConfirmDialog dialog = default!;
|
private ConfirmDialog dialog = default!;
|
||||||
private Modal modal = default!;
|
private Modal modal = default!;
|
||||||
|
Reference in New Issue
Block a user