app/Utils/TransactionUtil.php
/**
     * Edit transaction payment line
     *
     * @param array $product
     *
     * @return boolean
     */
Edit transaction payment line
@param array $product

@return boolean
Edit transaction payment line @param array $product @return boolean
public function editPaymentLine($payment, $transaction = null, $uf_data = true)
    {
        $payment_id = $payment['payment_id'];
        unset($payment['payment_id']);
        if ($payment['method'] == 'custom_pay_1') {
            $payment['transaction_no'] = $payment['transaction_no_1'];
        } elseif ($payment['method'] == 'custom_pay_2') {
            $payment['transaction_no'] = $payment['transaction_no_2'];
        } elseif ($payment['method'] == 'custom_pay_3') {
            $payment['transaction_no'] = $payment['transaction_no_3'];
        }
        unset($payment['transaction_no_1'], $payment['transaction_no_2'], $payment['transaction_no_3']);
        $payment['amount'] = $uf_data ? $this->num_uf($payment['amount']) : $payment['amount'];
        $tp = TransactionPayment::where('id', $payment_id)
                            ->first();
        $transaction_type = !empty($transaction->type) ? $transaction->type : null;
        $tp->update($payment);
        event(new TransactionPaymentUpdated($tp, $transaction->type));
        return true;
    }
public function editPaymentLine ( $ payment , $ transaction = null , $ uf_data = true ) { $ payment_id = $ payment [ 'payment_id' ] ; unset ( $ payment [ 'payment_id' ] ) ; if ( $ payment [ 'method' ] == 'custom_pay_1' ) { $ payment [ 'transaction_no' ] = $ payment [ 'transaction_no_1' ] ; } elseif ( $ payment [ 'method' ] == 'custom_pay_2' ) { $ payment [ 'transaction_no' ] = $ payment [ 'transaction_no_2' ] ; } elseif ( $ payment [ 'method' ] == 'custom_pay_3' ) { $ payment [ 'transaction_no' ] = $ payment [ 'transaction_no_3' ] ; } unset ( $ payment [ 'transaction_no_1' ] , $ payment [ 'transaction_no_2' ] , $ payment [ 'transaction_no_3' ] ) ; $ payment [ 'amount' ] = $ uf_data ? $ this -> num_uf ( $ payment [ 'amount' ] ) : $ payment [ 'amount' ] ; $ tp = TransactionPayment :: where ( 'id' , $ payment_id ) -> first ( ) ; $ transaction_type = ! empty ( $ transaction -> type ) ? $ transaction -> type : null ; $ tp -> update ( $ payment ) ; event ( new TransactionPaymentUpdated ( $ tp , $ transaction -> type ) ) ; return true ; }
Edit transaction payment line
 @param array $product
Edit transaction payment line @param array $product
//event