...
This commit is contained in:
@@ -544,5 +544,29 @@ namespace Back.Controllers
|
||||
{
|
||||
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)
|
||||
{
|
||||
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
|
||||
public async Task<bool> login(int CompanyID)
|
||||
|
Reference in New Issue
Block a user