<?php $page='vectra';
include(APPPATH.'views/Frontend/includes/sidebar.php'); ?>
 
<style>
.trns_my .disnon{display:none;}
.trns_my .uf_error_in .uf_error{line-height: 20px;color: #a94442 !important;font-size: 14px !important;margin-top: 5px;margin-bottom: 0;font-weight: 500; margin-left:6px}
.trns_my .error{line-height: 20px;color: #a94442 !important;font-size: 14px !important;margin-top: 5px;margin-bottom: 0;font-weight: 500; margin-left:6px}
.trns_my .uf_error_in .uf_error i,.error i{font-size: 11px;}
.progress{ margin-bottom:10px; line-height: 10px;}
 
* {
margin: 0;
padding: 0
}

html {
    height: 100%
}

#grad1 {
    background-color: : #9C27B0;
    background-image: linear-gradient(120deg, #ec8153, #5a3ab5)
}

#msform {
    text-align: center;
    position: relative;
    margin-top: 20px
}

#msform fieldset .form-card {
    background: white;
    border: 0 none;
    border-radius: 0px;
    box-shadow: 0 2px 2px 2px rgba(0, 0, 0, 0.2);
    padding: 20px 40px 30px 40px;
    box-sizing: border-box;
    width: 94%;
    margin: 0 3% 20px 3%;
    position: relative
}

#msform fieldset {
    background: white;
    border: 0 none;
    border-radius: 0.5rem;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding-bottom: 20px;
    position: relative
}

#msform fieldset:not(:first-of-type) {
    display: none
}

#msform fieldset .form-card {
    text-align: left;
    color: #9E9E9E
}

#msform input, #msform select,
#msform textarea {
    padding: 0px 8px 4px 8px;
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0px;
    margin-bottom: 25px;
    margin-top: 2px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'poppins', sans-serif;
    color: #272a6b;
    font-size: 16px;
    
}
#msform ::placeholder {
	color: #000000;
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: bold;
}

#msform input:focus,
#msform textarea:focus {
    -moz-box-shadow: none !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    border: none;
    font-weight: bold;
    border-bottom: 2px solid skyblue;
    outline-width: 0
}

#msform .action-button {
    width: 30%;
    background: #3b5884;
    font-weight: bold;
    color: white;
    border: 0 none;
    border-radius: 0px;
    cursor: pointer;
    padding: 10px 5px;
    margin: 10px 5px
}

#msform .action-button:hover,
#msform .action-button:focus {
    box-shadow: 0 0 0 2px white, 0 0 0 3px skyblue
}

#msform .action-button-previous {
    width: 100px;
    background: #616161;
    font-weight: bold;
    color: white;
    border: 0 none;
    border-radius: 0px;
    cursor: pointer;
    padding: 10px 5px;
    margin: 10px 5px
}

#msform .action-button-previous:hover,
#msform .action-button-previous:focus {
    box-shadow: 0 0 0 2px white, 0 0 0 3px #616161
}

select.list-dt {
    border: none;
    outline: 0;
    border-bottom: 1px solid #ccc;
    padding: 2px 5px 3px 5px;
    margin: 2px
}

select.list-dt:focus {
    border-bottom: 2px solid skyblue
}

.card {
    z-index: 0;
    border: none;
    border-radius: 0.5rem;
    position: relative
}

.fs-title {
    font-size: 22px;
    color: #2C3E50;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: left
}

#progressbar {
    margin-bottom: 30px;
    overflow: hidden;
    color: lightgrey
}

#progressbar .active {
    color: #000000
    background: red;
}

#progressbar li {
    list-style-type: none;
    font-size: 12px;
    width: 25%;
    float: left;
    position: relative
}

#progressbar .account:before {
    font-family: FontAwesome;
    content: "\f007"
}

#progressbar .personal:before {
    font-family: FontAwesome;
    content: "\f007"
}

#progressbar .payment:before {
    font-family: FontAwesome;
    content: "\f09d"
}

#progressbar .confirm:before {
    font-family: FontAwesome;
    content: "\f00c"
}

#progressbar li:before {
    width: 50px;
    height: 50px;
    line-height: 45px;
    display: block;
    font-size: 18px;
    color: #ffffff;
    background: #ec8153;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    padding: 2px
}

