Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: print_order.php
<?php define('APP_FAVICON', 'app_favicon.png'); define('APP_LOGO', $this->db->get_where('tbl_gf_ecomm_settings', array('id' => '1'))->row()->app_logo); define('APP_CURRENCY', $this->db->get_where('tbl_gf_ecomm_settings', array('id' => '1'))->row()->app_currency_code); define('CURRENCY_CODE', getusercurrencyforadmin($order_data[0]->user_id)); $address_arr=$this->common_model->get_addresses($order_data[0]->user_id,true); $app_settings = $this->data['rsStngs']; //d($app_settings); ?> <!DOCTYPE html> <html> <head> <title>ORDER INVOICE - <?=$order_data[0]->order_unique_id?></title> <link rel="shortcut icon" type="image/png" href="<?=base_url('assets/images/').APP_FAVICON?>"/> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script> <script src="<?=base_url('assets/global_assets/js/main/jquery-1.7.js')?>"></script> <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <style type="text/css"> .invoice-title h2{ float:right; text-align:right } .table>tbody>tr>td, .table>tfoot>tr>td{ border-top: none !important; background: #f5f4f4; } .container { width: 1020px; } .invoice-title h2, .invoice-title h3 { display: inline-block; } .table strong { font-weight: 500; } .table > tbody > tr > .no-line { border-top: none; } .table > thead > tr > .no-line { border-bottom: none; } .table > tbody > tr > .thick-line { border-top: 1px solid #ddd; } .table > tbody > tr > td{ border-right:0px solid; } .rank_item{ width:30px !important } .user_billing_item{ padding:20px 20px 10px 20px; } .table-condensed > thead > tr > td{ padding:8px; } .table-condensed > tbody > tr > td{ padding:8px; } tr.top_bdr{ border-top:0px solid; } td.bdr_left{ border-left:0px solid; } td.bdr_right{ border-right:0px solid; } td.bdr_bottom{ border-bottom:0px solid; } td.no_bdr{ border-right:0px !important; } div{ font-size:16px; margin-bottom:8px; } </style> </head> <body> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="user_billing_item"> <div class="row"> <div class="col-6"></div> <div class="col-6"> <div class="invoice-title"> <h2 style="margin-top: 0px;"><img style="max-width: 500px;" src="<?php echo base_url() .'/uplds'.$rowSettings->Theme.'/'. $website_logo; ?>" alt="logo" class="img-responsive" width="" height="" /></h2> </div> </div> </div> <div class="row" style="border-bottom:1px solid rgba(0, 0, 0, 0.1);margin-bottom:30px;padding-bottom:10px;"> <div class="col-xs-7"> <div> <strong>Billing Details:</strong> </div> <div> <?php print_r($this->Ecomm_model->selectByidParam($order_data[0]->user_id, 'tbl_gf_users','UserName')); ?> <br> <?php if(!empty($address_arr_1->building_name)){echo $address_arr_1->building_name.', ';} if(!empty($address_arr_1->road_area_colony)){echo $address_arr_1->road_area_colony.', <br/>';} if(!empty($address_arr_1->city)){echo $address_arr_1->city.', ';} if(!empty($address_arr_1->district)){echo $address_arr_1->district.', ';} if(!empty($address_arr_1->state)){echo $address_arr_1->state.', ';} if(!empty($address_arr_1->pincode)){echo $address_arr_1->pincode.', ';} ?> <br/> <strong>Mobile No.</strong> <?php echo $user_contact; ?><br> <strong>Email.</strong> <?php echo $user_email;?> </div> </div> <div class="col-xs-5"> <div class="col-xs-12"> <table class="table"> <tbody> <tr> <td><strong>Company:</strong></td> <td style="text-align:right"><?=$app_settings->Company?></td> </tr> <tr> <td><strong>Email:</strong></td> <td style="text-align:right"><?php echo $app_settings->ToEmail;?></td> </tr> <tr style="background:#d7dcdc"> <td><strong>Phone:</strong></td> <td style="text-align:right"><strong><?php echo $app_settings->Phone;?></strong></td> </tr> <tr style="background:#d7dcdc"> <td><strong>URL:</strong></td> <td style="text-align:right"><strong><?php echo $app_settings->SiteURL;?></strong></td> </tr> <tr style="background:#d7dcdc"> <td><strong>Address:</strong></td> <td style="text-align:right"><strong><?php echo $app_settings->Address;?></strong></td> </tr> </tbody> </table> </div> </div> </div> <div class="row"> <div class="col-xs-7"> <div> <strong>Shipping Details:</strong> </div> <div> <?php echo $address_arr_1->name;?><br> <?php if(!empty($address_arr_1->building_name)){echo $address_arr_1->building_name.', ';} if(!empty($address_arr_1->road_area_colony)){echo $address_arr_1->road_area_colony.', <br/>';} if(!empty($address_arr_1->city)){echo $address_arr_1->city.', ';} if(!empty($address_arr_1->district)){echo $address_arr_1->district.', ';} if(!empty($address_arr_1->state)){echo $address_arr_1->state.', ';} if(!empty($address_arr_1->pincode)){echo $address_arr_1->pincode.', ';} ?> <br/> <strong>Mobile No.</strong> <?php echo $address_arr_1->mobile_no;?><br> <strong>Email.</strong> <?php echo $address_arr_1->email;?> </div> </div> <div class="col-xs-5"> <table class="table"> <tbody> <tr> <td><strong>Order ID. #</strong></td> <td style="text-align:right"><?=$order_data[0]->id?></td> </tr> <tr> <td><strong>Order Date:</strong></td> <td style="text-align:right"><?php echo date('F d, Y',$order_data[0]->order_date);?></td> </tr> <tr style="background:#d7dcdc"> <td><strong>Total Amount</strong></td> <td style="text-align:right"><strong><?php echo CURRENCY_CODE.' '.$order_data[0]->new_payable_amt;?></strong></td> </tr> </tbody> </table> </div> </div> </div> <div class="panel-body" style="margin-bottom:0;"> <div class="table-responsive" style="margin-bottom:0;overflow:hidden !important"> <table class="table table-condensed"> <thead> <tr class="top_bdr" style="background:#d7dcdc"> <td class="rank_item text-left bdr_left bdr_right"><strong style="font-weight: 600">Product</strong></td> <td class="text-center bdr_right" style="width:80px !important"><strong style="font-weight: 600">Price</strong></td> <td class="text-center bdr_right" style="width:80px !important"><strong style="font-weight: 600">Saving</strong></td> <td class="text-center bdr_right" style="width:80px !important"><strong style="font-weight: 600">Quantity</strong></td> <td class="text-center bdr_right" style="width:80px !important"><strong style="font-weight: 600">Total Price</strong></td> </tr> </thead> <tbody> <?php $items_arr=$this->Ecomm_model->selectByids(array('order_id' => $order_data[0]->id, 'pro_order_status <> ' => '5'), 'tbl_gf_ecomm_order_items'); $_total_amt=$_total_price=$_total_qty=$_delivery_chrg=0; foreach ($items_arr as $key => $val) { $_total_amt+=$val->total_price; $_total_qty+=$val->product_qty; ?> <tr> <td class="rank_item text-left thick-line bdr_left" style="width: 220px !important"><?=$val->product_title?></td> <td class="text-center thick-line"><?php echo CURRENCY_CODE.' '.($this->Ecomm_model->selectByidParam($val->product_id, 'tbl_gf_ecomm_product','product_mrp') * get_USER_CURRENCY_RATE($order_data[0]->user_id));?></td> <td class="text-center thick-line"><?php echo CURRENCY_CODE.' '.(($this->Ecomm_model->selectByidParam($val->product_id, 'tbl_gf_ecomm_product','product_mrp')-$val->product_price) * get_USER_CURRENCY_RATE($order_data[0]->user_id))?></td> <td class="text-center thick-line" style="width: 80px"><?=$val->product_qty?></td> <td class="text-center thick-line"><?=CURRENCY_CODE.' '.($val->total_price * get_USER_CURRENCY_RATE($order_data[0]->user_id))?></td> </tr> <?php } ?> <tr> <td class="thick-line bdr_left"></td> <td class="thick-line bdr_left"></td> <td class="text-center thick-line"></td> <td class="text-center thick-line"></td> <td class="text-center thick-line"></td> </tr> </tbody> </table> </div> <div class="row" style="margin-top: 10px"> <div class="col-xs-7"> </div> <div class="col-xs-5"> <table class="table"> <tbody> <tr> <td><strong style="font-weight: 600">Sub Total</strong></td> <td style="text-align:right"><?=CURRENCY_CODE.' '.$_total_amt?></td> </tr> <tr> <td><strong style="font-weight: 600">Delivery Charge</strong></td> <td style="text-align:right">+ <?=CURRENCY_CODE.' '.$order_data[0]->delivery_charge?></td> </tr> <tr> <td><strong style="font-weight: 600">Discount</strong></td> <td style="text-align:right">- <?=CURRENCY_CODE.' '.($order_data[0]->discount_amt-$order_data[0]->refund_amt)?></td> </tr> <tr> <td><strong style="font-weight: 600">Payable Amount</strong></td> <td style="text-align:right"><?=CURRENCY_CODE.' '.($order_data[0]->new_payable_amt+$order_data[0]->delivery_charge)?></td> </tr> </tbody> </table> </div> </div> </div> </div> <!-- <center> <button class="btn btn-success" onclick="window.print()"><i class="fa fa-download"></i> Download</button> <button class="btn btn-danger btn_close" ><i class="fa fa-close"></i> Close Window</button> </center> --> </div> </div> </div> <script src="<?=base_url('assets/site_assets/js/vendor/jquery-1.12.4.min.js')?>"></script> <script type="text/javascript"> $(document).ready(function(e){ $(".btn_download").click(function(e){ e.preventDefault(); var _id=$(this).data("id"); href = '<?=base_url()?>download-invoice/'+_id; window.location.href=href; }); $(".btn_close").click(function(e){ var myWindow = window.open("", "_self"); myWindow.document.write(""); setTimeout (function() {myWindow.close();},1000); window.top.close(); }); }); </script> </body> </html>