...
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user