ix bug copy
This commit is contained in:
@@ -389,17 +389,43 @@ namespace Back.Controllers
|
||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
LastChangeUserID = Convert.ToInt32(UserID),
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
setm = Invoice.setm,
|
||||
cui = Invoice.cui,
|
||||
crn = Invoice.crn,
|
||||
CottageDateOfCustomsDeclaration = Invoice.CottageDateOfCustomsDeclaration,
|
||||
ft = Invoice.ft,
|
||||
cdcn = Invoice.cdcn,
|
||||
insp = Invoice.insp,
|
||||
billid = Invoice.billid,
|
||||
pspd = Invoice.pspd,
|
||||
scc = Invoice.scc,
|
||||
scln = Invoice.scln,
|
||||
seventeentax = Invoice.seventeentax,
|
||||
tinc = Invoice.tinc,
|
||||
|
||||
invoiceDetails = Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||
{
|
||||
CODID = s.CODID,
|
||||
am = s.am,
|
||||
fee = s.fee,
|
||||
dis = s.dis,
|
||||
|
||||
bros = s.bros,
|
||||
bsrn = s.bsrn,
|
||||
consfee = s.consfee,
|
||||
cut = s.cut,
|
||||
exr = s.exr,
|
||||
nw = s.nw,
|
||||
odam = s.odam,
|
||||
odr = s.odr,
|
||||
odt = s.odt,
|
||||
olam = s.olam,
|
||||
olr = s.olr,
|
||||
olt = s.olt,
|
||||
spro=s.spro,
|
||||
sscv = s.sscv,
|
||||
ssrv = s.ssrv
|
||||
}).ToList()
|
||||
}, true);
|
||||
if (result > 0)
|
||||
|
@@ -47,7 +47,7 @@ namespace Back.Services
|
||||
|
||||
IsDeleted = item.IsDeleted,
|
||||
PatternID = item.PatternID,
|
||||
PatternTitle = item.pattern.Title,
|
||||
PatternTitle = item.pattern?.Title,
|
||||
CustomerID = item.CustomerID,
|
||||
CustomerName = item.Customer.FullName,
|
||||
ID = item.ID,
|
||||
|
@@ -44,7 +44,7 @@ namespace Back.Validations
|
||||
RuleFor(r => r.Item3.am)
|
||||
.NotEmpty().WithMessage("تعداد مشخص نشده")
|
||||
.NotNull().WithMessage("تعداد مشخص نشده")
|
||||
.LessThanOrEqualTo(0).WithMessage("تعداد نمی تواند صفر یا کمتر باشد");
|
||||
.GreaterThanOrEqualTo(0).WithMessage("تعداد نمی تواند صفر یا کمتر باشد");
|
||||
|
||||
RuleFor(r => r.Item3.fee)
|
||||
.NotEmpty().WithMessage("مبلغ واحد مشخص نشده")
|
||||
|
@@ -57,43 +57,52 @@
|
||||
{
|
||||
<div class="row g-3">
|
||||
<div class="form-group col-md-9">
|
||||
<div class="multi-button">
|
||||
@switch (invoice.invoiceType)
|
||||
@if (invoice.invoiceType!=InvoiceType.Cancellation)
|
||||
{
|
||||
case (InvoiceType.Bidding):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Sale)" id="cut"><span>فاکتور</span></Button>
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred1"><span>ابطال</span></Button>
|
||||
break;
|
||||
<div class="multi-button">
|
||||
@switch (invoice.invoiceType)
|
||||
{
|
||||
case (InvoiceType.Bidding):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Sale)" id="cut"><span>فاکتور</span></Button>
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred1"><span>ابطال</span></Button>
|
||||
break;
|
||||
|
||||
case (InvoiceType.Sale):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.BackFrmSale)" id="copy"><span>برگشت فروش</span></Button>
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Repair)" id="paste"><span>اصلاح</span></Button>
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred"><span>ابطال</span></Button>
|
||||
@* <Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button> *@
|
||||
break;
|
||||
case (InvoiceType.Sale):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.BackFrmSale)" id="copy"><span>برگشت فروش</span></Button>
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Repair)" id="paste"><span>اصلاح</span></Button>
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred"><span>ابطال</span></Button>
|
||||
@* <Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button> *@
|
||||
break;
|
||||
|
||||
case (InvoiceType.BackFrmSale):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred"><span>ابطال</span></Button>
|
||||
@* <Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)" id="sred1"><span>لغو</span></Button> *@
|
||||
break;
|
||||
case (InvoiceType.BackFrmSale):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred"><span>ابطال</span></Button>
|
||||
@* <Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)" id="sred1"><span>لغو</span></Button> *@
|
||||
break;
|
||||
|
||||
case (InvoiceType.Repair):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred"><span>ابطال</span></Button>
|
||||
@* <Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)" id="sred1"><span>لغو</span></Button> *@
|
||||
<Button class="button" style="color:white;" id="copy" @onclick="() => ChangeStatus((int)InvoiceType.BackFrmSale)"><span>برگشت فروش</span></Button>
|
||||
break;
|
||||
case (InvoiceType.Repair):
|
||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred"><span>ابطال</span></Button>
|
||||
@* <Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)" id="sred1"><span>لغو</span></Button> *@
|
||||
<Button class="button" style="color:white;" id="copy" @onclick="() => ChangeStatus((int)InvoiceType.BackFrmSale)"><span>برگشت فروش</span></Button>
|
||||
break;
|
||||
|
||||
@* case (InvoiceType.Cancellation):
|
||||
<Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button>
|
||||
break; *@
|
||||
@* case (InvoiceType.Cancellation):
|
||||
<Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button>
|
||||
break; *@
|
||||
}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<div class="multi-button">
|
||||
<Button class="button" style="color:white;" @onclick="CopyInvoice" id="sbg"><span>کپی صورتحساب</span></Button>
|
||||
<Tooltip Title="کپی از صورتحساب">
|
||||
<Button style="color:white;" @onclick="CopyInvoice">
|
||||
<img height="20" width="20" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVR4nO3YMQrCMBTG8dzuDeqqS72A4j0CdSx01QO49goloGQo3YSMrl27JNJdTZr3oqW+P2Sz8PNrBlGIuQaydtizPKprUqDpbPQZnt8U2q5ypSYLvLS9WxfaLnJ1mySwutt0SCpgFYKkuPD7UxMN9CKHD2MCWbttqd3h3EYDPyIpgM2jd1mp3S5wyVfAt0gKoOnsKGTItSEHmpFI3xdIAjREyKRAQ4BMDjRIJDkQPOenQF8MxAb8ipEBL4gMeEFkwAsiA14QGfCCyIAXRAa8IDKI/Dvlqz/5BSYGyn9YEBIfMdeel7WFVd/aZ3IAAAAASUVORK5CYII=">
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -488,6 +497,11 @@
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
else if (rsp.StatusCode==System.Net.HttpStatusCode.NotFound)
|
||||
{
|
||||
ShowDangerAlert("صورتحساب یافت نشد");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
@@ -510,6 +524,11 @@
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
else if (rsp.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||
{
|
||||
ShowDangerAlert("صورتحساب یافت نشد");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
@@ -705,6 +724,7 @@
|
||||
if (request > 0)
|
||||
{
|
||||
InvoiceID = request;
|
||||
ShowSuccessAlert("صورتحساب با موفقیت ایجاد شد");
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
|
Reference in New Issue
Block a user