...
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Back.Controllers
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!result.PatternID.HasValue || result.PatternID==0)
|
if (!result.PatternID.HasValue || result.PatternID == 0)
|
||||||
return BadRequest(new List<string> { "ابتدا برای این صورتحساب الگو در نظر بگیرید" });
|
return BadRequest(new List<string> { "ابتدا برای این صورتحساب الگو در نظر بگیرید" });
|
||||||
|
|
||||||
if (result.invoiceType == InvoiceType.Bidding)
|
if (result.invoiceType == InvoiceType.Bidding)
|
||||||
@@ -90,8 +90,8 @@ namespace Back.Controllers
|
|||||||
//var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
//var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||||
//var UserID = claim.Value;
|
//var UserID = claim.Value;
|
||||||
//var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
//var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||||
// return Ok(await _actionTaxPayer.login(user.RolUsers.First().CompanyID));
|
// return Ok(await _actionTaxPayer.login(user.RolUsers.First().CompanyID));
|
||||||
return Ok(true);
|
return Ok(true);
|
||||||
|
|
||||||
return BadRequest();
|
return BadRequest();
|
||||||
|
|
||||||
@@ -425,7 +425,7 @@ namespace Back.Controllers
|
|||||||
InvoiceBody.Add(item);
|
InvoiceBody.Add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var responseModel = await _actionTaxPayer.SendInvoice(user.RolUsers.First().CompanyID, header, InvoiceBody, new PaymentDto { });
|
var responseModel = await _actionTaxPayer.SendInvoice(user.RolUsers.First().CompanyID, header, InvoiceBody, new PaymentDto { });
|
||||||
if (responseModel == null)
|
if (responseModel == null)
|
||||||
{
|
{
|
||||||
@@ -435,6 +435,8 @@ namespace Back.Controllers
|
|||||||
{
|
{
|
||||||
foreach (var item in responseModel.Body.Result)
|
foreach (var item in responseModel.Body.Result)
|
||||||
{
|
{
|
||||||
|
//ta imja
|
||||||
|
|
||||||
var ressenttax = new SentTax
|
var ressenttax = new SentTax
|
||||||
{
|
{
|
||||||
InvoiceID = result.ID,
|
InvoiceID = result.ID,
|
||||||
@@ -444,7 +446,8 @@ namespace Back.Controllers
|
|||||||
ReferenceNumber = item.ReferenceNumber,
|
ReferenceNumber = item.ReferenceNumber,
|
||||||
uId = item.Uid,
|
uId = item.Uid,
|
||||||
SentStatus = SentStatus.Send,
|
SentStatus = SentStatus.Send,
|
||||||
InvoiceModel = JsonConvert.SerializeObject(result),
|
InvoiceModel = JsonConvert.SerializeObject(result, Formatting.Indented,new JsonSerializerSettings
|
||||||
|
{ PreserveReferencesHandling = PreserveReferencesHandling.Objects }),
|
||||||
ResponseModel = JsonConvert.SerializeObject(responseModel)
|
ResponseModel = JsonConvert.SerializeObject(responseModel)
|
||||||
};
|
};
|
||||||
await _servTaxPayer.AddSentTax(ressenttax);
|
await _servTaxPayer.AddSentTax(ressenttax);
|
||||||
@@ -495,11 +498,11 @@ namespace Back.Controllers
|
|||||||
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||||
|
|
||||||
DataInSendTaxDto desData = new DataInSendTaxDto();
|
DataInSendTaxDto desData = new DataInSendTaxDto();
|
||||||
if (item.SentStatus==SentStatus.Send
|
if (item.SentStatus == SentStatus.Send
|
||||||
|| item.SentStatus == SentStatus.pending
|
|| item.SentStatus == SentStatus.pending
|
||||||
|| item.SentStatus == SentStatus.IN_PROGRESS)
|
|| item.SentStatus == SentStatus.IN_PROGRESS)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var result = await _actionTaxPayer.GetResultByUid(user.RolUsers.First().CompanyID, item.uId);
|
var result = await _actionTaxPayer.GetResultByUid(user.RolUsers.First().CompanyID, item.uId);
|
||||||
if (result == null)
|
if (result == null)
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using Back.Common;
|
using Back.Common;
|
||||||
using Shared.DTOs;
|
using Shared.DTOs;
|
||||||
namespace Back.Data.Models
|
namespace Back.Data.Models
|
||||||
@@ -72,7 +73,7 @@ namespace Back.Data.Models
|
|||||||
//اریخ کوتاژ اظهارنامه گمرکی
|
//اریخ کوتاژ اظهارنامه گمرکی
|
||||||
// Unix Time => from fild CottageDateOfCustomsDeclaration
|
// Unix Time => from fild CottageDateOfCustomsDeclaration
|
||||||
[MaxLength(5)]
|
[MaxLength(5)]
|
||||||
public long? cdcd { get { return new DateTimeOffset(CottageDateOfCustomsDeclaration.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
|
public long? cdcd { get { return string.IsNullOrEmpty(CottageDateOfCustomsDeclaration) ? null : new DateTimeOffset(CottageDateOfCustomsDeclaration.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
|
||||||
//کد پستی خریدار
|
//کد پستی خریدار
|
||||||
[MaxLength(10)]
|
[MaxLength(10)]
|
||||||
public string? bpc { get { return Customer.ZipCode; } }
|
public string? bpc { get { return Customer.ZipCode; } }
|
||||||
@@ -175,6 +176,7 @@ namespace Back.Data.Models
|
|||||||
[ForeignKey("PatternID")]
|
[ForeignKey("PatternID")]
|
||||||
public virtual Pattern? pattern { get; set; }
|
public virtual Pattern? pattern { get; set; }
|
||||||
[ForeignKey("CompanyID")]
|
[ForeignKey("CompanyID")]
|
||||||
|
[JsonIgnore]
|
||||||
public virtual Company? company { get; set; }
|
public virtual Company? company { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ namespace Back.Services
|
|||||||
}
|
}
|
||||||
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
||||||
{
|
{
|
||||||
|
return "testTaxid";
|
||||||
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
||||||
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
||||||
}
|
}
|
||||||
@@ -36,8 +37,12 @@ namespace Back.Services
|
|||||||
}
|
}
|
||||||
public async Task<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>> SendInvoice(int CompanyID,InvoiceHeaderDto header, List<InvoiceBodyDto> InvoiceBody, PaymentDto payment)
|
public async Task<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>> SendInvoice(int CompanyID,InvoiceHeaderDto header, List<InvoiceBodyDto> InvoiceBody, PaymentDto payment)
|
||||||
{
|
{
|
||||||
var stringtest = "{\"ReferenceNumber\":\"18084a18-1eb4-41cd-8bd3-2cad73c45398\",\"Uid\":\"0a4a4ab2-8047-4c31-b765-456ddf0e9c53\",\"Status\":\"SUCCESS\",\"Data\":{\"ValueKind\":1},\"PacketType\":\"receive_invoice_confirm\",\"FiscalId\":\"A2FFKZ\"}";
|
return new TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>
|
||||||
return JsonConvert.DeserializeObject<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>>(stringtest);
|
( body: new AsyncResponseModel(
|
||||||
|
1702299112
|
||||||
|
,new HashSet<PacketResponse>(new List<PacketResponse> { new PacketResponse("5d0c7198-e2fd-4cc1-8802-fe498d6ccf73", "a70444a4-1810-4cea-8bcc-7acb4bc75645", null,null)})
|
||||||
|
,new List<ErrorModel>()), 200);
|
||||||
|
|
||||||
if (!await login(CompanyID))
|
if (!await login(CompanyID))
|
||||||
return null;
|
return null;
|
||||||
return await TaxApiService.Instance.TaxApis.SendInvoicesAsync(new List<InvoiceDto>()
|
return await TaxApiService.Instance.TaxApis.SendInvoicesAsync(new List<InvoiceDto>()
|
||||||
|
@@ -340,12 +340,12 @@
|
|||||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||||
حذف
|
حذف
|
||||||
</Button>
|
</Button>
|
||||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
@* <Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||||
pdf
|
pdf
|
||||||
</Button>
|
</Button>
|
||||||
<Button class="mt-3" Color="ButtonColor.Info" @onclick="onClickLink" Type="ButtonType.Button">
|
<Button class="mt-3" Color="ButtonColor.Info" @onclick="onClickLink" Type="ButtonType.Button">
|
||||||
لینک
|
لینک
|
||||||
</Button>
|
</Button> *@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -37,10 +37,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("https://localhost:7075/api/") });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/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