<?php
$user = auth()->user();
?>
<script src="assets/js/king-table.js"></script>
<div class="content">
	<div class="widget">
		<div class="widget-header">
			<h3><?php echo e(__('mylanguage.spcl_member_new')); ?></h3>
		</div>
		<div class="widget-content">
			<ul class="nav nav-tabs nav-tabs-custom-colored" role="tablist">
				<li class="active"><a href="#colored21" role="tab" data-toggle="tab" class="loanApp"><i class="fa fa-user"></i> <?php echo e(__('mylanguage.spcl_member_detail')); ?></a></li>
				<li><a href="#colored22" role="tab" data-toggle="tab" class="loanApp"><i class="fa fa-cog"></i> <?php echo e(__('mylanguage.address')); ?></a></li>
				<?php
				/*
				<li><a href="#colored23" role="tab" data-toggle="tab" class="loanApp"><i class="fa fa-cog"></i> {{ __('mylanguage.family_members') }}</a></li>
				<li><a href="#colored24" role="tab" data-toggle="tab" class="loanApp"><i class="fa fa-cog"></i> {{ __('mylanguage.document') }}</a></li>
				*/
				?>
				<li><a href="#colored25" role="tab" data-toggle="tab" class="loanApp"><i class="fa fa-cog"></i> <?php echo e(__('mylanguage.subscription')); ?></a></li>
				<li><a href="#colored26" role="tab" data-toggle="tab" class="loanApp"><i class="fa fa-cog"></i> <?php echo e(__('mylanguage.trans_rpt')); ?></a></li>
			</ul>
<form id="frmmain" name="frmmain" data-parsley-validate novalidate enctype="multipart/form-data">
<input type="hidden" name="_token" id="_token" value="<?php echo e(csrf_token()); ?>">
<input type="hidden" name="Username" id="Username" value="<?php echo e($user->usr_id); ?>">
<input type="hidden" name="cst_id" id="cst_id" value="<?php echo e(isset($data) ? $data['cst_id'] : '0'); ?>">
<input type="hidden" id="cst_doj" name="cst_doj" value="<?php echo date("Y-m-d"); ?>" >
<input type="hidden" id="grd_id" name="grd_id" value="0" >
<input type="hidden" id="totamt" name="totamt" value="0" >
				<div class="tab-content">
					<div id="colored21" class="tab-pane fade in active">
						<!-- HORIZONTAL FORM -->
						<div class="widget">
							<div class="widget-header">
							<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.main')); ?> <?php echo e(__('mylanguage.member_profile')); ?></h3></div>
							<div class="widget-content">
<div class="alert  alert-info " >
    <ul><li class="fa fa-cog  fa-1x fa-fw"></li><?php echo e(__('grade.enter_details')); ?>...</ul>
</div>						
<div class="alert alert-success print-success-msg" style="display:none">
    <ul></ul>
</div>	
<div class="alert alert-danger print-error-msg" style="display:none">
    <ul></ul>
</div>
								<div class="row">
									<div class="col-md-6 form-horizontal">					
										<div class="form-group">
											<label for="cst_code" class="col-sm-4 control-label"><?php echo e(__('mylanguage.member_id')); ?></label>
											<div class="col-sm-8">
												<input type="hidden" class="form-control" id="cst_grd_code" name="cst_grd_code" value="0">
												<input type="text" class="form-control" id="cst_code" name="cst_code" placeholder="<?php echo e(__('mylanguage.member_id')); ?>" readonly >
											</div>
										</div>
										<div class="form-group">
											<label for="cst_name" class="col-sm-4 control-label"><?php echo e(__('mylanguage.name')); ?></label>
											<div class="col-sm-8">
												<input type="text" class="form-control" id="cst_name" name="cst_name" placeholder="<?php echo e(__('mylanguage.full')); ?> <?php echo e(__('mylanguage.name')); ?>" >
											</div>
										</div>
									</div>
									<div class="col-md-6 form-horizontal">
										<div class="form-group">
											<label for="jamath_member_id" class="col-sm-4 control-label"><?php echo e(__('mylanguage.jamath_member_id')); ?></label>
											<div class="col-sm-8">
												<input type="hidden" class="form-control" id="jamath_member_id_hidden" name="jamath_member_id_hidden" value="0" >
												<input type="text" class="form-control" id="jamath_member_id" name="jamath_member_id" placeholder="<?php echo e(__('mylanguage.jamath_member_id')); ?>" onkeyup="SEARCHmainmemberrec()" >
											</div>
										</div>
										<div class="form-group">
											<label for="cst_dob" class="col-sm-4 control-label"><?php echo e(__('mylanguage.dob')); ?></label>
											<div class="col-sm-8">
												<input type="date" class="form-control" id="cst_dob" name="cst_dob" placeholder="DOB." onkeyup="ageCount(this.value,'lacc_age')" onchange="ageCount(this.value,'lacc_age')" max="<?php echo date("Y-m-d"); ?>" >
												<span id="ageerror"></span>
											</div>
										</div>										
									</div>
								</div>

								<div class="row">
									<div class="col-md-6 form-horizontal">
										<div class="form-group">
											<label for="cst_maritalstatus" class="col-sm-4 control-label"><?php echo e(__('mylanguage.marital_status')); ?></label>
											<div class="col-sm-8">
												<select id="cst_maritalstatus" name="cst_maritalstatus" class="form-control">
													<option value="">- <?php echo e(__('mylanguage.marital_status')); ?> - </option>
													<option value="Single"><?php echo e(__('mylanguage.single')); ?></option>
													<option value="Married"><?php echo e(__('mylanguage.married')); ?></option>
													<option value="Divorced"><?php echo e(__('mylanguage.divorced')); ?></option>
													<option value="Widowed"><?php echo e(__('mylanguage.widowed')); ?></option>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label for="cst_qualification" class="col-sm-4 control-label"><?php echo e(__('mylanguage.qualification')); ?></label>
											<div class="col-sm-8">
												<input type="text" class="form-control" id="cst_qualification" name="cst_qualification" placeholder="<?php echo e(__('mylanguage.qualification')); ?>" >
											</div>
										</div>
										<div class="form-group">
											<label for="cst_income" class="col-sm-4 control-label"><?php echo e(__('mylanguage.income')); ?></label>
											<div class="col-sm-8">
												<input type="text" class="form-control" id="cst_income" name="cst_income" placeholder="<?php echo e(__('mylanguage.income')); ?>" >
											</div>
										</div>
									</div>
									<div class="col-md-6 form-horizontal">										
										<div class="form-group">
											<label for="lacc_age" class="col-sm-4 control-label"><?php echo e(__('mylanguage.age')); ?>.</label>
											<div class="col-sm-8">
												<input type="text" class="form-control" id="lacc_age" name="lacc_age" placeholder="<?php echo e(__('mylanguage.age')); ?>" readonly >
											</div>
										</div>
										<div class="form-group">
											<label for="cst_gender" class="col-sm-4 control-label"><?php echo e(__('mylanguage.gender')); ?></label>
											<div class="col-sm-8">
												<select id="cst_gender" name="cst_gender" class="form-control">
													<option value="">- <?php echo e(__('mylanguage.gender')); ?> -</option>
													<option value="Male"><?php echo e(__('mylanguage.male')); ?></option>
													<option value="Female"><?php echo e(__('mylanguage.female')); ?></option>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label for="cst_occupation" class="col-sm-4 control-label"><?php echo e(__('mylanguage.occupation')); ?></label>
											<div class="col-sm-8">
												<input type="text" class="form-control" id="cst_occupation" name="cst_occupation" placeholder="<?php echo e(__('mylanguage.occupation')); ?>" >
											</div>
										</div>	
									</div>
								</div>
							</div>
						</div>
						<div class="widget">
							<div class="widget-header">
							<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.note')); ?></h3></div>
							<div class="widget-content">
								<div class="row">
									<div class="col-md-12 form-horizontal">
										<div class="form-group">
											<div class="col-sm-12">
