ix bug copy
This commit is contained in:
@@ -389,17 +389,43 @@ namespace Back.Controllers
|
|||||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||||
LastChangeUserID = Convert.ToInt32(UserID),
|
LastChangeUserID = Convert.ToInt32(UserID),
|
||||||
BillReference = Invoice.ID,
|
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
PatternID = Invoice.PatternID,
|
PatternID = Invoice.PatternID,
|
||||||
setm = Invoice.setm,
|
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
|
invoiceDetails = Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||||
{
|
{
|
||||||
CODID = s.CODID,
|
CODID = s.CODID,
|
||||||
am = s.am,
|
am = s.am,
|
||||||
fee = s.fee,
|
fee = s.fee,
|
||||||
dis = s.dis,
|
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()
|
}).ToList()
|
||||||
}, true);
|
}, true);
|
||||||
if (result > 0)
|
if (result > 0)
|
||||||
|
@@ -47,7 +47,7 @@ namespace Back.Services
|
|||||||
|
|
||||||
IsDeleted = item.IsDeleted,
|
IsDeleted = item.IsDeleted,
|
||||||
PatternID = item.PatternID,
|
PatternID = item.PatternID,
|
||||||
PatternTitle = item.pattern.Title,
|
PatternTitle = item.pattern?.Title,
|
||||||
CustomerID = item.CustomerID,
|
CustomerID = item.CustomerID,
|
||||||
CustomerName = item.Customer.FullName,
|
CustomerName = item.Customer.FullName,
|
||||||
ID = item.ID,
|
ID = item.ID,
|
||||||
|
@@ -44,7 +44,7 @@ namespace Back.Validations
|
|||||||
RuleFor(r => r.Item3.am)
|
RuleFor(r => r.Item3.am)
|
||||||
.NotEmpty().WithMessage("تعداد مشخص نشده")
|
.NotEmpty().WithMessage("تعداد مشخص نشده")
|
||||||
.NotNull().WithMessage("تعداد مشخص نشده")
|
.NotNull().WithMessage("تعداد مشخص نشده")
|
||||||
.LessThanOrEqualTo(0).WithMessage("تعداد نمی تواند صفر یا کمتر باشد");
|
.GreaterThanOrEqualTo(0).WithMessage("تعداد نمی تواند صفر یا کمتر باشد");
|
||||||
|
|
||||||
RuleFor(r => r.Item3.fee)
|
RuleFor(r => r.Item3.fee)
|
||||||
.NotEmpty().WithMessage("مبلغ واحد مشخص نشده")
|
.NotEmpty().WithMessage("مبلغ واحد مشخص نشده")
|
||||||
|
@@ -57,43 +57,52 @@
|
|||||||
{
|
{
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="form-group col-md-9">
|
<div class="form-group col-md-9">
|
||||||
<div class="multi-button">
|
@if (invoice.invoiceType!=InvoiceType.Cancellation)
|
||||||
@switch (invoice.invoiceType)
|
|
||||||
{
|
{
|
||||||
case (InvoiceType.Bidding):
|
<div class="multi-button">
|
||||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Sale)" id="cut"><span>فاکتور</span></Button>
|
@switch (invoice.invoiceType)
|
||||||
<Button class="button" style="color:white;" @onclick="() => ChangeStatus((int)InvoiceType.Cancellation)" id="sred1"><span>ابطال</span></Button>
|
{
|
||||||
break;
|
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):
|
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.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.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;" @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> *@
|
@* <Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button> *@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (InvoiceType.BackFrmSale):
|
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.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;" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)" id="sred1"><span>لغو</span></Button> *@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (InvoiceType.Repair):
|
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.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;" @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>
|
<Button class="button" style="color:white;" id="copy" @onclick="() => ChangeStatus((int)InvoiceType.BackFrmSale)"><span>برگشت فروش</span></Button>
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@* case (InvoiceType.Cancellation):
|
@* case (InvoiceType.Cancellation):
|
||||||
<Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button>
|
<Button class="button" style="color:white;" id="sred1" @onclick="() => ChangeStatus((int)InvoiceType.CANCEL)"><span>لغو</span></Button>
|
||||||
break; *@
|
break; *@
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<div class="multi-button">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
@@ -488,6 +497,11 @@
|
|||||||
}
|
}
|
||||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||||
}
|
}
|
||||||
|
else if (rsp.StatusCode==System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
ShowDangerAlert("صورتحساب یافت نشد");
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||||
@@ -510,6 +524,11 @@
|
|||||||
}
|
}
|
||||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||||
}
|
}
|
||||||
|
else if (rsp.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||||
|
{
|
||||||
|
ShowDangerAlert("صورتحساب یافت نشد");
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||||
@@ -705,6 +724,7 @@
|
|||||||
if (request > 0)
|
if (request > 0)
|
||||||
{
|
{
|
||||||
InvoiceID = request;
|
InvoiceID = request;
|
||||||
|
ShowSuccessAlert("صورتحساب با موفقیت ایجاد شد");
|
||||||
}
|
}
|
||||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user