mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-25 15:34:02 +00:00
add customisation for suppliers pi export
This commit is contained in:
+12
-2
@@ -252,8 +252,18 @@ Route::get('/transactions/supplier/{id}/mock_up', 'Transactions\DownloadMockUpWh
|
||||
|
||||
Route::get('/notifications/list', 'Notifications\ListNotificationsController@list')->name('notifications.list');
|
||||
|
||||
Route::get('/supplier/pi/export', function(){
|
||||
$groups = \App\Models\Group::where('issuer', 2729)->whereMonth('created_at', 9)->whereYear('created_at', 2022)->get();
|
||||
Route::get('/supplier/pi/export/{month}/{year}/{?id}', function($month, $year, $id){
|
||||
|
||||
if(!$id){
|
||||
foreach (Company::where('business_type', \App\Classes\ValueObjects\Constants\BusinessType::CURRENCY_VENDOR) as $supplier) {
|
||||
echo '<a href="/supplier/pi/export/'.$month.'/'.$year.'/'.$supplier->id.'"><p>'.$supplier->name.'</p></a>';
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
echo '<a href="/supplier/pi/export/'.$month.'/'.$year.'"><p>Back to suppliers list</p></a>';
|
||||
|
||||
$groups = \App\Models\Group::where('issuer', $id)->whereMonth('created_at', $month)->whereYear('created_at', $year)->get();
|
||||
|
||||
echo '<table>';
|
||||
$i = 0;
|
||||
|
||||
Reference in New Issue
Block a user