Log agregar Venta

This commit is contained in:
Juan Pablo Vial
2022-06-09 16:19:05 -04:00
parent eac6b7d197
commit 9ffc7527c3

View File

@ -120,19 +120,21 @@ class Ventas
}
public static function agregar()
{
error_log(var_export(post(), true));
$f = Carbon::createFromDate(post('year'), post('month'), post('day'), config('app.timezone'));
$t = Carbon::today(config('app.timezone'));
$uf = uf($f);
error_log(var_export($uf, true));
$calle = trim(post('calle'));
$numero = post('numero');
$extra = trim(post('extra'));
$comuna = post('comuna');
$direccion = model(Direccion::class)
->where('calle', $calle)
->where('numero', $numero)
->where('extra', $extra)
->where('comuna', $comuna)
->where('calle', $calle)
->where('numero', $numero)
->where('extra', $extra)
->where('comuna', $comuna)
->findOne();
if (!$direccion) {
$direccion = model(Direccion::class)->create();