<textarea class="form-control" id="cst_note" name="cst_note" placeholder="<?php echo e(__('mylanguage.note')); ?>"></textarea>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- END HORIZONTAL FORM -->
					</div>
					<div id="colored22" class="tab-pane fade">
						<!-- HORIZONTAL FORM -->
						<div class="row">
							<div class="col-md-6">
								<div class="widget">
									<div class="widget-header">
									<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.Residence_Address')); ?>:</h3></div>
									<div class="widget-content">
										<div class="row">
											<div class="col-md-12 form-horizontal">
												<div class="form-group">
													<label for="lacc_resaddr_addr" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Address')); ?></label>
													<div class="col-sm-8">
														<textarea class="form-control" id="lacc_resaddr_addr" name="lacc_resaddr_addr" placeholder="<?php echo e(__('mylanguage.Address')); ?>"></textarea>
													</div>
												</div>
												<div class="form-group">
													<label for="lacc_resaddr_city" class="col-sm-4 control-label"><?php echo e(__('mylanguage.City')); ?></label>
													<div class="col-sm-8">
														<input type="text" class="form-control" id="lacc_resaddr_city" name="lacc_resaddr_city" placeholder="<?php echo e(__('mylanguage.City')); ?>">
													</div>
												</div>
												<div class="form-group">
													<label for="lacc_resaddr_pin" class="col-sm-4 control-label"><?php echo e(__('mylanguage.PIN_Code')); ?></label>
													<div class="col-sm-8">
														<input type="text" class="form-control" id="lacc_resaddr_pin" name="lacc_resaddr_pin" placeholder="<?php echo e(__('mylanguage.PIN_Code')); ?>">
													</div>
												</div>
												<div class="form-group">
													<label for="lacc_resaddr_landmark" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Landmark')); ?></label>
													<div class="col-sm-8">
														<input type="text" class="form-control" id="lacc_resaddr_landmark" name="lacc_resaddr_landmark" placeholder="<?php echo e(__('mylanguage.Landmark')); ?>">
													</div>
												</div>
												<div class="form-group">
													<label for="lacc_resaddr_mob" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Mobno')); ?></label>
													<div class="col-sm-8">
														<input type="text" class="form-control" id="lacc_resaddr_mob" name="lacc_resaddr_mob" placeholder="<?php echo e(__('mylanguage.Mobno')); ?>">
													</div>
												</div>
												<div class="form-group">
													<label for="lacc_resaddr_tel" class="col-sm-4 control-label"><?php echo e(__('mylanguage.TelNo')); ?></label>
													<div class="col-sm-8">
														<input type="text" class="form-control" id="lacc_resaddr_tel" name="lacc_resaddr_tel" placeholder="<?php echo e(__('mylanguage.TelNo')); ?>">
													</div>
												</div>
												<div class="form-group">
													<label for="lacc_resaddr_email" class="col-sm-4 control-label"><?php echo e(__('mylanguage.EmailID')); ?></label>
													<div class="col-sm-8">
														<input type="text" class="form-control" id="lacc_resaddr_email" name="lacc_resaddr_email" placeholder="<?php echo e(__('mylanguage.EmailID')); ?>">
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							
							<div class="col-md-6">
								<!-- REGISTRATION FORM WITH ICONS -->								
								<div class="widget">
									<div class="widget-header">
									<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.PermanentAddress')); ?></h3></div>
									<div class="widget-content">
										<div class="row">
		<div class="col-md-12 form-horizontal">
			<div class="form-group">
				<label for="lacc_permaddr_addr" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Address')); ?></label>
				<div class="col-sm-8">
					<textarea class="form-control" id="lacc_permaddr_addr" name="lacc_permaddr_addr" placeholder="<?php echo e(__('mylanguage.Address')); ?>"></textarea>
				</div>
			</div>
	 
			<div class="form-group">
				<label for="lacc_permaddr_city" class="col-sm-4 control-label"><?php echo e(__('mylanguage.City')); ?></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="lacc_permaddr_city" name="lacc_permaddr_city" placeholder="<?php echo e(__('mylanguage.City')); ?>">
				</div>
			</div>
			<div class="form-group">
				<label for="lacc_permaddr_pin" class="col-sm-4 control-label"><?php echo e(__('mylanguage.PIN_Code')); ?></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="lacc_permaddr_pin" name="lacc_permaddr_pin" placeholder="<?php echo e(__('mylanguage.PIN_Code')); ?>">
				</div>
			</div>
			<div class="form-group">
				<label for="lacc_permaddr_landmark" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Landmark')); ?></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="lacc_permaddr_landmark" name="lacc_permaddr_landmark" placeholder="<?php echo e(__('mylanguage.Landmark')); ?>">
				</div>
			</div>
			<div class="form-group">
				<label for="lacc_permaddr_mob" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Mobno')); ?></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="lacc_permaddr_mob" name="lacc_permaddr_mob" placeholder="<?php echo e(__('mylanguage.Mobno')); ?>">
				</div>
			</div>
			<div class="form-group">
				<label for="lacc_permaddr_tel" class="col-sm-4 control-label"><?php echo e(__('mylanguage.TelNo')); ?></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="lacc_permaddr_tel" name="lacc_permaddr_tel" placeholder="<?php echo e(__('mylanguage.TelNo')); ?>">
				</div>
			</div>
			<div class="form-group">
				<label for="lacc_permaddr_email" class="col-sm-4 control-label"><?php echo e(__('mylanguage.EmailID')); ?></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="lacc_permaddr_email" name="lacc_permaddr_email" placeholder="<?php echo e(__('mylanguage.EmailID')); ?>">
				</div>
			</div>
		</div>
										</div>
									</div>
								</div>
								<!-- END REGISTRATION FORM WITH ICONS -->
							</div>							
						</div>
						<!-- END HORIZONTAL FORM -->
					</div>
					<div id="colored23" class="tab-pane fade">
						<!-- HORIZONTAL FORM -->
						<div class="row">
							<div class="col-md-12">
								<!-- REGISTRATION FORM WITH ICONS -->
