Commit 2bd9741e by Azhan Hannan

Laporan by project -> hide/ remove PD

Tambah column mandays hours dgn days dalam table project & migration
parent 130a0ab5
...@@ -87,12 +87,14 @@ class ProjectExport implements FromView, ShouldAutoSize, WithColumnWidths, WithS ...@@ -87,12 +87,14 @@ class ProjectExport implements FromView, ShouldAutoSize, WithColumnWidths, WithS
->first(), ->first(),
'pteam' => VwProject::where('pid', $project) 'pteam' => VwProject::where('pid', $project)
->where('roleid', '<>', '7')
->orderby('roleid') ->orderby('roleid')
->get(), ->get(),
'ptdetail' => VwProject::where('pid', $project) 'ptdetail' => VwProject::where('pid', $project)
->where('MONTH', $month) ->where('MONTH', $month)
->where('year', $year) ->where('year', $year)
->where('roleid', '<>', '7')
->orderby('roleid') ->orderby('roleid')
->get() ->get()
......
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddColumnMandaysInTableProject extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('project', function (Blueprint $table) {
$table->double('p_total_hours', 10, 2)->after('p_project_type')->unsigned()->nullable();
$table->double('p_total_days', 10, 2)->after('p_total_hours')->unsigned()->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('project', function (Blueprint $table) {
$table->dropColumn('p_total_hours');
$table->dropColumn('p_total_days');
});
}
}
...@@ -66,7 +66,7 @@ class ExportController extends Controller ...@@ -66,7 +66,7 @@ class ExportController extends Controller
$month = date('F', mktime(0,0,0,$request->month, 1, date('Y'))); $month = date('F', mktime(0,0,0,$request->month, 1, date('Y')));
$year = strval($request->year); $year = strval($request->year);
$pdetail = VwProject::where('pid', $request->pid) $pdetail = VwProject::where('pid', $request->pid)
->first(); ->first();
return (new ProjectExport( return (new ProjectExport(
......
...@@ -122,12 +122,14 @@ class ReportController extends Controller ...@@ -122,12 +122,14 @@ class ReportController extends Controller
->first(); ->first();
$pteam = VwProject::where('pid', $request->project) $pteam = VwProject::where('pid', $request->project)
->where('roleid', '<>', '7')
->orderby('roleid') ->orderby('roleid')
->get(); ->get();
$ptdetail = VwProject::where('pid', $request->project) $ptdetail = VwProject::where('pid', $request->project)
->where('MONTH', $request->month) ->where('MONTH', $request->month)
->where('year', $request->year) ->where('year', $request->year)
->where('roleid', '<>', '7')
->orderby('roleid') ->orderby('roleid')
->get(); ->get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment