https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/blue-sky.co.id/public_html/application/views/account/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/blue-sky.co.id/public_html/application/views/account/order_history.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<!--make some space gap on top with menu-->
<div class="banner" style="padding-top: 10px;"></div>

<div class="container  margin_top_48px margin_bottom_48px">
	<div class="row" style="padding-bottom:50px;">
		<div class="col-sm-2 order-sm-1 order-2" style="border-right:1px solid #ccc;">
             <?= Modules::run('myaccount_menu'); ?>
        </div><!-- end col-sm-2-->
		<div class="col-sm-10 order-sm-2 order-1">
			<h4><?= strtoupper(lang('my_order_history')); ?></h4>   
			<?= $this->session->flashdata('success'); //to display success message ?> 
			<div class="table-responsive orderHistory">
				<table class="table table-striped">
					<thead>
						<tr>
							<th><?= ucwords(lang('order_no')); ?></th>
							<th><?= ucwords(lang('order_date')); ?></th>
							<th><?= ucwords(lang('recipient')); ?></th>
							<th>Total</th>
							<th><?= ucwords(lang('item_details')); ?></th>
							<th><?= ucwords(lang('order_status')); ?></th>
						</tr>
					</thead> 
					<?php foreach ($order_history as $item) : ?>
					<?php if($item->payment_status != 0): ?>
	            		<?php
	            			$order_id = $item->id_orders;
	            			
	            			$this->db->select('*');
	            			$this->db->from('orders_detail');
	            			$this->db->where('orders_id', $order_id);
	            			$query = $this->db->get();		
							$orders_detail = $query->result();

							$isFullyPaid = false;
	            			$isReadyToSend = false;
	            			$thisHasIndent = false;
	            			$firstPayment = 0;
	            			$secondPayment = 0; 
		            		$indent_dp = 0; 
	            			foreach ($orders_detail as $key) {
	            				if($key->indent_message != null){
	            					$thisHasIndent = true; 
	            					$firstPayment = 0;
	            				}
	            				if($key->status == 1){
	            					$isReadyToSend = true;
	            				}
	            				if($key->status == 3){
	            					$isFullyPaid = true;
	            				}  
	            			}

	            		?>

					
						<!-- Form Start --> 
		            	<?php echo form_open('account/payment_confirmation'); ?>  
		            	
		            	<input type="hidden" name="order_id" value="<?= $item->id_orders; ?>">         

		            	<tr>
		            		<td style="padding:3px;"><?= $item->id_orders; ?></td>
		            		<td style="padding:3px;">
		            		<?php
		            			$order_date = strtotime($item->order_date); 
		            			$new_date = date('j/m/Y', $order_date);
		            			echo $new_date;
		            		?>	
		            		</td>
							<td>
								<?php if($item->recipient_name != null): ?>
									<?= ucwords($item->recipient_name); ?><br>
								<?php endif; ?>
								<?= ucwords($item->address); ?><br>
								<?= ucwords($item->district); ?>, <?= ucwords($item->subdistrict); ?><br><?= ucwords($item->province); ?> <?= ucwords($item->postcode); ?> 	
							</td>
		            		<td style="padding:3px;">
		            			<?php
		            				$final_grand_total = 0;

		            				$finalshippingfee = 0;
									$calculate_finalshippingfee = $item->shipping_fee - $item->free_shipping_fee;
									if($calculate_finalshippingfee > 0){
										$finalshippingfee = $calculate_finalshippingfee;
									}

		            				$grand_total = ($item->total_amount - $item->redeemed_voucher_amount - $item->minus_reward_amount) + ($finalshippingfee);

		            				if($grand_total > 0){
		            					$final_grand_total = $grand_total;
		            				}
		            				echo "<p style='margin-top: 10px;'>";
		            				echo "IDR ".number_format($final_grand_total); 

		            				foreach ($orders_detail as $key){
		            					if($key->indent_message != null){
		            						$indent_dp = ($key->quantity * $key->item_price) * ($key->dp_percentage/100);
		            					}
		            				}
		            				$firstPayment = ($item->total_amount - $item->redeemed_voucher_amount - $item->minus_reward_amount)-$indent_dp;
		            				$secondPayment = $item->indent_remaining + $item->indent_shipping_fee;

		            				if($thisHasIndent == true){ 
		            					echo '<br><br>'.ucwords(lang('payment_1')).' : <br>';
		            					echo 'IDR '.number_format($firstPayment);
		            					echo '<br>'.ucwords(lang('payment_2')).' : <br>';
		            					echo 'IDR '.number_format($secondPayment);
		            				}
		            				if($final_grand_total == 0){
		            					echo ucwords(lang('free_order'));
		            				}
		            				echo "</p>";
		            			?>
		            		</td>
		            		<td>

		            		<?php foreach ($orders_detail as $order_detail) : 
            					if($key->indent_message != null){
		            				$indent_dp = ($order_detail->quantity * $order_detail->item_price) * ($order_detail->dp_percentage/100);
            					}

		            		?>
								<!-- <p> -->
									<?php if ($order_detail->status == 2): ?>
                                        <?= "No Resi : ".$order_detail->no_resi."<br>"; ?>
                                    <?php endif; ?>
								<!-- </p> -->
		            			<p><?= $order_detail->item_name; ?> <?= $order_detail->quantity; ?> pcs <br>@IDR <?= number_format($order_detail->item_price); ?>
		            				<?php 
		            				if($order_detail->indent_message != null){
		            				 ?>
		            				 <?= "<br><small>Indent DP IDR ".number_format($indent_dp)."</small>"; ?>
		            				<?php } ?>
		            			</p>
		            		<?php endforeach; ?>
							<?php 
	            			$sub_totalIndent_Remaining = 0;  
	            			foreach ($orders_detail as $key) {
	            				if($key->status == 1){
	            					$isReadyToSend = true; 	
	            					if($key->indent_message != null){

	            					// echo "<br>";
	            					// echo "Ready to send<br>";
	            					echo "<small>
	            						".ucwords(lang('indent_remaining')).": <br>
	            						IDR ".number_format(($key->item_price*($key->dp_percentage)/100))."<br>
										".ucwords(lang('indent_cost')).": <br>
										IDR ".number_format($key->shipping_fee)."
										</small>";
	            					

	            					}
	            				$sub_totalIndent_Remaining += (($key->item_price*$key->quantity)*($key->dp_percentage)/100)+$key->shipping_fee; 
	            				}
	            			}
	            			if($thisHasIndent == true && $isReadyToSend == true && $isFullyPaid != true){
	            				echo "<br><br><small>".ucwords(lang('indent_total')).": <br>
									IDR ".number_format($sub_totalIndent_Remaining)."</small><br>"; 
	            			}
	            			
	            			 ?>
		            		</td>

		            		<td>
		            			<!-- tes_ID:(<?= $item->payment_status; ?>)<br> --> 
		                		<?php if ($item->payment_status == 0) : ?>
		                			<?= ucwords(lang('pending')); ?>
		                		<?php endif; ?>	
		                		<?php if ($item->payment_status == 1) : ?>
		                			
		                			<?= ucwords(lang('not_paid_yet')); ?>

		                			<?php if ($item->payment_confirm == 0) : ?>

		                			 <br><input type="submit" name="confirm_payment" value="<?= strtoupper(lang('confirm')); ?>" style="background:<?= $primary_colortheme; ?>; color:white; cursor: pointer; border:none; padding:2px; padding-left:5px; padding-right:5px; ">

		                			 <?php else: ?>

		                			 <br><input type="submit" name="confirm_payment" value="<?= strtoupper(lang('already_confirm')); ?>" style="background:<?= $primary_colortheme; ?>; color:white; cursor: pointer; border:none; padding:2px; padding-left:5px; padding-right:5px;">

		                			 <?php endif; ?>	

		                		<?php elseif ($item->payment_status == 3) : ?>
		                			<?= ucwords(lang('paid'))?>
		                		<?php elseif ($item->payment_status == 4): ?>
									<?php  
									if($isReadyToSend == true && $isFullyPaid != true){
			            				echo ucwords(lang('ready_to_send'));
			            				if ($thisHasIndent == true && $item->payment_confirm_remaining == 0 ){
			            				echo '<input type="submit" name="confirm_payment" value="'.strtoupper('Konfirmasi').'" style="background:'.$primary_colortheme.'; color:white; cursor: pointer; border:none; padding:2px; padding-left:5px; padding-right:5px;">';
			            				}else{
			            					if($thisHasIndent == true){
			            					echo '<input type="submit" name="confirm_payment" value="'.strtoupper('Sudah Konfirmasi').'" style="background:'.$primary_colortheme.'; color:white; cursor: pointer; border:none; padding:2px; padding-left:5px; padding-right:5px;">';	
			            					}
			            				}
			            			}
			            			else if($isFullyPaid == true){
			            				echo ucwords(lang('fully_paid'));
			            			}else{
			            				echo ucwords(lang('in_process')); 
			            			}

									 ?>
		                			

			            			
		                			<!-- <br><input type="submit" name="confirm_payment" value="<?= strtoupper(lang('confirm')); ?>" style="background:<?= $primary_colortheme; ?>; color:white; cursor: pointer; border:none; padding:2px; padding-left:5px; padding-right:5px;"> -->

								<?php elseif ( ($item->payment_status == 5)) : ?>
		                			<?= ucwords(lang('in_process')); ?> <br>
		                		<?php elseif($item->payment_status == 2) : ?> 
		                		    <?= ucwords(lang('cancel')); ?>
		                		    <?php elseif($item->payment_status == 6) : ?> 
		                		    <?= ucwords(lang('partial_paid')); ?>
		                		<?php endif; ?>
		            		</td>

		            	</tr>	

		            	<?php echo form_close(); ?>
                    <?php endif; ?>
					<?php endforeach; ?>
				</table> 
			</div><!-- end class="table-responsive"> -->
			
		</div><!-- end col-sm-8-->
	</div><!-- end row-->
</div><!-- end container --> 

https://t.me/RX1948 - 2025