...
This commit is contained in:
@@ -544,5 +544,29 @@ namespace Back.Controllers
|
|||||||
{
|
{
|
||||||
return Ok(await _servTaxPayer.GetUnits());
|
return Ok(await _servTaxPayer.GetUnits());
|
||||||
}
|
}
|
||||||
|
[HttpGet("EconomicCodeInformation")]
|
||||||
|
public async Task<ActionResult<EconomicCodeModelDto>> GetEconomicCodeInformation(string item)
|
||||||
|
{
|
||||||
|
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||||
|
var UserID = claim.Value;
|
||||||
|
var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||||
|
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||||
|
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||||
|
var result=await _actionTaxPayer.GetEconomicCodeInformation(item);
|
||||||
|
if (result == null) return NotFound();
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
|
[HttpGet("FiscalInformation")]
|
||||||
|
public async Task<ActionResult<FiscalInformationModelDto>> GetFiscalInformation(string item)
|
||||||
|
{
|
||||||
|
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||||
|
var UserID = claim.Value;
|
||||||
|
var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||||
|
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||||
|
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||||
|
var result=await _actionTaxPayer.GetFiscalInformation(item);
|
||||||
|
if (result == null) return NotFound();
|
||||||
|
return Ok(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -48,7 +48,14 @@ namespace Back.Services
|
|||||||
}
|
}
|
||||||
public async Task<EconomicCodeModel?> GetEconomicCodeInformation(string Item)
|
public async Task<EconomicCodeModel?> GetEconomicCodeInformation(string Item)
|
||||||
{
|
{
|
||||||
|
|
||||||
return await TaxApiService.Instance.TaxApis.GetEconomicCodeInformationAsync(Item);
|
return await TaxApiService.Instance.TaxApis.GetEconomicCodeInformationAsync(Item);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public async Task<FiscalInformationModel?> GetFiscalInformation(string Item)
|
||||||
|
{
|
||||||
|
return await TaxApiService.Instance.TaxApis.GetFiscalInformationAsync(Item);
|
||||||
}
|
}
|
||||||
//-------------------internal
|
//-------------------internal
|
||||||
public async Task<bool> login(int CompanyID)
|
public async Task<bool> login(int CompanyID)
|
||||||
|
24
Shared/DTOs/EconomicCodeModelDto.cs
Normal file
24
Shared/DTOs/EconomicCodeModelDto.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Shared.DTOs
|
||||||
|
{
|
||||||
|
public class EconomicCodeModelDto
|
||||||
|
{
|
||||||
|
public string NameTrade { get; set; }
|
||||||
|
|
||||||
|
public string TaxpayerStatus { get; set; }
|
||||||
|
|
||||||
|
public string TaxpayerType { get; set; }
|
||||||
|
|
||||||
|
public string PostalcodeTaxpayer { get; set; }
|
||||||
|
|
||||||
|
public string AddressTaxpayer { get; set; }
|
||||||
|
|
||||||
|
public string NationalId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
19
Shared/DTOs/FiscalInformationModelDto.cs
Normal file
19
Shared/DTOs/FiscalInformationModelDto.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Shared.DTOs
|
||||||
|
{
|
||||||
|
public class FiscalInformationModelDto
|
||||||
|
{
|
||||||
|
public string NameTrade { get; set; }
|
||||||
|
|
||||||
|
public int FiscalStatus { get; set; }
|
||||||
|
|
||||||
|
public string EconomicCode { get; set; }
|
||||||
|
|
||||||
|
public string NationalId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -105,7 +105,7 @@
|
|||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@if (Cus.ID == 0)
|
@if (Cus.ID == 0)
|
||||||
{
|
{
|
||||||
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||||
جدید
|
جدید
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
@@ -124,6 +124,9 @@ else
|
|||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Info" @onclick="OnClickCheckEconomicCode" Type="ButtonType.Button">
|
||||||
|
بررسی کد اقتصادی
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" style="align-content:center">
|
<div class="col-md-2" style="align-content:center">
|
||||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||||
@@ -232,6 +235,33 @@ else
|
|||||||
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
|
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
|
||||||
SpinnerVisible = !SpinnerVisible;
|
SpinnerVisible = !SpinnerVisible;
|
||||||
}
|
}
|
||||||
|
public async Task OnClickCheckEconomicCode()
|
||||||
|
{
|
||||||
|
SpinnerVisible = !SpinnerVisible;
|
||||||
|
if (!string.IsNullOrEmpty(Cus.EconomicCode))
|
||||||
|
{
|
||||||
|
|
||||||
|
var rsp = await hc.Get($"TaxPayer/EconomicCodeInformation?item={Cus.EconomicCode}");
|
||||||
|
if (rsp.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
var request = await rsp.Content.ReadFromJsonAsync<EconomicCodeModelDto>();
|
||||||
|
// dialog.ShowAsync(
|
||||||
|
// title: $"کد اقتصادی به نام {request.NameTrade}",
|
||||||
|
// message1: $"وضعیت {request.TaxpayerStatus}");
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(rsp.StatusCode==System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
ShowDangerAlert("یافت نشد");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else ShowDangerAlert("کد اقعصادی را مشخص کنید");
|
||||||
|
SpinnerVisible = !SpinnerVisible;
|
||||||
|
}
|
||||||
public async Task OnClickAdd()
|
public async Task OnClickAdd()
|
||||||
{
|
{
|
||||||
SpinnerVisible = !SpinnerVisible;
|
SpinnerVisible = !SpinnerVisible;
|
||||||
|
@@ -111,7 +111,7 @@
|
|||||||
&& a.SentStatus == SentStatus.Successful))
|
&& a.SentStatus == SentStatus.Successful))
|
||||||
{
|
{
|
||||||
SendInvoice = false;
|
SendInvoice = false;
|
||||||
<h6>
|
<h6 style="color:#49cc90;">
|
||||||
این صورتحساب با این وضعیت به سامانه مودیان ارسال و تائید شده
|
این صورتحساب با این وضعیت به سامانه مودیان ارسال و تائید شده
|
||||||
</h6>
|
</h6>
|
||||||
}
|
}
|
||||||
|
@@ -144,6 +144,7 @@
|
|||||||
@functions{
|
@functions{
|
||||||
public async Task SentTaxItem(int ID)
|
public async Task SentTaxItem(int ID)
|
||||||
{
|
{
|
||||||
|
PreloadService.Show(SpinnerColor.Dark);
|
||||||
SpinnerVisible = true;
|
SpinnerVisible = true;
|
||||||
var rsp = await hc.Get($"TaxPayer/GetResult/{ID}");
|
var rsp = await hc.Get($"TaxPayer/GetResult/{ID}");
|
||||||
if (rsp.IsSuccessStatusCode)
|
if (rsp.IsSuccessStatusCode)
|
||||||
@@ -154,6 +155,7 @@
|
|||||||
ingriddata.SentStatus = requestsendTax.SentStatus;
|
ingriddata.SentStatus = requestsendTax.SentStatus;
|
||||||
ingriddata.msgSentStatus = requestsendTax.msgSentStatus;
|
ingriddata.msgSentStatus = requestsendTax.msgSentStatus;
|
||||||
SpinnerVisible = false;
|
SpinnerVisible = false;
|
||||||
|
PreloadService.Hide();
|
||||||
//-----------------
|
//-----------------
|
||||||
var parameters = new Dictionary<string, object>();
|
var parameters = new Dictionary<string, object>();
|
||||||
parameters.Add("inData", requestsendTax);
|
parameters.Add("inData", requestsendTax);
|
||||||
@@ -161,7 +163,7 @@
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||||
SpinnerVisible = false;
|
SpinnerVisible = false; PreloadService.Hide();
|
||||||
ShowDangerAlert(request[0]);
|
ShowDangerAlert(request[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,16 +22,16 @@ else
|
|||||||
|
|
||||||
@* alert *@
|
@* alert *@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
|
||||||
<Alert hidden="@Hidealert" Color="@alertColor" Dismissable="false">
|
<Alert hidden="@Hidealert" Color="@alertColor" Dismissable="false">
|
||||||
<Icon Name="@alertIconName" class="me-2"></Icon>
|
<Icon Name="@alertIconName" class="me-2"></Icon>
|
||||||
@alertMessage
|
@alertMessage
|
||||||
</Alert>
|
</Alert>
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-10">
|
||||||
@if (FullInvoice)
|
@if (FullInvoice)
|
||||||
{
|
{
|
||||||
<h4 class="fw-bold py-3 mb-4">
|
<h4 class="fw-bold py-3 mb-4">
|
||||||
@@ -43,8 +43,12 @@ else
|
|||||||
<h4 class="fw-bold py-3 mb-4">
|
<h4 class="fw-bold py-3 mb-4">
|
||||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> آماده سازی قبل از ارسال به سامانه مودیان
|
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> آماده سازی قبل از ارسال به سامانه مودیان
|
||||||
</h4>
|
</h4>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@if (!FullInvoice)
|
@if (!FullInvoice)
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@@ -36,10 +36,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
|||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
||||||
|
|
||||||
//Home
|
//Home
|
||||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||||
|
|
||||||
//farzan
|
//farzan
|
||||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||||
|
|
||||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user