...
This commit is contained in:
@@ -180,7 +180,7 @@ namespace Back.Controllers
|
||||
//صورتحساب مجموع
|
||||
Tbill = result.tbill ?? null,
|
||||
// تسویه روش
|
||||
Setm = result.setm ?? null,
|
||||
Setm = result.setm == 0 ? null : result.setm ?? null,
|
||||
//نقدی پرداختی مبلغ
|
||||
Cap = result.cap ?? null,
|
||||
//پرداختی نسیه
|
||||
|
@@ -171,6 +171,7 @@ namespace Back.Services
|
||||
{
|
||||
if (item.eName == "indatim" || item.eName == "Indati2m" || item.eName == "cdcd")
|
||||
item.Value = item.Value.Replace("/", "");
|
||||
|
||||
SetValue(item, ref InvoiceItem);
|
||||
|
||||
}
|
||||
|
22
TaxPayerFull/CUSComponent/SpecialConditions.razor
Normal file
22
TaxPayerFull/CUSComponent/SpecialConditions.razor
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="row g-3">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">متن</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Conditions)
|
||||
{
|
||||
<tr>
|
||||
<td>@item</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter] public string[] Conditions { get; set; }
|
||||
}
|
@@ -7,6 +7,7 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
<Modal @ref="modal" />
|
||||
@if (FullInvoice)
|
||||
{
|
||||
<PageTitle>اطلاعات تکمیلی صورتحساب</PageTitle>
|
||||
@@ -38,7 +39,7 @@ else
|
||||
</h4>
|
||||
}
|
||||
|
||||
@if(!FullInvoice)
|
||||
@if (!FullInvoice)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -68,15 +69,44 @@ else
|
||||
<div class="row">
|
||||
@foreach (var item in invoice?.header.filds)
|
||||
{
|
||||
<div class="mb-3 col-md-6">
|
||||
<div class="mb-1 col-md-3">
|
||||
@if (item.ModeID == 1 && item.InputBox != "autofild")
|
||||
{
|
||||
if (item.Des != null && !FullInvoice)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<Badge style="cursor: pointer;" @onclick="()=>ShowConditions(item.Des,item.fName)" Color="BadgeColor.Primary" IndicatorType="BadgeIndicatorType.RoundedPill">شرایط خاص</Badge>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<label style="color:red;" class="form-label">@item.fName</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label style="color:red;" class="form-label">@item.fName</label>
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.Des != null && !FullInvoice)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<Badge style="cursor: pointer;" @onclick="()=>ShowConditions(item.Des,item.fName)" Color="BadgeColor.Primary" IndicatorType="BadgeIndicatorType.RoundedPill">شرایط خاص</Badge>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<label class="form-label">@item.fName</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label class="form-label">@item.fName</label>
|
||||
}
|
||||
}
|
||||
@if (item.InputBox == "fromdb")
|
||||
{
|
||||
|
||||
@@ -139,14 +169,44 @@ else
|
||||
<div class="row">
|
||||
@foreach (var itemB in item.filds)
|
||||
{
|
||||
<div class="mb-3 col-md-6">
|
||||
<div class="mb-1 col-md-3">
|
||||
@if (itemB.ModeID == 1 && itemB.InputBox != "autofild")
|
||||
{
|
||||
if (itemB.Des != null && !FullInvoice)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<Badge style="cursor: pointer;" @onclick="()=>ShowConditions(itemB.Des,itemB.fName)" Color="BadgeColor.Primary" IndicatorType="BadgeIndicatorType.RoundedPill">شرایط خاص</Badge>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<label style="color:red;" class="form-label">@itemB.fName</label>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label style="color:red;" class="form-label">@itemB.fName</label>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (itemB.Des != null && !FullInvoice)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<Badge style="cursor: pointer;" @onclick="()=>ShowConditions(itemB.Des,itemB.fName)" Color="BadgeColor.Primary" IndicatorType="BadgeIndicatorType.RoundedPill">شرایط خاص</Badge>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<label class="form-label">@itemB.fName</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<label class="form-label">@itemB.fName</label>
|
||||
|
||||
}
|
||||
}
|
||||
@if (itemB.InputBox == "fromdb")
|
||||
{
|
||||
@@ -201,7 +261,7 @@ else
|
||||
</div>
|
||||
|
||||
|
||||
@if (invoice!=null)
|
||||
@if (invoice != null)
|
||||
{
|
||||
@* action *@
|
||||
<div class="row">
|
||||
@@ -229,6 +289,7 @@ else
|
||||
|
||||
|
||||
@code {
|
||||
private Modal modal = default!;
|
||||
private ConfirmDialog dialog = default!;
|
||||
[Parameter] public int? InvoiceID { get; set; }
|
||||
List<ToastMessage> messages = new List<ToastMessage>();
|
||||
@@ -271,13 +332,14 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
if (response)
|
||||
{
|
||||
if(FullInvoice)
|
||||
if (FullInvoice)
|
||||
ShowMessage(ToastType.Success, "تغییرات با موفقیت انجام شد");
|
||||
|
||||
if (!FullInvoice)
|
||||
@@ -363,4 +425,13 @@ else
|
||||
}
|
||||
|
||||
}
|
||||
private async Task ShowConditions(string[]? Conditions, string fild)
|
||||
{
|
||||
if (Conditions != null)
|
||||
{
|
||||
var parameters = new Dictionary<string, object>();
|
||||
parameters.Add("Conditions", Conditions);
|
||||
await modal.ShowAsync<CUSComponent.SpecialConditions>(title: $"شرایط خاص برای فیلد {fild}", parameters: parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user