Finalizacion de la primera version del proyecto
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
namespace App\Exports;
|
||||
|
||||
use App\Invoice;
|
||||
use App\Models\Venta;
|
||||
use App\Models\Movimiento;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromCollection;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
@@ -19,14 +19,14 @@ class VentasExport implements FromView{
|
||||
|
||||
public function collection()
|
||||
{
|
||||
return Venta::select(
|
||||
return Movimiento::select(
|
||||
'codigo',
|
||||
'pago_efectivo',
|
||||
'pago_tarjeta_debito',
|
||||
'pago_tarjeta_credito',
|
||||
'pago_vales',
|
||||
'precio_venta',
|
||||
'estado_venta_id as tipo_venta',
|
||||
'estado_venta_id as tipo_movimiento',
|
||||
'user_id as usuario',
|
||||
)->get();
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class VentasExport implements FromView{
|
||||
public function view(): View
|
||||
{
|
||||
return view('export.reporteExport',[
|
||||
'ventas' => Venta::whereBetween('created_at',[$this->fecha_inicio,$this->fecha_final])->get(),
|
||||
'movimientos' => Movimiento::whereBetween('created_at',[$this->fecha_inicio,$this->fecha_final])->get(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user