...
This commit is contained in:
@@ -64,6 +64,8 @@ namespace Back.Data.Models
|
||||
//نرخ مالیات بر ازش افزوده
|
||||
[MaxLength(5)]
|
||||
public decimal? vra { get { return cODItem.TaxRate; } }
|
||||
//واحد اندازه گیری عنوان
|
||||
public string? unitTitle { get { return cODItem.CODUnit.Title; } }
|
||||
#endregion
|
||||
|
||||
#region fild
|
||||
|
@@ -60,7 +60,7 @@ namespace Back.Services
|
||||
am = x.am.Value,
|
||||
dis = x.dis,
|
||||
fee = x.fee.Value,
|
||||
mu = x.mu,
|
||||
mu = x.unitTitle,
|
||||
sstt = x.sstt,
|
||||
tsstam = x.tsstam,
|
||||
vam = x.am,
|
||||
@@ -73,6 +73,7 @@ namespace Back.Services
|
||||
iinn = x.acn,
|
||||
pcn = x.acn,
|
||||
pdt = x.pdt,
|
||||
PaymentDateTime=x.PaymentDateTime,
|
||||
pid = x.pid,
|
||||
pmt = x.pmt,
|
||||
pv = x.pv,
|
||||
|
@@ -76,8 +76,8 @@ namespace Shared.DTOs
|
||||
[Display(Name = "مجموع صورتحساب")]
|
||||
public decimal? tbill { get; set; }
|
||||
public int? BillReference { get; set; }
|
||||
public ICollection<InvoiceItemDTO> items { get; set; }
|
||||
public ICollection<InvoicePaymentDTO> payments { get; set; }
|
||||
public ICollection<InvoiceItemDTO> items { get; set; }=new List<InvoiceItemDTO>();
|
||||
public ICollection<InvoicePaymentDTO> payments { get; set; } = new List<InvoicePaymentDTO>();
|
||||
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
|
||||
// public ICollection<InvoiceSendTaxDTO> InvoiceSendTaxs { get; set; }
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Shared.DTOs
|
||||
public int CODID { get; set; }
|
||||
// شرح کاال/خدمت
|
||||
public string? sstt { get; set; }
|
||||
//واحد اندازهگیری
|
||||
//واحد اندازهگیری------
|
||||
public string? mu { get; set; }
|
||||
//تعداد/مقدار
|
||||
public decimal am { get; set; }
|
||||
@@ -104,6 +104,7 @@ namespace Shared.DTOs
|
||||
public decimal? adis { get; set; }
|
||||
//مبلغ کل کالا/خدمت
|
||||
public decimal? tsstam { get; set; }
|
||||
|
||||
}
|
||||
public class InvoicePaymentDTO
|
||||
{
|
||||
@@ -131,6 +132,7 @@ namespace Shared.DTOs
|
||||
//تاریخ و زمان پرداخت
|
||||
[MaxLength(13)]
|
||||
public long? pdt { get; set; }
|
||||
public string? PaymentDateTime { get; set; }
|
||||
//مبلغ پرداختی
|
||||
[MaxLength(18)]
|
||||
public decimal? pv { get; set; }
|
||||
|
@@ -1,8 +0,0 @@
|
||||
namespace Front.CUSComponent
|
||||
{
|
||||
public class Employee
|
||||
{
|
||||
public string LastName { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
}
|
||||
}
|
@@ -8,10 +8,6 @@
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="CUSComponent\Employee.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazor.Bootstrap" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.3" />
|
||||
|
66
TaxPayerFull/Layout/LGridInvoiceItem.razor
Normal file
66
TaxPayerFull/Layout/LGridInvoiceItem.razor
Normal file
@@ -0,0 +1,66 @@
|
||||
@using Shared.DTOs
|
||||
<Grid TItem="InvoiceItemDTO"
|
||||
Class="table table-hover table-bordered table-striped"
|
||||
DataProvider="DataProvider"
|
||||
AllowPaging="true"
|
||||
PageSize="10"
|
||||
OnRowClick="OnRowClick"
|
||||
Responsive="true">
|
||||
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="شناسه">
|
||||
@context.ID
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="کد">
|
||||
@context.CODID
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="کالا">
|
||||
@context.sstt
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="واحد">
|
||||
@context.mu
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="تعداد/مقدار">
|
||||
@context.am
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ واحد">
|
||||
@context.fee
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="نرخ مالیات">
|
||||
@context.vra
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ مالیات">
|
||||
@context.vam
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="تخفیف">
|
||||
@context.dis
|
||||
</GridColumn>
|
||||
@* <GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ بعد از تخفیف">
|
||||
@context.adis
|
||||
</GridColumn> *@
|
||||
<GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ کل">
|
||||
@context.tsstam
|
||||
</GridColumn>
|
||||
</Grid>
|
||||
|
||||
|
||||
@code {
|
||||
[Inject] ModalService ModalService { get; set; } = default!;
|
||||
[Parameter] public IEnumerable<InvoiceItemDTO> InvoiceItems { get; set; }
|
||||
private async Task<GridDataProviderResult<InvoiceItemDTO>> DataProvider(GridDataProviderRequest<InvoiceItemDTO> request)
|
||||
{
|
||||
if (InvoiceItems is null) // pull employees only one time for client-side filtering, sorting, and paging
|
||||
InvoiceItems = GetInvoiceItems(); // call a service or an API to pull the employees
|
||||
|
||||
return await Task.FromResult(request.ApplyTo(InvoiceItems));
|
||||
}
|
||||
private async Task OnRowClick(GridRowEventArgs<InvoiceItemDTO> args)
|
||||
{
|
||||
await ModalService.ShowAsync(new ModalOption { Type = ModalType.Primary, Title = "Event: Row Click", Message = $"Id: {args.Item.ID}, Name: {args.Item.sstt}" });
|
||||
}
|
||||
private IEnumerable<InvoiceItemDTO> GetInvoiceItems()
|
||||
{
|
||||
return new List<InvoiceItemDTO>();
|
||||
|
||||
}
|
||||
|
||||
}
|
66
TaxPayerFull/Layout/LGridInvoicePayment.razor
Normal file
66
TaxPayerFull/Layout/LGridInvoicePayment.razor
Normal file
@@ -0,0 +1,66 @@
|
||||
@using Shared.DTOs
|
||||
<Grid TItem="InvoicePaymentDTO"
|
||||
Class="table table-hover table-bordered table-striped"
|
||||
DataProvider="DataProvider"
|
||||
AllowPaging="true"
|
||||
PageSize="10"
|
||||
OnRowClick="OnRowClick"
|
||||
Responsive="true">
|
||||
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شناسه">
|
||||
@context.ID
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شماره سوییچ">
|
||||
@context.iinn
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شماره پذیرنده">
|
||||
@context.acn
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شماره پایانه">
|
||||
@context.trmn
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="روش پرداخت">
|
||||
@context.pmt
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شماره پیگیری">
|
||||
@context.trn
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شماره کارت پرداخت کننده">
|
||||
@context.pcn
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="شناسه پرداخت کننده">
|
||||
@context.pid
|
||||
</GridColumn>
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="تاریخ و زمان پرداخت">
|
||||
@context.PaymentDateTime
|
||||
</GridColumn>
|
||||
@* <GridColumn TItem="InvoiceItemDTO" HeaderText="مبلغ بعد از تخفیف">
|
||||
@context.adis
|
||||
</GridColumn> *@
|
||||
<GridColumn TItem="InvoicePaymentDTO" HeaderText="مبلغ پرداختی">
|
||||
@context.pv
|
||||
</GridColumn>
|
||||
</Grid>
|
||||
|
||||
|
||||
@code {
|
||||
[Inject] ModalService ModalService { get; set; } = default!;
|
||||
[Parameter] public IEnumerable<InvoicePaymentDTO> InvoicePays { get; set; }
|
||||
private async Task<GridDataProviderResult<InvoicePaymentDTO>> DataProvider(GridDataProviderRequest<InvoicePaymentDTO> request)
|
||||
{
|
||||
if (InvoicePays is null) // pull employees only one time for client-side filtering, sorting, and paging
|
||||
InvoicePays = GetInvoicePays(); // call a service or an API to pull the employees
|
||||
|
||||
return await Task.FromResult(request.ApplyTo(InvoicePays));
|
||||
}
|
||||
private async Task OnRowClick(GridRowEventArgs<InvoicePaymentDTO> args)
|
||||
{
|
||||
await ModalService.ShowAsync(new ModalOption { Type = ModalType.Primary, Title = "Event: Row Click", Message = $"Id: {args.Item.ID}, Name: {args.Item.PaymentDateTime}" });
|
||||
}
|
||||
private IEnumerable<InvoicePaymentDTO> GetInvoicePays()
|
||||
{
|
||||
return new List<InvoicePaymentDTO>();
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -123,12 +123,32 @@
|
||||
<Tabs NavStyle="NavStyle.VerticalUnderline">
|
||||
<Tab Title="آیتم ها" IsActive="true">
|
||||
<Content>
|
||||
<p class="ms-3">This is the placeholder content for the <b>Home</b> tab.</p>
|
||||
<div class="row g-3">
|
||||
<div class="form-group col-md-11">
|
||||
<LGridInvoiceItem InvoiceItems="invoice.items" />
|
||||
</div>
|
||||
<div class="form-group col-md-1">
|
||||
<button class="button-8" role="button">+</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</Content>
|
||||
</Tab>
|
||||
<Tab Title="پرداختی ها">
|
||||
<Content>
|
||||
<p class="ms-3">This is the placeholder content for the <b>Profile</b> tab.</p>
|
||||
<div class="row g-3">
|
||||
<div class="form-group col-md-11">
|
||||
<LGridInvoicePayment InvoicePays="invoice.payments" />
|
||||
</div>
|
||||
<div class="form-group col-md-1">
|
||||
|
||||
<Button class="mt-3" Color="ButtonColor.Secondary" @onclick="OnClickDelete" Type="ButtonType.Button">
|
||||
پرداخت جدید
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</Content>
|
||||
</Tab>
|
||||
|
||||
@@ -141,11 +161,29 @@
|
||||
<label class="col-sm-4 col-form-label" for="inputdes">توضیحات</label>
|
||||
<InputText @bind-Value="invoice.Des" type="text" class="form-control" id="inputdes" placeholder="توضیحات" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label class="col-sm-4 col-form-label" for="inputUdate">آخرین ویرایش</label>
|
||||
<div class="form-group col-md-2">
|
||||
<label class="col-sm-5 col-form-label" for="inputUdate">آخرین ویرایش</label>
|
||||
<InputText style=" text-align: center;" @bind-Value="invoice.Udate" class="form-control" id="inputUdate" readonly />
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<br />
|
||||
@if (invoice.ID == 0)
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
</Button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="OnClickDelete" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -153,21 +191,7 @@
|
||||
</form>
|
||||
|
||||
|
||||
@if (invoice.ID == 0)
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
</Button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
|
||||
ثبت تغییرات
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="OnClickDelete" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
@@ -191,7 +215,7 @@ else
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
Cus =await fv.GetCustomers();
|
||||
Cus = await fv.GetCustomers();
|
||||
Patterns = await fv.GetPatterns();
|
||||
if (InvoiceID != null && InvoiceID > 0)
|
||||
{
|
||||
@@ -202,7 +226,7 @@ else
|
||||
}
|
||||
else
|
||||
hc._nav.NavigateTo("/Pael");
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -214,7 +238,7 @@ else
|
||||
Udate = DateTime.Now.ConvertMiladiToShamsiinFront().ShamciToFormatShamciinFront()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Hidealert = true;
|
||||
alertMessage = "";
|
42
TaxPayerFull/Pages/UserPanel/InvoiceItem.razor.css
Normal file
42
TaxPayerFull/Pages/UserPanel/InvoiceItem.razor.css
Normal file
@@ -0,0 +1,42 @@
|
||||
/* CSS */
|
||||
.button-8 {
|
||||
background-color: #e1ecf4;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #7aa7c7;
|
||||
box-shadow: rgba(255, 255, 255, .7) 0 1px 0 0 inset;
|
||||
box-sizing: border-box;
|
||||
color: #39739d;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-family: -apple-system,system-ui,"Segoe UI","Liberation Sans",sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 1.15385;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
padding: 8px .8em;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
touch-action: manipulation;
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.button-8:hover,
|
||||
.button-8:focus {
|
||||
background-color: #b3d3ea;
|
||||
color: #2c5777;
|
||||
}
|
||||
|
||||
.button-8:focus {
|
||||
box-shadow: 0 0 0 4px rgba(0, 149, 255, .15);
|
||||
}
|
||||
|
||||
.button-8:active {
|
||||
background-color: #a0c7e4;
|
||||
box-shadow: none;
|
||||
color: #2c5777;
|
||||
}
|
Reference in New Issue
Block a user