Fix validation for 'No of Operation' in resolveRecord method to include actual value in error message

This commit is contained in:
dhanabalan
2025-09-26 16:30:53 +05:30
parent 5b8bb29aeb
commit d2c7f85917

View File

@@ -114,8 +114,8 @@ class LineImporter extends Importer
$noOfOps = (int) ($this->data['no_of_operation'] ?? 0);
if ($noOfOps == null || $noOfOps == '' || !is_numeric($noOfOps)) {
throw new RowImportFailedException("'No of Operation' is required and must be a number");
if (($noOfOps == null || $noOfOps == '' || !is_numeric($noOfOps)) && $noOfOps != 0) {
throw new RowImportFailedException("'No of Operation' is required and must be a number $noOfOps");
}
if ($noOfOps > 10)