Subversion Repositories SmartDukaan

Rev

Rev 19061 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
        td:first-child { background-color: #F9FCF7; border:1px solid white;}
        td{
        padding:2px;
    border:1px solid #e6e6e6;
}

#pindet,#citydet,#phonedet{
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: #58d936 solid 1px;
  color: #555;
  border-radius: 6px;
  outline: none;
  padding: 2px;
  /*display: block;*/
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  font: 15px Helvetica, Arial, sans-serif;
  /*margin: 2px 0 8px 0;*/
   margin: 2px 0 0px 0;
}
</style>

<script>
$(document).ready(function(){
        var checkpin ="<?php echo $pincheck;?>";        
        console.log(checkpin);
        if(checkpin != "nothing"){
                console.log("Hello");
        $.ajax({
            method: "GET",
            url:  "<?php echo $base_url;?>shippings/getstate/"+checkpin,
        },'json')
        .done(function(msg){ 
                msg = eval('('+msg+')');
                if(msg=="{}")                  
                {
                        $("#cities").empty();
//                      $("#state").val("");            
                }
                else
                {
//                      $("#state").val(msg['state']);
                        $("#cities").empty();
                        for(var i in msg['cities']){
                                var html = '<option value="'+msg['cities'][i]+'"></option>';
                                $("#cities").append(html);
                        }       
                }
            
        });   
        }                  
});
</script>
<input type="hidden" value = "<?php echo $pincheck;?>" id="pincheck">

<?php //debug($tinres);?>
<div class="modal fade" id="tinModal">
  <div class="modal-dialog">
    <div class="modal-content" style="background-color: #f0f0f0;color: #555;border:2px solid #58d936;">
      <div class="modal-body">
        <p id="tin_response" style="color:#555;" class="text-center"></p>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<?php //debug($tinres);?>
