Skip to content

Commit

Permalink
added: revenue, product, inventory, and payment report
Browse files Browse the repository at this point in the history
  • Loading branch information
gieart87 committed Jun 14, 2020
1 parent e4c5354 commit bd61c7e
Show file tree
Hide file tree
Showing 24 changed files with 1,944 additions and 21 deletions.
39 changes: 39 additions & 0 deletions app/Exports/ReportInventoryExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Exports;

use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;

class ReportInventoryExport implements FromView
{

private $_results;

/**
* Create a new exporter instance.
*
* @param array $results query result
*
* @return void
*/
public function __construct($results)
{
$this->_results = $results;
}

/**
* Load the view.
*
* @return void
*/
public function view(): View
{
return view(
'admin.reports.exports.inventory_xlsx',
[
'products' => $this->_results,
]
);
}
}
39 changes: 39 additions & 0 deletions app/Exports/ReportPaymentExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Exports;

use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;

class ReportPaymentExport implements FromView
{

private $_results;

/**
* Create a new exporter instance.
*
* @param array $results query result
*
* @return void
*/
public function __construct($results)
{
$this->_results = $results;
}

/**
* Load the view.
*
* @return void
*/
public function view(): View
{
return view(
'admin.reports.exports.payment_xlsx',
[
'payments' => $this->_results,
]
);
}
}
39 changes: 39 additions & 0 deletions app/Exports/ReportProductExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Exports;

use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;

class ReportProductExport implements FromView
{

private $_results;

/**
* Create a new exporter instance.
*
* @param array $results query result
*
* @return void
*/
public function __construct($results)
{
$this->_results = $results;
}

/**
* Load the view.
*
* @return void
*/
public function view(): View
{
return view(
'admin.reports.exports.product_xlsx',
[
'products' => $this->_results,
]
);
}
}
39 changes: 39 additions & 0 deletions app/Exports/ReportRevenueExport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Exports;

use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;

class ReportRevenueExport implements FromView
{

private $_results;

/**
* Create a new exporter instance.
*
* @param array $results query result
*
* @return void
*/
public function __construct($results)
{
$this->_results = $results;
}

/**
* Load the view.
*
* @return void
*/
public function view(): View
{
return view(
'admin.reports.exports.revenue_xlsx',
[
'revenues' => $this->_results,
]
);
}
}
Loading

0 comments on commit bd61c7e

Please sign in to comment.