add checkout salaryAid option To Create
This commit is contained in:
@@ -99,8 +99,8 @@ public class SalaryAidApplication : ISalaryAidApplication
|
||||
var existsCheckouts = _customizeCheckoutRepository.ValidateExistsCheckouts(calculationDateGr,
|
||||
calculationDateGr, command.WorkshopId, command.EmployeeIds);
|
||||
|
||||
if (existsCheckouts.Checkout)
|
||||
return op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده ای دهید");
|
||||
//if (existsCheckouts.Checkout)
|
||||
// return op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده ای دهید");
|
||||
|
||||
|
||||
var (userId, userType, _) = _authHelper.GetUserTypeWithId();
|
||||
@@ -198,8 +198,8 @@ public class SalaryAidApplication : ISalaryAidApplication
|
||||
var existsCheckouts = _customizeCheckoutRepository.ValidateExistsCheckouts(calculationDateGr,
|
||||
calculationDateGr, entity.WorkshopId, [entity.EmployeeId]);
|
||||
|
||||
if (existsCheckouts.Checkout)
|
||||
return op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده ای دهید");
|
||||
// if (existsCheckouts.Checkout)
|
||||
// return op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده ای دهید");
|
||||
|
||||
|
||||
using var transaction = new TransactionScope();
|
||||
@@ -336,8 +336,8 @@ public class SalaryAidApplication : ISalaryAidApplication
|
||||
calculationDateGr, command.WorkshopId, command.EmployeeIds);
|
||||
|
||||
|
||||
if (existsCheckouts.Checkout)
|
||||
return op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده ای دهید");
|
||||
// if (existsCheckouts.Checkout)
|
||||
// return op.Failed("شما نمیتوانید برای پرسنلی در تاریخی که برای فیش حقوقی رسمی صادر شده است مساعده ای دهید");
|
||||
|
||||
var month = Convert.ToInt32(command.CalculationMonth);
|
||||
var year = Convert.ToInt32(command.CalculationYear);
|
||||
|
||||
@@ -345,14 +345,14 @@ function CheckExistAjax() {
|
||||
var checkoutType = "";
|
||||
|
||||
if (response.customizeCheckout) {
|
||||
checkoutType = "نهایی";
|
||||
checkoutType = "غیررسمی نهایی";
|
||||
} else if (response.customizeCheckoutTemp) {
|
||||
checkoutType = "موقت";
|
||||
checkoutType = "غیررسمی موقت";
|
||||
}
|
||||
|
||||
if (response.customizeCheckout || response.customizeCheckoutTemp) {
|
||||
if (response.checkout) {
|
||||
swal({
|
||||
title: `برای این پرسنل فیش حقوقی غیررسمی ${checkoutType} صادر شده است. در صورت تایید، این فیش حقوقی به صورت خودکار تغییر پیدا میکند.`,
|
||||
title: `پرسنل دارای فیش رسمی است با تایید این پیغام مساعده شما ثبت میشود ولی در فیش حقوقی رسمی پرسنل اعمال نمیشود. درصورت نیاز به ثبت مساعده در فیش رسمی میبایست فیش حقوقی رسمی را مجددا ایجاد کنید. آیا ادامه میدهید؟`,
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
@@ -368,7 +368,27 @@ function CheckExistAjax() {
|
||||
$('#createData').removeClass('disable');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
}
|
||||
else if (response.customizeCheckout || response.customizeCheckoutTemp) {
|
||||
swal({
|
||||
title: `برای این پرسنل فیش حقوقی ${checkoutType} صادر شده است. در صورت تایید، این فیش حقوقی به صورت خودکار تغییر پیدا میکند.`,
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
SaveDataAjax();
|
||||
} else {
|
||||
$('#createData').removeClass('disable');
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
SaveDataAjax();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -276,14 +276,33 @@ function CheckExistAjax() {
|
||||
var checkoutType = "";
|
||||
|
||||
if (response.customizeCheckout) {
|
||||
checkoutType = "نهایی";
|
||||
checkoutType = "غیررسمی نهایی";
|
||||
} else if (response.customizeCheckoutTemp) {
|
||||
checkoutType = "موقت";
|
||||
checkoutType = "غیررسمی موقت";
|
||||
}
|
||||
|
||||
if (response.customizeCheckout || response.customizeCheckoutTemp) {
|
||||
if (response.checkout) {
|
||||
swal({
|
||||
title: `برای این پرسنل فیش حقوقی غیررسمی ${checkoutType} صادر شده است. در صورت تایید، این فیش حقوقی به صورت خودکار تغییر پیدا میکند.`,
|
||||
title: `پرسنل دارای فیش رسمی است با تایید این پیغام مساعده شما ثبت میشود ولی در فیش حقوقی رسمی پرسنل اعمال نمیشود. درصورت نیاز به اعمال مساعده در فیش رسمی میبایست فیش حقوقی رسمی را مجددا ایجاد کنید. آیا ادامه میدهید؟`,
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
SaveDataAjax();
|
||||
} else {
|
||||
$('#createData').removeClass('disable');
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (response.customizeCheckout || response.customizeCheckoutTemp) {
|
||||
swal({
|
||||
title: `برای این پرسنل فیش حقوقی ${checkoutType} صادر شده است. در صورت تایید، این فیش حقوقی به صورت خودکار تغییر پیدا میکند.`,
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
|
||||
@@ -766,14 +766,33 @@ function CheckExistAjax() {
|
||||
var checkoutType = "";
|
||||
|
||||
if (response.customizeCheckout) {
|
||||
checkoutType = "نهایی";
|
||||
checkoutType = "غیررسمی نهایی";
|
||||
} else if (response.customizeCheckoutTemp) {
|
||||
checkoutType = "موقت";
|
||||
checkoutType = "غیررسمی موقت";
|
||||
}
|
||||
|
||||
if (response.customizeCheckout || response.customizeCheckoutTemp) {
|
||||
if (response.checkout) {
|
||||
swal({
|
||||
title: `برای این پرسنل فیش حقوقی غیررسمی ${checkoutType} صادر شده است. در صورت تایید، این فیش حقوقی به صورت خودکار تغییر پیدا میکند.`,
|
||||
title: `پرسنل دارای فیش رسمی است با تایید این پیغام مساعده شما ثبت میشود ولی در فیش حقوقی رسمی پرسنل اعمال نمیشود. درصورت نیاز به اعمال مساعده در فیش رسمی میبایست فیش حقوقی رسمی را مجددا ایجاد کنید. آیا ادامه میدهید؟`,
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
SaveDataAjax();
|
||||
} else {
|
||||
$('#createData').removeClass('disable');
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (response.customizeCheckout || response.customizeCheckoutTemp) {
|
||||
swal({
|
||||
title: `برای این پرسنل فیش حقوقی ${checkoutType} صادر شده است. در صورت تایید، این فیش حقوقی به صورت خودکار تغییر پیدا میکند.`,
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
|
||||
Reference in New Issue
Block a user