<?php if(isset($tinres['isError']) && $tinres['isError']== false):?>
        <div class='row card'>
                <div class='col-xs-12' style="padding:0px;">
                        
                                <table cellpadding="1" cellspacing="1" width="100%">
                                        <tr width="100%"> 
                                              <td width="100%" colspan="2" style="border:1px solid #58d936;">
                                                <div align="center">
                                                        <strong>Retailer details by TIN : <?php echo $tin_num; ?></strong>
                                                </div>
                                              </td>
                                </tr>
                                        
                                        <?php if(isset($tinres['counter_name']) && !empty($tinres['counter_name'])):?>
                                                <tr>
                                                        <td><strong>Counter Name</strong></td><td><?php echo $tinres['counter_name'];?></td>
                                                </tr>
                                        <?php endif;?>
                                        <?php if(isset($tinres['counter_address']) && !empty($tinres['counter_address'])):?>
                                                <tr>
                                                        <td><strong>Counter Address</strong></td><td><?php echo $tinres['counter_address'];?></td>
                                                </tr>
                                        <?php endif;?>
                                        <?php if(isset($tinres['state']) && !empty($tinres['state'])):?>
                                                <tr>
                                                        <td><strong>State</strong></td><td id="tinstate"><?php echo $tinres['state'];?></td>
                                                </tr>
                                        <?php endif;?>
                                        <?php if(isset($tinres['pan']) && !empty($tinres['pan'])):?>
                                                <tr>
                                                        <td><strong>PAN</strong></td><td><?php echo $tinres['pan'];?></td>
                                                </tr>
                                        <?php endif;?>
                                        <?php if(isset($tinres['registered_on']) && !empty($tinres['registered_on'])):?>
                                                <tr>
                                                        <td><strong>Date of Registration</strong></td><td><?php echo $tinres['registered_on'];?></td>
                                                </tr>
                                        <?php endif;?>
                                        
                                </table>
                                
                                <datalist id="cities"></datalist>
                                <div class= "row" style="padding:5px 0px;">
                                        <div class="col-xs-6" style='padding:0px 5px 0px 0px ;'>
                                                
                                                <input type="text" id="pindet" placeholder="Enter your pin*" autocomplete="off" value = "<?php if(isset($tinres['pin_required']) && $tinres['pin_required'] == false):?><?php echo $tinres['pin'];?><?php endif;?>" class="<?php if(isset($tinres['pin_required']) && $tinres['pin_required'] == false):?>hidden<?php endif;?>">
                                                
                                                <input type="text" id="phonedet" placeholder="Enter your phone*" autocomplete="off" value = "<?php echo $phone_number;?>">
                                        </div>
                                                
                                        <div class="col-xs-6" style='padding:0px 0px 0px 5px ;'>
                                                <input type="text" placeholder="Select city*" id="citydet" name="city" list="cities" class="<?php if(isset($tinres['pin_required']) && $tinres['pin_required'] == true):?>hidden<?php endif;?>" autocomplete="off"/>
                                                <input type="hidden" id="tinres" <?php printf('data-tinres = "%s"',htmlspecialchars(json_encode($tinres), ENT_QUOTES, 'UTF-8'));?>>
                                        </div>
                                </div>
                                                                
                                <div class="row">
                                        
                                        <?php if(isset($tinres['state']) && !empty($tinres['state'])):?>
                                                <div style="border:1px solid #58d936; padding:2px;margin-bottom:5px;font-size:12px;">
                                                        <?php if(trim($tinres['state']) == "Delhi"):?>  
                                                                <div style="line-height: 15px;">
                                                                        <b>*</b> You will get tax invoice for orders shipped to counter address mentioned above.<br>
                                                                        <b>*</b> Available only on purchase through ProfitMandi and billed by Saholic.com.
                                                                </div>
                                                                <div style="line-height: 15px;margin-top: 4px;">
                                                                        <b>*</b> आपको उपरोक्त काउंटर के पते पर दिए गए ऑर्डरों पर ही आपको टैक्स बिल मिलेगा।<br> 
                                                                        <b>*</b>ProfitMandi से खरीदने पर और Saholic.com द्वारा बिलिंग पर उपलब्ध  है ।
                                                                </div>
                                                        <?php else:?>
                                                                <div style="line-height: 15px;">
                                                                        <b>*</b> <span style="color:red;">Tax invoice is only available in Delhi</span>. We will get back to you when tax invoice is available in <?php echo $tinres['state'];?>.
                                                                </div>
                                                                <div style="line-height: 15px;margin-top: 4px;">                                
                                                                        <b>*</b> <span style="color:red;">टैक्स बिल केवल दिल्ली में उपलब्ध है</span>।<?php echo $tinres['state'];?> में टैक्स बिल उपलब्ध होते ही आपसे संपर्क किया जाएगा। 
                                                                </div>  
                                                        <?php endif;?>
                                                </div>
                                        <?php endif;?>
                                        
                                        <div class= "col-xs-12 text-center" style="margin-bottom: 5px;">
                                        <?php $query = http_build_query(array('aParam' => $tinres)); ?>
                                        <?php //debug($query);?>
                                                <!--  <button type="button" class="btn btn-sm" style="background-color:#58d936;color:white;float:right;">Not OK</button>-->     
                                                <!--<a href="<?php //echo $base_url;?>tins/confirm/?<?php //echo $query;?>">-->
                                                        <button type="button" class="btn btn-sm" style="background-color:#58d936;color:white;" id="submit_det">
                                                        <?php if(isset($tinres['state']) && !empty($tinres['state']) && trim($tinres['state']) == "Delhi"):?>   
                                                                Confirm to get tax invoice
                                                        <?php else:?>
                                                                Confirm your tax details
                                                        <?php endif;?>
                                                        </button>       
                                                <!--</a>-->
                                        </div>                          
                                </div>                          
                </div>
                
        </div>

        <div class="row card" style="padding:0px;">
                        <div class="col-xs-12" style="padding: 5px;font-size:12px;">
                                <div style="line-height: 15px;">
                                        <b>#</b> In case your tax details are incorrect or you want to change your shipping address, send your TIN RC copy to <b>help@profitmandi.com</b> from your registered email 
                                        <?php if(isset($user_email) && !empty($user_email)){
                                                echo "<b>".$user_email."</b>";
                                        }?>
                                        .
                                </div>
                                <div style="line-height:15px;margin-top: 4px;">
                                        <b>#</b> अगर आपका विवरण गलत है या आप अपना शिपिंग पता बदलवाना चाहते है तो अपनी टिन आर सी की प्रतिलिपि  <b>help@profitmandi.com</b> पर अपने रजिस्टर्ड ईमेल 
                                        <?php if(isset($user_email) && !empty($user_email)){
                                                echo "<b>".$user_email."</b> ";
                                        }?>
                                        से भेजे। 
                                </div>
                        </div>
        </div>
        
        <?php else: ?>
                                <br>
                                <div class = "card" style="text-align:center;padding-bottom:5px;"><?php echo $tinres['errorMsg'];?></div>
                                <br><br>
        <?php endif; ?>