#progressbar li:after {
    content: '';
    width: 100%;
    height: 2px;
    background: #ec8153;
    position: absolute;
    left: 0;
    top: 25px;
    z-index: -1
}

#progressbar li.active:before,
#progressbar li.active:after {
    background: #70b944;
}

.radio-group {
    position: relative;
    margin-bottom: 25px
}

.radio {
    display: inline-block;
    width: 204;
    height: 104;
    border-radius: 0;
    background: lightblue;
    box-shadow: 0 2px 2px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    cursor: pointer;
    margin: 8px 2px
}

.radio:hover {
    box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.3)
}

.radio.selected {
    box-shadow: 1px 1px 2px 2px rgba(0, 0, 0, 0.1)
}

.fit-image {
    width: 100%;
    object-fit: cover
}
</style>




		<!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body trns_my">
			<div class="container-fluid">

				<div class="form-head mb-sm-5 mb-3 d-flex flex-wrap align-items-center">
					<h2 class="font-w600 title mb-2 mr-auto ">Transfers</h2>
					
						
					<div class="d-flex align-items-center">
						<a href="javascript:void(0);" class="btn btn-xs btn-primary light mr-1" style="background: #ec8153; color: #ffffff;">Credit Bills</a>

						<a href="javascript:void(0);" class="btn btn-xs btn-primary light mr-1" style="background: #ec8153; color: #ffffff;">Transfers</a>
						<a href="javascript:void(0);" class="btn btn-xs btn-primary light mr-1" style="background: #3b5884; color: #ffffff;">Services</a>
						<a href="javascript:void(0);" class="btn btn-xs btn-primary light mr-1" style="background: #3b5884; color: #ffffff;">Statements</a>
						<a href="javascript:void(0);" class="btn btn-xs btn-primary light mr-1" style="background: #3b5884; color: #ffffff;">Settings</a>
						
					</div>
				</div>
				<!-- <div class="form-head mb-sm-5 mb-3 d-flex align-items-center flex-wrap">
					<h2 class="font-w600 mb-0 mr-auto mb-2 text-black">My Wallet</h2>
					<a href="javascript:void(0);" class="btn btn-outline-secondary mr-3 mb-2"><i class="las la-calendar scale5 mr-2"></i>Filter Periode</a>
					<a href="javascript:void(0);" class="btn btn-secondary mb-2">+ Add Wallet</a>
				</div> -->
				<div class="row">







					<div class="col-xl-9 col-xxl-6">
						<div class="row">
							<div class="col-xl-12">
								<div class="d-block d-sm-flex mb-4">
									<h4 class="mb-0 text-back fs-20 mr-auto" style="color: #5a3ab5; font-weight: bold; font-size: 10px;"><?php echo $page_name;?></h4>
									<div class="d-flex mt-sm-0">
										<a href="javascript:void(0);" class="btn-link mr-3 underline">View All Transactions</a>
										<a href="javascript:void(0);" class="btn-link underline">Pay Bills</a>
									</div>
								</div>
							</div>	




							<!-- MultiStep Form -->
