Merge branch 'master' of http://195.88.208.142:3000/mmr/FullTaxPayer
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Service">
|
||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -95,7 +95,8 @@ namespace Back.Controllers
|
||||
LastChangeUserID = Convert.ToInt32(UserID),
|
||||
BillReference = null,
|
||||
IsDeleted = false,
|
||||
PatternID = item.PatternID
|
||||
PatternID = item.PatternID,
|
||||
setm=1
|
||||
}));
|
||||
|
||||
|
||||
@@ -249,6 +250,7 @@ namespace Back.Controllers
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
setm=Invoice.setm,
|
||||
invoiceDetails=Invoice.invoiceDetails.Select(s=>new InvoiceItem
|
||||
{
|
||||
CODID=s.CODID,
|
||||
@@ -277,6 +279,7 @@ namespace Back.Controllers
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
setm = Invoice.setm,
|
||||
invoiceDetails = Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||
{
|
||||
CODID = s.CODID,
|
||||
@@ -361,6 +364,7 @@ namespace Back.Controllers
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
setm = Invoice.setm,
|
||||
invoiceDetails =Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||
{
|
||||
CODID = s.CODID,
|
||||
|
@@ -90,7 +90,7 @@ namespace Back.Data.Models
|
||||
public string? sbc { get { return company?.BranchID; } }
|
||||
//مبلغ پرداختی نقدی
|
||||
[MaxLength(18)]
|
||||
public decimal? cap { get { return insp - tvam - todam - tbill; } }
|
||||
public decimal? cap { get { return tbill- insp- tvam- todam; } }
|
||||
//موضوع صورتحساب
|
||||
[MaxLength(1)]
|
||||
public int? ins { get { return (int)invoiceType; } }
|
||||
@@ -131,9 +131,14 @@ namespace Back.Data.Models
|
||||
//روش تسویه
|
||||
private int? _setm;
|
||||
[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
|
||||
:_setm; }
|
||||
: _setm;
|
||||
}
|
||||
set { _setm = value; }
|
||||
}
|
||||
//مبلغ نسیه
|
||||
|
@@ -95,7 +95,7 @@ namespace Back.Services
|
||||
foreach (_TaxPayer.Fild item in head)
|
||||
{
|
||||
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.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)
|
||||
{
|
||||
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.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)
|
||||
{
|
||||
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.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)
|
||||
{
|
||||
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.GetValue(obj) == null && !string.IsNullOrEmpty(fild.Value))
|
||||
|
@@ -50,6 +50,18 @@
|
||||
@decimal.Parse(property.GetValue(item, null).ToString()).ToString("N0") ريال
|
||||
</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
|
||||
{
|
||||
<td>@property.GetValue(item, null)</td>
|
||||
|
@@ -7,7 +7,30 @@
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
||||
@* alert *@
|
||||
<div class="row">
|
||||
<Alert hidden="@Hidealert" Color="@alertColor" Dismissable="false">
|
||||
<Icon Name="@alertIconName" class="me-2"></Icon>
|
||||
@alertMessage
|
||||
</Alert>
|
||||
|
||||
</div>
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> آماده سازی قبل از ارسال به سامانه مودیان
|
||||
</h4>
|
||||
<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="col-md-12">
|
||||
<div class="card mb-4">
|
||||
@@ -34,7 +57,7 @@
|
||||
{
|
||||
|
||||
<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)
|
||||
{
|
||||
if (itema.ID == item.Value)
|
||||
@@ -78,13 +101,14 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">اطلاعات تکمیلی بدنه صورتحساب</h5>
|
||||
<h5 class="card-header">اطلاعات تکمیلی بدنه صورتحساب (کالاها)</h5>
|
||||
<div class="card-body">
|
||||
@if (invoice?.Bodys != null)
|
||||
{
|
||||
<Accordion>
|
||||
@foreach (var item in invoice?.Bodys)
|
||||
{<div class="col-md-12">
|
||||
{
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-4">
|
||||
<AccordionItem Title="@item.filds.Where(w=>w.eName=="sstt").Select(s=>s.Value).First()">
|
||||
<Content>
|
||||
@@ -152,6 +176,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if (invoice!=null)
|
||||
{
|
||||
@* action *@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -159,13 +186,15 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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>
|
||||
}
|
||||
|
||||
|
||||
@code {
|
||||
private ConfirmDialog dialog = default!;
|
||||
@@ -181,13 +210,22 @@
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
await LoadData();
|
||||
PreloadService.Hide();
|
||||
await base.OnParametersSetAsync();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@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()
|
||||
{
|
||||
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
|
||||
@@ -196,11 +234,12 @@
|
||||
var response = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
if (response)
|
||||
{
|
||||
ShowSuccessAlert("آماده سازی با موفقیت انجام شد");
|
||||
ShowMessage(ToastType.Success, "آماده سازی با موفقیت انجام شد");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowDangerAlert("خطای در آماده سازی اطلاعات رخ داده");
|
||||
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -226,7 +265,7 @@
|
||||
}
|
||||
private async Task LoadData()
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
|
||||
var rsp = await hc.Get($"TaxPayer/GetInvoice/{InvoiceID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
@@ -237,6 +276,6 @@
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
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");
|
||||
|
||||
|
Reference in New Issue
Block a user