<div class="widget">
	<div class="widget-header">
	<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.Family_Members_entry')); ?></h3></div>
	<div class="widget-content">	
<input type="hidden" class="form-control" id="family_cst_id" name="family_cst_id" value="0" >
		<div class="row">
			<div class="col-md-6 form-horizontal">
				<div class="form-group">
					<label for="cst_family_relationship" class="col-sm-4 control-label"><?php echo e(__('mylanguage.relationship')); ?></label>
					<div class="col-sm-8">
						<select id="cst_family_relationship" name="cst_family_relationship" class="form-control">
							<option value="">- <?php echo e(__('mylanguage.select')); ?> -</option>
							<option value="Husband"><?php echo e(__('mylanguage.Husband')); ?></option>
							<option value="Wife"><?php echo e(__('mylanguage.Wife')); ?></option>
							<option value="Father"><?php echo e(__('mylanguage.Father')); ?></option>
							<option value="Mother"><?php echo e(__('mylanguage.Mother')); ?></option>
							<option value="Son"><?php echo e(__('mylanguage.Son')); ?></option>
							<option value="Daughter"><?php echo e(__('mylanguage.Daughter')); ?></option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_name" class="col-sm-4 control-label"><?php echo e(__('mylanguage.name')); ?></label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="cst_family_name" name="cst_family_name" placeholder="<?php echo e(__('mylanguage.name')); ?>" >
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_gender" class="col-sm-4 control-label"><?php echo e(__('mylanguage.gender')); ?></label>
					<div class="col-sm-8">
						<select id="cst_family_gender" name="cst_family_gender" class="form-control">
								<option value="">- <?php echo e(__('mylanguage.gender')); ?> -</option>
								<option value="Male"><?php echo e(__('mylanguage.male')); ?></option>
								<option value="Female"><?php echo e(__('mylanguage.female')); ?></option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_maritalstatus" class="col-sm-4 control-label"><?php echo e(__('mylanguage.marital_status')); ?></label>
					<div class="col-sm-8">
						<select id="cst_family_maritalstatus" name="cst_family_maritalstatus" class="form-control">
							<option value="">- <?php echo e(__('mylanguage.marital_status')); ?> -</option>
							<option value="Single"><?php echo e(__('mylanguage.single')); ?></option>
							<option value="Married"><?php echo e(__('mylanguage.single')); ?></option>
							<option value="Divorced"><?php echo e(__('mylanguage.divorced')); ?></option>
							<option value="Widowed"><?php echo e(__('mylanguage.widowed')); ?></option>
						</select>
					</div>
				</div>				
				<div class="form-group">
					<label for="cst_family_qualification" class="col-sm-4 control-label"><?php echo e(__('mylanguage.qualification')); ?></label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="cst_family_qualification" name="cst_family_qualification" placeholder="<?php echo e(__('mylanguage.qualification')); ?>" >
					</div>
				</div>
			</div>
			<div class="col-md-6 form-horizontal">
				<div class="form-group">
					<label for="cst_family_dob" class="col-sm-4 control-label"><?php echo e(__('mylanguage.dob')); ?>.</label>
					<div class="col-sm-8">
						<input type="date" class="form-control" id="cst_family_dob" name="cst_family_dob" placeholder="DOB." onkeyup="ageCount(this.value,'cst_family_age')" onchange="ageCount(this.value,'cst_family_age')" >
						<span id="ageerror"></span>
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_age" class="col-sm-4 control-label"><?php echo e(__('mylanguage.age')); ?>.</label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="cst_family_age" name="cst_family_age" placeholder="<?php echo e(__('mylanguage.age')); ?>" readonly >
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_bloodgroup" class="col-sm-4 control-label"><?php echo e(__('mylanguage.blood_group')); ?></label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="cst_family_bloodgroup" name="cst_family_bloodgroup" placeholder="<?php echo e(__('mylanguage.blood_group')); ?>" >
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_mobileno" class="col-sm-4 control-label"><?php echo e(__('mylanguage.Mobno')); ?></label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="cst_family_mobileno" name="cst_family_mobileno" placeholder="<?php echo e(__('mylanguage.Mobno')); ?>" >
					</div>
				</div>
				<div class="form-group">
					<label for="cst_family_note" class="col-sm-4 control-label"><?php echo e(__('mylanguage.note')); ?></label>
					<div class="col-sm-8"><input type="text" class="form-control" id="cst_family_note" name="cst_family_note" placeholder="<?php echo e(__('mylanguage.note')); ?>" >
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="widget-footer">
	<center><button type="submit" id="btnfamilymember" name="btnfamilymember" class="btn btn-default">Add</button></center>
	</div>
</div>
								<!-- END REGISTRATION FORM WITH ICONS -->
							</div>
							
							<div class="col-md-12">
								<!-- REGISTRATION FORM WITH ICONS -->
								
								<div class="widget">
									<div class="widget-header">
									<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.family_members_list')); ?>:</h3></div>
									<div class="widget-content">
										<div class="row">
											<div class="col-md-12 form-horizontal" id="idfamilylist"></div>
										</div>
									</div>
								</div>
								<!-- END REGISTRATION FORM WITH ICONS -->
							</div>
							

						</div>
						<!-- END HORIZONTAL FORM -->
					</div>
					<div id="colored24" class="tab-pane fade">
						<!-- HORIZONTAL FORM -->
						
						<div class="row">

							<div class="col-md-12">
								<!-- REGISTRATION FORM WITH ICONS -->
