diff --git a/app/Http/Controllers/SerahanController.php b/app/Http/Controllers/SerahanController.php
index 74b5ceff..c7862f93 100644
--- a/app/Http/Controllers/SerahanController.php
+++ b/app/Http/Controllers/SerahanController.php
@@ -27,6 +27,8 @@ use App\Models\LelongBid;
use App\Models\LelongBidMarhun;
use App\Models\LelKarat;
+use App\Models\Payment;
+
class SerahanController extends Controller
{
/**
@@ -44,19 +46,49 @@ class SerahanController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function pembayaran()
+
+
+
+
+ public function pembayaran()
{
- $lelong = Lelong::all();
- return view('serahan.pembayaran',compact('lelong'));
+ $payment= Payment::join('lelongbidder','payment.user_id','=','lelongbidder.user_id')
+ ->join('users','payment.user_id','=','users.id')
+ ->join('lelongbid','payment.lelongbid_id','=','lelongbid.id')
+
+ ->get();
+ // dd($payment);
+ return view('serahan.pembayaran',compact('payment'));
}
- public function penyatabayaran(Request $request)
+
+ public function penyatabayaran($user_id)
{
- $pdf = PDF::loadView('pdf.penyatabayaran')->setPaper('a4', 'landscape');
+ // dd($norujukan);
+ // $payment_id = $request->paymentid;
+ $pembida= User::where('id','=',$user_id)
+ ->first();
+
+ $payment= Payment::join('lelongbidder','payment.user_id','=','lelongbidder.user_id')
+ ->join('users','payment.user_id','=','users.id')
+ ->join('lelongbid','payment.lelongbid_id','=','lelongbid.id')
+ ->where('lelongbidder.user_id','=',$user_id)
+ ->where('lelongbidder.status_bidder','=','1')
+ ->get();
+ // dd($payment);
+ $pdf = PDF::loadView('pdf.penyatabayaran',compact('payment','pembida'))
+ ->setPaper('a4', 'landscape');
return $pdf->download('Penyata Bayaran.pdf');
}
+
+
+
+
+
+
+
public function resitpembayaran(Request $request)
{
$pdf = PDF::loadView('pdf.resitpembayaran')->setPaper('a4', 'landscape');
diff --git a/database/migrations/2021_12_13_053311_create_cawangans_table.php b/database/migrations/2021_12_13_053311_create_cawangans_table.php
index 00ac113d..f369b89b 100644
--- a/database/migrations/2021_12_13_053311_create_cawangans_table.php
+++ b/database/migrations/2021_12_13_053311_create_cawangans_table.php
@@ -33,10 +33,60 @@ class CreateCawangansTable extends Migration
$table->timestamps();
});
+ Schema::create('customer', function (Blueprint $table) {
+ $table->bigIncrements('id');
+ $table->string('ahli')->nullable();
+ $table->string('kodcaw')->nullable();
+ $table->integer('nosiri')->nullable();
+ $table->date('tarikhdaftar')->nullable();
+ $table->string('nopelanggan');
+ $table->string('kplama')->nullable();
+ $table->string('kpbaru')->nullable();
+ $table->string('nama')->nullable();
+ $table->date('t_lahir')->nullable();
+ $table->string('jantina')->nullable();
+ $table->string('alamat1')->nullable();
+ $table->string('alamat2')->nullable();
+ $table->string('alamat3')->nullable();
+ $table->string('alamat4')->nullable();
+ $table->string('poskod')->nullable();
+ $table->integer('koddaerah')->nullable();
+ $table->string('kodnegeri')->nullable();
+ $table->string('telefon')->nullable();
+ $table->decimal('jumpinjaman', $precision = 9, $scale = 2)->nullable();
+ $table->date('t_gadai')->nullable();
+ $table->decimal('pinjamhari', $precision = 9, $scale = 2)->nullable();
+ $table->string('bumiputra')->nullable();
+ $table->string('warganegara')->nullable();
+ $table->string('bangsa')->nullable();
+ $table->string('kodkerja')->nullable();
+ $table->string('kodugama')->nullable();
+ $table->string('kodstatus')->nullable();
+ $table->string('kodbank')->nullable();
+ $table->string('noakaun')->nullable();
+ $table->string('nota')->nullable();
+ $table->string('teller')->nullable();
+ $table->string('pelulus')->nullable();
+ $table->date('t_ubah')->nullable();
+ $table->time('m_ubah')->nullable();
+ $table->string('aktif')->nullable();
+ $table->decimal('yuranahli', $precision = 5, $scale = 2)->nullable();
+ $table->string('nopelangganlama')->nullable();
+ $table->string('tujuangadai')->nullable();
+ $table->string('kodkerjabaru')->nullable();
+ $table->string('tagperingatan')->nullable();
+ $table->string('namateller')->nullable();
+ $table->integer('kumpulan')->nullable();
+ $table->string('telefon2')->nullable();
+ $table->string('tagpelanggan')->nullable();
+ });
+
+
Schema::create('gadai', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('kodcaw');
$table->string('norujukan');
+ $table->string('nokp');
$table->decimal('jbg', $precision = 7, $scale = 2);
$table->decimal('kadarupah', $precision = 5, $scale = 2)->nullable();
$table->decimal('upahsimpan', $precision = 11, $scale = 2)->nullable();
diff --git a/resources/views/pdf/penyatabayaran.blade.php b/resources/views/pdf/penyatabayaran.blade.php
index d9623b8b..c8fe7a88 100644
--- a/resources/views/pdf/penyatabayaran.blade.php
+++ b/resources/views/pdf/penyatabayaran.blade.php
@@ -1,188 +1,136 @@
-
-
-
- | Ar-Rahn Kota Belud |
- Invois |
-
-
- | Ground Floor, Lot 11, KKMP |
- No.Invois: :0002588 |
-
-
- | Kota Belud, Sabah. |
- Tarikh: 30/08/2021 |
-
-
- | Tel : 088-979599 |
- |
-
-
- | Faks : 088-255026 |
- Cawangan : Ar-Rahn Kota Belud |
-
-
-
-
-
- |
-
-
- | |
-
-
-
-
- | Nama |
- : |
- MOHD SAID BIN TAIB |
-
-
- | No.K/P |
- : |
- 830519125399 |
-
-
- | Alamat |
- : |
- KAMPUNG TAMAU KOTA BELUD |
-
-
- | No.Telefon |
- : |
- 0193749495 |
-
-
+ #marhun {
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+ font-size:11px;
+ border-collapse: collapse;
+ width: 100%;
+ }
+
+ #marhun td, #marhun th {
+ border: 0px solid;
+ padding: 1px;
+
+ }
+
+
+ #marhun th {
+
+ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+
+ }
+
+
+
+
+
+
+
+
+ | Ar-Rahn Kota Belud |
+ Invois |
+
+
+ | Ground Floor, Lot 11, KKMP |
+ No.Invois: :0002588 |
+
+
+ | Kota Belud, Sabah. |
+ Tarikh: 30/08/2021 |
+
+
+ | Tel : 088-979599 |
+ |
+
+
+ | Faks : 088-255026 |
+ Cawangan : Ar-Rahn Kota Belud |
+
+
+
-
- PENYATA BAYARAN LELONGAN
-
-
+
- | Bil |
- No. Rujukan |
- Jenis Barang |
- Berat(g) |
- Harga Bidaan(RM) |
-
-
-
+ |
+
- | 1. |
- 011232200714-0049 |
- 1- Cincin |
- 1.53 |
- 346.00 |
+ |
- | 2. |
- 011232200723-0039 |
- 1- Cincin |
- 2.90 |
- 647.00 |
+
+
+ | Nama |
+ : |
+ {{ $pembida['name'] }} |
- | Jumlah Bayaran |
- 4.43 |
- 993.00 |
+ No.K/P |
+ : |
+ {{$pembida['nokp']}} |
-
+
+ | Alamat |
+ : |
+ {{$pembida['alamat']}} |
+
+
+ | No.Telefon |
+ : |
+ {{$pembida['notelbimbit']}} |
+
+
-
-
-
-
- SENARAI BAYARAN MENGIKUT AKAUN
+
+ PENYATA BAYARAN LELONGAN
-
-
- | Bil |
- Cawangan |
- Berat(g) |
- Harga Jual(RM) |
- Nama Bank |
- Pemegang Akaun |
- No.Akaun |
-
-
-
-
- | 1. |
- Ar-Rahn Kota Belud |
- 4.43 |
- 993.00 |
- Bank Muamalat Malaysia Berhad |
- Joint Venture MVSB and PKB-Kota Belud |
- 0301-0006119-71-3 |
-
-
-
-
-
- | Jumlah Bayaran |
- 993.00 |
- |
-
-
-
- *Sila Buat Pembayaran Mengikut Akaun |
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ | Bil |
+ No. Rujukan |
+ Jenis Barang |
+ Berat(g) |
+ Harga Bidaan(RM) |
+
+
+ @foreach ($payment as $index=>$info)
+
+ | {{$index+1}} |
+ {{$info['norujukan']}} |
+ {{$info['marhun']}} |
+ {{ number_format($info['berat'], 2, '.', ',') }} |
+ {{ number_format($info['hargajual'], 2, '.', ',') }} |
+
+
+
+ @endforeach
+
+
+
+
+
+
diff --git a/resources/views/serahan/pembayaran.blade.php b/resources/views/serahan/pembayaran.blade.php
index 51d431e5..44e45019 100644
--- a/resources/views/serahan/pembayaran.blade.php
+++ b/resources/views/serahan/pembayaran.blade.php
@@ -13,6 +13,7 @@