<section class="content">
    <div class="row">
        <div class="col-sm-12">
            <div class="tabbable">
                <div class="tab-content no-border padding-24">
                    <div class="tab-pane fade in active" id="faq-tab-1">
                        <div class="space-8"></div>
                        <div class="panel-group accordion-style1 accordion-style2" id="faq-list-1">
                            <div class="panel panel-default" id="search_div">
                                <div class="panel-headingnew"> Edit <?php echo $type;?> Markup </div>
                                <div id="faq-1-1" class="panel-collapse collapse in" aria-expanded="true">

                                    <div class="panel-body">

    <div class="tab-content" id="myTabContent">
        <div id="home" class="tab-pane fade active in">
            <div class="col-sm-col-sm-offset-1 margin-10auto0 paddingRL10px">

                <div class="row">
                    <div class="col-sm-10 no-padding">

                        <div id="markup_div" class="display-block">
                            <!-- /.panel-heading -->
                            <!--<div class="panel-heading tabheading text-center text-uppercase edit-markup" > <b style="cursor:pointer;">Edit Markup</b> </div>-->

                            <!-- Edit profile start -->

                            <?php

                            //Get Filed Individual Data For Updation ------
                           $comp_markup_id='';
                           $company_id='';
                           $markup_category='';
                           $country_id='';
                           $state_id='';
                           $master_package_id='';
                           $mark_amt_type='';
                           $basic_amt='';
                           $markup_amt_base='';
                           $extra_km_markup='';
                           $extra_hr_markup='';
                           $user_grade='';
                           $user_id='';
                           $user_name='';
                           $city_id='';
                           $booking_id='';
                           $master_booking_type_id = '';
                           $currency =  '';

                            if(isset($markupdata) && !empty($markupdata))
                            {
                            $comp_markup_id=$markupdata['comp_markup_id'];
                            $company_id=$markupdata['company_id'];
                            $markup_category=$markupdata['markup_category'];
                            $country_id=$markupdata['country_id'];
                            $state_id=$markupdata['state_id'];
                            $currency=$markupdata['currency'];
                            $booking_id=$markupdata['master_package_id'];
                            $mark_amt_type=$markupdata['mark_amt_type'];
                            $basic_amt=$markupdata['basic_amt'];
                            $markup_amt_base=$markupdata['markup_amt_base'];
                            $extra_km_markup=$markupdata['extra_km_markup'];
                            $extra_hr_markup=$markupdata['extra_hr_markup'];
                            $user_grade=$markupdata['user_grade'];
                            $user_id=$markupdata['user_id'];
                            $user_name=$markupdata['first_name'];
                            $city_id=$markupdata['city_id'];
                            $master_booking_type_id=$markupdata['master_booking_type_id'];

                            }


                            $form = $this->form;
                            $form->prepare();
                            $form->setAttribute('action', $this->url('markup', ['action' => 'edit-markup-user']));
                            $form->setAttribute('method', 'post');
                            $form->setAttribute('id', 'markup-form');
                            echo $this->form()->openTag($form);
                            echo $this->FormElement($form->get('markup_id')->setvalue($comp_markup_id));
                            echo $this->FormElement($form->get('company_id')->setvalue($company_id));
                            echo $this->FormElement($form->get('master_booking_type_id')->setvalue($master_booking_type_id));



                            ?>
                                <div class="form-group clearfix margintopbottom20">
                                    <div class="col-sm-12 no-padding">

                                        <div class="col-sm-2">
                                            <div class="carbooking">
                                                <input type="radio" name="markup" id="add_marcup_country"  value="3" class="getmarkupval"
                                                    <?php  if($markup_category==3){?> checked="checked" <?php }?>>

                                                <label for="add_marcup_country"><span class="radio">Country</span></label>
                                            </div>

                                        </div>
                                        
                                        <?php if(($type!='flight') && ($type!='package')) { ?>
                                        
                                        <div class="col-sm-2">
            <div class="carbooking">
                <input type="radio" name="markup" id="add_marcup_state"  value="5" class="getmarkupval"
                                                    <?php  if($markup_category==5){?> checked="checked" <?php }?>>

                <label for="add_marcup_state"><span class="radio">State</span></label>
            </div>

        </div>
                                        <?php } ?>

                                        <div class="col-sm-2">

                                            <div class="carbooking">
                     <input type="radio" name="markup" id="add_marcup_city" value="4" class="getmarkupval" <?php  if($markup_category==4){?> checked="checked" <?php }?>>

                                                <label for="add_marcup_city"><span class="radio">City</span></label>
                                            </div>

                                        </div>
                                        <div class="col-sm-2">

                                           <div class="carbooking">
           <input type="radio" name="markup" id="add_marcup_booking" value="2" class="getmarkupval" <?php  if($markup_category==2){?> checked="checked" <?php }?> >

                                                <label for="add_marcup_booking"><span class="radio">Booking Type</span></label>

                                            </div>

                                        </div>
                                        <div class="col-sm-2">
                                            <div class="carbooking">


                                           <input type="radio" name="markup"  id="add_marcup_user" value="1" class="getmarkupval" <?php  if($markup_category==1){?> checked="checked" <?php }?> >

                                                <label for="add_marcup_user"><span class="radio">User</span></label>
                                            </div>



                                        </div>

                                    </div>

                                </div>





                                  <!--                              add markup user start             -->
                            <div id="user_markup_div">

                                <div class="form-group clearfix margintopbottom20">