<div class="widget">
	<div class="widget-header">
	<h3><i class="fa fa-edit"></i> <?php echo e(__('mylanguage.upload_documents')); ?></h3></div>
	<input type="hidden" class="form-control" id="document_cst_id" name="document_cst_id" value="0" >
	<div class="widget-content">
		<div class="row">
			<div class="col-md-6 form-horizontal">
				<div class="form-group">
					<label for="doc_doctype" class="col-sm-4 control-label"><?php echo e(__('mylanguage.document_type')); ?></label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="doc_doctype" name="doc_doctype" placeholder="<?php echo e(__('mylanguage.document_type')); ?>" >
					</div>
				</div>			
				<div class="form-group">
					<label for="doc_docfile" class="col-sm-4 control-label"><?php echo e(__('mylanguage.document_file')); ?></label>
					<div class="col-sm-8">
						<input type="file" class="form-control" id="doc_docfile" name="doc_docfile"  >
					</div>
				</div>
			</div>
			<div class="col-md-6 form-horizontal">
				<div class="form-group">
					<label for="doc_docno" class="col-sm-4 control-label"><?php echo e(__('mylanguage.idnocode')); ?></label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="doc_docno" name="doc_docno" placeholder="<?php echo e(__('mylanguage.idnocode')); ?>" >
					</div>
				</div>
			</div>
						
			<div class="col-md-6 form-horizontal">
				<div class="form-group">
					<label for="doc_detail" class="col-sm-4 control-label"><?php echo e(__('mylanguage.document_note')); ?></label>
					<div class="col-sm-8"><input type="text" class="form-control" id="doc_detail" name="doc_detail" placeholder="<?php echo e(__('mylanguage.document_note')); ?>" ></div>
				</div>
			</div>
		</div>
	</div>
	<div class="widget-footer">
	<center><button type="submit" id="btndocument" name="btndocument" class="btn btn-default">Add</button></center>
	</div>
</div>
								<!-- END REGISTRATION FORM WITH ICONS -->
							</div>
							
							<div class="col-md-12">
								<!-- REGISTRATION FORM WITH ICONS -->
								
								<div class="widget">
									<div class="widget-header">
									<h3><i class="fa fa-edit"></i> View Uploaded Documents:</h3></div>
									<div class="widget-content">
										<div class="row">
						<div class="col-md-12 form-horizontal" id="iddocumentlist"></div>
										</div>
									</div>
								</div>
								<!-- END REGISTRATION FORM WITH ICONS -->
							</div>
							
						</div>
						<!-- END HORIZONTAL FORM -->
					</div>
					
					<div id="colored25" class="tab-pane fade">
						<!-- HORIZONTAL FORM -->
						<div class="row">							
							<div class="col-md-12">
								<!-- Invoice amount - Paid Amount - Balance Amount STARTS HERE-->
								<div class="widget" id="tabipblist"></div>
								<!-- Invoice amount - Paid Amount - Balance Amount ENDS HERE-->
							</div>
						</div>
						<!-- END HORIZONTAL FORM -->
					</div>								
				
					<div id="colored26" class="tab-pane fade">
						<!-- HORIZONTAL FORM -->
						<div class="row">
							<div class="col-md-12" id="tabrptlist"></div>
						<center><a class="form-control" style="width: 100px;" target="_blank" href="splloadprintcrdr?" >Print</a></centeR>
								<hr>
						<!-- END HORIZONTAL FORM -->
					</div>								
				
				</div>
				<!-- HORIZONTAL FORM -->
				<div class="widget">
					<div class="widget-header">
<div class="row">
	<div class="col-md-4">
		<button type="submit" id="btndelete" name="btndelete" class="btn btn-danger  delete_submit">Delete</button>
	</div>
	<div class="col-md-4">	
		<center>
			<?php if(isset($data['cst_id'])): ?>
			<button type="submit" id="btnsubmitall" name="btnsubmitall" class="btn btn-info loanapplicant_submit">Update</button>
			<?php else: ?>
			<button type="submit" id="btnsubmitall" name="btnsubmitall" class="btn btn-default loanapplicant_submit">Submit</button>
			<?php endif; ?>
		</center>	
	</div>
	<div class="col-md-4 text-right">
	</div>
</div>		
					
				</div>
			</form>
			<!-- END HORIZONTAL FORM -->
		</div>
	</div>
</div>
<style>
.modal-dialog.modal-100 {
    width: 90%;
    /*margin: 30px auto;*/
}
</style>
<!-- ###### The Modal payment amount starts here ###### -->
<div class="modal" id="viewtransdetail">
    <div class="modal-dialog paymentmodal modal-100">
      <div class="modal-content">      
        <!-- Modal Header -->
        <div class="modal-header">
          <h4 class="modal-title">View Transaction</h4>
        </div>
        <!-- Modal body -->
        <div class="modal-body" id="idpaymentrecord"></div>
        <!-- Modal footer -->
        <div class="modal-footer">
          <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
        </div>        
      </div>
    </div>
</div>
<!-- ###### The Modal payment amount ends here ###### -->

<!-- ###### The Modal Payment Receipt starts here ###### -->
<div class="modal" id="modprintpaymentreceipt">
		<div class="modal-dialog paymentmodal">
		  <div class="modal-content">
		  
			<!-- Modal Header -->
			<div class="modal-header">
			  <h4 class="modal-title">Payment Receipt...</h4>
			</div>
			
			<!-- Modal body -->
			<div class="modal-body" id="divbillprint">
				<!-- PRINT RECEIPT START HERE -->
