Compare commits
2 Commits
92afe58e66
...
36abab1280
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36abab1280 | ||
|
|
7818d1677b |
@@ -156,6 +156,7 @@
|
|||||||
'description' => $this->generateNarrative($item),
|
'description' => $this->generateNarrative($item),
|
||||||
'end_balance' => $runningBalance,
|
'end_balance' => $runningBalance,
|
||||||
'actual_date' => $actualDate,
|
'actual_date' => $actualDate,
|
||||||
|
'recipt_no' => $item->ft?->recipt_no ?? '-',
|
||||||
'created_at' => now(),
|
'created_at' => now(),
|
||||||
'updated_at' => now(),
|
'updated_at' => now(),
|
||||||
];
|
];
|
||||||
@@ -242,9 +243,9 @@
|
|||||||
$narr[] = $item->narrative;
|
$narr[] = $item->narrative;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($item->ft?->recipt_no) {
|
/*if ($item->ft?->recipt_no) {
|
||||||
$narr[] = 'Receipt No: ' . $item->ft->recipt_no;
|
$narr[] = 'Receipt No: ' . $item->ft->recipt_no;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return implode(' ', array_filter($narr));
|
return implode(' ', array_filter($narr));
|
||||||
}
|
}
|
||||||
@@ -404,7 +405,7 @@
|
|||||||
Storage::disk($this->disk)->delete($filePath);
|
Storage::disk($this->disk)->delete($filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$csvContent = "NO|TRANSACTION.DATE|REFERENCE.NUMBER|TRANSACTION.AMOUNT|TRANSACTION.TYPE|DESCRIPTION|END.BALANCE|ACTUAL.DATE\n";
|
$csvContent = "NO|TRANSACTION.DATE|REFERENCE.NUMBER|TRANSACTION.AMOUNT|TRANSACTION.TYPE|DESCRIPTION|END.BALANCE|ACTUAL.DATE|NO.RECEIPT\n";
|
||||||
|
|
||||||
// Ambil data yang sudah diproses dalam chunk untuk mengurangi penggunaan memori
|
// Ambil data yang sudah diproses dalam chunk untuk mengurangi penggunaan memori
|
||||||
ProcessedStatement::where('account_number', $this->account_number)
|
ProcessedStatement::where('account_number', $this->account_number)
|
||||||
@@ -420,7 +421,8 @@
|
|||||||
$statement->transaction_type,
|
$statement->transaction_type,
|
||||||
$statement->description,
|
$statement->description,
|
||||||
$statement->end_balance,
|
$statement->end_balance,
|
||||||
$statement->actual_date
|
$statement->actual_date,
|
||||||
|
$statement->recipt_no
|
||||||
]) . "\n";
|
]) . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
'transaction_type',
|
'transaction_type',
|
||||||
'description',
|
'description',
|
||||||
'end_balance',
|
'end_balance',
|
||||||
'actual_date'
|
'actual_date',
|
||||||
|
'recipt_no'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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('recipt_no')->nullable()->after('reference_number');
|
||||||
|
|
||||||
|
// Menambahkan index untuk field no_receipt jika diperlukan untuk pencarian
|
||||||
|
$table->index('recipt_no');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('processed_statements', function (Blueprint $table) {
|
||||||
|
$table->dropIndex(['recipt_no']);
|
||||||
|
$table->dropColumn('recipt_no');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user