...
This commit is contained in:
17
Back/Controllers/TaxPayerController.cs
Normal file
17
Back/Controllers/TaxPayerController.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Back.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Back.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class TaxPayerController : ControllerBase
|
||||
{
|
||||
private readonly servTaxPayer _servTaxPayer;
|
||||
public TaxPayerController(servTaxPayer servTaxPayer)
|
||||
{
|
||||
_servTaxPayer = servTaxPayer;
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
using Back.Data.Contracts;
|
||||
using Back.Data.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Back.Common;
|
||||
|
||||
namespace Back.Services
|
||||
{
|
||||
@@ -9,10 +10,13 @@ namespace Back.Services
|
||||
{
|
||||
private readonly IAsyncRepository<SentTax> _repoSentTax;
|
||||
private readonly IAsyncRepository<Pattern> _repoPattern;
|
||||
public servTaxPayer(IAsyncRepository<SentTax> repoSentTax, IAsyncRepository<Pattern> repoPattern)
|
||||
private readonly IAsyncRepository<Invoice> _invoiceRepo;
|
||||
public servTaxPayer(IAsyncRepository<SentTax> repoSentTax, IAsyncRepository<Pattern> repoPattern
|
||||
, IAsyncRepository<Invoice> invoiceRepo)
|
||||
{
|
||||
_repoSentTax = repoSentTax;
|
||||
_repoPattern = repoPattern;
|
||||
_invoiceRepo = invoiceRepo;
|
||||
}
|
||||
public async Task<bool> ExistSuccessfulorSendorpendingInvoiceinCompanyID(int CompanyID)
|
||||
{
|
||||
@@ -34,5 +38,21 @@ namespace Back.Services
|
||||
return await _repoPattern.Get(w=>w.Status).Select(s => new IdName<int> { ID = s.ID, Title = s.Title }).ToListAsync();
|
||||
|
||||
}
|
||||
|
||||
public async Task<Invoice?> GetInvoice(int CompanyID, int ID)
|
||||
{
|
||||
#region AdvancedSearch
|
||||
var invok = _invoiceRepo
|
||||
.Get(w => w.CompanyID == CompanyID && w.ID == ID && !w.IsDeleted);
|
||||
|
||||
|
||||
#endregion
|
||||
//-----------------------
|
||||
return await invok
|
||||
.Include(inc => inc.invoiceDetails)
|
||||
.ThenInclude(inc => inc.cODItem)
|
||||
.ThenInclude(inc => inc.CODUnit)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@
|
||||
stroke="#FF3C82" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
<a href="tel:09121234567">09121234567</a>
|
||||
<a href="tel:+989016940504">09016940504</a>
|
||||
</li>
|
||||
<li>
|
||||
<span>
|
||||
@@ -99,7 +99,7 @@
|
||||
stroke="#FF3C82" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
<a target="_blank">ایران، تهران، آزادی</a>
|
||||
<a target="_blank">ایران، تهران</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<div class="row align-items-center">
|
||||
<div class="col-xxl-1 col-xl-1 col-lg-1 col-md-3 col-5">
|
||||
<div class="header-bottom__logo">
|
||||
<a href="index.html"><img height="37" src="img/logo/logo-black.png" alt=""></a>
|
||||
<a href="/"><img height="37" src="img/logo/logo-black.png" alt=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-8 col-xl-7 col-lg-7 d-none d-lg-block">
|
||||
|
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="header-top__support text-end">
|
||||
<span>پیشتیبانی: <a href="tel:+989121234569">09121234567</a></span>
|
||||
<span>پیشتیبانی: <a href="tel:+989016940504">09016940504</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -31,15 +31,21 @@
|
||||
<div>صورتحساب</div>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="menu-item @cssActionItem[4]" @onclick="() => onClickcssActionItem(4)">
|
||||
<NavLink href="TaxPayer" class="menu-link">
|
||||
<i class="menu-icon tf-icons bx bx-copy"></i>
|
||||
<div>سامانه مودیان</div>
|
||||
</NavLink>
|
||||
</li>
|
||||
<!-- Misc -->
|
||||
<li class="menu-header small text-uppercase"><span class="menu-header-text">متفرقه</span></li>
|
||||
<li class="menu-item @cssActionItem[4]" @onclick="() => onClickcssActionItem(4)">
|
||||
<li class="menu-item @cssActionItem[5]" @onclick="() => onClickcssActionItem(5)">
|
||||
<NavLink class="dropdown-item" href="Profile">
|
||||
<i class="bx bx-user me-2"></i>
|
||||
<span class="align-middle">پروفایل</span>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="menu-item @cssActionItem[5]" @onclick="() => onClickcssActionItem(5)">
|
||||
<li class="menu-item @cssActionItem[6]" @onclick="() => onClickcssActionItem(6)">
|
||||
<NavLink href="Ticket" class="menu-link">
|
||||
<i class="menu-icon tf-icons bx bx-support"></i>
|
||||
<div>پشتیبانی</div>
|
||||
@@ -51,7 +57,7 @@
|
||||
<div >سفارشات</div>
|
||||
</NavLink>
|
||||
</li> *@
|
||||
<li class="menu-item @cssActionItem[6]" @onclick="() => onClickcssActionItem(6)">
|
||||
<li class="menu-item @cssActionItem[7]" @onclick="() => onClickcssActionItem(7)">
|
||||
<NavLink href="Setting" class="menu-link">
|
||||
<i class="menu-icon tf-icons bx bx-file"></i>
|
||||
<div>تنظیمات</div>
|
||||
@@ -61,7 +67,7 @@
|
||||
|
||||
</ul>
|
||||
@code{
|
||||
string[] cssActionItem = { "active", "", "", "", "", "", "" };
|
||||
string[] cssActionItem = { "active", "", "", "", "", "", "", "" };
|
||||
|
||||
}
|
||||
@functions{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@inject Services.localService servlocal;
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Home</PageTitle>
|
||||
<PageTitle>مدیریت کسب و کار</PageTitle>
|
||||
|
||||
|
||||
|
||||
@@ -404,6 +404,7 @@
|
||||
<Price />
|
||||
<!-- tp-price-area-end -->
|
||||
<!-- tp-rank-area-start -->
|
||||
|
||||
<Rank />
|
||||
<!-- tp-rank-area-end -->
|
||||
<!-- tp-TaxTools-start-->
|
||||
|
@@ -10,6 +10,9 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> کالا
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
<div class="row">
|
||||
|
@@ -10,6 +10,9 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> مشتری
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
<div class="row">
|
||||
|
@@ -12,6 +12,9 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> صورتحساب
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
<div class="row">
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
|
||||
<PageTitle>جزئیات صورتحساب</PageTitle>
|
||||
|
||||
|
||||
@if (invoice.IsDeleted)
|
||||
@@ -22,6 +22,20 @@
|
||||
<hr class="hr" />
|
||||
}
|
||||
<form>
|
||||
@if (InvoiceID.HasValue)
|
||||
{
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> @invoice?.Title
|
||||
</h4>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> جدید
|
||||
</h4>
|
||||
}
|
||||
|
||||
|
||||
@* alert *@
|
||||
<div class="row">
|
||||
<Alert hidden="@Hidealert" Color="@alertColor" Dismissable="false">
|
||||
@@ -241,7 +255,7 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="row g-3">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="form-group col-md-4">
|
||||
<label class="col-form-label" for="inputdes">توضیحات</label>
|
||||
<InputText @bind-Value="invoice.Des" type="text" class="form-control" id="inputdes" placeholder="توضیحات" />
|
||||
</div>
|
||||
@@ -270,13 +284,24 @@
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
@* <Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
چاپ
|
||||
</Button>
|
||||
</Button> *@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
@if (invoice.invoiceType != InvoiceType.Bidding)
|
||||
{
|
||||
<div class="form-group col-md-2">
|
||||
<br />
|
||||
<Button class="mt-3" Color="ButtonColor.Dark" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
ارسال به سامانه مودیان
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="row g-3">
|
||||
@@ -409,7 +434,9 @@
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
invoice = await rsp.Content.ReadFromJsonAsync<InvoiceDTO>();
|
||||
|
||||
}
|
||||
|
||||
else if(rsp.StatusCode==System.Net.HttpStatusCode.BadRequest)
|
||||
{
|
||||
ShowDangerAlert("صورتحساب مرجع یافت نشد");
|
||||
|
8
TaxPayerFull/Pages/UserPanel/TaxPayer.razor
Normal file
8
TaxPayerFull/Pages/UserPanel/TaxPayer.razor
Normal file
@@ -0,0 +1,8 @@
|
||||
<PageTitle>سامانه مودیان</PageTitle>
|
||||
@inject HttpClientController hc;
|
||||
@layout PanelLayout
|
||||
@page "/TaxPayer"
|
||||
@using Front.Services
|
||||
@code {
|
||||
|
||||
}
|
60
TaxPayerFull/Pages/UserPanel/TaxPayerInvoiceItem.razor
Normal file
60
TaxPayerFull/Pages/UserPanel/TaxPayerInvoiceItem.razor
Normal file
@@ -0,0 +1,60 @@
|
||||
@page "/TaxPayerInvoiceItem/{InvoiceID:int}"
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@layout PanelLayout
|
||||
@inject HttpClientController hc;
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
||||
|
||||
@code {
|
||||
private ConfirmDialog dialog = default!;
|
||||
[Parameter] public int? InvoiceID { get; set; }
|
||||
List<ToastMessage> messages = new List<ToastMessage>();
|
||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||
public InvoiceDTO? invoice { get; set; }
|
||||
// alert
|
||||
AlertColor alertColor = AlertColor.Primary;
|
||||
IconName alertIconName = IconName.CheckCircleFill;
|
||||
bool Hidealert = true;
|
||||
string alertMessage = "";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await LoadData();
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
@functions{
|
||||
private void ShowSuccessAlert(string msg)
|
||||
{
|
||||
Hidealert = false;
|
||||
alertColor = AlertColor.Success;
|
||||
alertIconName = IconName.CheckCircleFill;
|
||||
alertMessage = msg;
|
||||
}
|
||||
private void ShowDangerAlert(string msg)
|
||||
{
|
||||
Hidealert = false;
|
||||
alertColor = AlertColor.Danger;
|
||||
alertIconName = IconName.ExclamationTriangleFill;
|
||||
alertMessage = msg;
|
||||
}
|
||||
private async Task LoadData()
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
var rsp = await hc.Get($"Invoice/Get/{InvoiceID}/{true}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
invoice = await rsp.Content.ReadFromJsonAsync<InvoiceDTO>();
|
||||
}
|
||||
else
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowDangerAlert(request[0]);
|
||||
}
|
||||
PreloadService.Hide();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user