<!--                                        <label class="col-sm-2 markup-user-id"><strong>User ID</strong></label>
                                        <div class="col-sm-4 markup-user-id">

                                            <?php //echo $this->FormElement($form->get('driver_id')); ?>
                                            <?php //echo $this->formElementErrors($form->get('driver_id'), ['class' => 'error']); ?>

                                        </div>-->

                                        <label class="col-sm-2 markup-user-name"><strong>Name</strong></label>
                                        <div class="col-sm-4 markup-user-name">

                                             <?php echo $this->FormElement($form->get('driver_name')->setvalue($user_name)); ?>
                                            <?php echo $this->FormElement($form->get('driver_value')->setvalue($user_id)); ?>
                                            <?php echo $this->formElementErrors($form->get('driver_name'), ['class' => 'error']); ?>
                                        </div>

                                        <label class="col-sm-2 markup-user-country"><strong>Country</strong></label>
                                        <div class="col-sm-4 markup-user-country">

                                            <?php echo $this->FormElement($form->get('country_id')->setvalue($country_id)); ?>
                                            <?php echo $this->formElementErrors($form->get('country_id'), ['class' => 'error']); ?>
                                        </div>
                                          <label class="col-sm-2 markup-user-state"><strong> State</strong></label>
                                        <div class="col-sm-4 markup-user-state">

                                             <?php echo $this->FormElement($form->get('state_id')->setvalue($state_id)); ?>
                                            <?php echo $this->formElementErrors($form->get('state_id'), ['class' => 'error']); ?>
                                        </div>

                                        <label class="col-sm-2 markup-user-city"><strong> City</strong></label>
                                        <div class="col-sm-4 markup-user-city">

                                             <?php echo $this->FormElement($form->get('city_id')); ?>
                                            <?php echo $this->formElementErrors($form->get('city_id'), ['class' => 'error']); ?>
                                            <input type="Hidden" id="markup-city-id" value="<?php echo $city_id;?>">
                                        </div>

                                         <label class="col-sm-2 markup-user-type"><strong>User Grade Type</strong></label>
                                        <div class="col-sm-4 markup-user-type">
                                             <?php echo $this->FormElement($form->get('user_grade_type')->setvalue($user_grade)); ?>
                                        </div>

                                        <label class="col-sm-2 markup-user-booking-type"><strong>Booking Type</strong></label>
                                        <div class="col-sm-4 markup-user-booking-type">


                                             <?php  echo $this->FormElement($form->get('booking_type')->setvalue($booking_id));?>
                                        </div>
                                        
                                        
                                        

                                        <div class="col-sm-12 no-padding">

                                          <label class="col-sm-2 markup-user-markup-type"><strong>Markup Type</strong></label>

                                          <div class="col-sm-4 no-padding markup-user-markup-type lineheight40px">
                  	 <div class="col-sm-6 ">
                  	 <div class="carbooking">
      	        <input type="radio" name="addmarkupType" id="addmarkup_typeper" value="%" <?php  if($mark_amt_type=='%'){?>checked="checked"<?php }?>>
     										<label for="addmarkup_typeper"><span class="radio">Percent (%)</span></label>
    									</div>

                          </div>

                     <div class="col-sm-6 ">
                                        <div class="carbooking">
     <input type="radio" name="addmarkupType" id="addmarkup_typefixed" value="Rs" <?php  if($mark_amt_type=='Rs'){?>checked="checked"<?php }?>>
     										<label for="addmarkup_typefixed"><span class="radio">Fixed(Rs)</span></label>
    									</div>

                                        </div>
                  </div>
                                          
                                          
                                              <div class="currency_div <?php if($mark_amt_type=='%'){?>display-none<?php }?>">

                                          <label class="col-sm-2 markup-user-currency"><strong>Currency</strong></label>
                                        <div class="col-sm-4 markup-currency">


                                             <?php  echo $this->FormElement($form->get('currency')->setvalue($currency));?>
                                        </div>


                       </div>


                                        

                       </div>
                                        
                                        
                                        
                                          <div class="col-sm-12 no-padding">

                                         


                                        <label class="col-sm-2 markup-user-markup-amount"><strong>Markup Amount</strong></label>

                                        <div class="col-sm-4 no-padding markup-user-markup-amount markup-margin5px">

                  	<div class="col-sm-4">

                      	 <?php echo $this->FormElement($form->get('markup_amount')->setvalue($basic_amt)); ?>

                        </div>

                         <div class="col-sm-4 lineheight40px">
                  	 <div class="carbooking">
                   <input type="radio" name="addmarkupAmountT"  id="addamounttype" value="1" <?php if($markup_amt_base==1){?> checked="checked" <?php }?>>
     		<label for="addamounttype"><span class="radio">Total</span></label>
          </div>

                          </div>

                     <div class="col-sm-4 lineheight40px ">
                                        <div class="carbooking">
      			<input type="radio" name="addmarkupAmountT" id="addamounttypebace" value="2" <?php if($markup_amt_base==2){?> checked="checked" <?php }?>>
     	         <label for="addamounttypebace"><span class="radio">Base</span></label>
    									</div>

                                        </div>

                  </div>

                       </div>
                                         <div class="extra_hr_div <?php if($markup_amt_base==1){?>display-none<?php }?>">
                                           <label class="col-sm-2 markup-user-extryMin"><strong>Extra HR</strong></label>
                  <div class="col-sm-4 markup-user-extryMin">

                  	                      <?php echo $this->FormElement($form->get('extra_min')->setvalue($extra_hr_markup)); ?>
                                            <?php echo $this->formElementErrors($form->get('extra_min'), ['class' => 'error']); ?>

                        </div>


                          <label class="col-sm-2 markup-user-extryKm"><strong>Extra KM</strong></label>
                  <div class="col-sm-4 markup-user-extryKm">

                  	                      	 <?php echo $this->FormElement($form->get('extra_km')->setvalue($extra_km_markup)); ?>
                                            <?php echo $this->formElementErrors($form->get('extra_km'), ['class' => 'error']); ?>

                        </div>
                                         </div>

                                    </div>
                      </div>



                            <div class="tool-bar">

                                    <div class="text-right btn-groups">
                                        <a class="back_btn_link btn btn-orange btn-default" id="back_markup" href="<?php echo $this->basePath('/markup');?>">
                                            <i class="fa fa-chevron-left"></i>
                                            Back
                                        </a>
                                        <a class="reset_btn btn btn-success btn-new-vehile" href="#">
                                            <i class="fa fa-retweet"></i>
                                            Reset
                                        </a>
                                         <?php echo $this->FormElement($form->get('save')); ?>

</div>
</div>


</div>


<?php echo $this->form()->closeTag(); ?>

</div>

</div>

</div>
</div>

</div>

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


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

</div>

</div>

</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(function () {
    /*var state = '<?php echo $state_id;?>';
    if(state!="" && state!=0){
        alert(state);
   $("#country-id").trigger( "change" );
   $("#state-id").val(state);
   //$('select[name^="state_id"] option[value="'+state+'"]').prop('selected' , true);
   //$("#state-id option[value='"+state+"']").attr('selected' , 'selected');  
   

    }*/
});
</script>