⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.113
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
vhosts
/
raqmix.net
/
testpos.raqmix.net
/
app
/
View File Name :
TransactionPayment.php
belongsTo(\App\Account::class, 'account_id'); } /** * Get the transaction related to this payment. */ public function transaction() { return $this->belongsTo(\App\Transaction::class, 'transaction_id'); } /** * Get the user. */ public function created_user() { return $this->belongsTo(\App\User::class, 'created_by'); } /** * Get child payments */ public function child_payments() { return $this->hasMany(\App\TransactionPayment::class, 'parent_id'); } /** * Retrieves documents path if exists */ public function getDocumentPathAttribute() { $path = ! empty($this->document) ? asset('/uploads/documents/'.$this->document) : null; return $path; } /** * Removes timestamp from document name */ public function getDocumentNameAttribute() { $document_name = ! empty(explode('_', $this->document, 2)[1]) ? explode('_', $this->document, 2)[1] : $this->document; return $document_name; } public static function deletePayment($payment) { //Update parent payment if exists if (! empty($payment->parent_id)) { $parent_payment = TransactionPayment::find($payment->parent_id); $parent_payment->amount -= $payment->amount; if ($parent_payment->amount <= 0) { $parent_payment->delete(); event(new TransactionPaymentDeleted($parent_payment)); } else { $parent_payment->save(); //Add event to update parent payment account transaction event(new TransactionPaymentUpdated($parent_payment, null)); } } $payment->delete(); $transactionUtil = new \App\Utils\TransactionUtil(); if (! empty($payment->transaction_id)) { //update payment status $transaction = $payment->load('transaction')->transaction; $transaction_before = $transaction->replicate(); $payment_status = $transactionUtil->updatePaymentStatus($payment->transaction_id); $transaction->payment_status = $payment_status; $transactionUtil->activityLog($transaction, 'payment_edited', $transaction_before); } $log_properities = [ 'id' => $payment->id, 'ref_no' => $payment->payment_ref_no, ]; $transactionUtil->activityLog($payment, 'payment_deleted', null, $log_properities); //Add event to delete account transaction event(new TransactionPaymentDeleted($payment)); } public function denominations() { return $this->morphMany(\App\CashDenomination::class, 'model'); } }