...
This commit is contained in:
@@ -180,7 +180,7 @@ namespace Back.Controllers
|
|||||||
//صورتحساب مجموع
|
//صورتحساب مجموع
|
||||||
Tbill = result.tbill ?? null,
|
Tbill = result.tbill ?? null,
|
||||||
// تسویه روش
|
// تسویه روش
|
||||||
Setm = result.setm ?? null,
|
Setm = result.setm == 0 ? null : result.setm ?? null,
|
||||||
//نقدی پرداختی مبلغ
|
//نقدی پرداختی مبلغ
|
||||||
Cap = result.cap ?? null,
|
Cap = result.cap ?? null,
|
||||||
//پرداختی نسیه
|
//پرداختی نسیه
|
||||||
|
@@ -171,6 +171,7 @@ namespace Back.Services
|
|||||||
{
|
{
|
||||||
if (item.eName == "indatim" || item.eName == "Indati2m" || item.eName == "cdcd")
|
if (item.eName == "indatim" || item.eName == "Indati2m" || item.eName == "cdcd")
|
||||||
item.Value = item.Value.Replace("/", "");
|
item.Value = item.Value.Replace("/", "");
|
||||||
|
|
||||||
SetValue(item, ref InvoiceItem);
|
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; }
|
||||||
|
}
|
@@ -6,7 +6,8 @@
|
|||||||
@inject HttpClientController hc;
|
@inject HttpClientController hc;
|
||||||
<Preload LoadingText="در حال بارگذاری..." />
|
<Preload LoadingText="در حال بارگذاری..." />
|
||||||
<ConfirmDialog @ref="dialog" />
|
<ConfirmDialog @ref="dialog" />
|
||||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||||
|
<Modal @ref="modal" />
|
||||||
@if (FullInvoice)
|
@if (FullInvoice)
|
||||||
{
|
{
|
||||||
<PageTitle>اطلاعات تکمیلی صورتحساب</PageTitle>
|
<PageTitle>اطلاعات تکمیلی صورتحساب</PageTitle>
|
||||||
@@ -38,7 +39,7 @@ else
|
|||||||
</h4>
|
</h4>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if(!FullInvoice)
|
@if (!FullInvoice)
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -68,20 +69,49 @@ else
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
@foreach (var item in invoice?.header.filds)
|
@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.ModeID == 1 && item.InputBox != "autofild")
|
||||||
{
|
{
|
||||||
<label style="color:red;" class="form-label">@item.fName</label>
|
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
|
else
|
||||||
{
|
{
|
||||||
<label class="form-label">@item.fName</label>
|
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")
|
@if (item.InputBox == "fromdb")
|
||||||
{
|
{
|
||||||
|
|
||||||
<select @bind="item.Value" class="form-control" aria-label="Default select example">
|
<select @bind="item.Value" class="form-control" aria-label="Default select example">
|
||||||
<option style="color: #b5b5b5; " selected>@item.fName...</option>
|
<option style="color: #b5b5b5; " selected>@item.fName...</option>
|
||||||
@foreach (var itema in item.DefVals)
|
@foreach (var itema in item.DefVals)
|
||||||
{
|
{
|
||||||
if (itema.ID == item.Value)
|
if (itema.ID == item.Value)
|
||||||
@@ -139,14 +169,44 @@ else
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
@foreach (var itemB in item.filds)
|
@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.ModeID == 1 && itemB.InputBox != "autofild")
|
||||||
{
|
{
|
||||||
<label style="color:red;" class="form-label">@itemB.fName</label>
|
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
|
else
|
||||||
{
|
{
|
||||||
<label class="form-label">@itemB.fName</label>
|
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")
|
@if (itemB.InputBox == "fromdb")
|
||||||
{
|
{
|
||||||
@@ -201,7 +261,7 @@ else
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@if (invoice!=null)
|
@if (invoice != null)
|
||||||
{
|
{
|
||||||
@* action *@
|
@* action *@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -229,6 +289,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private Modal modal = default!;
|
||||||
private ConfirmDialog dialog = default!;
|
private ConfirmDialog dialog = default!;
|
||||||
[Parameter] public int? InvoiceID { get; set; }
|
[Parameter] public int? InvoiceID { get; set; }
|
||||||
List<ToastMessage> messages = new List<ToastMessage>();
|
List<ToastMessage> messages = new List<ToastMessage>();
|
||||||
@@ -271,14 +332,15 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
|
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
|
||||||
if (rsp.IsSuccessStatusCode)
|
if (rsp.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||||
if (response)
|
if (response)
|
||||||
{
|
{
|
||||||
if(FullInvoice)
|
if (FullInvoice)
|
||||||
ShowMessage(ToastType.Success, "تغییرات با موفقیت انجام شد");
|
ShowMessage(ToastType.Success, "تغییرات با موفقیت انجام شد");
|
||||||
|
|
||||||
if (!FullInvoice)
|
if (!FullInvoice)
|
||||||
{
|
{
|
||||||
@@ -308,7 +370,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (FullInvoice)
|
if (FullInvoice)
|
||||||
ShowMessage(ToastType.Danger, "خطای در ذخیره سازی اطلاعات رخ داده");
|
ShowMessage(ToastType.Danger, "خطای در ذخیره سازی اطلاعات رخ داده");
|
||||||
else
|
else
|
||||||
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
||||||
}
|
}
|
||||||
@@ -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