...
This commit is contained in:
@@ -14,14 +14,23 @@
|
||||
</div>
|
||||
@if (Cod.ID != 0)
|
||||
{
|
||||
<h6 style="color:red">نکته:</h6>
|
||||
|
||||
<ul>
|
||||
@if (_UsedInTheInvoice)
|
||||
|
||||
@if (_SuccessfulSubmissiontoTaxPayer)
|
||||
{
|
||||
<li>با این کالا صورتحسابی صادر کرده اید ،نمیتوانید نام کالا را ویرایش کنید</li>
|
||||
<li style="color:red">با این کالا صورتحسابی به سامانه مودیان ارسال کرده اید <br />نمیتوانید آن را ویرایش کنید</li>
|
||||
}
|
||||
<li>زمان ویرایش دقت کنید تغییرات میتواند روی فاکتورهای صادر شده تائیر بگذارد</li>
|
||||
else
|
||||
{
|
||||
@if (_UsedInTheInvoice)
|
||||
{
|
||||
<li style="color:indianred">با این کالا صورتحسابی صادر کرده اید <br />نمیتوانید نام کالا را ویرایش کنید</li>
|
||||
<br />
|
||||
}
|
||||
<li style="color:dodgerblue">زمان ویرایش دقت کنید<br /> تغییرات میتواند روی فاکتورهای صادر شده تائیر بگذارد</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
}
|
||||
<div class="row g-3">
|
||||
@@ -94,12 +103,16 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
@if (!_SuccessfulSubmissiontoTaxPayer)
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
}
|
||||
|
||||
@if (_UsedInTheInvoice)
|
||||
|
||||
{
|
||||
@@ -123,6 +136,7 @@ else
|
||||
bool Hidealert = true;
|
||||
string alertMessage = "";
|
||||
bool _UsedInTheInvoice = false;
|
||||
bool _SuccessfulSubmissiontoTaxPayer = false;
|
||||
[Parameter] public RCOD Cod { get; set; }
|
||||
[Parameter] public EventCallback<ActionInResultComponent> OnMultipleOfThree { get; set; }
|
||||
[Parameter] public List<IdName<int>>? Unitrequest { get; set; }
|
||||
@@ -139,6 +153,7 @@ else
|
||||
Hidealert = true;
|
||||
alertMessage = "";
|
||||
await UsedInTheInvoice();
|
||||
await SuccessfulSubmissiontoTaxPayer();
|
||||
SpinnerVisible = false;
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
@@ -160,6 +175,20 @@ else
|
||||
}
|
||||
|
||||
}
|
||||
public async Task SuccessfulSubmissiontoTaxPayer()
|
||||
{
|
||||
SpinnerVisible = true;
|
||||
if (Cod.ID != 0)
|
||||
{
|
||||
var rsp = await hc.Get($"TaxPayer/CodInTaxPayerHaveBeenSentSuccessfully/{Cod.ID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
_SuccessfulSubmissiontoTaxPayer = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
|
||||
else _SuccessfulSubmissiontoTaxPayer = false;
|
||||
}
|
||||
|
||||
SpinnerVisible = false ;
|
||||
}
|
||||
private void ShowSuccessAlert(string msg)
|
||||
{
|
||||
Hidealert = false;
|
||||
|
@@ -13,16 +13,23 @@
|
||||
</div>
|
||||
@if (Cus.ID != 0)
|
||||
{
|
||||
<h6 style="color:red">نکته:</h6>
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
@if (_UsedInTheInvoice)
|
||||
@if (_SuccessfulSubmissiontoTaxPayer)
|
||||
{
|
||||
<li>با این مشتری صورتحسابی صادر کرده اید ، نمیتوانید نام کامل را ویرایش کنید</li>
|
||||
<li style="color:red">با این مشتری صورتحسابی به سامانه مودیان ارسال کرده اید <br />نمیتوانید آن را ویرایش کنید</li>
|
||||
}
|
||||
|
||||
<li>زمان ویرایش دقت کنید تغییرات میتواند روی فاکتورهای صادر شده تائیر بگذارد</li>
|
||||
else
|
||||
{
|
||||
@if (_UsedInTheInvoice)
|
||||
{
|
||||
<li style="color:indianred">با این مشتری صورتحسابی صادر کرده اید <br /> نمیتوانید نام کامل را ویرایش کنید</li>
|
||||
<br />
|
||||
}
|
||||
<li style="color:dodgerblue">زمان ویرایش دقت کنید <br />تغییرات میتواند روی فاکتورهای صادر شده تائیر بگذارد</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
}
|
||||
<div class="row g-3">
|
||||
@@ -114,16 +121,21 @@
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
</Button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
</Button>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (!_SuccessfulSubmissiontoTaxPayer)
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
|
||||
}
|
||||
|
||||
@if (_UsedInTheInvoice)
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Link" @onclick="OnClickGoToInvoice" Type="ButtonType.Button">
|
||||
@@ -151,6 +163,7 @@ else
|
||||
public int? ItemSearchCustomertype { get; set; }
|
||||
[Parameter] public EventCallback<ActionInResultComponent> OnMultipleOfThree { get; set; }
|
||||
private ConfirmDialog dialog = default!;
|
||||
bool _SuccessfulSubmissiontoTaxPayer = false;
|
||||
public ActionInResultComponent result { get; set; }
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
@@ -164,6 +177,7 @@ else
|
||||
Hidealert = true;
|
||||
alertMessage = "";
|
||||
await UsedInTheInvoice();
|
||||
await SuccessfulSubmissiontoTaxPayer();
|
||||
SpinnerVisible = false;
|
||||
await base.OnParametersSetAsync();
|
||||
}
|
||||
@@ -329,6 +343,19 @@ else
|
||||
SpinnerVisible = !SpinnerVisible;
|
||||
|
||||
}
|
||||
public async Task SuccessfulSubmissiontoTaxPayer()
|
||||
{
|
||||
SpinnerVisible = !SpinnerVisible;
|
||||
if (Cus.ID != 0)
|
||||
{
|
||||
var rsp = await hc.Get($"TaxPayer/CustomerInTaxPayerHaveBeenSentSuccessfully/{Cus.ID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
_SuccessfulSubmissiontoTaxPayer = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
|
||||
else _SuccessfulSubmissiontoTaxPayer = false;
|
||||
}
|
||||
SpinnerVisible = !SpinnerVisible;
|
||||
}
|
||||
private void ShowInfoAlert(string msg)
|
||||
{
|
||||
Hidealert = false;
|
||||
|
Reference in New Issue
Block a user