<div class="widget widget-table">
	<div class="widget-content">
	
		<div class="row">
			<div class="col-md-12">
				<center>
					<center><img src="img/printlogo.png" style="width: 100%;"></center>
				</center>
				<hr>
				<center><b><?php echo e(__('mylanguage.pay_receipt')); ?></b></center>
				<hr>
			</div>
			
			<div class="col-md-6">
				<b><?php echo e(__('mylanguage.member_id')); ?> <label id="receiptmember_id" ></label></b><br>
				<b><?php echo e(__('mylanguage.name')); ?> <label id="receiptname"></label></b>
			</div>
			<div class="col-md-6 text-right">
				<b><?php echo e(__('mylanguage.billno')); ?> <label id="receiptbillno"></label></b><br>
				<b><?php echo e(__('mylanguage.date')); ?> <label id="receiptdate" >00-00-0000</label></b>
			</div>

			<div class="col-md-12"><hr></div>

			<div class="col-md-12" id="receipttable"></div>
			
<input type="hidden" name="transaction_id" id="transaction_id" value="">

			<div class="col-md-6"><h1 style="border:1px solid #cecece;">Rs. <label id="receiptamt1">000</label>/-</h2>Subject to realisation</div>
			<div class="col-md-6 text-right">For <b><?php echo e(__('mylanguage.mosquename')); ?></b> <br><br><br><br>Authorised Signatury
			</div>
			
		</div>
	</div>
</div>
<!-- PRINT RECEIPT ENDS HERE -->
			</div>
			<!-- Modal footer -->
			<div class="modal-footer">			
				<button type="button" class="btn btn-dark" onclick="ConfirmToDelete()">Delete</button> 
				<button type="button" class="btn btn-primary"  onclick="printDiv('divbillprint')">Print</button>
				<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button> 
			</div>
			
		  </div>
		</div>
</div>
<!-- ###### The Modal Payment Receipt ends here ###### -->

<script src="js/jquery.validate.min.js"></script>
<style>
	.error
	{
	color:red;
	}
</style>
<script>
//Moday Make Payment Starts here
	$('#viewtransdetail').on('show.bs.modal', function(e) 
	{
			var $modal = $(this),
            trn_id = e.relatedTarget.id;
			$('#trn_id').val(trn_id);
			$.ajax({
				url: 'splviewbillrecs',
				type: 'GET',
				data:'&trn_id='+trn_id,
				success: function(data)
				{
					$('#idpaymentrecord').html("test");
				}
			});
    })
