whoami7 - Manager
:
/
home
/
papecmvm
/
public_html
/
application
/
views
/
webapp
/
master
/
ledger
/
Upload File:
files >> /home/papecmvm/public_html/application/views/webapp/master/ledger/add.php
<?php require_once(APPPATH.'views/webapp/header.php');?> <?php require_once(APPPATH.'views/webapp/menu.php');?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Add Ledger </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url('webapp/welcome')?>"><i class="fa fa-dashboard"></i> Dashboard</a></li> <li class="active">Add Ledger</li> </ol> </section> <!-- Main content --> <section class="content"> <?php $attributes = array('id' => 'formid'); if(isset($ledger)){ echo form_open("webapp/master/ledger/edit/".$ledger[0]['lid'],$attributes); }else{ echo form_open("webapp/master/ledger/add",$attributes); } ?> <!-- /.row --> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <div class="text-left"> </div> </div><!-- /.box-header --> <div class="box-body"> <div class="col-sm-2"> <div class="form-group"> <label>Ledger Name</label> <input type="text" class="form-control" name="l_name" value="<?php if(isset($ledger)){echo $ledger[0]['l_name'];}?>" placeholder="Ledger Name" required=""> </div> </div> <div class="col-sm-2"> <label>Opening Balance</label> <div class="input-group"> <div class="input-group-addon" style="padding: 6px 6px;"> <select style="border: none" name="bal_type"> <option <?php if(isset($ledger)){ if($ledger[0]['bal_type'] == 'Dr'){ echo "selected"; } } ?> value="Dr">Dr</option> <option <?php if(isset($ledger)){ if($ledger[0]['bal_type'] == 'Cr'){ echo "selected"; } } ?> value="Cr">Cr</option> </select> </div> <input type="text" class="form-control" name="open_balance" value="<?php if(isset($ledger)){echo $ledger[0]['open_balance'];}?>" placeholder="Opening Balance" required=""> </div> </div> <div class="col-sm-2"> <div class="form-group"> <label>Customer</label> <select class="form-control multiselect" name="rid" required=""> <option value="">--Select--</option> <?php foreach ($cust as $k => $v){ ?> <option value="<?php echo $v['rid']; ?>" <?php if(isset($ledger)){ if($ledger[0]['rid'] == $v['rid']){ echo "selected"; } } ?>> <?php echo $v['name']; ?> </option> <?php } ?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label>Group</label> <?php if(isset($ledger)){ $gr = $ledger[0]['gid']; } ?> <select class="form-control gr" name="gid" required=""> <option value="">--Select--</option> <?php foreach ($group as $g){ ?> <option value="<?php echo $g['gid']; ?>" <?php if(isset($ledger)){ if($g['gid'] == $gr) { echo 'selected'; } }?>><?php echo $g['gname']; ?></option> <?php } ?> </select> </div> </div> <div class="col-sm-3"> <div class="form-group"> <label>Sub Group</label> <select class="form-control sgr" name="sg_id"> <option value="0">--Select--</option> <?php if(isset($ledger)){ $sg_id = $ledger[0]['sg_id']; if(!empty($sub_group)){ foreach ($sub_group as $k => $v) { ?> <option <?php if($sg_id != 0){if($sg_id == $v['sg_id']){echo "selected";}} ?> value="<?php echo $v['sg_id']; ?>"><?php echo $v['sg_name']; ?></option> <?php } } } ?> </select> </div> </div> <div class="col-sm-2"> <div class="form-group"> <label>State</label> <select class="form-control" name="state"> <option value="">--Select--</option> <option value="Gujarat">Gujarat</option> <option value="Rajasthan">Rajasthan</option> <option value="Maharastra">Maharastra</option> <option value="Asam">Asam</option> </select> </div> </div> <div class="col-sm-2"> <div class="form-group"> <label>City</label> <select class="form-control" name="city"> <option value="">--Select--</option> <option value="Gandhinagar">Gandhinagar</option> <option value="Udaipur">Udaipur</option> <option value="Mumbai">Mumbai</option> <option value="Guwahati">Guwahati</option> </select> </div> </div> <div class="col-sm-4"> <div class="form-group"> <label>Address</label> <input type="text" name="address" value="<?php if(isset($ledger)){echo $ledger[0]['address'];}?>" class="form-control"> </div> </div> <div class="col-sm-2"> <div class="form-group"> <label>GST</label> <input type="text" name="gst" value="<?php if(isset($ledger)){echo $ledger[0]['gst'];}?>" class="form-control"> </div> </div> <div class="col-sm-2"> <div class="form-group"> <label>PAN</label> <input type="text" name="pan" value="<?php if(isset($ledger)){echo $ledger[0]['pan'];}?>" class="form-control"> </div> </div> <div class="col-sm-12"> <input type="submit" name="save" value="save" class="btn btn-primary text-capitalize"> <a class="btn btn-info" href="<?php echo base_url().'webapp/master/ledger' ?>">Back</a> </div> </div><!-- /.box-body --> </div><!-- /.box --> </div> </div> <!-- /.row --> <?php echo form_close(); ?> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once(APPPATH.'views/webapp/footer.php');?> <script type="text/javascript"> $(document).ready(function(){ //---------------- delete message ------------------------------------- $('#deletedata').click(function() { var exists = $('input[type=checkbox][name^=ck]:checked').filter(':checked').length; if( !exists ) { alert('Please select at least 1 checkbox!'); return false; } else if(confirm('Are you sure you want to delete this Data?')) { var cct = $.cookie("<?php echo $this->config->item('csrf_cookie_name'); ?>"); var postData = $('input[type=checkbox][name^=ck]:checked').serialize(); $.post("postmanagement/deletepostselected",{ck: postData,'<?php echo $this->security->get_csrf_token_name(); ?>': cct}, function(data,status){ location.reload(); }); //$('#formid').submit(); } else { return false; } }); }); </script> <script type="text/javascript"> $('.gr').on('change', function(){ var gid = $(this).val(); var controller = 'webapp/master/ledger'; var base_url = '<?php echo site_url(); ?>'; $.ajax({ url: base_url + controller + '/get_subgr/'+gid, type: 'POST', dataType: 'json', success: function (data) { $(".sgr").html(data.html); }, error: function () { alert("Something went wrong!"); //$('.errorLabel').show(); } }); }); </script>
Copyright ©2021 || Defacer Indonesia