...
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Service">
|
<Reference Include="Service">
|
||||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@@ -49,20 +49,20 @@ namespace Back.Controllers
|
|||||||
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)
|
||||||
return BadRequest(new List<string> { "صورتحساب در وضعیت پیش نویس نمیتواند ارسال شود" });
|
// return BadRequest(new List<string> { "صورتحساب در وضعیت پیش نویس نمیتواند ارسال شود" });
|
||||||
|
|
||||||
if (await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result))
|
//if (await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result))
|
||||||
return BadRequest(new List<string> { "این صورتحساب قبلا به سازمان ارسال شده" });
|
// return BadRequest(new List<string> { "این صورتحساب قبلا به سازمان ارسال شده" });
|
||||||
|
|
||||||
if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
//if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||||
&& !result.BillReference.HasValue)
|
// && !result.BillReference.HasValue)
|
||||||
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع وجود داشته باشد" });
|
// return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع وجود داشته باشد" });
|
||||||
|
|
||||||
|
|
||||||
if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
//if ((result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair)
|
||||||
&& !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
// && !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
||||||
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
// return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -80,6 +80,25 @@ namespace Back.Controllers
|
|||||||
if (result == null)
|
if (result == null)
|
||||||
return BadRequest(new List<string> { "صورتحساب یافت نشد" });
|
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));
|
return Ok(await _servTaxPayer.PreparationInvoiceBeforeSending(item, result));
|
||||||
}
|
}
|
||||||
@@ -87,11 +106,11 @@ namespace Back.Controllers
|
|||||||
public async Task<ActionResult<bool>> CheckAuth()
|
public async Task<ActionResult<bool>> CheckAuth()
|
||||||
{
|
{
|
||||||
|
|
||||||
//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();
|
||||||
|
|
||||||
@@ -103,8 +122,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));
|
||||||
//if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||||
// return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||||
|
|
||||||
var result = await _servTaxPayer.GetInvoice(user.RolUsers.First().CompanyID, InvoiceID);
|
var result = await _servTaxPayer.GetInvoice(user.RolUsers.First().CompanyID, InvoiceID);
|
||||||
if (result == null)
|
if (result == null)
|
||||||
@@ -497,8 +516,8 @@ namespace Back.Controllers
|
|||||||
if (string.IsNullOrEmpty(item.uId))
|
if (string.IsNullOrEmpty(item.uId))
|
||||||
return BadRequest(new List<string> { "کد پیگیری یافت نشد" });
|
return BadRequest(new List<string> { "کد پیگیری یافت نشد" });
|
||||||
|
|
||||||
//if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||||
// return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||||
|
|
||||||
DataInSendTaxDto desData = new DataInSendTaxDto();
|
DataInSendTaxDto desData = new DataInSendTaxDto();
|
||||||
|
|
||||||
|
@@ -25,12 +25,12 @@ namespace Back.Data.Models
|
|||||||
public string? mu { get { return cODItem != null ? cODItem.CODUnit.UnitTaxID : null; } }
|
public string? mu { get { return cODItem != null ? cODItem.CODUnit.UnitTaxID : null; } }
|
||||||
//میزان ارز
|
//میزان ارز
|
||||||
[MaxLength(18)]
|
[MaxLength(18)]
|
||||||
public decimal? cfee { get { return fee / exr; } }
|
public decimal? cfee { get { return exr==null || exr==0 ? null : fee / exr; } }
|
||||||
//مبلغ مالیات بر ارزش افزوده
|
//مبلغ مالیات بر ارزش افزوده
|
||||||
[MaxLength(18)]
|
[MaxLength(18)]
|
||||||
public decimal? vam { get
|
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)
|
invoice?.pattern?.inp == 13 ? ((tcpbs+9)/100)+((prdis*vra)/100)
|
||||||
: vra * adis / 100;
|
: vra * adis / 100;
|
||||||
} }
|
} }
|
||||||
|
@@ -22,24 +22,24 @@ namespace Back.Services
|
|||||||
}
|
}
|
||||||
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
||||||
{
|
{
|
||||||
return "testTaxid";
|
// return "testTaxid";
|
||||||
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
||||||
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
||||||
}
|
}
|
||||||
public async Task<InquiryResultModel> GetResultByUid(int CompanyID, string uid)
|
public async Task<InquiryResultModel> GetResultByUid(int CompanyID, string uid)
|
||||||
{
|
{
|
||||||
return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "FAILED",
|
//return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "SUCCESS",
|
||||||
JsonConvert.SerializeObject( new DataInSendTaxDto()
|
// new DataInSendTaxDto()
|
||||||
{
|
// {
|
||||||
error=new List<MessageInSendTaxDto>()
|
// error=new List<MessageInSendTaxDto>()
|
||||||
{
|
// {
|
||||||
new MessageInSendTaxDto()
|
// new MessageInSendTaxDto()
|
||||||
{
|
// {
|
||||||
code="21001",message="یک خطای تست"
|
// code="21001",message="یک خطای تست"
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// }
|
||||||
, "receive_invoice_confirm", "A2FFKZ");
|
// , "receive_invoice_confirm", "A2FFKZ");
|
||||||
if (!await login(CompanyID))
|
if (!await login(CompanyID))
|
||||||
return null;
|
return null;
|
||||||
var uidAndFiscalId = new UidAndFiscalId(uid, _UniqueMemory);
|
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)
|
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>
|
//return new TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>
|
||||||
( body: new AsyncResponseModel(
|
// ( body: new AsyncResponseModel(
|
||||||
1702299112
|
// 1702299112
|
||||||
,new HashSet<PacketResponse>(new List<PacketResponse> { new PacketResponse("5d0c7198-e2fd-4cc1-8802-fe498d6ccf73", "a70444a4-1810-4cea-8bcc-7acb4bc75645", null,null)})
|
// ,new HashSet<PacketResponse>(new List<PacketResponse> { new PacketResponse("5d0c7198-e2fd-4cc1-8802-fe498d6ccf73", "a70444a4-1810-4cea-8bcc-7acb4bc75645", null,null)})
|
||||||
,new List<ErrorModel>()), 200);
|
// ,new List<ErrorModel>()), 200);
|
||||||
|
|
||||||
if (!await login(CompanyID))
|
if (!await login(CompanyID))
|
||||||
return null;
|
return null;
|
||||||
|
@@ -24,87 +24,89 @@ namespace Back.Services
|
|||||||
{
|
{
|
||||||
#region AdvancedSearch
|
#region AdvancedSearch
|
||||||
var invok = _invoiceRepo
|
var invok = _invoiceRepo
|
||||||
.Get(w => w.CompanyID == CompanyID && w.ID == ID);
|
.Get(w => w.CompanyID == CompanyID && w.ID == ID);
|
||||||
if (notloaddelete)
|
if (notloaddelete)
|
||||||
{
|
{
|
||||||
invok = invok
|
invok = invok
|
||||||
.Where(w => !w.IsDeleted);
|
.Where(w => !w.IsDeleted);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
//-----------------------
|
//-----------------------
|
||||||
return await invok
|
var item= await invok
|
||||||
.Include(inc => inc.invoiceDetails)
|
.Include(inc => inc.invoiceDetails)
|
||||||
.ThenInclude(inc => inc.cODItem)
|
.ThenInclude(inc => inc.cODItem)
|
||||||
.ThenInclude(inc => inc.CODUnit)
|
.ThenInclude(inc => inc.CODUnit)
|
||||||
.Include(inc=>inc.sentTax)
|
.Include(inc => inc.Customer)
|
||||||
//.Include(inc => inc.payments)
|
.Include(inc => inc.sentTax)
|
||||||
.Include(inc => inc.pattern)
|
//.Include(inc => inc.payments)
|
||||||
.Select(s => new InvoiceDTO()
|
.Include(inc => inc.pattern)
|
||||||
{
|
.ThenInclude(inc => inc.BillType).FirstOrDefaultAsync();
|
||||||
// ExternalAccessCode=s.ExternalAccessCode,
|
return new InvoiceDTO()
|
||||||
IsDeleted=s.IsDeleted,
|
{
|
||||||
PatternID = s.PatternID,
|
|
||||||
PatternTitle = s.pattern.Title,
|
IsDeleted = item.IsDeleted,
|
||||||
CustomerID = s.CustomerID,
|
PatternID = item.PatternID,
|
||||||
CustomerName = s.Customer.FullName,
|
PatternTitle = item.pattern.Title,
|
||||||
ID = s.ID,
|
CustomerID = item.CustomerID,
|
||||||
InvoiceDate = s.InvoiceDate.ShamciToFormatShamci(),
|
CustomerName = item.Customer.FullName,
|
||||||
invoiceTypeTitle = s.invoiceType.GetEnumDisplayName(),
|
ID = item.ID,
|
||||||
invoiceType = s.invoiceType,
|
InvoiceDate = item.InvoiceDate.ShamciToFormatShamci(),
|
||||||
Title = s.Title,
|
invoiceTypeTitle = item.invoiceType.GetEnumDisplayName(),
|
||||||
InvoicIssueDate = s.InvoicIssueDate.ShamciToFormatShamci(),
|
invoiceType = item.invoiceType,
|
||||||
BillReference = s.BillReference,
|
Title = item.Title,
|
||||||
tbill = s.tbill,
|
InvoicIssueDate = item.InvoicIssueDate.ShamciToFormatShamci(),
|
||||||
Des = s.Des,
|
BillReference = item.BillReference,
|
||||||
PreparedtoSendtoTax = s.PreparedtoSendtoTax,
|
tbill = item.tbill,
|
||||||
tdis = s.tdis,
|
Des = item.Des,
|
||||||
tvam = s.tvam,
|
PreparedtoSendtoTax = item.PreparedtoSendtoTax,
|
||||||
Udate = s.Udate.ShamciToFormatShamci(),
|
tdis = item.tdis,
|
||||||
InvoiceSendTaxs=s.sentTax.OrderBy(o => o.ID).Select(s=>new SentTaxDto()
|
tvam = item.tvam,
|
||||||
{
|
Udate = item.Udate.ShamciToFormatShamci(),
|
||||||
Date = s.Date.ShamciToFormatShamci(),
|
|
||||||
Time = s.Time,
|
InvoiceSendTaxs = item.sentTax.OrderBy(o => o.ID).Select(s => new SentTaxDto()
|
||||||
ID = s.ID,
|
{
|
||||||
InvoiceID = s.InvoiceID,
|
Date = s.Date.ShamciToFormatShamci(),
|
||||||
SentStatus = s.SentStatus,
|
Time = s.Time,
|
||||||
InvoiceType= s.InvoiceType,
|
ID = s.ID,
|
||||||
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
InvoiceID = s.InvoiceID,
|
||||||
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
SentStatus = s.SentStatus,
|
||||||
}).ToList(),
|
InvoiceType = s.InvoiceType,
|
||||||
items = s.invoiceDetails.OrderBy(o => o.ID).Select(x => new InvoiceItemDTO()
|
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
||||||
{
|
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
||||||
ID = x.ID,
|
}).ToList(),
|
||||||
CODID = x.CODID,
|
items = item.invoiceDetails.OrderBy(o => o.ID).Select(x => new InvoiceItemDTO()
|
||||||
adis = x.adis,
|
{
|
||||||
am = x.am.Value,
|
ID = x.ID,
|
||||||
dis = x.dis,
|
CODID = x.CODID,
|
||||||
fee = x.fee.Value,
|
adis = x.adis,
|
||||||
mu = x.unitTitle,
|
am = x.am.Value,
|
||||||
sstt = x.sstt,
|
dis = x.dis,
|
||||||
tsstam = x.tsstam,
|
fee = x.fee.Value,
|
||||||
vam = x.vam,
|
mu = x.unitTitle,
|
||||||
vra = x.vra,
|
sstt = x.sstt,
|
||||||
prdis = x.prdis
|
tsstam = x.tsstam,
|
||||||
}).ToList(),
|
vam = x.vam,
|
||||||
payments = new List<InvoicePaymentDTO>() //s.payments.OrderBy(o => o.ID).Select(x => new InvoicePaymentDTO()
|
vra = x.vra,
|
||||||
//{
|
prdis = x.prdis
|
||||||
// ID = x.ID,
|
}).ToList(),
|
||||||
// acn = x.acn,
|
payments = new List<InvoicePaymentDTO>()
|
||||||
// iinn = x.acn,
|
//s.payments.OrderBy(o => o.ID).Select(x => new InvoicePaymentDTO()
|
||||||
// pcn = x.acn,
|
//{
|
||||||
// pdt = x.pdt,
|
// ID = x.ID,
|
||||||
// PaymentDateTime=x.PaymentDateTime,
|
// acn = x.acn,
|
||||||
// pid = x.pid,
|
// iinn = x.acn,
|
||||||
// pmt = x.pmt,
|
// pcn = x.acn,
|
||||||
// pv = x.pv,
|
// pdt = x.pdt,
|
||||||
// trmn = x.trmn,
|
// PaymentDateTime=x.PaymentDateTime,
|
||||||
// trn = x.acn
|
// pid = x.pid,
|
||||||
//}).ToList()
|
// pmt = x.pmt,
|
||||||
,
|
// pv = x.pv,
|
||||||
})
|
// trmn = x.trmn,
|
||||||
.FirstOrDefaultAsync();
|
// trn = x.acn
|
||||||
|
//}).ToList()
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public async Task<PagingDto<InvoiceGridDTO>?> GetInvoices(int CompanyID, ItemSerchGetInvoices itemSerch)
|
public async Task<PagingDto<InvoiceGridDTO>?> GetInvoices(int CompanyID, ItemSerchGetInvoices itemSerch)
|
||||||
@@ -126,10 +128,10 @@ namespace Back.Services
|
|||||||
invok = invok.Where(w => w.Title.Contains(itemSerch.Title));
|
invok = invok.Where(w => w.Title.Contains(itemSerch.Title));
|
||||||
|
|
||||||
if (itemSerch.refInvoiceID != null)
|
if (itemSerch.refInvoiceID != null)
|
||||||
invok = invok.Where(w => w.BillReference==itemSerch.refInvoiceID);
|
invok = invok.Where(w => w.BillReference == itemSerch.refInvoiceID);
|
||||||
|
|
||||||
if(itemSerch.CodID != null)
|
if (itemSerch.CodID != null)
|
||||||
invok = invok.Where(w => w.invoiceDetails.Any(wa=>wa.CODID== itemSerch.CodID));
|
invok = invok.Where(w => w.invoiceDetails.Any(wa => wa.CODID == itemSerch.CodID));
|
||||||
//foreach (InputObj item in inputObjs)
|
//foreach (InputObj item in inputObjs)
|
||||||
// invok = invok.Where(ExMethod.GetFunc<Customer>(item.Param, item.Value));
|
// invok = invok.Where(ExMethod.GetFunc<Customer>(item.Param, item.Value));
|
||||||
|
|
||||||
@@ -183,7 +185,7 @@ namespace Back.Services
|
|||||||
var item = await _invoiceRepo.AddAsync(invoice);
|
var item = await _invoiceRepo.AddAsync(invoice);
|
||||||
return item.ID;
|
return item.ID;
|
||||||
}
|
}
|
||||||
catch (Exception ex )
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -221,7 +223,7 @@ namespace Back.Services
|
|||||||
{
|
{
|
||||||
return await _invoiceRepo
|
return await _invoiceRepo
|
||||||
.Get(w => w.ID == InvoiceID && w.CompanyID == CompanyID && !w.IsDeleted)
|
.Get(w => w.ID == InvoiceID && w.CompanyID == CompanyID && !w.IsDeleted)
|
||||||
.Include(inc=>inc.invoiceDetails)
|
.Include(inc => inc.invoiceDetails)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
public async Task<bool> DeleteInvoice(Invoice item)
|
public async Task<bool> DeleteInvoice(Invoice item)
|
||||||
|
@@ -65,26 +65,12 @@
|
|||||||
|
|
||||||
<div class="postbox__details-title-box pb-30">
|
<div class="postbox__details-title-box pb-30">
|
||||||
|
|
||||||
<p>
|
@((MarkupString)Item?.Text)
|
||||||
@Item?.Text
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
</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 List<BlogDto> collectionitem { get; set; } = new List<BlogDto>();
|
||||||
public BlogDtoFull? Item { get; set; }
|
public BlogDtoFull? Item { get; set; }
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
if (ItemID != null)
|
if (ItemID != null)
|
||||||
{
|
{
|
||||||
Item = await GetItems();
|
Item = await GetItems();
|
||||||
|
// Item.Text = "<p><strong>RTHH</strong></p>";
|
||||||
if (Item==null)
|
if (Item==null)
|
||||||
Navigation.NavigateTo("/");
|
Navigation.NavigateTo("/");
|
||||||
|
|
||||||
|
@@ -334,12 +334,17 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||||
ثبت تغییرات
|
ثبت تغییرات
|
||||||
</Button>
|
</Button>
|
||||||
<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="showFullInvoiceItem" Type="ButtonType.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>
|
||||||
@@ -350,7 +355,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@if (invoice.invoiceType != InvoiceType.Bidding && SendInvoice)
|
@if (!invoice.IsDeleted && invoice.invoiceType != InvoiceType.Bidding && SendInvoice)
|
||||||
{
|
{
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<br />
|
<br />
|
||||||
@@ -492,6 +497,13 @@
|
|||||||
hc._nav.NavigateTo($"TaxPayerInvoiceItem/{InvoiceID}");
|
hc._nav.NavigateTo($"TaxPayerInvoiceItem/{InvoiceID}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private async Task showFullInvoiceItem()
|
||||||
|
{
|
||||||
|
if (InvoiceID.HasValue)
|
||||||
|
{
|
||||||
|
hc._nav.NavigateTo($"FullInvoiceItem/{InvoiceID}");
|
||||||
|
}
|
||||||
|
}
|
||||||
private async Task onClickLink()
|
private async Task onClickLink()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
@page "/TaxPayerInvoiceItem/{InvoiceID:int}"
|
@page "/TaxPayerInvoiceItem/{InvoiceID:int}"
|
||||||
|
@page "/FullInvoiceItem/{InvoiceID:int}"
|
||||||
@using Front.Services
|
@using Front.Services
|
||||||
@using Shared.DTOs
|
@using Shared.DTOs
|
||||||
@layout PanelLayout
|
@layout PanelLayout
|
||||||
@@ -6,7 +7,15 @@
|
|||||||
<Preload LoadingText="در حال بارگذاری..." />
|
<Preload LoadingText="در حال بارگذاری..." />
|
||||||
<ConfirmDialog @ref="dialog" />
|
<ConfirmDialog @ref="dialog" />
|
||||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||||
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
@if (FullInvoice)
|
||||||
|
{
|
||||||
|
<PageTitle>اطلاعات تکمیلی صورتحساب</PageTitle>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@* alert *@
|
@* alert *@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -16,22 +25,36 @@
|
|||||||
</Alert>
|
</Alert>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<h4 class="fw-bold py-3 mb-4">
|
@if (FullInvoice)
|
||||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> آماده سازی قبل از ارسال به سامانه مودیان
|
{
|
||||||
</h4>
|
<h4 class="fw-bold py-3 mb-4">
|
||||||
<div class="row">
|
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> اطلاعات تکمیلی صورتحساب
|
||||||
<div class="col-md-12">
|
</h4>
|
||||||
<div class="card mb-4">
|
}
|
||||||
<h4 style="color:red;" class="card-header">توجه</h4>
|
else
|
||||||
<div class="card-body">
|
{
|
||||||
<p>1) این یک پیش نمایش کامل از صورتحساب شماست با دقت آنرا بررسی کنید</p>
|
<h4 class="fw-bold py-3 mb-4">
|
||||||
<p>2) یسری از فیلدها قابل دسترس هستند میتوانید در این مرحله اطلاعات تکمیلی بیشتری برای صورتحساب وارد کنید</p>
|
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> آماده سازی قبل از ارسال به سامانه مودیان
|
||||||
<p>3) فیلد هایی که قابل دسترسی نیستند به صورت خودکار از صورتحساب پر شده اند</p>
|
</h4>
|
||||||
<p>4) فیلد های قرمز را حتما مشخص کنید</p>
|
}
|
||||||
|
|
||||||
|
@if(!FullInvoice)
|
||||||
|
{
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card mb-4">
|
||||||
|
<h4 style="color:red;" class="card-header">توجه</h4>
|
||||||
|
<div class="card-body">
|
||||||
|
<p>1) این یک پیش نمایش کامل از صورتحساب شماست با دقت آنرا بررسی کنید</p>
|
||||||
|
<p>2) یسری از فیلدها قابل دسترس هستند میتوانید در این مرحله اطلاعات تکمیلی بیشتری برای صورتحساب وارد کنید</p>
|
||||||
|
<p>3) فیلد هایی که قابل دسترسی نیستند به صورت خودکار از صورتحساب پر شده اند</p>
|
||||||
|
<p>4) فیلد های قرمز را حتما مشخص کنید</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
@@ -187,7 +210,15 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<button type="submit" @onclick="Send" class="btn btn-primary">آماده سازی و ارسال</button>
|
@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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -203,6 +234,7 @@
|
|||||||
List<ToastMessage> messages = new List<ToastMessage>();
|
List<ToastMessage> messages = new List<ToastMessage>();
|
||||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||||
public _TaxPayer.Atemplatefield? invoice { get; set; }
|
public _TaxPayer.Atemplatefield? invoice { get; set; }
|
||||||
|
public bool FullInvoice { get; set; } = true;
|
||||||
// alert
|
// alert
|
||||||
AlertColor alertColor = AlertColor.Primary;
|
AlertColor alertColor = AlertColor.Primary;
|
||||||
IconName alertIconName = IconName.CheckCircleFill;
|
IconName alertIconName = IconName.CheckCircleFill;
|
||||||
@@ -214,6 +246,10 @@
|
|||||||
PreloadService.Show(SpinnerColor.Dark);
|
PreloadService.Show(SpinnerColor.Dark);
|
||||||
await LoadData();
|
await LoadData();
|
||||||
PreloadService.Hide();
|
PreloadService.Hide();
|
||||||
|
|
||||||
|
if (hc._nav.Uri.ToString().Contains("FullInvoiceItem"))
|
||||||
|
FullInvoice = true;
|
||||||
|
else FullInvoice = false;
|
||||||
await base.OnParametersSetAsync();
|
await base.OnParametersSetAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -229,7 +265,7 @@
|
|||||||
};
|
};
|
||||||
public async Task Send()
|
public async Task Send()
|
||||||
{
|
{
|
||||||
if (!await CheckAuth())
|
if (!FullInvoice && !await CheckAuth())
|
||||||
{
|
{
|
||||||
ShowMessage(ToastType.Danger, "خطا در احراز هویت سازمان مالیاتی");
|
ShowMessage(ToastType.Danger, "خطا در احراز هویت سازمان مالیاتی");
|
||||||
}
|
}
|
||||||
@@ -241,31 +277,40 @@
|
|||||||
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||||
if (response)
|
if (response)
|
||||||
{
|
{
|
||||||
ShowMessage(ToastType.Success, "آماده سازی با موفقیت انجام شد");
|
if(FullInvoice)
|
||||||
ShowMessage(ToastType.Light, "در حال ارسال صورتحساب");
|
ShowMessage(ToastType.Success, "تغییرات با موفقیت انجام شد");
|
||||||
rsp = await hc.Get($"TaxPayer/SendInvoice/{InvoiceID}");
|
|
||||||
if (rsp.IsSuccessStatusCode)
|
if (!FullInvoice)
|
||||||
{
|
{
|
||||||
response = await rsp.Content.ReadFromJsonAsync<bool>();
|
ShowMessage(ToastType.Light, "در حال ارسال صورتحساب");
|
||||||
if (response)
|
rsp = await hc.Get($"TaxPayer/SendInvoice/{InvoiceID}");
|
||||||
|
if (rsp.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
hc._nav.NavigateTo($"TaxPayer/{InvoiceID}");
|
response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||||
// ShowMessage(ToastType.Success, "ارسال با موفقیت انجام شد");
|
if (response)
|
||||||
|
{
|
||||||
|
hc._nav.NavigateTo($"TaxPayer/{InvoiceID}");
|
||||||
|
// ShowMessage(ToastType.Success, "ارسال با موفقیت انجام شد");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowMessage(ToastType.Danger, "خطای در ارسال رخ داده");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowMessage(ToastType.Danger, "خطای در ارسال رخ داده");
|
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||||
|
ShowMessage(ToastType.Danger, request[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
|
||||||
ShowMessage(ToastType.Danger, request[0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
if (FullInvoice)
|
||||||
|
ShowMessage(ToastType.Danger, "خطای در ذخیره سازی اطلاعات رخ داده");
|
||||||
|
else
|
||||||
|
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -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