//Modal Make Payment Ends here
</script>
<script>
			$("#btndelete").click(function()
			{
				var totamt = $("input[name='totamt']").val();
				if(totamt > 0)
				{
					alert("Payment not cleared.. You cannot delete this record...");
				}
				else
				{
					if(confirm("Are you sure want to delete this record?") == true)
					{
						var cst_id =  $('#cst_id').val();
						$.ajax({
							url: 'spldeletemember',
							type: 'GET',
							data:'&cst_id='+cst_id,
							success: function(data)
							{
								$('#sideMenu').load('viewspecialmembers');
							}
						});
					}
				}
				return false;
			});
	i = 0;
			$("#btnfamilymember").click(function()
			{
				i = 0;
					//alert-family-info alert-family-success alert-family-danger
					//$(".alert-family-info").find("ul").html('<li class="fa fa-cog fa-spin fa-1x fa-fw"></li>Inserting record...');
					var family_status = "";
					var _token = $("input[name='_token']").val();
					var cst_id =  $('#cst_id').val();
					var cst_family_relationship =  $('#cst_family_relationship').val();
					var cst_family_name  =  $('#cst_family_name').val();
					var cst_family_gender =  $('#cst_family_gender').val();
					var cst_family_maritalstatus =  $('#cst_family_maritalstatus').val();
					var cst_family_qualification =  $('#cst_family_qualification').val();
					var cst_family_dob =  $('#cst_family_dob').val();
					var cst_family_age  = $('#cst_family_age').val();
					var cst_family_bloodgroup =  $('#cst_family_bloodgroup').val();
					var cst_family_mobileno =  $('#cst_family_mobileno').val();
					var cst_family_note =  $('#cst_family_note').val();
					var family_cst_id =  $('#family_cst_id').val();
					if(cst_id == 0)
					{
						family_status =  "Pending";
					}
					else
					{
						family_status =  "Active";
					}
					if(i == 0)
					{
						i++;
						$.ajax({
							url: "/spladdfamilymembers",
							type:'POST',
							data: {_token:_token, cst_id:cst_id, cst_family_relationship: cst_family_relationship, cst_family_name: cst_family_name, cst_family_gender: cst_family_gender, cst_family_maritalstatus:cst_family_maritalstatus, cst_family_qualification:cst_family_qualification, cst_family_dob:cst_family_dob, cst_family_age:cst_family_age, cst_family_bloodgroup:cst_family_bloodgroup, cst_family_mobileno:cst_family_mobileno, cst_family_note:cst_family_note, family_cst_id:family_cst_id,family_status: family_status},
							success: function(data) 
							{
								if(data.status == 1)
								{
									alert("Family Record Inserted Successfully..");
								}
								else
								{
									alert("Family Record Updated Successfully..");
								}
								document.getElementById("idfamilylist").innerHTML = data.transrecord;
								$('#cst_family_name').val('');
								$('#cst_family_qualification').val('');
								$('#cst_family_bloodgroup').val('');
								$('#cst_family_mobileno').val('');
								$('#cst_family_note').val('');
								$('#family_cst_id').val('0');
							}
						});
					}
					return false;
			});
				
				$("#btndocument").click(function(){
					i = 0;
					var doc_status = "";
					var _token = $("input[name='_token']").val();
					var cst_id =  $('#cst_id').val();
					var document_cst_id =  $('#document_cst_id').val();
					var doc_doctype  =  $('#doc_doctype').val();
					var doc_docfile =  $('#doc_docfile').val();
					var doc_docno =  $('#doc_docno').val();
					var doc_detail =  $('#doc_detail').val();
					var formData = new FormData($("#frmmain")[0]);
					if(i == 0)
					{
						i++;
						$.ajax({
							url: "/spluploadmemberdocs",
							type:'POST',
							data: formData,
							processData: false,
							contentType: false,
							//data: {_token:_token, cst_id:cst_id, document_cst_id: document_cst_id, doc_doctype: doc_doctype, doc_docfile: doc_docfile, doc_docno:doc_docno, doc_detail:doc_detail, doc_status: doc_status},
							success: function(data) 
							{
								if(data.status == 1)
								{
									alert("Document Uploaded Successfully..");
								}
								else
								{
									alert("Document Record Updated Successfully..");
								}
								document.getElementById("iddocumentlist").innerHTML = data.transrecord;
								$('#doc_doctype').val('');
								$('#doc_docfile').val('');
								$('#doc_docno').val('');
								$('#doc_detail').val('');
								$('#document_cst_id').val('0');
							}
						});
					}
					return false;
				});
				$("#btnsubmitall").click(function(){
					i = 0;
//#########################btnsubmitall starts################################
$(".alert-info").find("ul").html('<li class="fa fa-cog fa-spin fa-1x fa-fw"></li>Inserting record...');
	var _token = $("input[name='_token']").val();
	var Username = $('#Username').val();
	var cst_id = $('#cst_id').val();
	var cst_doj = $('#cst_doj').val();
	var cst_name = $('#cst_name').val();
	var cst_dob = $('#cst_dob').val();
	var grd_id = $('#grd_id').val();
	var cst_code = $('#cst_code').val();
	var cst_grd_code = $('#cst_grd_code').val();
	var lacc_age = $('#lacc_age').val();
	var cst_maritalstatus = $('#cst_maritalstatus').val();
	var cst_qualification = $('#cst_qualification').val();
	var cst_bloodgroup = $('#cst_bloodgroup').val();
	var cst_gender = $('#cst_gender').val();
	var cst_occupation = $('#cst_occupation').val();
	var cst_income = $('#cst_income').val();
	var cst_note = $('#cst_note').val();
	var lacc_resaddr_addr = $('#lacc_resaddr_addr').val();
	var lacc_resaddr_city = $('#lacc_resaddr_city').val();
	var lacc_resaddr_pin = $('#lacc_resaddr_pin').val();
	var lacc_resaddr_landmark = $('#lacc_resaddr_landmark').val();
	var lacc_resaddr_mob = $('#lacc_resaddr_mob').val();
	var lacc_resaddr_tel = $('#lacc_resaddr_tel').val();
	var lacc_resaddr_email = $('#lacc_resaddr_email').val();
	var lacc_permaddr_addr = $('#lacc_permaddr_addr').val();
	var lacc_permaddr_city = $('#lacc_permaddr_city').val();
	var lacc_permaddr_pin = $('#lacc_permaddr_pin').val();
	var lacc_permaddr_landmark = $('#lacc_permaddr_landmark').val();
	var lacc_permaddr_mob = $('#lacc_permaddr_mob').val();
	var lacc_permaddr_tel = $('#lacc_permaddr_tel').val();
	var lacc_permaddr_email = $('#lacc_permaddr_email').val();
	var jamath_member_id_hidden = $('#jamath_member_id_hidden').val();
	var jamath_member_id = $('#jamath_member_id').val();
/*
	document.getElementById("errtaxtype").innerHTML = "";
	document.getElementById("errtaxpercentage").innerHTML = "";
	if(taxtype == "")
	{
		document.getElementById("errtaxtype").innerHTML = "Tax Type should not be empty...";
		$(".alert-info").find("ul").html('<li class="fa fa-cog fa-1x fa-fw"></li>Kindly check the error...');
	}
	else if(taxpercentage == "")
	{
		document.getElementById("errtaxpercentage").innerHTML = "Tax Percentage should not be empty...";
		$(".alert-info").find("ul").html('<li class="fa fa-cog fa-1x fa-fw"></li>Kindly check the error...');
	}
	else
*/
	{						   
		if(i == 0)
		{
		i++;
		$.ajax({
		url: "/splApplicantionInsert",
		type:'POST',
		dataType: "json",
		data: {Username:Username, cst_id: cst_id,cst_doj:cst_doj,cst_name:cst_name,cst_dob:cst_dob,grd_id:grd_id,cst_code:cst_code,cst_grd_code:cst_grd_code,lacc_age:lacc_age,cst_maritalstatus:cst_maritalstatus,cst_qualification:cst_qualification,cst_bloodgroup:cst_bloodgroup,cst_gender:cst_gender,cst_occupation:cst_occupation,cst_income:cst_income,cst_note:cst_note, lacc_resaddr_addr:lacc_resaddr_addr,lacc_resaddr_city:lacc_resaddr_city, lacc_resaddr_pin:lacc_resaddr_pin, lacc_resaddr_landmark:lacc_resaddr_landmark, lacc_resaddr_mob:lacc_resaddr_mob,lacc_resaddr_tel:lacc_resaddr_tel,  lacc_resaddr_email:lacc_resaddr_email, lacc_permaddr_addr:lacc_permaddr_addr, lacc_permaddr_city:lacc_permaddr_city,lacc_permaddr_pin:lacc_permaddr_pin, lacc_permaddr_landmark:lacc_permaddr_landmark, lacc_permaddr_mob:lacc_permaddr_mob,lacc_permaddr_tel:lacc_permaddr_tel, lacc_permaddr_email:lacc_permaddr_email,jamath_member_id:jamath_member_id_hidden},
			success: function(data) 
			{
				if(data.entry_type == "Insert")
				{
					alert("Record Inserted successfully...");
				}
				if(data.entry_type == "Update")
				{
					alert("Record Updated successfully...");
				}
				$('#sideMenu').load('viewspecialmembers');
			}
		});	
		}
	}
//############################btnsubmitall ends#############################
					return false;
				});
	//alert-family-info alert-family-success alert-family-danger
	function printErrorMsg (msg) {			
		$(".alert-family-info").css('display','none');
		$(".print-success-msg").css('display','none');
		$(".print-error-msg").find("ul").html('');
		$(".print-error-msg").css('display','block');
		$(".print-error-msg").find("ul").append('<li class="fa fa-times-circle fa-1x fa-fw"></li>'+msg);
	}
			
	function printSuccessMsg (msg) {
		$(".alert-info").css('display','none');
		$(".print-error-msg").css('display','none');
		$(".print-success-msg").find("ul").html('');
		$(".print-success-msg").css('display','block');
		$(".print-success-msg").find("ul").append('<li class="fa fa-check  fa-1x fa-fw"></li>'+msg);
	}
	
	function ageCount(dt,agectrl)
	{
		lacc_dob=dt;
		ageCounts(lacc_dob,agectrl);
	}
	function ageCounts(lacc_dob,agectrl)
	{
		$('#ageerror').html("");
		dob = new Date(lacc_dob);
		var today = new Date();
		var age = Math.floor((today-dob) / (365.25 * 24 * 60 * 60 * 1000));
		if(age<0)
		{
			$('#ageerror').html("<span style='color:red'>Sorry! Age Below Then 0</span>");
		}
		else
		{
			$('#ageerror').html("");
			$('#'+agectrl).val(age);
		}		
	}
	//###Coding to Load Grade Serial Number starts here
	function loadgradeslno(doj,gradeid)
	{
		//loadgradeslno(cst_doj.value,grd_id.value)
		if(gradeid=="")
		{
		}
		else
		{
			var Username = $('#Username').val();
			$('#cst_code').val('');
			$.ajax({
					url:'splLoadgradeserialnumber',
					type:'GET',
					data:'&doj='+doj+'&gradeid='+gradeid+'&Username='+Username,
					success:function(data)
					{
						if($('#cst_id').val() == 0)
						{
							$('#cst_code').val(data['reclist'][0].gradeprefix+data['reclist'][0].custcode);
							$('#cst_grd_code').val(data['reclist'][0].custcode);				
							$('#tabipb').html(data['transrecord']);
							$('#tabrpt').html(data['rpt_transrecord']);
						}
						else
						{
							$('#cst_code').val(data['reclist'][0].gradeprefix+$('#cst_grd_code').val());
							$('#tabipb').html(data['transrecord']);
							$('#tabrpt').html(data['rpt_transrecord']);
						}
					}
				});
		}
	}
	//###Coding to Load Grade Serial Number ends here
	//Edit Family Members Record starts here
	function funeditfamilymembers(customerid)
	{
		$.ajax({
			type: "GET",
			url:"/spleditfamilymember",
			dataType: "json",
			data: {			
				'customerid': customerid
			},
			success: function (data) {
					$('#cst_family_relationship').val(data.sqlstatement[0].cst_relationship);
					$('#cst_family_name').val(data.sqlstatement[0].cst_name);
					$('#cst_family_gender').val(data.sqlstatement[0].cst_gender);
					$('#cst_family_maritalstatus').val(data.sqlstatement[0].cst_maritalstatus);
					$('#cst_family_qualification').val(data.sqlstatement[0].cst_qualification);
					$('#cst_family_dob').val(data.sqlstatement[0].cst_dob);
					ageCount(data.sqlstatement[0].cst_dob,'cst_family_age');
					$('#cst_family_bloodgroup').val(data.sqlstatement[0].cst_bloodgroup);
					$('#cst_family_mobileno').val(data.contactno);
					$('#cst_family_note').val(data.sqlstatement[0].cst_note);
					$('#family_cst_id').val(data.sqlstatement[0].cst_id);
			}
		});
	}
	//Edit Family Members Record ends here
	//Delete Family Members starts here
	function DeleteFamilyMembers(customerid)
	{
		var cst_id = $('#cst_id').val();
		if(confirm("Are you sure want to delete this record?") == true)
		{
			k = 0;
			if(k == 0)
			{
				k++;
				$.ajax({
					type: "GET",
					url:"/spldelfamilymember",
					dataType: "json",
					data: {
						'_token': $('input[name=_token]').val(),
						'customerid': customerid,
						'cst_id':cst_id
					},
					success: function (data) {	
						$('#idfamilylist').html(data['transrecord']);
					}
				});
			}
		}		
	}
	//Delete Family Members ends here
	//Delete Members document starts here
	function DeleteMemberDocuments(doc_id)
	{
		var cst_id = $('#cst_id').val();
		if(confirm("Are you sure want to delete this record?") == true)
		{
			k = 0;
			if(k == 0)
			{
				k++;
				$.ajax({
					type: "GET",
					url:"/spldelmemberdocs",
					dataType: "json",
					data: {
						'_token': $('input[name=_token]').val(),
						'doc_id': doc_id,
						'cst_id':cst_id
					},
					success: function (data) {	
						$('#iddocumentlist').html(data['transrecord']);
					}
				});
			}
		}	
	}
	//Delete Members document ends here
