45 lines
1.4 KiB
JavaScript
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;
|
|
}
|
|
} |