...
This commit is contained in:
@@ -29,12 +29,12 @@
|
||||
<label class="col-sm-4 col-form-label" style="color:red" for="inputTitle">نام کالا</label>
|
||||
@if (Cod.ID == 0 || !_UsedInTheInvoice)
|
||||
{
|
||||
<InputText dir="rtl" @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا"
|
||||
<InputText style="text-align:center" @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا"
|
||||
/>
|
||||
}
|
||||
else
|
||||
{
|
||||
<InputText dir="rtl" @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا" readonly />
|
||||
<InputText style="text-align:center" @bind-Value="Cod.Title" type="text" class="form-control" id="inputTitle" placeholder="نام کالا" readonly />
|
||||
}
|
||||
|
||||
</div>
|
||||
@@ -73,19 +73,19 @@
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="col-sm-5 col-form-label">شناسه مالیاتی کالا</label>
|
||||
<InputText dir="rtl" @bind-Value="Cod.TaxID" type="text" class="form-control" id="inputTaxID" placeholder="شناسه مالیاتی کالا" />
|
||||
<InputText dir="ltr" style="text-align:center" @bind-Value="Cod.TaxID" type="text" class="form-control" id="inputTaxID" placeholder="شناسه مالیاتی کالا" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label style="color:red" class="col-sm-5 col-form-label">% نرخ مالیات کالا</label>
|
||||
<NumberInput dir="rtl" @bind-Value="Cod.TaxRate" type="text" class="form-control" id="inputTaxRate" placeholder="نرخ مالیات کالا" />
|
||||
<NumberInput dir="ltr" style="text-align:center" @bind-Value="Cod.TaxRate" type="number" class="form-control" id="inputTaxRate" placeholder="نرخ مالیات کالا" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="col-md-10">
|
||||
@if (Cod.ID == 0)
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
@@ -108,8 +108,11 @@ else
|
||||
</Button>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-2" style="align-content:center">
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
</div>
|
||||
</div>
|
||||
@code {
|
||||
public bool SpinnerVisible { get; set; } = false;
|
||||
private ConfirmDialog dialog = default!;
|
||||
@@ -226,7 +229,7 @@ else
|
||||
public async Task OnClickAdd()
|
||||
{
|
||||
SpinnerVisible = true;
|
||||
if (Cod.UnitID > 0 && Cod.TaxRate > 0 && !string.IsNullOrEmpty(Cod.Title))
|
||||
if (Cod.UnitID > 0 && Cod.TaxRate >= 0 && !string.IsNullOrEmpty(Cod.Title))
|
||||
{
|
||||
|
||||
var rsp = await hc.Post<RCOD>("Cod/Add", Cod);
|
||||
|
Reference in New Issue
Block a user