</script>
<script>
	$(document).ready(function(){
		var edit_cst_id = parseInt($('#cst_id').val());
		if(edit_cst_id == 0)
		{
			$.ajax({
				type: "GET",
				url:"/loadnextspecialmemid",
				dataType: "json",
				data: {
					'_token': $('input[name=_token]').val()
				},
				success: function (data) {
					$('input[name=cst_code]').val(data['custcode'][0].custcode);
				}
			});
		}
	});
	
	$(document).ready(function(){
		var edit_cst_id = parseInt($('#cst_id').val());
		if(edit_cst_id != 0)
		{
			loadeditcstrec();
		}
	});	
	
	function loadeditcstrec()
	{
			var edit_cst_id = $('#cst_id').val();
			$.ajax({
			type: "GET",
			url:"/splloadeditingapplication",
			dataType: "json",
			data: {
				'_token': $('input[name=_token]').val(),
				'edit_cst_id': edit_cst_id
			},
			success: function (data) {
					$('#cst_grd_code').val(data['cst_customer'].cst_code);
					$('#cst_code').val(data['cst_customer'].cst_code);
					$('#cst_name').val(data['cst_customer'].cst_name);
if(data['cst_customer'].cst_relation_cst_id != 0)					
{
					$('#jamath_member_id_hidden').val(data['cst_customer'].cst_relation_cst_id);
					$('#jamath_member_id').val(data['cst_grade'].grd_prefix + data['main_customer'].cst_code);
}
					$('#cst_maritalstatus').val(data['cst_customer'].cst_maritalstatus);
					$('#cst_occupation').val(data['cst_customer'].cst_occupation);
					$('#cst_income').val(data['cst_customer'].cst_income);
					$('#cst_qualification').val(data['cst_customer'].cst_qualification);
					$('#cst_gender').val(data['cst_customer'].cst_gender);
					$('#cst_doj').val(data['cst_customer'].cst_doj);
					$('#cst_bloodgroup').val(data['cst_customer'].cst_bloodgroup);
					$('#cst_relationship').val(data['cst_customer'].cst_relationship);
					$('#cst_note').val(data['cst_customer'].cst_note);
					$('#cst_dob').val(data['cst_customer'].cst_dob);
					$('#grd_id').val(data['cst_customer'].grd_id);
					ageCount(data['cst_customer'].cst_dob,'lacc_age');
					//Residence_Address
					$('#lacc_resaddr_addr').val(data['resaddress'][0]);
					$('#lacc_resaddr_city').val(data['resaddress'][1]);
					$('#lacc_resaddr_pin').val(data['resaddress'][2]);
					$('#lacc_resaddr_landmark').val(data['resaddress'][3]);
					$('#lacc_resaddr_mob').val(data['resaddress'][4]);
					$('#lacc_resaddr_tel').val(data['resaddress'][5]);
					$('#lacc_resaddr_email').val(data['resaddress'][6]);
					//PermanentAddress
					$('#lacc_permaddr_addr').val(data['permaddress'][0]);
					$('#lacc_permaddr_city').val(data['permaddress'][1]);
					$('#lacc_permaddr_pin').val(data['permaddress'][2]);
					$('#lacc_permaddr_landmark').val(data['permaddress'][3]);
					$('#lacc_permaddr_mob').val(data['permaddress'][4]);
					$('#lacc_permaddr_tel').val(data['permaddress'][5]);
					$('#lacc_permaddr_email').val(data['permaddress'][6]);
					$('#totamt').val(data['totamt']);
					$('#idfamilylist').html(data['transrecord']);
					$('#iddocumentlist').html(data['docrecord']);
					$('#tabipblist').html(data['crdrrecord']);
					$('#tabrptlist').html(data['cstrpt']);
			}
		});
	}
	$(document).ready(function(){
		if(document.getElementById('grd_id').value == "")
		{
			loadeditcstrec();
		}
	});
