Fixes de telefono y apellido de persona
This commit is contained in:
@ -72,6 +72,17 @@ class Customer extends AbstractEndPoint
|
||||
if ($ref === null) {
|
||||
continue;
|
||||
}
|
||||
if ($ref === 'telefono') {
|
||||
$value = $data[$ref];
|
||||
if ($value === '' or $value === null or $value === '0') {
|
||||
continue;
|
||||
}
|
||||
if (!str_starts_with($value, '+')) {
|
||||
$value = "+56{$value}";
|
||||
}
|
||||
$params[$key] = $value;
|
||||
continue;
|
||||
}
|
||||
if (array_key_exists($ref, $data) and $data[$ref] !== '' and $data[$ref] !== null) {
|
||||
$params[$key] = $data[$ref];
|
||||
}
|
||||
|
Reference in New Issue
Block a user