-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added: revenue, product, inventory, and payment report
- Loading branch information
Showing
24 changed files
with
1,944 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
] | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
] | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
] | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
] | ||
); | ||
} | ||
} |
Oops, something went wrong.