...
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Service">
|
<Reference Include="Service">
|
||||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@@ -95,7 +95,8 @@ namespace Back.Controllers
|
|||||||
LastChangeUserID = Convert.ToInt32(UserID),
|
LastChangeUserID = Convert.ToInt32(UserID),
|
||||||
BillReference = null,
|
BillReference = null,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
PatternID = item.PatternID
|
PatternID = item.PatternID,
|
||||||
|
setm=1
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
@@ -249,6 +250,7 @@ namespace Back.Controllers
|
|||||||
BillReference = Invoice.ID,
|
BillReference = Invoice.ID,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
PatternID = Invoice.PatternID,
|
PatternID = Invoice.PatternID,
|
||||||
|
setm=Invoice.setm,
|
||||||
invoiceDetails=Invoice.invoiceDetails.Select(s=>new InvoiceItem
|
invoiceDetails=Invoice.invoiceDetails.Select(s=>new InvoiceItem
|
||||||
{
|
{
|
||||||
CODID=s.CODID,
|
CODID=s.CODID,
|
||||||
@@ -277,6 +279,7 @@ namespace Back.Controllers
|
|||||||
BillReference = Invoice.ID,
|
BillReference = Invoice.ID,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
PatternID = Invoice.PatternID,
|
PatternID = Invoice.PatternID,
|
||||||
|
setm = Invoice.setm,
|
||||||
invoiceDetails = Invoice.invoiceDetails.Select(s => new InvoiceItem
|
invoiceDetails = Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||||
{
|
{
|
||||||
CODID = s.CODID,
|
CODID = s.CODID,
|
||||||
@@ -361,7 +364,8 @@ namespace Back.Controllers
|
|||||||
BillReference = Invoice.ID,
|
BillReference = Invoice.ID,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
PatternID = Invoice.PatternID,
|
PatternID = Invoice.PatternID,
|
||||||
invoiceDetails=Invoice.invoiceDetails.Select(s => new InvoiceItem
|
setm = Invoice.setm,
|
||||||
|
invoiceDetails =Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||||
{
|
{
|
||||||
CODID = s.CODID,
|
CODID = s.CODID,
|
||||||
am = s.am,
|
am = s.am,
|
||||||
|
@@ -90,7 +90,7 @@ namespace Back.Data.Models
|
|||||||
public string? sbc { get { return company?.BranchID; } }
|
public string? sbc { get { return company?.BranchID; } }
|
||||||
//مبلغ پرداختی نقدی
|
//مبلغ پرداختی نقدی
|
||||||
[MaxLength(18)]
|
[MaxLength(18)]
|
||||||
public decimal? cap { get { return insp - tvam - todam - tbill; } }
|
public decimal? cap { get { return tbill- insp- tvam- todam; } }
|
||||||
//موضوع صورتحساب
|
//موضوع صورتحساب
|
||||||
[MaxLength(1)]
|
[MaxLength(1)]
|
||||||
public int? ins { get { return (int)invoiceType; } }
|
public int? ins { get { return (int)invoiceType; } }
|
||||||
@@ -131,9 +131,14 @@ namespace Back.Data.Models
|
|||||||
//روش تسویه
|
//روش تسویه
|
||||||
private int? _setm;
|
private int? _setm;
|
||||||
[MaxLength(1)]
|
[MaxLength(1)]
|
||||||
public int? setm { get { return pattern.BillTypeID == 3 || pattern.BillTypeID == 4 || pattern.inp==8
|
public int? setm
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return pattern.BillTypeID == 3 || pattern.BillTypeID == 4 || pattern.inp == 8
|
||||||
? 1
|
? 1
|
||||||
:_setm; }
|
: _setm;
|
||||||
|
}
|
||||||
set { _setm = value; }
|
set { _setm = value; }
|
||||||
}
|
}
|
||||||
//مبلغ نسیه
|
//مبلغ نسیه
|
||||||
|
@@ -95,7 +95,7 @@ namespace Back.Services
|
|||||||
foreach (_TaxPayer.Fild item in head)
|
foreach (_TaxPayer.Fild item in head)
|
||||||
{
|
{
|
||||||
var resval = InvoiceItem.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(InvoiceItem)).FirstOrDefault();
|
var resval = InvoiceItem.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(InvoiceItem)).FirstOrDefault();
|
||||||
item.Value = resval == null ? "" : (item.eName == "InvoicIssueDate" || item.eName == "InvoiceDate" || item.eName == "CottageDateOfCustomsDeclaration" ? resval.ToString().ShamciToFormatShamci() : resval.ToString());
|
item.Value = resval == null ? "" : (item.eName == "InvoicIssueDate" || item.eName == "InvoiceDate" || item.eName == "CottageDateOfCustomsDeclaration" ? resval.ToString().ShamciToFormatShamci() :resval.ToString().Split('.').Length==2 ? ((decimal)resval).ToString("N0") : resval.ToString());
|
||||||
item.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
item.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
||||||
item.Des = item.ModeID == 3 ? _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() : null;
|
item.Des = item.ModeID == 3 ? _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() : null;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ namespace Back.Services
|
|||||||
foreach (_TaxPayer.Fild item in body)
|
foreach (_TaxPayer.Fild item in body)
|
||||||
{
|
{
|
||||||
var resval = invoicedetail.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(invoicedetail)).FirstOrDefault();
|
var resval = invoicedetail.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(invoicedetail)).FirstOrDefault();
|
||||||
item.Value = resval == null ? "" : resval.ToString();
|
item.Value = resval == null ? "" : resval.ToString().Split('.').Length == 2 ? ((decimal)resval).ToString("N0") : resval.ToString();
|
||||||
item.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
item.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
||||||
item.Des = item.ModeID == 3 ? _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() : null;
|
item.Des = item.ModeID == 3 ? _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() : null;
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ namespace Back.Services
|
|||||||
foreach (_TaxPayer.Fild item in pay)
|
foreach (_TaxPayer.Fild item in pay)
|
||||||
{
|
{
|
||||||
var resval = InvoiceItem.payments.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(InvoiceItem.payments)).FirstOrDefault();
|
var resval = InvoiceItem.payments.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(InvoiceItem.payments)).FirstOrDefault();
|
||||||
item.Value = resval == null ? "" : resval.ToString();
|
item.Value = resval == null ? "" : resval.ToString().Split('.').Length == 2 ? ((decimal)resval).ToString("N0") : resval.ToString();
|
||||||
item.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
item.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
||||||
item.Des = item.ModeID == 3 ? _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() : null;
|
item.Des = item.ModeID == 3 ? _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() : null;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ namespace Back.Services
|
|||||||
}
|
}
|
||||||
private void SetValue<T>(_TaxPayer.Fild fild, ref T obj)
|
private void SetValue<T>(_TaxPayer.Fild fild, ref T obj)
|
||||||
{
|
{
|
||||||
var resvaltype = obj.GetType().GetProperties().Where(w => w.Name == (fild.eName=="tax17" ? "seventeentax" : fild.eName)).FirstOrDefault();
|
var resvaltype = obj.GetType().GetProperties().Where(w => w.Name == fild.eName).FirstOrDefault();
|
||||||
//if (resvaltype != null)
|
//if (resvaltype != null)
|
||||||
//{
|
//{
|
||||||
if ((resvaltype.GetValue(obj) == null && !string.IsNullOrEmpty(fild.Value))
|
if ((resvaltype.GetValue(obj) == null && !string.IsNullOrEmpty(fild.Value))
|
||||||
|
@@ -39,8 +39,8 @@
|
|||||||
int id = 0;
|
int id = 0;
|
||||||
foreach (PropertyInfo property in properties)
|
foreach (PropertyInfo property in properties)
|
||||||
{
|
{
|
||||||
if (property.Name.ToLower()=="id")
|
if (property.Name.ToLower() == "id")
|
||||||
id =Convert.ToInt32(property.GetValue(item, null));
|
id = Convert.ToInt32(property.GetValue(item, null));
|
||||||
|
|
||||||
if (property.CustomAttributes.Any(w => w.AttributeType.Name == "DisplayAttribute"))
|
if (property.CustomAttributes.Any(w => w.AttributeType.Name == "DisplayAttribute"))
|
||||||
{
|
{
|
||||||
@@ -50,6 +50,18 @@
|
|||||||
@decimal.Parse(property.GetValue(item, null).ToString()).ToString("N0") ريال
|
@decimal.Parse(property.GetValue(item, null).ToString()).ToString("N0") ريال
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
|
else if (property.Name.ToLower() == "id")
|
||||||
|
{
|
||||||
|
if (id > 0)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<td><button type="button" class="btn btn-link disabled">@property.GetValue(item, null)</button></td>
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<td>@property.GetValue(item, null)</td>
|
<td>@property.GetValue(item, null)</td>
|
||||||
@@ -58,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (id>0)
|
if (id > 0)
|
||||||
{
|
{
|
||||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,27 @@
|
|||||||
<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>
|
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
||||||
|
@* alert *@
|
||||||
|
<div class="row">
|
||||||
|
<Alert hidden="@Hidealert" Color="@alertColor" Dismissable="false">
|
||||||
|
<Icon Name="@alertIconName" class="me-2"></Icon>
|
||||||
|
@alertMessage
|
||||||
|
</Alert>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<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 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">
|
||||||
@@ -34,7 +54,7 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
<select @bind="item.Value" class="form-control" aria-label="Default select example">
|
<select @bind="item.Value" class="form-control" aria-label="Default select example">
|
||||||
<option value="100" style="color: #b5b5b5; " selected>@item.fName...</option>
|
<option style="color: #b5b5b5; " selected>@item.fName...</option>
|
||||||
@foreach (var itema in item.DefVals)
|
@foreach (var itema in item.DefVals)
|
||||||
{
|
{
|
||||||
if (itema.ID == item.Value)
|
if (itema.ID == item.Value)
|
||||||
@@ -78,13 +98,14 @@
|
|||||||
<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">
|
||||||
<h5 class="card-header">اطلاعات تکمیلی بدنه صورتحساب</h5>
|
<h5 class="card-header">اطلاعات تکمیلی بدنه صورتحساب (کالاها)</h5>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@if (invoice?.Bodys != null)
|
@if (invoice?.Bodys != null)
|
||||||
{
|
{
|
||||||
<Accordion>
|
<Accordion>
|
||||||
@foreach (var item in invoice?.Bodys)
|
@foreach (var item in invoice?.Bodys)
|
||||||
{<div class="col-md-12">
|
{
|
||||||
|
<div class="col-md-12">
|
||||||
<div class="card mb-4">
|
<div class="card mb-4">
|
||||||
<AccordionItem Title="@item.filds.Where(w=>w.eName=="sstt").Select(s=>s.Value).First()">
|
<AccordionItem Title="@item.filds.Where(w=>w.eName=="sstt").Select(s=>s.Value).First()">
|
||||||
<Content>
|
<Content>
|
||||||
@@ -150,22 +171,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@* action *@
|
|
||||||
<div class="row">
|
@if (invoice!=null)
|
||||||
|
{
|
||||||
|
@* action *@
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<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>
|
<button type="submit" @onclick="Send" class="btn btn-primary">آماده سازی و ارسال</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private ConfirmDialog dialog = default!;
|
private ConfirmDialog dialog = default!;
|
||||||
@@ -181,13 +207,22 @@
|
|||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
|
PreloadService.Show(SpinnerColor.Dark);
|
||||||
await LoadData();
|
await LoadData();
|
||||||
|
PreloadService.Hide();
|
||||||
await base.OnParametersSetAsync();
|
await base.OnParametersSetAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@functions {
|
@functions {
|
||||||
|
private void ShowMessage(ToastType toastType, string msg) => messages.Add(CreateToastMessage(toastType, msg));
|
||||||
|
private ToastMessage CreateToastMessage(ToastType toastType, string msg)
|
||||||
|
=> new ToastMessage
|
||||||
|
{
|
||||||
|
Type = toastType,
|
||||||
|
Message = msg,
|
||||||
|
};
|
||||||
public async Task Send()
|
public async Task Send()
|
||||||
{
|
{
|
||||||
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
|
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
|
||||||
@@ -196,11 +231,12 @@
|
|||||||
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||||
if (response)
|
if (response)
|
||||||
{
|
{
|
||||||
ShowSuccessAlert("آماده سازی با موفقیت انجام شد");
|
ShowMessage(ToastType.Success, "آماده سازی با موفقیت انجام شد");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowDangerAlert("خطای در آماده سازی اطلاعات رخ داده");
|
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -226,7 +262,7 @@
|
|||||||
}
|
}
|
||||||
private async Task LoadData()
|
private async Task LoadData()
|
||||||
{
|
{
|
||||||
PreloadService.Show(SpinnerColor.Dark);
|
|
||||||
var rsp = await hc.Get($"TaxPayer/GetInvoice/{InvoiceID}");
|
var rsp = await hc.Get($"TaxPayer/GetInvoice/{InvoiceID}");
|
||||||
if (rsp.IsSuccessStatusCode)
|
if (rsp.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
@@ -237,6 +273,6 @@
|
|||||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||||
ShowDangerAlert(request[0]);
|
ShowDangerAlert(request[0]);
|
||||||
}
|
}
|
||||||
PreloadService.Hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -34,9 +34,9 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
|||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
|
|
||||||
//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/") });
|
||||||
|
|
||||||
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