Compare commits
No commits in common. "5cc5bd193842255cc300b6be6948bd809254e10b" and "d65f1bda1fb8116a90bd94679407b3bbde1e674e" have entirely different histories.
5cc5bd1938
...
d65f1bda1f
@ -58,7 +58,7 @@ class Dashboard extends \Filament\Pages\Dashboard implements HasForms, HasAction
|
|||||||
|
|
||||||
public function printTrendPasienAction(): Action
|
public function printTrendPasienAction(): Action
|
||||||
{
|
{
|
||||||
$original_date = $this->data['filtering_date'];
|
$filtering_date = $this->data['filtering_date'];
|
||||||
if ($this->data['filtering_date']) {
|
if ($this->data['filtering_date']) {
|
||||||
$filtering_date = explode(' - ', $this->data['filtering_date']);
|
$filtering_date = explode(' - ', $this->data['filtering_date']);
|
||||||
$start_date = $filtering_date[0];
|
$start_date = $filtering_date[0];
|
||||||
@ -86,11 +86,11 @@ class Dashboard extends \Filament\Pages\Dashboard implements HasForms, HasAction
|
|||||||
->scale(2)
|
->scale(2)
|
||||||
->print() // Enable print option
|
->print() // Enable print option
|
||||||
->preview()
|
->preview()
|
||||||
->filename(function ($record) use ($original_date) {
|
->filename(function ($record) use ($filtering_date) {
|
||||||
return 'trends-pasien.pdf';
|
return 'trends-pasien.pdf';
|
||||||
})
|
})
|
||||||
->content(function ($record) use ($data, $original_date) {
|
->content(function ($record) use ($data, $filtering_date) {
|
||||||
return view('components.pdf.trends-pasien', ['pasien' => $data, 'filtering_date' => $original_date]);
|
return view('components.pdf.trends-pasien', ['pasien' => $data, 'filtering_date' => $filtering_date]);
|
||||||
})
|
})
|
||||||
->savePdf() // Enable save as PDF option
|
->savePdf() // Enable save as PDF option
|
||||||
->requiresConfirmation() // Show confirmation modal
|
->requiresConfirmation() // Show confirmation modal
|
||||||
@ -103,7 +103,7 @@ class Dashboard extends \Filament\Pages\Dashboard implements HasForms, HasAction
|
|||||||
|
|
||||||
public function printTrendPendapatanAction(): Action
|
public function printTrendPendapatanAction(): Action
|
||||||
{
|
{
|
||||||
$original_date = $this->data['filtering_date'];
|
$filtering_date = $this->data['filtering_date'];
|
||||||
if ($this->data['filtering_date']) {
|
if ($this->data['filtering_date']) {
|
||||||
$filtering_date = explode(' - ', $this->data['filtering_date']);
|
$filtering_date = explode(' - ', $this->data['filtering_date']);
|
||||||
$start_date = $filtering_date[0];
|
$start_date = $filtering_date[0];
|
||||||
@ -128,11 +128,11 @@ class Dashboard extends \Filament\Pages\Dashboard implements HasForms, HasAction
|
|||||||
->scale(2)
|
->scale(2)
|
||||||
->print()
|
->print()
|
||||||
->preview()
|
->preview()
|
||||||
->filename(function ($record) use ($original_date) {
|
->filename(function ($record) use ($filtering_date) {
|
||||||
return 'trends-pendapatan.pdf';
|
return 'trends-pendapatan.pdf';
|
||||||
})
|
})
|
||||||
->content(function ($record) use ($data, $original_date) {
|
->content(function ($record) use ($data, $filtering_date) {
|
||||||
return view('components.pdf.trends-pendapatan', ['pendapatans' => $data, 'filtering_date' => $original_date]);
|
return view('components.pdf.trends-pendapatan', ['pendapatans' => $data, 'filtering_date' => $filtering_date]);
|
||||||
})
|
})
|
||||||
->savePdf() // Enable save as PDF option
|
->savePdf() // Enable save as PDF option
|
||||||
->requiresConfirmation() // Show confirmation modal
|
->requiresConfirmation() // Show confirmation modal
|
||||||
|
|||||||
35
database/migrations/2025_04_26_072520_tr_pembayaran.php
Normal file
35
database/migrations/2025_04_26_072520_tr_pembayaran.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?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::create('tr_pembayaran', function (Blueprint $table) {
|
||||||
|
$table->id('id_pembayaran');
|
||||||
|
$table->string('id_registrasi');
|
||||||
|
$table->date('tgl_pembayaran');
|
||||||
|
$table->decimal('total_tagihan', 12, 2);
|
||||||
|
$table->decimal('jumlah_bayar', 12, 2);
|
||||||
|
$table->enum('metode_pembayaran', ['cash', 'asuransi', 'transfer']);
|
||||||
|
$table->text('keterangan')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('id_registrasi')->references('id_registrasi')->on('tr_registrasi');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('tr_pembayaran');
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -43,22 +43,12 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@php
|
|
||||||
$total_pasien = 0;
|
|
||||||
@endphp
|
|
||||||
@foreach ($pasien as $tanggal => $jumlah)
|
@foreach ($pasien as $tanggal => $jumlah)
|
||||||
@php
|
|
||||||
$total_pasien += $jumlah;
|
|
||||||
@endphp
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $tanggal }}</td>
|
<td>{{ $tanggal }}</td>
|
||||||
<td>{{ $jumlah }}</td>
|
<td>{{ $jumlah }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
<tr>
|
|
||||||
<td colspan="1">Total Pasien</td>
|
|
||||||
<td>{{ $total_pasien }}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user