<div class="container-fluid trns_my" id="grad1">
    <div class="row justify-content-center mt-0">
        <div class="col-11 col-sm-9 col-md-7 col-lg-12 text-center p-0 mt-3 mb-2">
            <div class="card px-0 pb-0 mt-3 mb-3">
                
                <div class="row">
                    <div class="col-md-12 mx-0">
                         <form id="msform" method="post" action="vectra/save_trans_entry" class="form bg-offwhite" style="padding:20px;">
                                        
                                         
        								<input type="hidden" id="h_ajax_base_url" name="h_ajax_base_url" value="<?php echo $this->config->item('ajax_base_url');?>" />
            						 
            							
            								<div id="result_display" class="result_display"></div>
            								<div class="up_bk_step_one upbk_box" id="up_bk_step_one">
                                        
                                                
                                            <h2 class="fs-title">Between My Accounts at Vectra.</h2>  
											 
												  <div id="uf_error_accountFrom" class="uf_error_in"></div>
													<select name="accountFrom" id="accountFrom" class="form-control">													
														<option value="">Select the account you want to transfer From</option>
														<?php foreach($my_bank_accounts_listing as $bank){?>
															<option value="<?php echo $bank['account_id'];?>"><?php echo $bank['account_no'].' - '.$this->config->item('bank_account_types_array_config')[$bank['account_category']]['name'];?></option>
														<?php } ?>
													</select>
												 
												  <div id="uf_error_accountTo" class="uf_error_in"></div>
													<select name="accountTo" id="accountTo" class="form-control" onchange="return chkOther(this.value);">													
														<option value="">Select the account you want to transfer To</option>
														<?php foreach($unique_sent_account_no as $res){?>
															<option value="<?php echo $res['beneficiary_account_no'].'|'.$res['beneficiary_account_name'];?>"><?php echo $res['beneficiary_account_no'].' - '.$res['beneficiary_account_name'];?></option>
														<?php } ?>
														<option value="other">Other</option>
													</select>
													
													<div id="uf_error_enterAcctNo" class="uf_error_in"></div>
											 <input type="text" name="enterAcctNo" id="enterAcctNo" value="" autocomplete="off" class="disnon" onkeyup="return remove_field_validation('uf_error_enterAcctNo');" placeholder="Enter Beneficiary Account Number." />
											 
											 <div id="uf_error_enterAcctName" class="uf_error_in"></div>
											 <input type="text" name="enterAcctName" id="enterAcctName" value="" autocomplete="off" class="disnon" onkeyup="return remove_field_validation('uf_error_enterAcctName');" placeholder="Enter Beneficiary Name." />
												 
                                            
                                            <div id="uf_error_sendAmt" class="uf_error_in"></div>
											 <input type="number" name="sendAmt" id="sendAmt" value="" autocomplete="off" onkeyup="return remove_field_validation('uf_error_sendAmt');" placeholder="Enter the Amount you want to transfer." />
											 
											<div id="uf_error_transOccurDate" class="uf_error_in"></div>
											 <input type="date" name="transOccurDate" id="transOccurDate" value="" autocomplete="off" onkeyup="return remove_field_validation('uf_error_transOccurDate');" placeholder="Enter Date you want transaction to Occur." />
											 
											 
											 <div id="uf_error_transPin" class="uf_error_in"></div>
											 <input type="number" name="transPin" id="transPin" value="" autocomplete="off" onkeyup="return remove_field_validation('uf_error_transPin');" placeholder="Enter Transaction Pin." />
											 
											   
                                            
                                            
                                           
                                             
                                            
                                            <button type="button" onclick="return sub_vectra();" class="btn btn-primary" id="send_btn">Send Money <i class="fas fa-chevron-right"></i></button>
                                            </div>
                                            
                                              
                                            
                                            <div class="up_bk_step_two upbk_box disnon" id="up_bk_step_two">
                									<div class="">
                                                        <div class="text-center">
                                                            <h1 class=""><i class="far fa-check-circle text-success"></i></h1>
                                                            <h3 class=" text-success">Success!</h3>
                                                            <p class="">Transactions Complete</p>
                                                            <p>See transaction details under <a class="succ_trans_summary">Activity</a></p>
                                                            <p>
                                                                <span class="name"><b>Transaction ID:</b></span>
                                                                <span class="decs" id="succ_trans_id"></span>
                                                            </p>
                                                            <hr>
                                                            <a href="<?php echo base_url().'vectra';?>" class="btn btn-default mr-0 mt-5">
                                                                <span class="bh"></span>
                                                                <span>Send Money Again</span>
                                                            </a>
                                                           <!-- <a href="<?php echo base_url().'vectra/history';?>" class="btn btn-default mr-0 mt-5">
                                                                <span class="bh"></span>
                                                                <span>Go to Summery</span>
                                                            </a>-->
                                                        </div>
                                                    </div>
                								</div>
                                            
                                            </form>
											