</script>																				
<script>
	function BillPrint(transaction_id)
	{
		$("#modprintpaymentreceipt").modal();
		$.ajax({
			url: 'splprintpaymentbill',
			type: 'get',
			data:'&transaction_id='+transaction_id,
			success: function(data)
			{
				//Update balance in table starts here
				$('#tot_'+data.trn_transaction.cst_id).html(""+data.bil_billrec[0].totalamt);
				paidamt= parseFloat(parseFloat(data.bil_billrec[0].paidamt) + parseFloat(data.bil_billrec[0].advamt) + parseFloat(data.bil_billrec[0].prepayamt));
				$('#paid_'+data.trn_transaction.cst_id).html(""+ paidamt);
				amt= parseFloat(data.bil_billrec[0].totalamt) - (parseFloat(data.bil_billrec[0].paidamt) + parseFloat(data.bil_billrec[0].advamt) + parseFloat(data.bil_billrec[0].prepayamt));
				$('#bal_'+data.trn_transaction.cst_id).html(""+amt);
				//Update balance in table ends here							
				document.getElementById("receiptbillno").innerHTML=data.trn_billno;
				document.getElementById("receiptmember_id").innerHTML= data.cst_grade_prefix + "-" + data.cst_code;
				document.getElementById("receiptdate").innerHTML=data.trn_date;
				document.getElementById("receiptname").innerHTML=data.cst_name;
				document.getElementById("receiptamt1").innerHTML=data.bilr_gtotal;
				document.getElementById("transaction_id").value=transaction_id;
				$('#receipttable').html(data.transrecord);
			}
		});
	}
	function ConfirmToDelete()
	{
		var transaction_ids = $('input[name=transaction_ids]').val();
		if(confirm("Are you sure want to delete this Payment record?") == true)
		{
			k = 0;
			if(k == 0)
			{
				k++;
				$.ajax({
					type: "GET",
					url:"/spldelpaymentrecord",
					dataType: "json",
					data: {
						'_token': $('input[name=_token]').val(),
						'transaction_ids': transaction_ids
					},
					success: function (data) {
						$('#modprintpaymentreceipt').modal('toggle');
							//$('#tabipblist').html(data['crdrrecord']);
							//$('#tabrptlist').html(data['cstrpt']);
							loadeditcstrec();
						alert("Payment Record deleted successfully...");
						//$('#iddocumentlist').html(data['transrecord']);
					}
				});
			}
		}	
	}
	function SEARCHmainmemberrec()
	{
			var edit_cst_id = $('#jamath_member_id').val();
			$.ajax({
			type: "GET",
			url:"/splloadmainrecord",
			dataType: "json",
			data: {
				'_token': $('input[name=_token]').val(),
				'edit_cst_id': edit_cst_id
			},
			success: function (data) {
				//jamath_member_id_hidden
					$('#cst_grd_code').val(data['cst_customer'].cst_code);
					$('#jamath_member_id_hidden').val(data['cst_customer'].cst_id);
					//$('#cst_code').val(data['cst_grade'].grd_prefix + data['cst_customer'].cst_code);
					$('#cst_name').val(data['cst_customer'].cst_name);
					$('#cst_maritalstatus').val(data['cst_customer'].cst_maritalstatus);
					$('#cst_occupation').val(data['cst_customer'].cst_occupation);
					$('#cst_income').val(data['cst_customer'].cst_income);
					$('#cst_qualification').val(data['cst_customer'].cst_qualification);
					$('#cst_gender').val(data['cst_customer'].cst_gender);
					$('#cst_doj').val(data['cst_customer'].cst_doj);
					$('#cst_bloodgroup').val(data['cst_customer'].cst_bloodgroup);
					$('#cst_relationship').val(data['cst_customer'].cst_relationship);
					$('#cst_note').val(data['cst_customer'].cst_note);
					$('#cst_dob').val(data['cst_customer'].cst_dob);
					$('#grd_id').val(data['cst_customer'].grd_id);
					ageCount(data['cst_customer'].cst_dob,'lacc_age');
					//Residence_Address
					$('#lacc_resaddr_addr').val(data['resaddress'][0]);
					$('#lacc_resaddr_city').val(data['resaddress'][1]);
					$('#lacc_resaddr_pin').val(data['resaddress'][2]);
					$('#lacc_resaddr_landmark').val(data['resaddress'][3]);
					$('#lacc_resaddr_mob').val(data['resaddress'][4]);
					$('#lacc_resaddr_tel').val(data['resaddress'][5]);
					$('#lacc_resaddr_email').val(data['resaddress'][6]);
					//PermanentAddress
					$('#lacc_permaddr_addr').val(data['permaddress'][0]);
					$('#lacc_permaddr_city').val(data['permaddress'][1]);
					$('#lacc_permaddr_pin').val(data['permaddress'][2]);
					$('#lacc_permaddr_landmark').val(data['permaddress'][3]);
					$('#lacc_permaddr_mob').val(data['permaddress'][4]);
					$('#lacc_permaddr_tel').val(data['permaddress'][5]);
					$('#lacc_permaddr_email').val(data['permaddress'][6]);
			}
		});
	}
</script>