Log agregar Venta
This commit is contained in:
@ -120,19 +120,21 @@ class Ventas
|
|||||||
}
|
}
|
||||||
public static function agregar()
|
public static function agregar()
|
||||||
{
|
{
|
||||||
|
error_log(var_export(post(), true));
|
||||||
$f = Carbon::createFromDate(post('year'), post('month'), post('day'), config('app.timezone'));
|
$f = Carbon::createFromDate(post('year'), post('month'), post('day'), config('app.timezone'));
|
||||||
$t = Carbon::today(config('app.timezone'));
|
$t = Carbon::today(config('app.timezone'));
|
||||||
$uf = uf($f);
|
$uf = uf($f);
|
||||||
|
error_log(var_export($uf, true));
|
||||||
|
|
||||||
$calle = trim(post('calle'));
|
$calle = trim(post('calle'));
|
||||||
$numero = post('numero');
|
$numero = post('numero');
|
||||||
$extra = trim(post('extra'));
|
$extra = trim(post('extra'));
|
||||||
$comuna = post('comuna');
|
$comuna = post('comuna');
|
||||||
$direccion = model(Direccion::class)
|
$direccion = model(Direccion::class)
|
||||||
->where('calle', $calle)
|
->where('calle', $calle)
|
||||||
->where('numero', $numero)
|
->where('numero', $numero)
|
||||||
->where('extra', $extra)
|
->where('extra', $extra)
|
||||||
->where('comuna', $comuna)
|
->where('comuna', $comuna)
|
||||||
->findOne();
|
->findOne();
|
||||||
if (!$direccion) {
|
if (!$direccion) {
|
||||||
$direccion = model(Direccion::class)->create();
|
$direccion = model(Direccion::class)->create();
|
||||||
|
Reference in New Issue
Block a user