This commit is contained in:
mmrbnjd
2024-07-29 23:32:54 +03:30
parent a025225920
commit a1a6076035
8 changed files with 61 additions and 16 deletions

View File

@@ -165,7 +165,7 @@ namespace Back.Controllers
{
Company.Credit -= order.TPrice;
var comUpdate=await _servCompany.AddORUpdateCompany(Company);
if (comUpdate!=null)
if (comUpdate != null)
{
if (await _servWalt.AddDocument(new CreditDocuments
{
@@ -175,7 +175,14 @@ namespace Back.Controllers
type = CreditDocumentType.Decrease,
Value = order.TPrice
}))
return Ok();
{
if (await _servOrders.SubmitOrder(order,CompanyID))
return Ok();
else
return BadRequest(new List<string> { "خطا در بروزرسانی سرویس ها" });
}
else
return BadRequest(new List<string> { "خطا در بروزرسانی سند سفارش" });
}