...
This commit is contained in:
@@ -221,25 +221,17 @@ namespace Back.Controllers
|
||||
{
|
||||
case 1:
|
||||
return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.Sale));
|
||||
|
||||
case 3:
|
||||
return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.Cancellation));
|
||||
//case 0:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.CANCEL));
|
||||
|
||||
default:
|
||||
return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست" });
|
||||
}
|
||||
}
|
||||
if (Invoice.invoiceType == InvoiceType.Sale)
|
||||
{
|
||||
//if (sent)
|
||||
//{
|
||||
|
||||
switch (invoiceType)
|
||||
{
|
||||
//case 0:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.CANCEL));
|
||||
|
||||
case 3:
|
||||
return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.Cancellation));
|
||||
|
||||
@@ -305,53 +297,9 @@ namespace Back.Controllers
|
||||
default:
|
||||
return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست این صورتحساب به سامانه مودیان ارسال شده" });
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// switch (invoiceType)
|
||||
// {
|
||||
// case 0:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.CANCEL));
|
||||
|
||||
// default:
|
||||
// return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست" });
|
||||
// }
|
||||
|
||||
//}
|
||||
}
|
||||
//if (Invoice.invoiceType == InvoiceType.Cancellation)
|
||||
//{
|
||||
// if (!sent)
|
||||
// {
|
||||
// switch (invoiceType)
|
||||
// {
|
||||
// //case InvoiceType.Sale:
|
||||
// // return Ok(await _servInvoice.ChangeInvoiceType(Invoice, invoiceType));
|
||||
|
||||
// case 0:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.CANCEL));
|
||||
|
||||
// default:
|
||||
// return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست" });
|
||||
// }
|
||||
// }
|
||||
// else return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست این صورتحساب به سامانه مودیان ارسال شده" });
|
||||
//}
|
||||
if (Invoice.invoiceType == InvoiceType.Repair)
|
||||
{
|
||||
//if (!sent)
|
||||
//{
|
||||
// switch (invoiceType)
|
||||
// {
|
||||
// case 0:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.CANCEL));
|
||||
|
||||
// default:
|
||||
// return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست" });
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
switch (invoiceType)
|
||||
{
|
||||
case 3:
|
||||
@@ -391,53 +339,16 @@ namespace Back.Controllers
|
||||
return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست این صورتحساب به سامانه مودیان ارسال شده" });
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
if (Invoice.invoiceType == InvoiceType.BackFrmSale)
|
||||
{
|
||||
// if (!sent)
|
||||
// {
|
||||
switch (invoiceType)
|
||||
{
|
||||
//case 0:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.CANCEL));
|
||||
|
||||
case 3:
|
||||
return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.Cancellation));
|
||||
default:
|
||||
return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست" });
|
||||
}
|
||||
// }
|
||||
//else
|
||||
//{
|
||||
// switch (invoiceType)
|
||||
// {
|
||||
// case 3:
|
||||
// return Ok(await _servInvoice.ChangeInvoiceType(Invoice, InvoiceType.Cancellation));
|
||||
|
||||
// //case InvoiceType.Repair:
|
||||
// // await _servInvoice.ChangeInvoiceType(Invoice, invoiceType, false);
|
||||
// // return Ok(await _servInvoice.AddInvoice(new Invoice()
|
||||
// // {
|
||||
|
||||
// // Title = Invoice.Title,
|
||||
// // Des = Invoice.Des,
|
||||
// // invoiceType = invoiceType,
|
||||
// // CustomerID = Invoice.CustomerID,
|
||||
// // CompanyID = Invoice.CompanyID,
|
||||
// // InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
// // InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
// // LastChangeUserID = Convert.ToInt32(UserID),
|
||||
// // BillReference = Invoice.ID,
|
||||
// // IsDeleted = false,
|
||||
// // PatternID = Invoice.PatternID
|
||||
// // }, false));
|
||||
|
||||
// default:
|
||||
// return BadRequest(new List<string> { $"تغییر وضعیت از {Invoice.invoiceType.GetEnumDisplayName()} به {((InvoiceType)invoiceType).GetEnumDisplayName()} امکان پذیر نیست این صورتحساب به سامانه مودیان ارسال شده" });
|
||||
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user