Add invalid mobile numbers to invalid file. #460
This commit is contained in:
parent
8c32792c38
commit
8eebf6ee1c
1 changed files with 15 additions and 0 deletions
|
|
@ -180,6 +180,21 @@ class MigrateCMBLegacyJobOrderCommand extends Command
|
|||
continue;
|
||||
}
|
||||
|
||||
// check if mobile phone number has letters or spaces or special characters
|
||||
if (!(preg_match('/^\d+$/', $customer_mobile)))
|
||||
{
|
||||
// not a valid mobile number
|
||||
//error_log('invalid number ' . $customer_mobile);
|
||||
$invalid_entries[] = $this->addInvalidEntry($entry_num, $date_create, $case_number, $insurer, $plate_number, $car_model,
|
||||
$nature_of_call, $service_needed, $location, $state, $driver, $truck, $workshop_arrival_time,
|
||||
$status, $customer_name, $customer_mobile, $reference, $odometer, $batt_model, $batt_size,
|
||||
$batt_trade_in, $replaced_by, $remark, $satisfaction, 'Invalid mobile number');
|
||||
|
||||
$total_inv_entries++;
|
||||
// move to next entry
|
||||
continue;
|
||||
}
|
||||
|
||||
// create job order
|
||||
$cmb_legacy_jo = new CMBLegacyJobOrder();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue