app/Services/TransactionServices.php
/**
     * Logs transactions entry at the time of member registration and for payments from Admin UI
     * @param $request
     * @param Account $account
     * @param Billing $bill
     * @return mixed
     */
Logs transactions entry at the time of member registration and for payments from Admin UI
@param $request
@param Account $account
@param Billing $bill
@return mixed
Logs transactions entry at the time of member registration and for payments from Admin UI @param $request @param Account $account @param Billing $bill @return mixed
public static function  logUITransaction(
        $request,
        $accountID,
        $billID,
        $paymentRequest = false
    ) {
        $todaysDate = Carbon::now()->toDateString();
        $receiptNumber = self::generateReceiptNumber();
        $finanicalYear = CommonServices::getFinancialYear();
        if ($paymentRequest) {
            $transactionComment = "Payment received by " . Auth::user()->name;
        } else {
            $transactionComment = $request->transaction_comment;
        }
        return Transaction::create([
            "receipt_number" => $receiptNumber,
            "account_id" => $accountID,
            "bill_id" => $billID,
            "transaction_mode" => $request->mode,
            "transaction_type" => $request->transaction_type,
            "transaction_date" => $todaysDate,
            "transaction_amount" => $request->payment_amount,
            "due_amount_before_transaction" => $request->payable_amount,
            "due_amount_after_transaction" => $request->pending_amount,
            "transaction_comment" => $transactionComment,
            "financial_year" => $finanicalYear,
        ]);
    }
public static function logUITransaction ( $ request , $ accountID , $ billID , $ paymentRequest = false ) { $ todaysDate = Carbon :: now ( ) -> toDateString ( ) ; $ receiptNumber = self :: generateReceiptNumber ( ) ; $ finanicalYear = CommonServices :: getFinancialYear ( ) ; if ( $ paymentRequest ) { $ transactionComment = " Payment received by  " . Auth :: user ( ) -> name ; } else { $ transactionComment = $ request -> transaction_comment ; } return Transaction :: create ( [ " receipt_number " => $ receiptNumber , " account_id " => $ accountID , " bill_id " => $ billID , " transaction_mode " => $ request -> mode , " transaction_type " => $ request -> transaction_type , " transaction_date " => $ todaysDate , " transaction_amount " => $ request -> payment_amount , " due_amount_before_transaction " => $ request -> payable_amount , " due_amount_after_transaction " => $ request -> pending_amount , " transaction_comment " => $ transactionComment , " financial_year " => $ finanicalYear , ] ) ; }
Logs transactions entry at the time of member registration and for payments from Admin UI
 @param $request
 @param Account $account
 @param Billing $bill
 @return mixed
Logs transactions entry at the time of member registration and for payments from Admin UI @param $request @param Account $account @param Billing $bill @return mixed
// request coming for making a payment