Fixes de telefono y apellido de persona
This commit is contained in:
@ -113,9 +113,11 @@ class Toku extends Ideal\Service
|
||||
$invoice = array_find($customerInvoices, function($invoiceRow) use ($cuota) {
|
||||
return $invoiceRow['invoice_external_id'] === $cuota->id;
|
||||
});
|
||||
$invoices []= $invoice;
|
||||
$this->invoice->save($invoice);
|
||||
continue;
|
||||
if ($invoice !== null) {
|
||||
$invoices []= $invoice;
|
||||
$this->invoice->save($invoice);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
try {
|
||||
$invoices []= $this->invoice->getById($cuota->id);
|
||||
|
@ -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