<commit_before><?php

namespace Point\PointPurchasing\Http\Controllers\Service;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Point\Core\Helpers\QueueHelper;
use Point\Core\Models\User;
use Point\Core\Traits\ValidationTrait;
use Point\Framework\Helpers\FormulirHelper;

use Point\Framework\Traits\RequestApprovalTrait;
use Point\PointPurchasing\Models\Service\Invoice;

class InvoiceApprovalController extends Controller
{
    use ValidationTrait, RequestApprovalTrait;

    public function requestApproval()
    {
        access_is_allowed('create.point.purchasing.service.invoice');

        $view = view('point-purchasing::app.purchasing.point.service.invoice.request-approval');
        $view->list_invoice = Invoice::selectRequestApproval()->paginate(100);
        return $view;
    }

    public function sendRequestApproval(Request $request)
    {
        access_is_allowed('create.point.purchasing.service.invoice');
        self::sendRequestApproval(app('request')->input('formulir_id'), auth()->user()->name);

        gritter_success('You have sent email for invoice approval');<commit_msg>fixed error wrong function called when requesting approval purchase service invoice<commit_after><?php

namespace Point\PointPurchasing\Http\Controllers\Service;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Point\Core\Helpers\QueueHelper;
use Point\Core\Models\User;
use Point\Core\Traits\ValidationTrait;
use Point\Framework\Helpers\FormulirHelper;

use Point\Framework\Traits\RequestApprovalTrait;
use Point\PointPurchasing\Models\Service\Invoice;

class InvoiceApprovalController extends Controller
{
    use ValidationTrait, RequestApprovalTrait;

    public function requestApproval()
    {
        access_is_allowed('create.point.purchasing.service.invoice');

        $view = view('point-purchasing::app.purchasing.point.service.invoice.request-approval');
        $view->list_invoice = Invoice::selectRequestApproval()->paginate(100);
        return $view;
    }

    public function sendRequestApproval(Request $request)
    {
        access_is_allowed('create.point.purchasing.service.invoice');
        self::sendingRequestApproval(app('request')->input('formulir_id'), auth()->user()->name);

        gritter_success('You have sent email for invoice approval');
{'fraction_non_alphanumeric': 0.1127348643006263, 'fraction_numerical': 0.0025052192066805845, 'mean_word_length': 4.945409429280397, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5456291', 'n_tokens_mistral': 700, 'n_tokens_neox': 695, 'n_words': 113}