This commit is contained in:
mmrbnjd
2024-06-12 07:54:43 +03:30
parent 5a96240660
commit 39c9de8f4c
5 changed files with 61 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ namespace Back.Services
.Include(inc => inc.invoiceDetails)
.ThenInclude(inc => inc.cODItem)
.ThenInclude(inc => inc.CODUnit)
.Include(inc=>inc.sentTax)
//.Include(inc => inc.payments)
//.Include(inc => inc.pattern)
.Select(s => new InvoiceDTO()
@@ -60,6 +61,17 @@ namespace Back.Services
tdis = s.tdis,
tvam = s.tvam,
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()
{
ID = x.ID,

View File

@@ -233,6 +233,7 @@ namespace Back.Services
ID = s.ID,
InvoiceID = s.InvoiceID,
SentStatus=s.SentStatus,
InvoiceType= s.InvoiceType,
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
msgSentStatus = s.SentStatus.GetEnumDisplayName()

View File

@@ -81,7 +81,7 @@ namespace Shared.DTOs
public ICollection<InvoiceItemDTO> items { get; set; }=new List<InvoiceItemDTO>();
public ICollection<InvoicePaymentDTO> payments { get; set; } = new List<InvoicePaymentDTO>();
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
// public ICollection<InvoiceSendTaxDTO> InvoiceSendTaxs { get; set; }
public ICollection<SentTaxDto> InvoiceSendTaxs { get; set; }=new List<SentTaxDto> { };
}
public class InvoiceItemDTO

View File

@@ -19,6 +19,7 @@ namespace Shared.DTOs
[Display(Name = "زمان")]
public string Time { get; set; }
public SentStatus SentStatus { get; set; }
public InvoiceType InvoiceType { get; set; }
[Display(Name = "وضعیت صورتحساب")]
public string msgInvoiceType { get; set; }
[Display(Name = "وضعیت ارسال")]

View File

@@ -84,6 +84,48 @@
</div>
</div>
<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" />
}
<div class="row g-3">
@@ -238,7 +280,8 @@
</div>
}
<br />
<br />
<hr class="hr" />
<div class="row g-3">
<div class="form-group col-md-4">
@@ -292,7 +335,7 @@
}
</div>
@if (invoice.invoiceType != InvoiceType.Bidding)
@if (invoice.invoiceType != InvoiceType.Bidding && SendInvoice)
{
<div class="form-group col-md-2">
<br />
@@ -322,7 +365,7 @@
@code {
public bool SendInvoice { get; set; } = false;
List<ToastMessage> messages = new List<ToastMessage>();
private ConfirmDialog dialog = default!;
private Modal modal = default!;