...
This commit is contained in:
@@ -118,6 +118,24 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
if (Selected.promotionDetails.Any(w => w.PermissionID == 18))
|
||||
{
|
||||
<tr>
|
||||
<td>@Selected.promotionDetails.Where(w => w.PermissionID == 18).Select(s => s.PermissionTitle).FirstOrDefault()</td>
|
||||
<td>@Selected.promotionDetails.Where(w => w.PermissionID == 18).Select(s => s.APrice).FirstOrDefault().ToString("N0") ريال</td>
|
||||
<td>
|
||||
@if (Selected.ID < 0)
|
||||
{
|
||||
<InputNumber @bind-Value="values[4]" @bind-Value:after="OnInput" type="text" class="form-control" id="inputax" style="text-align:center;" placeholder="تعداد" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input value="@Selected.promotionDetails.Where(w => w.PermissionID == 18).Select(s => s.CreditAmount).FirstOrDefault()" style="text-align:center;" class="form-control" type="text" readonly>
|
||||
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
}
|
||||
</tbody>
|
||||
@@ -154,7 +172,7 @@
|
||||
public List<PromotionDto> Promotions { get; set; } = new();
|
||||
public PromotionDto? Selected { get; set; } = null;
|
||||
// invoice cod cus tax
|
||||
int[] values = { 0,0,0,0};
|
||||
int[] values = { 0,0,0,0,0};
|
||||
decimal TotalPrice = 0;
|
||||
}
|
||||
@functions {
|
||||
@@ -176,7 +194,7 @@
|
||||
{
|
||||
orderSelectName = "نوع سفارش";
|
||||
Selected = null;
|
||||
values =new int[] { 0,0,0,0};
|
||||
values =new int[] { 0,0,0,0,0};
|
||||
TotalPrice = 0;
|
||||
Promotions = await fv.GetPromotion();
|
||||
orderstype = new List<IdName<int>>();
|
||||
@@ -220,6 +238,10 @@
|
||||
if (itemtax != null)
|
||||
itemtax.CreditAmount = values[3];
|
||||
|
||||
var itemwarehouse = Selected.promotionDetails.Where(w => w.PermissionID == 18).FirstOrDefault();
|
||||
if (itemwarehouse != null)
|
||||
itemwarehouse.CreditAmount = values[4];
|
||||
|
||||
TotalPrice = Selected.TotalPrice;
|
||||
}
|
||||
|
||||
@@ -230,8 +252,8 @@
|
||||
SpinnerVisible = true;
|
||||
if (Selected != null)
|
||||
{
|
||||
if (Selected.ID < 0 && (values[0] < 0 || values[1] < 0 || values[2] < 0 || values[3] < 0)) return;
|
||||
if (Selected.ID < 0 && values[0] == 0 && values[1] == 0 && values[2] == 0 && values[3] == 0) return;
|
||||
if (Selected.ID < 0 && (values[0] < 0 || values[1] < 0 || values[2] < 0 || values[3] < 0 || values[4] < 0)) return;
|
||||
if (Selected.ID < 0 && values[0] == 0 && values[1] == 0 && values[2] == 0 && values[3] == 0 && values[4] == 0) return;
|
||||
|
||||
//---------
|
||||
var itemFac = Selected.promotionDetails.Where(w => w.PermissionID == 3).FirstOrDefault();
|
||||
@@ -249,6 +271,10 @@
|
||||
var itemtax = Selected.promotionDetails.Where(w => w.PermissionID == 16).FirstOrDefault();
|
||||
if (itemtax != null)
|
||||
itemtax.CreditAmount = values[3];
|
||||
|
||||
var itemwarehouse = Selected.promotionDetails.Where(w => w.PermissionID == 18).FirstOrDefault();
|
||||
if (itemwarehouse != null)
|
||||
itemwarehouse.CreditAmount = values[4];
|
||||
//---------
|
||||
var rsp = await hc.Post<PromotionDto>($"Orders/AddOrder", Selected);
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
|
@@ -12,7 +12,7 @@
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> مشتری
|
||||
<span class="text-muted fw-light">سرویس ها /</span> انبارداری
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
|
Reference in New Issue
Block a user