<div class="page-content" >   
<div class="row">
    <div class="col-sm-12">
        <div class="widget-box">
            <div class="widget-header" style="height:70px;">
                <h4  style="text-align:center; color:green;"><b> New Out Cheque Entry</b> </h4>
            </div>

            <div class="widget-body">
            
                 <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green" style="text-align:center;"><b>
                                                <?php echo $message;
                                                $this->session->unset_userdata('message');
                                                ?>
                                            </b></h6>
                                    </div>  
                                    <?php
                                }
                                $errormessage = $this->session->userdata('errormessage');
                                if (!empty($errormessage)) {
                                    ?>
                                    <div class="alert alert-block alert-danger">
                                        <h6 class="lighter arial red" style="text-align:center;"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div> 
                                    <?php
                                }
                                ?>
                <div class="widget-main no-padding">
                    <form action="<?php echo admin_url()?>/chequeinoutentryview/insert_chequeout" method="post">
                        <!-- <legend>Form</legend> -->
                        
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Name </label>
                            <?php echo form_error('data[receiver]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[receiver]" autocomplete="off" value="<?php echo set_value('data[receiver]',false); ?>" placeholder="Receiver Name..." class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Purpose </label>
                            <?php echo form_error('data[purpose]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[purpose]" autocomplete="off" value="<?php echo set_value('data[purpose]',false); ?>" placeholder="Cheque Issue Purpose..." class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                         <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Cheque Number </label>
                            <?php echo form_error('data[cheque_no]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[cheque_no]" autocomplete="off" value="<?php echo set_value('data[cheque_no]',false); ?>" placeholder="Cheque No..." class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Bank Name </label>
                            <?php echo form_error('data[bank_name]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[bank_name]" autocomplete="off" value="<?php echo set_value('data[bank_name]',false); ?>" placeholder="Bank Name...." class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                                <div class="col-xs-2 col-sm-2"><label>Date</label></div>
                                <?php echo form_error('data[date]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                                <div class="input-group col-xs-4 col-sm-4">
                                    <input class="form-control date-picker" id="id-date-picker-1" type="text" name="data[date]" value="<?php echo set_value('data[date]',false); ?>" data-date-format="dd-mm-yyyy" />
                                    <span class="input-group-addon">
                                        <i class="fa fa-calendar bigger-110"></i>
                                    </span>
                                </div>
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Amount </label>
                            <?php echo form_error('data[amount]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[amount]" autocomplete="off" value="<?php echo set_value('data[amount]',false); ?>" placeholder="amount" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>                      
                        

                        <div class="clearfix"></div>

                        <div class="form-actions center">
                            <button type="submit" class="btn btn-sm btn-success">
                                 <i class="ace-icon fa fa-check bigger-110"></i>
                                Submit
                                
                            </button>
                            
                            
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div></div></div>

    <script>
function myFunction() {
    var x = document.getElementById("mySelect").value;
    if(x==2 || x==3  || x==4){
    document.getElementById("demo").innerHTML = "<label class='col-xs-2 col-sm-2'>Check/PayOrder/DD No </label><input type='text' name='pay_order_ddNo' autocomplete='off' value='<?php echo set_value('pay_order_ddNo',false); ?>' placeholder='Check/Pay Order/DD No' class='col-xs-4 col-sm-4' />";
    }
    else
    {
    document.getElementById("demo").innerHTML = " ";
    }
}
</script>



    