...
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Service">
|
||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -49,20 +49,20 @@ namespace Back.Controllers
|
||||
if (!result.PatternID.HasValue || result.PatternID == 0)
|
||||
return BadRequest(new List<string> { "ابتدا برای این صورتحساب الگو در نظر بگیرید" });
|
||||
|
||||
if (result.invoiceType == InvoiceType.Bidding)
|
||||
return BadRequest(new List<string> { "صورتحساب در وضعیت پیش نویس نمیتواند ارسال شود" });
|
||||
//if (result.invoiceType == InvoiceType.Bidding)
|
||||
// return BadRequest(new List<string> { "صورتحساب در وضعیت پیش نویس نمیتواند ارسال شود" });
|
||||
|
||||
if (await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result))
|
||||
return BadRequest(new List<string> { "این صورتحساب قبلا به سازمان ارسال شده" });
|
||||
//if (await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result))
|
||||
// return BadRequest(new List<string> { "این صورتحساب قبلا به سازمان ارسال شده" });
|
||||
|
||||
if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||
&& !result.BillReference.HasValue)
|
||||
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع وجود داشته باشد" });
|
||||
//if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||
// && !result.BillReference.HasValue)
|
||||
// return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع وجود داشته باشد" });
|
||||
|
||||
|
||||
if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||
&& !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
||||
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
||||
//if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||
// && !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
||||
// return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,25 @@ namespace Back.Controllers
|
||||
if (result == null)
|
||||
return BadRequest(new List<string> { "صورتحساب یافت نشد" });
|
||||
|
||||
//else
|
||||
//{
|
||||
// if (result.invoiceType == InvoiceType.Bidding)
|
||||
// return BadRequest(new List<string> { "صورتحساب در وضعیت پیش نویس نمیتواند آماده ارسال شود" });
|
||||
|
||||
// if (await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result))
|
||||
// return BadRequest(new List<string> { "این صورتحساب قبلا به سازمان ارسال شده" });
|
||||
|
||||
// if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||
// && !result.BillReference.HasValue)
|
||||
// return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع وجود داشته باشد" });
|
||||
|
||||
|
||||
// if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||
// && !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
||||
// return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
||||
|
||||
//}
|
||||
|
||||
|
||||
return Ok(await _servTaxPayer.PreparationInvoiceBeforeSending(item, result));
|
||||
}
|
||||
@@ -87,11 +106,11 @@ namespace Back.Controllers
|
||||
public async Task<ActionResult<bool>> CheckAuth()
|
||||
{
|
||||
|
||||
//var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
//var UserID = claim.Value;
|
||||
//var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||
// return Ok(await _actionTaxPayer.login(user.RolUsers.First().CompanyID));
|
||||
return Ok(true);
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||
return Ok(await _actionTaxPayer.login(user.RolUsers.First().CompanyID));
|
||||
// return Ok(true);
|
||||
|
||||
return BadRequest();
|
||||
|
||||
@@ -103,8 +122,8 @@ namespace Back.Controllers
|
||||
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> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||
|
||||
var result = await _servTaxPayer.GetInvoice(user.RolUsers.First().CompanyID, InvoiceID);
|
||||
if (result == null)
|
||||
@@ -497,8 +516,8 @@ namespace Back.Controllers
|
||||
if (string.IsNullOrEmpty(item.uId))
|
||||
return BadRequest(new List<string> { "کد پیگیری یافت نشد" });
|
||||
|
||||
//if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||
// return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||
|
||||
DataInSendTaxDto desData = new DataInSendTaxDto();
|
||||
|
||||
|
@@ -25,12 +25,12 @@ namespace Back.Data.Models
|
||||
public string? mu { get { return cODItem != null ? cODItem.CODUnit.UnitTaxID : null; } }
|
||||
//میزان ارز
|
||||
[MaxLength(18)]
|
||||
public decimal? cfee { get { return fee / exr; } }
|
||||
public decimal? cfee { get { return exr==null || exr==0 ? null : fee / exr; } }
|
||||
//مبلغ مالیات بر ارزش افزوده
|
||||
[MaxLength(18)]
|
||||
public decimal? vam { get
|
||||
{
|
||||
return invoice?.pattern?.inp == 9 ? fee*vra/100 :
|
||||
return vra==0 ? 0 : invoice?.pattern?.inp == 9 ? fee*vra/100 :
|
||||
invoice?.pattern?.inp == 13 ? ((tcpbs+9)/100)+((prdis*vra)/100)
|
||||
: vra * adis / 100;
|
||||
} }
|
||||
|
@@ -22,24 +22,24 @@ namespace Back.Services
|
||||
}
|
||||
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
||||
{
|
||||
return "testTaxid";
|
||||
// return "testTaxid";
|
||||
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
||||
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
||||
}
|
||||
public async Task<InquiryResultModel> GetResultByUid(int CompanyID, string uid)
|
||||
{
|
||||
return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "FAILED",
|
||||
JsonConvert.SerializeObject( new DataInSendTaxDto()
|
||||
{
|
||||
error=new List<MessageInSendTaxDto>()
|
||||
{
|
||||
new MessageInSendTaxDto()
|
||||
{
|
||||
code="21001",message="یک خطای تست"
|
||||
}
|
||||
}
|
||||
})
|
||||
, "receive_invoice_confirm", "A2FFKZ");
|
||||
//return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "SUCCESS",
|
||||
// new DataInSendTaxDto()
|
||||
// {
|
||||
// error=new List<MessageInSendTaxDto>()
|
||||
// {
|
||||
// new MessageInSendTaxDto()
|
||||
// {
|
||||
// code="21001",message="یک خطای تست"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// , "receive_invoice_confirm", "A2FFKZ");
|
||||
if (!await login(CompanyID))
|
||||
return null;
|
||||
var uidAndFiscalId = new UidAndFiscalId(uid, _UniqueMemory);
|
||||
@@ -50,11 +50,11 @@ namespace Back.Services
|
||||
}
|
||||
public async Task<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>> SendInvoice(int CompanyID,InvoiceHeaderDto header, List<InvoiceBodyDto> InvoiceBody, PaymentDto payment)
|
||||
{
|
||||
return new TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>
|
||||
( 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);
|
||||
//return new TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>
|
||||
// ( 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))
|
||||
return null;
|
||||
|
@@ -31,38 +31,40 @@ namespace Back.Services
|
||||
.Where(w => !w.IsDeleted);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
//-----------------------
|
||||
return await invok
|
||||
var item= await invok
|
||||
.Include(inc => inc.invoiceDetails)
|
||||
.ThenInclude(inc => inc.cODItem)
|
||||
.ThenInclude(inc => inc.CODUnit)
|
||||
.Include(inc => inc.Customer)
|
||||
.Include(inc => inc.sentTax)
|
||||
//.Include(inc => inc.payments)
|
||||
.Include(inc => inc.pattern)
|
||||
.Select(s => new InvoiceDTO()
|
||||
.ThenInclude(inc => inc.BillType).FirstOrDefaultAsync();
|
||||
return new InvoiceDTO()
|
||||
{
|
||||
// ExternalAccessCode=s.ExternalAccessCode,
|
||||
IsDeleted=s.IsDeleted,
|
||||
PatternID = s.PatternID,
|
||||
PatternTitle = s.pattern.Title,
|
||||
CustomerID = s.CustomerID,
|
||||
CustomerName = s.Customer.FullName,
|
||||
ID = s.ID,
|
||||
InvoiceDate = s.InvoiceDate.ShamciToFormatShamci(),
|
||||
invoiceTypeTitle = s.invoiceType.GetEnumDisplayName(),
|
||||
invoiceType = s.invoiceType,
|
||||
Title = s.Title,
|
||||
InvoicIssueDate = s.InvoicIssueDate.ShamciToFormatShamci(),
|
||||
BillReference = s.BillReference,
|
||||
tbill = s.tbill,
|
||||
Des = s.Des,
|
||||
PreparedtoSendtoTax = s.PreparedtoSendtoTax,
|
||||
tdis = s.tdis,
|
||||
tvam = s.tvam,
|
||||
Udate = s.Udate.ShamciToFormatShamci(),
|
||||
InvoiceSendTaxs=s.sentTax.OrderBy(o => o.ID).Select(s=>new SentTaxDto()
|
||||
|
||||
IsDeleted = item.IsDeleted,
|
||||
PatternID = item.PatternID,
|
||||
PatternTitle = item.pattern.Title,
|
||||
CustomerID = item.CustomerID,
|
||||
CustomerName = item.Customer.FullName,
|
||||
ID = item.ID,
|
||||
InvoiceDate = item.InvoiceDate.ShamciToFormatShamci(),
|
||||
invoiceTypeTitle = item.invoiceType.GetEnumDisplayName(),
|
||||
invoiceType = item.invoiceType,
|
||||
Title = item.Title,
|
||||
InvoicIssueDate = item.InvoicIssueDate.ShamciToFormatShamci(),
|
||||
BillReference = item.BillReference,
|
||||
tbill = item.tbill,
|
||||
Des = item.Des,
|
||||
PreparedtoSendtoTax = item.PreparedtoSendtoTax,
|
||||
tdis = item.tdis,
|
||||
tvam = item.tvam,
|
||||
Udate = item.Udate.ShamciToFormatShamci(),
|
||||
|
||||
InvoiceSendTaxs = item.sentTax.OrderBy(o => o.ID).Select(s => new SentTaxDto()
|
||||
{
|
||||
Date = s.Date.ShamciToFormatShamci(),
|
||||
Time = s.Time,
|
||||
@@ -73,7 +75,7 @@ namespace Back.Services
|
||||
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
||||
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
||||
}).ToList(),
|
||||
items = s.invoiceDetails.OrderBy(o => o.ID).Select(x => new InvoiceItemDTO()
|
||||
items = item.invoiceDetails.OrderBy(o => o.ID).Select(x => new InvoiceItemDTO()
|
||||
{
|
||||
ID = x.ID,
|
||||
CODID = x.CODID,
|
||||
@@ -88,7 +90,8 @@ namespace Back.Services
|
||||
vra = x.vra,
|
||||
prdis = x.prdis
|
||||
}).ToList(),
|
||||
payments = new List<InvoicePaymentDTO>() //s.payments.OrderBy(o => o.ID).Select(x => new InvoicePaymentDTO()
|
||||
payments = new List<InvoicePaymentDTO>()
|
||||
//s.payments.OrderBy(o => o.ID).Select(x => new InvoicePaymentDTO()
|
||||
//{
|
||||
// ID = x.ID,
|
||||
// acn = x.acn,
|
||||
@@ -102,9 +105,8 @@ namespace Back.Services
|
||||
// trmn = x.trmn,
|
||||
// trn = x.acn
|
||||
//}).ToList()
|
||||
,
|
||||
})
|
||||
.FirstOrDefaultAsync();
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
public async Task<PagingDto<InvoiceGridDTO>?> GetInvoices(int CompanyID, ItemSerchGetInvoices itemSerch)
|
||||
|
@@ -65,26 +65,12 @@
|
||||
|
||||
<div class="postbox__details-title-box pb-30">
|
||||
|
||||
<p>
|
||||
@Item?.Text
|
||||
</p>
|
||||
@((MarkupString)Item?.Text)
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="postbox__details-qoute mb-30">
|
||||
<blockquote class="d-flex align-items-start">
|
||||
<div class="postbox__details-qoute-icon">
|
||||
<svg width="37" height="27" viewBox="0 0 37 27" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M35.046 0.402002C32.4553 2.01 30.222 3.97534 28.346 6.298C26.5593 8.53133 25.3533 10.8093 24.728 13.132C25.3533 12.596 26.0233 12.194 26.738 11.926C27.542 11.5687 28.3013 11.39 29.016 11.39C31.16 11.39 32.9467 12.1493 34.376 13.668C35.8053 15.0973 36.52 16.884 36.52 19.028C36.52 21.172 35.7607 22.9587 34.242 24.388C32.8127 25.8173 31.026 26.532 28.882 26.532C26.6487 26.532 24.8173 25.7727 23.388 24.254C21.9587 22.7353 21.244 20.77 21.244 18.358C21.244 15.142 22.1373 11.7027 23.924 8.04C25.8 4.288 27.8993 1.608 30.222 0H35.046V0.402002ZM13.802 0.402002C11.2113 2.01 8.978 3.97534 7.102 6.298C5.31533 8.53133 4.10933 10.8093 3.484 13.132C4.10933 12.596 4.77933 12.194 5.494 11.926C6.298 11.5687 7.05733 11.39 7.772 11.39C9.916 11.39 11.7027 12.1493 13.132 13.668C14.5613 15.0973 15.276 16.884 15.276 19.028C15.276 21.172 14.5167 22.9587 12.998 24.388C11.5687 25.8173 9.782 26.532 7.638 26.532C5.40467 26.532 3.57333 25.7727 2.144 24.254C0.714667 22.7353 0 20.77 0 18.358C0 15.142 0.893333 11.7027 2.68 8.04C4.556 4.288 6.65533 1.608 8.978 0H13.802V0.402002Z" fill="#CDCECF"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="postbox__details-qoute-text">
|
||||
<p>“تیم در سافت تک فوق العاده اختصاصی ، دانش و مفید است.</p>
|
||||
<span>سقراط</span>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -133,11 +119,13 @@
|
||||
|
||||
public List<BlogDto> collectionitem { get; set; } = new List<BlogDto>();
|
||||
public BlogDtoFull? Item { get; set; }
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (ItemID != null)
|
||||
{
|
||||
Item = await GetItems();
|
||||
// Item.Text = "<p><strong>RTHH</strong></p>";
|
||||
if (Item==null)
|
||||
Navigation.NavigateTo("/");
|
||||
|
||||
|
@@ -334,12 +334,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="showFullInvoiceItem" Type="ButtonType.Button">
|
||||
اطلاعات تکمیلی
|
||||
</Button>
|
||||
@* <Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
pdf
|
||||
</Button>
|
||||
@@ -350,7 +355,7 @@
|
||||
}
|
||||
|
||||
</div>
|
||||
@if (invoice.invoiceType != InvoiceType.Bidding && SendInvoice)
|
||||
@if (!invoice.IsDeleted && invoice.invoiceType != InvoiceType.Bidding && SendInvoice)
|
||||
{
|
||||
<div class="form-group col-md-2">
|
||||
<br />
|
||||
@@ -492,6 +497,13 @@
|
||||
hc._nav.NavigateTo($"TaxPayerInvoiceItem/{InvoiceID}");
|
||||
}
|
||||
}
|
||||
private async Task showFullInvoiceItem()
|
||||
{
|
||||
if (InvoiceID.HasValue)
|
||||
{
|
||||
hc._nav.NavigateTo($"FullInvoiceItem/{InvoiceID}");
|
||||
}
|
||||
}
|
||||
private async Task onClickLink()
|
||||
{
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
@page "/TaxPayerInvoiceItem/{InvoiceID:int}"
|
||||
@page "/FullInvoiceItem/{InvoiceID:int}"
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@layout PanelLayout
|
||||
@@ -6,7 +7,15 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
@if (FullInvoice)
|
||||
{
|
||||
<PageTitle>اطلاعات تکمیلی صورتحساب</PageTitle>
|
||||
}
|
||||
else
|
||||
{
|
||||
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
||||
}
|
||||
|
||||
|
||||
@* alert *@
|
||||
<div class="row">
|
||||
@@ -16,9 +25,21 @@
|
||||
</Alert>
|
||||
|
||||
</div>
|
||||
@if (FullInvoice)
|
||||
{
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> اطلاعات تکمیلی صورتحساب
|
||||
</h4>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> آماده سازی قبل از ارسال به سامانه مودیان
|
||||
</h4>
|
||||
}
|
||||
|
||||
@if(!FullInvoice)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-4">
|
||||
@@ -32,6 +53,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-4">
|
||||
@@ -187,7 +210,15 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-auto">
|
||||
@if (FullInvoice)
|
||||
{
|
||||
<button type="submit" @onclick="Send" class="btn btn-primary">ثبت تغییرات</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="submit" @onclick="Send" class="btn btn-primary">آماده سازی و ارسال</button>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -203,6 +234,7 @@
|
||||
List<ToastMessage> messages = new List<ToastMessage>();
|
||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||
public _TaxPayer.Atemplatefield? invoice { get; set; }
|
||||
public bool FullInvoice { get; set; } = true;
|
||||
// alert
|
||||
AlertColor alertColor = AlertColor.Primary;
|
||||
IconName alertIconName = IconName.CheckCircleFill;
|
||||
@@ -214,6 +246,10 @@
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
await LoadData();
|
||||
PreloadService.Hide();
|
||||
|
||||
if (hc._nav.Uri.ToString().Contains("FullInvoiceItem"))
|
||||
FullInvoice = true;
|
||||
else FullInvoice = false;
|
||||
await base.OnParametersSetAsync();
|
||||
|
||||
}
|
||||
@@ -229,7 +265,7 @@
|
||||
};
|
||||
public async Task Send()
|
||||
{
|
||||
if (!await CheckAuth())
|
||||
if (!FullInvoice && !await CheckAuth())
|
||||
{
|
||||
ShowMessage(ToastType.Danger, "خطا در احراز هویت سازمان مالیاتی");
|
||||
}
|
||||
@@ -241,7 +277,11 @@
|
||||
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
if (response)
|
||||
{
|
||||
ShowMessage(ToastType.Success, "آماده سازی با موفقیت انجام شد");
|
||||
if(FullInvoice)
|
||||
ShowMessage(ToastType.Success, "تغییرات با موفقیت انجام شد");
|
||||
|
||||
if (!FullInvoice)
|
||||
{
|
||||
ShowMessage(ToastType.Light, "در حال ارسال صورتحساب");
|
||||
rsp = await hc.Get($"TaxPayer/SendInvoice/{InvoiceID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
@@ -263,8 +303,13 @@
|
||||
ShowMessage(ToastType.Danger, request[0]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FullInvoice)
|
||||
ShowMessage(ToastType.Danger, "خطای در ذخیره سازی اطلاعات رخ داده");
|
||||
else
|
||||
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
||||
}
|
||||
}
|
||||
|
@@ -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/") });
|
||||
|
||||
//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
|
||||
//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");
|
||||
|
||||
|
Reference in New Issue
Block a user