diff --git a/Modules/Murid/Resources/views/pembayaran/edit.blade.php b/Modules/Murid/Resources/views/pembayaran/edit.blade.php index 35d793f..db0acf6 100644 --- a/Modules/Murid/Resources/views/pembayaran/edit.blade.php +++ b/Modules/Murid/Resources/views/pembayaran/edit.blade.php @@ -126,9 +126,14 @@
+ @php + $p = new NumberFormatter("id", NumberFormatter::SPELLOUT); + $result = preg_replace("/\..+/", "", $payment->amount); + @endphp Jumlah : Rp {{number_format($payment->amount)}} + {{ ucwords($p->format($result))}} Rupiah diff --git a/Modules/PPDB/Http/Controllers/DataMuridController.php b/Modules/PPDB/Http/Controllers/DataMuridController.php index ac8c120..967e3e2 100644 --- a/Modules/PPDB/Http/Controllers/DataMuridController.php +++ b/Modules/PPDB/Http/Controllers/DataMuridController.php @@ -151,14 +151,15 @@ public function payment($murid) ]); if ($payment) { - DetailPaymentSpp::create([ - 'payment_id' => $payment->id, - 'user_id' => $murid, - 'month' => date('F'), - 'amount' => 300000, - 'status' => 'unpaid', - 'file' => null, - ]); + $generate = rand(10,100); + DetailPaymentSpp::create([ + 'payment_id' => $payment->id, + 'user_id' => $murid, + 'month' => date('F'), + 'amount' => 300 .$murid .$generate, + 'status' => 'unpaid', + 'file' => null, + ]); } DB::commit(); } catch (\ErrorException $e) {