Updated validation for Characteristic Approver Master Importer
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s

This commit is contained in:
dhanabalan
2026-09-21 09:38:34 +05:30
parent 48c3264532
commit 549462948e

View File

@@ -153,10 +153,14 @@ class CharacteristicApproverMasterImporter extends Importer
if (! is_numeric($apprDur1)) {
$warnMsg[] = 'Duration 1 must be a numeric value (HH.MM)!';
}
if ($apprDur2 != null && $apprDur2 != '' && ! is_numeric($apprDur2)) {
if ($apprDur2 == null || $apprDur2 == '') {
$apprDur2 = 0.00;
} elseif ($apprDur2 != null && $apprDur2 != '' && ! is_numeric($apprDur2)) {
$warnMsg[] = 'Duration 2 must be a numeric value (HH.MM)!';
}
if ($apprDur3 != null && $apprDur3 != '' && ! is_numeric($apprDur3)) {
if ($apprDur3 == null || $apprDur3 == '') {
$apprDur3 = 0.00;
} elseif ($apprDur3 != null && $apprDur3 != '' && ! is_numeric($apprDur3)) {
$warnMsg[] = 'Duration 3 must be a numeric value (HH.MM)!';
}