feat(webstatement): tambah field no_receipt pada processed_statements
Perubahan yang dilakukan: - Menambahkan field no_receipt pada tabel processed_statements melalui migrasi baru. - Menambahkan no_receipt ke dalam fillable array di model ProcessedStatement. - Mengintegrasikan field recipt_no dari relasi ft ke dalam data yang disimpan di processed_statements. - Menambahkan kolom NO.RECEIPT pada header CSV export statement. - Menyertakan data recipt_no ke dalam output CSV export statement. - Mengomentari kode yang sebelumnya menambahkan receipt number ke narrative description untuk menghindari duplikasi. - Menggunakan nilai default '-' jika recipt_no tidak tersedia. File yang dimodifikasi: - app/Jobs/ExportStatementJob.php: Menambahkan mapping recipt_no ke no_receipt, update header CSV, dan menyertakan data dalam export. - app/Models/ProcessedStatement.php: Menambahkan no_receipt ke fillable fields. - Modules/Webstatement/database/migrations/2025_07_14_022029_add_no_receipt_to_processed_statements_table.php: Menambahkan kolom no_receipt di database. Tujuan perubahan: - Memisahkan nomor receipt transaksi dari narrative description untuk kemudahan pelaporan dan audit. - Memberikan fleksibilitas lebih dalam pengolahan data statement, khususnya untuk kebutuhan export dan compliance.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('processed_statements', function (Blueprint $table) {
|
||||
$table->string('no_receipt')->nullable()->after('reference_number');
|
||||
|
||||
// Menambahkan index untuk field no_receipt jika diperlukan untuk pencarian
|
||||
$table->index('no_receipt');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('processed_statements', function (Blueprint $table) {
|
||||
$table->dropIndex(['no_receipt']);
|
||||
$table->dropColumn('no_receipt');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user