This commit is contained in:
MahanCh
2025-08-09 15:15:38 +03:30
parent 9c0d5b65be
commit d1b7e0c3e1

View File

@@ -203,35 +203,35 @@ namespace ServiceHost.Areas.Client.Pages.Company.SalaryAid
var op = new OperationResult();
_ = DateTime.Now.Date.AddMonthsFa(-1, out var oneMonthAgoGr);
if (oneMonthAgoGr > dateTime)
{
var prevCheckouts = _customizeCheckoutRepository.ValidateExistsCheckouts(dateTime,
oneMonthAgoGr, workshopId, extractNumbers);
if (prevCheckouts.CustomizeCheckout || prevCheckouts.Checkout || prevCheckouts.CustomizeCheckoutTemp)
{
op.Failed("شما نمیتوانید در تاریخ قبل از یک ماه گذشته که فیش صادر شده باشد مساعده دهید");
return new JsonResult(new
{
op.IsSuccedded,
op.Message
});
}
}
// if (oneMonthAgoGr > dateTime)
// {
// var prevCheckouts = _customizeCheckoutRepository.ValidateExistsCheckouts(dateTime,
// oneMonthAgoGr, workshopId, extractNumbers);
//
// if (prevCheckouts.CustomizeCheckout || prevCheckouts.Checkout || prevCheckouts.CustomizeCheckoutTemp)
// {
// op.Failed("شما نمیتوانید در تاریخ قبل از یک ماه گذشته که فیش صادر شده باشد مساعده دهید");
// return new JsonResult(new
// {
// op.IsSuccedded,
// op.Message
// });
// }
// }
var existsCheckouts = _customizeCheckoutRepository.ValidateExistsCheckouts(dateTime,
dateTime, workshopId, extractNumbers);
if (existsCheckouts.Checkout)
{
op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده دهید");
return new JsonResult(new
{
op.IsSuccedded,
op.Message
});
}
// if (existsCheckouts.Checkout)
// {
// op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده دهید");
// return new JsonResult(new
// {
// op.IsSuccedded,
// op.Message
// });
//
// }
op.Succcedded();
return new JsonResult(new