feature/cierres #25

Open
aldarien wants to merge 446 commits from feature/cierres into develop
217 changed files with 682 additions and 7206 deletions
Showing only changes of commit d6e60efcaf - Show all commits

View File

@ -72,7 +72,7 @@ class Customer extends AbstractEndPoint
if ($ref === null) {
continue;
}
if (array_key_exists($ref, $data)) {
if (array_key_exists($ref, $data) and $data[$ref] !== '' and $data[$ref] !== null) {
$params[$key] = $data[$ref];
}
}

View File

@ -127,7 +127,7 @@ class Invoice extends AbstractEndPoint
$params[$key] = $data['cuota']->id;
continue;
}
if (array_key_exists($ref, $data)) {
if (array_key_exists($ref, $data) and $data[$ref] !== '' and $data[$ref] !== null) {
$params[$key] = $data[$ref];
}
}
@ -149,11 +149,11 @@ class Invoice extends AbstractEndPoint
return $mappedData;
}
protected function datosCuota(Model\Venta\Cuota $cuota): string
protected function datosCuota(Model\Venta\Cuota $cuota): array
{
return json_encode([
return [
'numero' => $cuota->numero,
'monto_clp' => $cuota->pago->valor
]);
];
}
}

View File

@ -73,7 +73,7 @@ class Subscription extends AbstractEndPoint
$params[$key] = $this->datosVenta($data['venta']);
continue;
}
if (array_key_exists($ref, $data)) {
if (array_key_exists($ref, $data) and $data[$ref] !== '' and $data[$ref] !== null) {
$params[$key] = $data[$ref];
}
}
@ -94,12 +94,11 @@ class Subscription extends AbstractEndPoint
}
return $mappedData;
}
protected function datosVenta(Venta $venta): string
protected function datosVenta(Venta $venta): array
{
$datos = [
return [
'proyecto' => $venta->proyecto()->descripcion,
'unidades' => $venta->propiedad()->summary()
];
return json_encode($datos);
}
}