<script type="text/javascript">
function chkOther(val){
	if(val=='other'){
		$('#enterAcctNo').show();
		$('#enterAcctName').show();
	}else{
		$('#enterAcctNo').hide();
		$('#enterAcctName').hide();
	}
}
function remove_field_validation(field_name){$('#'+field_name).html('');}
function sub_vectra(){
	var next_move = 0;
	
	var accountFrom = $('#accountFrom').val();
	var accountTo = $('#accountTo').val();
	var sendAmt = $('#sendAmt').val();
	var transOccurDate = $('#transOccurDate').val();
	var transPin = $('#transPin').val();
	
	if(accountFrom!='' && accountTo!='' && sendAmt!='' && transOccurDate!='' && transPin!=''){
		var next_move = 1;
	}else{
		if(accountFrom==''){$('#uf_error_accountFrom').html('<label class="uf_error"><i class="fa fa-exclamation"></i> Select From Account.</label>');}
		if(accountTo==''){$('#uf_error_accountTo').html('<label class="uf_error"><i class="fa fa-exclamation"></i> Select To Account.</label>');}
		if(sendAmt==''){$('#uf_error_sendAmt').html('<label class="uf_error"><i class="fa fa-exclamation"></i> Enter Amount</label>');}			
		if(transOccurDate==''){$('#uf_error_transOccurDate').html('<label class="uf_error"><i class="fa fa-exclamation"></i> Enter Transaction Occur Date</label>');}
		if(transPin==''){$('#uf_error_transPin').html('<label class="uf_error"><i class="fa fa-exclamation"></i> Enter Transfer Pin</label>');}					
	}
	
	
	if(next_move==1){
	
			var ajax_base_url = jQuery('#h_ajax_base_url').val();
			var form = jQuery('#msform');
			var url = ajax_base_url+form.attr('action');
			$.ajax({
				type: "POST",
				url: url,
				data: form.serialize(), // serializes the form's elements.
				beforeSend: function(){
					jQuery('#result_display').html('');
					jQuery('#send_btn').html('Sending <i class="fa fa-spinner fa-spin"></i>');
					jQuery('#send_btn').css('opacity','0.8');
				},
				success: function(result, status, xhr){
					var res_arr = result.split("|");
					if(res_arr[0]=='success'){
						$('#succ_trans_id').html(res_arr[1]);
						$('#up_bk_step_one').hide();
						$('#up_bk_step_two').show();
					}else{
						$("html, body").animate({ scrollTop: 0 }, "slow");
						$('#result_display').html('<div class="alert alert-danger">'+res_arr[1]+'</div>');
						$('#send_btn').html('Send Money <i class="fas fa-chevron-right"></i>');
						$('#send_btn').css('opacity','1');
					}
				},
				error: function(xhr, status, error_desc){				
					jQuery("html, body").animate({ scrollTop: 0 }, "slow");
					jQuery('#result_display').html('<div class="alert alert-danger">'+error_desc+'</div>');
					jQuery('#send_btn').html('Send Money <i class="fas fa-chevron-right"></i>');
					jQuery('#send_btn').css('opacity','1');
				}
			});	
	}	
	return false;
}
</script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
							
					</div>
					</div>
					










					<div class="col-xl-3 col-xxl-3">
						<div class="denav" style="background: #ffffff; border-radius: 500px;">
            		<div class="card overflow-hidden">
							<ul class="metismenu" id="menu">
								<h4 class="mb-0" style="color: #5a3ab5; padding: 20px;  font-weight: bold; text-align: center;">Send Money</h4>
								
								
							<div class="card overflow-hidden" style="border-radius: 10px; padding: 20px; border: 5px solid transparent; position: relatve; maxwidth: 150px; margin: 30px; box-shadow: 0px 0px 13px 0px rgba(82, 63, 105, 35); margin-bottom: 20px; <?php if($page=='vectra'){echo 'background: #6647bf; color: #ffffff;';} else echo'background: #eeeeee;';?>">
                            		<center>
                                   <!--  <i class="fa fa-exchange" aria-hidden="true" style="color: #000f0f; font-size: 20px;"></i> -->
                                    <center><a href=""><img src="<?php echo base_url();?>zera/images/avatar/accounts_icon.png" style="width: 45px;"></a></center>
                                    
                                    <a href="<?php echo base_url().'vectra';?>" style=" <?php if($page=='vectra')
                                 {echo 'color: #ffffff; font-weight: bold; font-size: 13px;';} else echo'background: #eeeeee;';?>">Between My Accounts at Vectra</a>
                                    
			                      </center>
			                         
			                  </div>



			                  <div class="card overflow-hidden" style="border-radius: 10px; padding: 20px; border: 5px solid transparent; position: relatve; maxwidth: 150px; margin: 30px; box-shadow: 0px 0px 13px 0px rgba(82, 63, 105, 35); margin-bottom: 20px; background: #eeeeee;">
                           		 <center>
                                 
                                    <center><a href=""><img src="<?php echo base_url();?>zera/images/avatar/other_bank.png" style="width: 45px;"></a></center>
                                   
                                    <a href="" style="font-weight: bold; font-size: 13px;">To My Accounts At Other Bank</a>
                                    
			                      </center>     
			                  </div>


			                  <div class="card overflow-hidden" style=" <?php if($page=='inter_wire'){echo 'background: #6647bf; color: #ffffff;';} else echo'background: #eeeeee;';?> border-radius: 10px; padding: 20px; border: 5px solid transparent; position: relative;  margin: 30px; box-shadow: 0px 0px 13px 0px rgba(82, 63, 105, 35); margin-bottom: 20px;">
                           		 <center>
                                 
                                    <center><a href=""><img src="<?php echo base_url();?>zera/images/avatar/p2p.png" style="width: 45px;">
                                    </a></center>
                                    <a href="<?php echo base_url().'inter_wire';?>" style=" <?php if($page=='inter_wire')
                                 {echo 'color: #ffffff; font-weight: bold; font-size: 13px;';} else echo'background: #eeeeee;';?> ">International Wire Transfer To Someone or Business</a>
                                    
			                      </center>     
			                  </div>
			              </ul>
							
						</div>
						</div>





						<div class="denav" style="background: #ffffff;">
            		<div class="card overflow-hidden">
							<ul class="metismenu" id="menu">
								<h4 class="mb-0" style="color: #5a3ab5; padding: 20px;  font-weight: bold; text-align: center;">Receive Money</h4>
							<div class="card overflow-hidden" style="border-radius: 10px; padding: 20px; border: 5px solid transparent; position: relative;  margin: 30px; box-shadow: 0px 0px 13px 0px rgba(82, 63, 105, 35); margin-bottom: 20px; background: #eeeeee;">
                            		<center>
                                  
                                    <div class="panel-group" id="accordion">
   
							    <div class="panel panel-default">
							      <div class="panel-heading">
							        <h6 class="panel-title">
							          <a data-toggle="collapse" data-parent="#accordion" href="#collapse2">Show Account and Routing Numbers</a>
							        </h6>
							      </div>
							      <div id="collapse2" class="panel-collapse collapse">
							        <div class="panel-body">Lorem ipsum dolor sit amet, consectetur adipisicing elit,
							        sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
							        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
							      </div>
							    </div>
							   
							  </div> 
                                   
			                      </center>
			                         
			                  </div>



			              </ul>
							
						</div>
						</div>
					</div>























				
					<div class="col-xl-3 col-xxl-3">
						<div class="swiper-bo">
							<div class="swiper-container card-swiper">
								<?php foreach($user_accounts_listing as $accts_dets){?>
								<div class="swiper-wrapper">
									<div class="swiper-slide">
										<div class="card-bx stacked card" style="border-radius: 25px;">
										    <?php echo $this->config->item('amt_currencies_array_config')[$accts_dets->account_cur]['img_bg'];?>
										
											<div class="card-info">
												<p class="mb-1 text-white fs-14"><?php echo $this->config->item('bank_account_types_array_config')[$accts_dets->account_category]['name'];?></p>
												<div class="d-flex justify-content-between">
													<h2 class="num-text text-white mb-5 font-w600"><?php echo $this->config->item('amt_currencies_array_config')[$accts_dets->account_cur]['csign'].' '.number_format($accts_dets->available_balance, 2);?> </h2>
                                                    
                                                    
													<i style="color: #ffffff; font-size: 20px;"><?php echo $this->config->item('amt_currencies_array_config')[$accts_dets->account_cur]['card_sign'];?></i>
												</div>
												<div class="d-flex">
													<!--<div class="mr-4 text-white">-->
													<!--	<p class="fs-12 mb-1 op6">VALID THRU</p>-->
													<!--	<span>08/21</span>-->
													<!--</div>-->
													<div class="text-white">
														<p class="fs-12 mb-1 op6">Verified Owner</p>
														<?php $sess_prefix = $this->config->item('sess_prefix');
                                    					if(isset($_SESSION[$sess_prefix.'sess_user_id']) && $_SESSION[$sess_prefix.'sess_user_id']!=''){?>
                                    					<span><?php echo $_SESSION[$sess_prefix.'sess_customer_name'];?></span>
                                    					<?php } ?>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<?php } ?> 

							



							</div>
						</div>
					</div>
			
				</div>
			</div>
		</div>
    </div>	
<!--**********************************
Content body end
***********************************-->
