tax
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="TaxCollectData.Library" Version="0.0.15" />
|
<PackageReference Include="TaxCollectData.Library" Version="0.0.20" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Service">
|
<Reference Include="Service">
|
||||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
<HintPath>C:\Dlls\Service.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@@ -188,22 +188,47 @@ namespace Back.Controllers
|
|||||||
if (result.inty == 1 && result.inp == 1)
|
if (result.inty == 1 && result.inp == 1)
|
||||||
header = new InvoiceHeaderDto
|
header = new InvoiceHeaderDto
|
||||||
{
|
{
|
||||||
//نوع شخص خریدار
|
//شماره منحصر به فرد مالیاتی
|
||||||
Tob = result.tob,
|
Taxid = _actionTaxPayer.GenerateTaxid(result.inno, result.InvoiceDate.Replace("/", "").Trim()),
|
||||||
|
//زمان صدور
|
||||||
|
Indatim = result.indatim ?? null,
|
||||||
|
//زمان ایجاد
|
||||||
|
Indati2m = result.Indati2m ?? null,
|
||||||
// صورتحساب نوع *
|
// صورتحساب نوع *
|
||||||
Inty = result.inty ?? 1,
|
Inty = result.inty ?? 1,
|
||||||
|
//سریال صورت حساب
|
||||||
|
Inno = string.IsNullOrEmpty(result.inno) ? null : result.inno,
|
||||||
|
//شماره منحصر به فرد مالیاتی صورتحساب مرجع
|
||||||
|
Irtaxid = result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair ? result.invoice.taxid
|
||||||
|
: result.invoiceType == InvoiceType.Cancellation ? result.taxid : null,
|
||||||
//الگوی صورتحساب *
|
//الگوی صورتحساب *
|
||||||
Inp = result.inp ?? 1,
|
Inp = result.inp ?? 1,
|
||||||
//موضوع صورتحساب *
|
//موضوع صورتحساب *
|
||||||
Ins = result.ins ?? 1,
|
Ins = result.ins ?? 1,
|
||||||
//شماره منحصر به فرد مالیاتی
|
|
||||||
Taxid = _actionTaxPayer.GenerateTaxid(result.inno, result.InvoiceDate.Replace("/", "").Trim()),
|
|
||||||
//سریال صورت حساب
|
|
||||||
Inno = string.IsNullOrEmpty(result.inno) ? null : result.inno,
|
|
||||||
//شماره اقتصادی فروشنده به جاش شناسه ملی داده شد
|
//شماره اقتصادی فروشنده به جاش شناسه ملی داده شد
|
||||||
Tins = string.IsNullOrEmpty(result.tins) ? null : result.tins,
|
Tins = string.IsNullOrEmpty(result.tins) ? null : result.tins,
|
||||||
|
//نوع شخص خریدار
|
||||||
|
Tob = result.tob,
|
||||||
|
//شماره/شناسه ملی/شناسه مشارکت مدنی / کد فراگیر
|
||||||
|
Bid = string.IsNullOrEmpty(result.bid) ? null : result.bid,
|
||||||
|
//شماره اقتصادی خریدار
|
||||||
|
Tinb = string.IsNullOrEmpty(result.tinb) ? null : result.tinb,
|
||||||
|
//کد شعبه فروشنده
|
||||||
|
Sbc = string.IsNullOrEmpty(result.sbc) ? null : result.sbc,
|
||||||
|
//کد پستی خریدار
|
||||||
|
Bpc = string.IsNullOrEmpty(result.bpc) ? null : result.bpc,
|
||||||
|
//کد شعبه خریدار
|
||||||
|
Bbc = string.IsNullOrEmpty(result.bbc) ? null : result.bbc,
|
||||||
|
//شماره پروانه گمرکی
|
||||||
|
Scln = string.IsNullOrEmpty(result.scln) ? null : result.scln,
|
||||||
|
//کد گمرک محل اظهار فروشنده
|
||||||
|
Scc = string.IsNullOrEmpty(result.scc) ? null : result.scc,
|
||||||
|
//شناسه یکتای ثبت قزارداد فروشنده
|
||||||
|
Crn = string.IsNullOrEmpty(result.crn) ? null : result.crn,
|
||||||
//مجموع مبلغ قبل از کسر تخفیف
|
//مجموع مبلغ قبل از کسر تخفیف
|
||||||
Tprdis = result.tprdis ?? null,
|
Tprdis = result.tprdis ?? null,
|
||||||
|
//مجموع تخفیفات
|
||||||
|
Tdis = result.tdis ?? null,
|
||||||
// مجموع مبلغ پس از کسر تخفیف
|
// مجموع مبلغ پس از کسر تخفیف
|
||||||
Tadis = result.tadis ?? null,
|
Tadis = result.tadis ?? null,
|
||||||
//مجموع مالیات بر ارزش افزوده
|
//مجموع مالیات بر ارزش افزوده
|
||||||
@@ -218,129 +243,15 @@ namespace Back.Controllers
|
|||||||
Cap = result.cap ?? null,
|
Cap = result.cap ?? null,
|
||||||
//پرداختی نسیه
|
//پرداختی نسیه
|
||||||
Insp = result.insp ?? null,
|
Insp = result.insp ?? null,
|
||||||
//مجموع تخفیفات
|
//مجموع سهم مالیات بر ارزش افزوده از پرداخت
|
||||||
Tdis = result.tdis ?? null,
|
|
||||||
//شماره منحصر به فرد مالیاتی صورتحساب مرجع
|
|
||||||
Irtaxid = result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair ? result.invoice.taxid : null,
|
|
||||||
//شماره اقتصادی خریدار
|
|
||||||
Tinb = string.IsNullOrEmpty(result.tinb) ? null : result.tinb ,
|
|
||||||
//زمان صدور
|
|
||||||
Indatim = result.indatim ?? null,
|
|
||||||
//زمان ایجاد
|
|
||||||
Indati2m = result.Indati2m ?? null,
|
|
||||||
//کد شعبه خریدار
|
|
||||||
Bbc = string.IsNullOrEmpty(result.bbc) ? null : result.bbc,
|
|
||||||
Tvop = result.tvop ?? null,
|
Tvop = result.tvop ?? null,
|
||||||
Crn = string.IsNullOrEmpty(result.crn) ? null : result.crn ,
|
//مالیات موضوع 17
|
||||||
Tax17 = string.IsNullOrEmpty(result.seventeentax) ? null : Convert.ToDecimal(result.seventeentax),
|
Tax17 = string.IsNullOrEmpty(result.seventeentax) ? null : Convert.ToDecimal(result.seventeentax),
|
||||||
Scc = string.IsNullOrEmpty(result.scc) ? null : result.scc ,
|
|
||||||
Scln = string.IsNullOrEmpty(result.scln) ? null : result.scln ,
|
|
||||||
Bid = string.IsNullOrEmpty(result.bid) ? null : result.bid ,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//if (header.Inty == 1 && header.Inp == 2)
|
|
||||||
// header = new InvoiceHeaderDto
|
|
||||||
// {
|
|
||||||
// //نوع شخص خریدار
|
|
||||||
// Tob = result.tob,
|
|
||||||
// // صورتحساب نوع *
|
|
||||||
// Inty = result.inty ?? 1,
|
|
||||||
// //الگوی صورتحساب *
|
|
||||||
// Inp = result.inp ?? 1,
|
|
||||||
// //موضوع صورتحساب *
|
|
||||||
// Ins = result.ins ?? 1,
|
|
||||||
// //شماره منحصر به فرد مالیاتی
|
|
||||||
// Taxid = _actionTaxPayer.GenerateTaxid(result.inno, result.InvoiceDate.Replace("/", "").Trim()),
|
|
||||||
// //سریال صورت حساب
|
|
||||||
// Inno = result.inno ?? null,
|
|
||||||
// //شماره اقتصادی فروشنده به جاش شناسه ملی داده شد
|
|
||||||
// Tins = result.tins ?? null,
|
|
||||||
// //مجموع مبلغ قبل از کسر تخفیف
|
|
||||||
// Tprdis = result.tprdis ?? null,
|
|
||||||
// // مجموع مبلغ پس از کسر تخفیف
|
|
||||||
// Tadis = result.tadis ?? null,
|
|
||||||
// //مجموع مالیات بر ارزش افزوده
|
|
||||||
// Tvam = result.tvam ?? null,
|
|
||||||
// // مجموع سایر مالیات، عوارض و وجوه قانونی
|
|
||||||
// Todam = result.todam ?? null,
|
|
||||||
// //صورتحساب مجموع
|
|
||||||
// Tbill = result.tbill ?? null,
|
|
||||||
// // تسویه روش
|
|
||||||
// Setm = result.setm ?? null,
|
|
||||||
// //نقدی پرداختی مبلغ
|
|
||||||
// Cap = result.cap ?? null,
|
|
||||||
// //پرداختی نسیه
|
|
||||||
// Insp = result.insp ?? null,
|
|
||||||
// //مجموع تخفیفات
|
|
||||||
// Tdis = result.tdis ?? null,
|
|
||||||
// //شماره منحصر به فرد مالیاتی صورتحساب مرجع
|
|
||||||
// Irtaxid = result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair ? result.invoice.taxid : null,
|
|
||||||
// //شماره اقتصادی خریدار
|
|
||||||
// Tinb = result.tinb ?? null,
|
|
||||||
// //زمان صدور
|
|
||||||
// Indatim = result.indatim ?? null,
|
|
||||||
// //زمان ایجاد
|
|
||||||
// Indati2m = result.Indati2m ?? null,
|
|
||||||
// //کد شعبه خریدار
|
|
||||||
// Bbc = result.bbc ?? null,
|
|
||||||
// Tvop = result.tvop ?? null,
|
|
||||||
// Crn = result.crn ?? null,
|
|
||||||
// Tax17 = string.IsNullOrEmpty(result.seventeentax) ? null : Convert.ToDecimal(result.seventeentax),
|
|
||||||
// Scc = result.scc ?? null,
|
|
||||||
// Scln = result.scln ?? null,
|
|
||||||
// Bpn = result.bpn ?? null,
|
|
||||||
// Bid = result.bid ?? null,
|
|
||||||
// };
|
|
||||||
//if (header.Inty == 1 && header.Inp == 3)
|
|
||||||
// header = new InvoiceHeaderDto
|
|
||||||
// {
|
|
||||||
// //نوع شخص خریدار
|
|
||||||
// Tob = result.tob,
|
|
||||||
// // صورتحساب نوع *
|
|
||||||
// Inty = result.inty ?? 1,
|
|
||||||
// //الگوی صورتحساب *
|
|
||||||
// Inp = result.inp ?? 1,
|
|
||||||
// //موضوع صورتحساب *
|
|
||||||
// Ins = result.ins ?? 1,
|
|
||||||
// //شماره منحصر به فرد مالیاتی
|
|
||||||
// Taxid = _actionTaxPayer.GenerateTaxid(result.inno, result.InvoiceDate.Replace("/", "").Trim()),
|
|
||||||
// //سریال صورت حساب
|
|
||||||
// Inno = result.inno ?? null,
|
|
||||||
// //شماره اقتصادی فروشنده به جاش شناسه ملی داده شد
|
|
||||||
// Tins = result.tins ?? null,
|
|
||||||
// //مجموع مبلغ قبل از کسر تخفیف
|
|
||||||
// Tprdis = result.tprdis ?? null,
|
|
||||||
// // مجموع مبلغ پس از کسر تخفیف
|
|
||||||
// Tadis = result.tadis ?? null,
|
|
||||||
// //مجموع مالیات بر ارزش افزوده
|
|
||||||
// Tvam = result.tvam ?? null,
|
|
||||||
// // مجموع سایر مالیات، عوارض و وجوه قانونی
|
|
||||||
// Todam = result.todam ?? null,
|
|
||||||
// //صورتحساب مجموع
|
|
||||||
// Tbill = result.tbill ?? null,
|
|
||||||
// // تسویه روش
|
|
||||||
// Setm = result.setm ?? null,
|
|
||||||
// //نقدی پرداختی مبلغ
|
|
||||||
// Cap = result.cap ?? null,
|
|
||||||
// //پرداختی نسیه
|
|
||||||
// Insp = result.insp ?? null,
|
|
||||||
// //مجموع تخفیفات
|
|
||||||
// Tdis = result.tdis ?? null,
|
|
||||||
// //شماره منحصر به فرد مالیاتی صورتحساب مرجع
|
|
||||||
// Irtaxid = result.invoiceType == InvoiceType.BackFrmSale || result.invoiceType == InvoiceType.Repair ? result.invoice.taxid : null,
|
|
||||||
// //شماره اقتصادی خریدار
|
|
||||||
// Tinb = result.tinb ?? null,
|
|
||||||
// //زمان صدور
|
|
||||||
// Indatim = result.indatim ?? null,
|
|
||||||
// //زمان ایجاد
|
|
||||||
// Indati2m = result.Indati2m ?? null,
|
|
||||||
// //کد شعبه خریدار
|
|
||||||
// Bbc = result.bbc ?? null,
|
|
||||||
// Tvop = result.tvop ?? null,
|
|
||||||
// Crn = result.crn ?? null,
|
|
||||||
// Tax17 = string.IsNullOrEmpty(result.seventeentax) ? null : Convert.ToDecimal(result.seventeentax),
|
|
||||||
// Bid = result.bid ?? null,
|
|
||||||
// };
|
|
||||||
else return BadRequest(new List<string> { "این الگو فعلا در دسترس نمی باشد" });
|
else return BadRequest(new List<string> { "این الگو فعلا در دسترس نمی باشد" });
|
||||||
#endregion header
|
#endregion header
|
||||||
List<InvoiceBodyDto> InvoiceBody = new List<InvoiceBodyDto>();
|
List<InvoiceBodyDto> InvoiceBody = new List<InvoiceBodyDto>();
|
||||||
@@ -379,100 +290,15 @@ namespace Back.Controllers
|
|||||||
Odt = string.IsNullOrEmpty(bitem.odt) ? null : bitem.odt,
|
Odt = string.IsNullOrEmpty(bitem.odt) ? null : bitem.odt,
|
||||||
Odr = bitem.odr,
|
Odr = bitem.odr,
|
||||||
Odam = bitem.odam,
|
Odam = bitem.odam,
|
||||||
Olt =string.IsNullOrEmpty(bitem.olt) ? null : bitem.olt,
|
Olt = string.IsNullOrEmpty(bitem.olt) ? null : bitem.olt,
|
||||||
Olr = bitem.olr,
|
Olr = bitem.olr,
|
||||||
Olam = bitem.olam,
|
Olam = bitem.olam,
|
||||||
Cop = bitem.cop,
|
Cop = bitem.cop,
|
||||||
Vop = bitem.vop,
|
Vop = bitem.vop,
|
||||||
Bsrn =string.IsNullOrEmpty(bitem.bsrn) ? null :bitem.bsrn,
|
Bsrn = string.IsNullOrEmpty(bitem.bsrn) ? null : bitem.bsrn,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//else if (header.Inty == 1 && header.Inp == 2)
|
|
||||||
// item = new InvoiceBodyDto
|
|
||||||
// {
|
|
||||||
// //شناسه کالا / خدمت
|
|
||||||
// Sstid = bitem.sstid,
|
|
||||||
// //شرح کاال/خدمت
|
|
||||||
// Sstt = bitem.sstt,
|
|
||||||
// //واحد اندازه گیری
|
|
||||||
// Mu = bitem.mu,
|
|
||||||
// // تعداد
|
|
||||||
// Am = bitem.am,
|
|
||||||
// // مبلغ واحد
|
|
||||||
// Fee = bitem.fee,
|
|
||||||
// //مبلغ قبل از تخفیف
|
|
||||||
// Prdis = bitem.prdis,
|
|
||||||
// //مبلغ تخفیف
|
|
||||||
// Dis = bitem.dis,
|
|
||||||
// //مبلغ بعد از تخفیف
|
|
||||||
// Adis = bitem.adis,
|
|
||||||
// //نرخ مالیات بر ارزش افزوده
|
|
||||||
// Vra = bitem.vra,
|
|
||||||
// //مبلغ مالیات بر ارزش افزوده
|
|
||||||
// Vam = bitem.vam,
|
|
||||||
// // مبلغ کل کالا / خدمت
|
|
||||||
// Tsstam = bitem.tsstam,
|
|
||||||
// Cfee = bitem.cfee,
|
|
||||||
// Cut = bitem.cut,
|
|
||||||
// Exr = bitem.exr,
|
|
||||||
// Odt = bitem.odt,
|
|
||||||
// Odr = bitem.odr,
|
|
||||||
// Odam = bitem.odam,
|
|
||||||
// Olt = bitem.olt,
|
|
||||||
// Olr = bitem.olr,
|
|
||||||
// Olam = bitem.olam,
|
|
||||||
// Cop = bitem.cop,
|
|
||||||
// Vop = bitem.vop,
|
|
||||||
// Bsrn = bitem.bsrn,
|
|
||||||
|
|
||||||
|
|
||||||
// };
|
|
||||||
|
|
||||||
//else if (header.Inty == 1 && header.Inp == 3)
|
|
||||||
// item = new InvoiceBodyDto
|
|
||||||
// {
|
|
||||||
// //شناسه کالا / خدمت
|
|
||||||
// Sstid = bitem.sstid,
|
|
||||||
// //شرح کاال/خدمت
|
|
||||||
// Sstt = bitem.sstt,
|
|
||||||
// //واحد اندازه گیری
|
|
||||||
// Mu = bitem.mu,
|
|
||||||
// // تعداد
|
|
||||||
// Am = bitem.am,
|
|
||||||
// // مبلغ واحد
|
|
||||||
// Fee = bitem.fee,
|
|
||||||
// //مبلغ قبل از تخفیف
|
|
||||||
// Prdis = bitem.prdis,
|
|
||||||
// //مبلغ تخفیف
|
|
||||||
// Dis = bitem.dis,
|
|
||||||
// //مبلغ بعد از تخفیف
|
|
||||||
// Adis = bitem.adis,
|
|
||||||
// //نرخ مالیات بر ارزش افزوده
|
|
||||||
// Vra = bitem.vra,
|
|
||||||
// //مبلغ مالیات بر ارزش افزوده
|
|
||||||
// Vam = bitem.vam,
|
|
||||||
// // مبلغ کل کالا / خدمت
|
|
||||||
// Tsstam = bitem.tsstam,
|
|
||||||
// Cfee = bitem.cfee,
|
|
||||||
// Cut = bitem.cut,
|
|
||||||
// Exr = bitem.exr,
|
|
||||||
// Odt = bitem.odt,
|
|
||||||
// Odr = bitem.odr,
|
|
||||||
// Odam = bitem.odam,
|
|
||||||
// Olt = bitem.olt,
|
|
||||||
// Olr = bitem.olr,
|
|
||||||
// Olam = bitem.olam,
|
|
||||||
// Cop = bitem.cop,
|
|
||||||
// Vop = bitem.vop,
|
|
||||||
// Bsrn = bitem.bsrn,
|
|
||||||
// Consfee = bitem.consfee,
|
|
||||||
// Spro = bitem.spro,
|
|
||||||
// Bros = bitem.bros,
|
|
||||||
// Tcpbs = bitem.tcpbs,
|
|
||||||
// };
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
InvoiceBody.Add(item);
|
InvoiceBody.Add(item);
|
||||||
}
|
}
|
||||||
@@ -487,7 +313,7 @@ namespace Back.Controllers
|
|||||||
{
|
{
|
||||||
foreach (var item in responseModel.Body.Result)
|
foreach (var item in responseModel.Body.Result)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var ressenttax = new SentTax
|
var ressenttax = new SentTax
|
||||||
{
|
{
|
||||||
@@ -498,12 +324,12 @@ 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, Formatting.Indented,new JsonSerializerSettings
|
InvoiceModel = JsonConvert.SerializeObject(result, Formatting.Indented, new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
PreserveReferencesHandling = PreserveReferencesHandling.Objects
|
PreserveReferencesHandling = PreserveReferencesHandling.Objects
|
||||||
}),
|
}),
|
||||||
ResponseModel = JsonConvert.SerializeObject(responseModel)
|
ResponseModel = JsonConvert.SerializeObject(responseModel)
|
||||||
|
|
||||||
};
|
};
|
||||||
await _servTaxPayer.AddSentTax(ressenttax);
|
await _servTaxPayer.AddSentTax(ressenttax);
|
||||||
}
|
}
|
||||||
@@ -553,7 +379,7 @@ 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.Unsuccessful && !string.IsNullOrEmpty(item.ErrorsModel))
|
if (item.SentStatus == SentStatus.Unsuccessful && !string.IsNullOrEmpty(item.ErrorsModel))
|
||||||
{
|
{
|
||||||
@@ -562,13 +388,13 @@ namespace Back.Controllers
|
|||||||
InquiryResultModel inquiryResult = JsonConvert.DeserializeObject<InquiryResultModel>(item.InquiryResultModel);
|
InquiryResultModel inquiryResult = JsonConvert.DeserializeObject<InquiryResultModel>(item.InquiryResultModel);
|
||||||
if (inquiryResult.Data != null)
|
if (inquiryResult.Data != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
desData = new DataInSendTaxDto();
|
desData = new DataInSendTaxDto();
|
||||||
desData.SentStatus = SentStatus.Unsuccessful;
|
desData.SentStatus = SentStatus.Unsuccessful;
|
||||||
desData.error = inquiryerrorResult;
|
desData.error = inquiryerrorResult;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return Ok(desData);
|
return Ok(desData);
|
||||||
}
|
}
|
||||||
|
@@ -16,9 +16,7 @@ namespace Back.Data.Models
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region autofild
|
#region autofild
|
||||||
//سریال صورتحساب داخلی حافظه مالیاتی
|
|
||||||
[MaxLength(10)]
|
|
||||||
public string? inno { get { return ID.ToString("0000000000"); } }
|
|
||||||
//تاریخ و زمان صدور صورتحساب )میالدی(
|
//تاریخ و زمان صدور صورتحساب )میالدی(
|
||||||
[MaxLength(13)]
|
[MaxLength(13)]
|
||||||
public long? indatim { get { return new DateTimeOffset(InvoicIssueDate.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
|
public long? indatim { get { return new DateTimeOffset(InvoicIssueDate.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
|
||||||
@@ -98,6 +96,9 @@ namespace Back.Data.Models
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region fild
|
#region fild
|
||||||
|
//سریال صورتحساب داخلی حافظه مالیاتی
|
||||||
|
[MaxLength(10)]
|
||||||
|
public string? inno { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string? Des { get; set; }
|
public string? Des { get; set; }
|
||||||
public InvoiceType invoiceType { get; set; }
|
public InvoiceType invoiceType { get; set; }
|
||||||
|
@@ -63,7 +63,7 @@ namespace Back.Services
|
|||||||
tdis = item.tdis,
|
tdis = item.tdis,
|
||||||
tvam = item.tvam,
|
tvam = item.tvam,
|
||||||
Udate = item.Udate.ShamciToFormatShamci(),
|
Udate = item.Udate.ShamciToFormatShamci(),
|
||||||
|
inno = item.inno,
|
||||||
InvoiceSendTaxs = item.sentTax.OrderBy(o => o.ID).Select(s => new SentTaxDto()
|
InvoiceSendTaxs = item.sentTax.OrderBy(o => o.ID).Select(s => new SentTaxDto()
|
||||||
{
|
{
|
||||||
Date = s.Date.ShamciToFormatShamci(),
|
Date = s.Date.ShamciToFormatShamci(),
|
||||||
@@ -116,7 +116,7 @@ namespace Back.Services
|
|||||||
.Get(w => w.CompanyID == CompanyID && !w.IsDeleted/* && !w.BillReference.HasValue*/);
|
.Get(w => w.CompanyID == CompanyID && !w.IsDeleted/* && !w.BillReference.HasValue*/);
|
||||||
|
|
||||||
if (itemSerch.InvoiceID != null)
|
if (itemSerch.InvoiceID != null)
|
||||||
invok = invok.Where(w => w.ID == itemSerch.InvoiceID);
|
invok = invok.Where(w => w.ID == itemSerch.InvoiceID || w.inno == itemSerch.InvoiceID.ToString());
|
||||||
|
|
||||||
if (itemSerch.CustomerID != null)
|
if (itemSerch.CustomerID != null)
|
||||||
invok = invok.Where(w => w.CustomerID == itemSerch.CustomerID);
|
invok = invok.Where(w => w.CustomerID == itemSerch.CustomerID);
|
||||||
|
@@ -176,6 +176,11 @@ namespace Back.Services
|
|||||||
SetValue(item, ref InvoiceItem);
|
SetValue(item, ref InvoiceItem);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// سریال صورتحساب
|
||||||
|
var innoS=await _invoiceRepo.Get(w => w.CompanyID == InvoiceItem.CompanyID).Select(s => s.inno).ToListAsync();
|
||||||
|
var result = Enumerable.Range(1, 1000000000) .Except(innoS.Select(t => t).ToList().Select(int.Parse).ToList()).FirstOrDefault();
|
||||||
|
InvoiceItem.inno = result.ToString("0000000000");
|
||||||
|
|
||||||
if (await _invoiceRepo.UpdateAsync(InvoiceItem))
|
if (await _invoiceRepo.UpdateAsync(InvoiceItem))
|
||||||
{
|
{
|
||||||
foreach (var Bitem in FildItems.Bodys)
|
foreach (var Bitem in FildItems.Bodys)
|
||||||
|
9
Back/Validations/TaxSystemRules.cs
Normal file
9
Back/Validations/TaxSystemRules.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using FluentValidation;
|
||||||
|
using TaxCollectData.Library.Dto.Content;
|
||||||
|
|
||||||
|
namespace Back.Validations
|
||||||
|
{
|
||||||
|
public class TaxSystemRules : AbstractValidator<Tuple<InvoiceHeaderDto, List<InvoiceBodyDto>, PaymentDto>>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@@ -84,6 +84,11 @@ namespace Shared.DTOs
|
|||||||
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
|
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
|
||||||
public ICollection<SentTaxDto> InvoiceSendTaxs { get; set; }=new List<SentTaxDto> { };
|
public ICollection<SentTaxDto> InvoiceSendTaxs { get; set; }=new List<SentTaxDto> { };
|
||||||
|
|
||||||
|
[MaxLength(10)]
|
||||||
|
[Display(Name = "سریال صورتحساب داخلی حافظه مالیاتی")]
|
||||||
|
public string? inno { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public class InvoiceItemDTO
|
public class InvoiceItemDTO
|
||||||
{
|
{
|
||||||
|
@@ -23,8 +23,8 @@
|
|||||||
<ul class="list-group fa-padding" style="border: 2px solid #0d6efd">
|
<ul class="list-group fa-padding" style="border: 2px solid #0d6efd">
|
||||||
<li class="list-group-item" data-toggle="modal" data-target="#issue">
|
<li class="list-group-item" data-toggle="modal" data-target="#issue">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-md-1">
|
<div class="col-md-2">
|
||||||
<input @bind-value="itemsearch.InvoiceID" placeholder="شناسه" style="text-align:center;" class="form-control" type="text">
|
<input @bind-value="itemsearch.InvoiceID" placeholder="شناسه / سریال" style="text-align:center;" class="form-control" type="text">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<input @bind-value="itemsearch.refInvoiceID" placeholder="شناسه مرجع" style="text-align:center;" class="form-control" type="text">
|
<input @bind-value="itemsearch.refInvoiceID" placeholder="شناسه مرجع" style="text-align:center;" class="form-control" type="text">
|
||||||
|
@@ -338,7 +338,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-6">
|
||||||
<br />
|
<br />
|
||||||
@if (!invoice.IsDeleted)
|
@if (!invoice.IsDeleted)
|
||||||
{
|
{
|
||||||
@@ -371,6 +371,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row g-3">
|
||||||
@if (!invoice.IsDeleted && 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">
|
||||||
@@ -380,7 +384,13 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div class="form-group col-md-3">
|
||||||
|
<label class="col-form-label" for="inputinno">سریال صورتحساب داخلی حافظه مالیاتی</label>
|
||||||
|
<InputText style=" text-align: center;" @bind-Value="invoice.inno" class="form-control" id="inputinno" readonly />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
|
@@ -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