Perbaikan P1 Remunerasi
This commit is contained in:
@@ -11,9 +11,13 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::connection('pgsql')->table('rekapitulasi.p1', function (Blueprint $table) {
|
||||
$table->string('jenis_pegawai')->nullable()->after('nama');
|
||||
});
|
||||
$schema = Schema::connection('pgsql');
|
||||
|
||||
if (! $schema->hasColumn('rekapitulasi.p1', 'jenis_pegawai')) {
|
||||
$schema->table('rekapitulasi.p1', function (Blueprint $table) {
|
||||
$table->string('jenis_pegawai')->nullable()->after('nama');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,8 +25,12 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::connection('pgsql')->table('rekapitulasi.p1', function (Blueprint $table) {
|
||||
$table->dropColumn('jenis_pegawai');
|
||||
});
|
||||
$schema = Schema::connection('pgsql');
|
||||
|
||||
if ($schema->hasColumn('rekapitulasi.p1', 'jenis_pegawai')) {
|
||||
$schema->table('rekapitulasi.p1', function (Blueprint $table) {
|
||||
$table->dropColumn('jenis_pegawai');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('rekapitulasi.p1_selisih', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('tahun');
|
||||
$table->integer('bulan');
|
||||
$table->string('nip');
|
||||
$table->string('nama');
|
||||
$table->string('jenis_pegawai')->nullable();
|
||||
$table->integer('id_unit_kerja');
|
||||
$table->string('nama_unit_kerja');
|
||||
$table->integer('id_unit_pembayaran');
|
||||
$table->string('pangkat')->nullable();
|
||||
$table->string('golongan')->nullable();
|
||||
$table->string('nama_jabatan_fungsional')->nullable();
|
||||
$table->string('grade_jabatan_fungsional')->nullable();
|
||||
$table->decimal('gaji_jabatan_fungsional', 16, 2)->nullable();
|
||||
$table->string('nama_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('grade_jabatan_tugas_tambahan')->nullable();
|
||||
$table->decimal('gaji_jabatan_tugas_tambahan', 16, 2)->nullable();
|
||||
$table->decimal('selisih_bruto', 16, 2)->default(0);
|
||||
$table->decimal('selisih_pajak', 16, 2)->default(0);
|
||||
$table->decimal('selisih_netto', 16, 2)->default(0);
|
||||
$table->string('keterangan')->nullable();
|
||||
$table->string('npwp')->nullable();
|
||||
$table->string('nomor_rekening')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['tahun', 'bulan', 'nip', 'id_unit_pembayaran']);
|
||||
$table->index(['tahun', 'bulan', 'id_unit_pembayaran']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('rekapitulasi.p1_selisih');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user