403Webshell
Server IP : 14.225.204.176  /  Your IP : 216.73.216.6
Web Server : nginx/1.24.0
System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64
User : root ( 0)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/php/wit-crm/modules/purchase/libraries/merge_fields/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/php/wit-crm/modules/purchase/libraries/merge_fields/Purchase_request_merge_fields.php
<?php

defined('BASEPATH') or exit('No direct script access allowed');

class Purchase_request_merge_fields extends App_merge_fields
{
    public function build()
    {
        return [
            [
                'name'      => 'PR number',
                'key'       => '{pr_number}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
            [
                'name'      => 'PR Public link',
                'key'       => '{public_link}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
            [
                'name'      => 'PR name',
                'key'       => '{pr_name}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
            [
                'name'      => 'PR tax value',
                'key'       => '{pr_tax_value}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
            [
                'name'      => 'PR subtotal',
                'key'       => '{pr_subtotal}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
            [
                'name'      => 'PR value',
                'key'       => '{pr_value}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
            [
                'name'      => 'Additional content',
                'key'       => '{additional_content}',
                'available' => [
                    
                ],
                'templates' => [
                    'purchase-request-to-contact',
                ],
            ],
        ];
    }

    /**
     * Merge field for appointments
     * @param  mixed $teampassword 
     * @return array
     */
    public function format($data)
    {
        $po_id = $data->pur_request_id;
        $this->ci->load->model('purchase/purchase_model');


        $fields = [];

        $this->ci->db->where('id', $po_id);

        $po = $this->ci->db->get(db_prefix() . 'pur_request')->row();


        if (!$po) {
            return $fields;
        }

        $fields['{public_link}']                  = site_url('purchase/vendors_portal/pur_request/' . $po->id.'/'.$po->hash);
        $fields['{pr_name}']                  =  $po->pur_rq_name;
        $fields['{pr_number}']                  =  $po->pur_rq_code;
        $fields['{pr_value}']                   =  app_format_money($po->total, '');
        $fields['{pr_tax_value}']                   =  app_format_money($po->total_tax, '');
        $fields['{pr_subtotal}']                   =  app_format_money($po->subtotal, '');
        $fields['{additional_content}'] = $data->content;

        return $fields;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit