Files
Backend-Api/ServiceHost/wwwroot/AssetsClient/pages/Employees/js/TempCheckout.js
2025-05-25 19:24:29 +03:30

45 lines
1.4 KiB
JavaScript

$(document).ready(function() {
$("#personnelSalary").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
new Cleave(this, {
numeral: true,
numeralThousandsGroupStyle: 'thousand'
});
});
$("#leavePermittedDays").each(function () {
let element = $(this);
element.on('input', function () {
let value = convertPersianNumbersToEnglish(element.val());
element.val(value);
});
element.mask("000");
});
});
function checkStepTempCheckout() {
var workshopSettingSelect = $('#workshopSettingSelect').val();
if (workshopSettingSelect === "0") {
return true;
} else {
if ($("#personnelSalary").val() === "") {
showAlert('لطفا حقوق پرسنل را وارد نمائید.', $("#personnelSalary"));
return false;
}
if ($("#leavePermittedDays").val() === "") {
showAlert('لطفا تعداد روز مجاز مرخصی را وارد نمائید.', $("#leavePermittedDays"));
return false;
}
if ($("#personnelSalary").val() !== "" && $("#leavePermittedDays").val() !== "") {
return true;
}
return false;
}
}