Log agregar Venta
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user