bugs fixed and reuploaded
This commit is contained in:
parent
8958aa4b47
commit
a45f349783
@ -129,7 +129,7 @@ class assetdetails extends BaseController
|
||||
$this->session->set_flashdata('error', 'Asset Not Create');
|
||||
}
|
||||
|
||||
redirect('assetdetails/assetListing');
|
||||
redirect('assetListing');
|
||||
}
|
||||
|
||||
}
|
||||
@ -198,7 +198,7 @@ class assetdetails extends BaseController
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||
$Createdby = $this->input->post('Createdby');
|
||||
$Createdby = $this->input->post('Createdby');
|
||||
$AssetValue = $this->input->post('AssetValue');
|
||||
|
||||
$asset = array();
|
||||
@ -218,8 +218,8 @@ class assetdetails extends BaseController
|
||||
{
|
||||
$this->session->set_flashdata('error', 'Asset updation failed');
|
||||
}
|
||||
echo $asset;
|
||||
// redirect('assetListing');
|
||||
//echo success;
|
||||
redirect('assetListing');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="AssetOwner">Asset Owner</label>
|
||||
<label for="AssetOwner">User</label>
|
||||
<input type="text" class="form-control required" id="User" name="User">
|
||||
</div>
|
||||
</div>
|
||||
@ -103,7 +103,7 @@
|
||||
<div class="form-group">
|
||||
<label for="SupplierName">Supplier Name</label>
|
||||
<select class="form-control required" id="SupplierName" name="SupplierName">
|
||||
<option >Select Supplier Name</option>
|
||||
<option value="0">Select Supplier Name</option>
|
||||
<?php
|
||||
if(!empty($SupplierName))
|
||||
{
|
||||
@ -136,8 +136,8 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="Assetvalue">Asset Value</label>
|
||||
<input type="text" class="form-control required" id="Assetvalue" name="Assetvalue" maxlength="255">
|
||||
<input type="hidden" class="form-control required" id="Createdby" name="Createdby" maxlength="255">
|
||||
<input type="text" class="form-control required" id="Assetvalue" name="AssetValue" maxlength="255">
|
||||
<input type="text" class="form-control required" id="Createdby" value="<?php echo $name;?>" name="Createdby" maxlength="255">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
<div class="col-md-6 col-xs-6">
|
||||
<div class="form-group">
|
||||
<label for="TIN">TIN</label>
|
||||
<input type="text" class="form-control required" id="TIN" pattern="^\d{2}-\d{7}$"name="TIN" minlength="10" maxlength="10">
|
||||
<input type="text" class="form-control required" id="TIN" pattern="^\d{2}-\d{7}$"name="TIN" minlength="10" maxlength="10" title="ex:xx-xxxxxxx">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -126,18 +126,21 @@
|
||||
|
||||
<div class="col-md-6 col-xs-6">
|
||||
<label for="payablefrom">Payable From</label>
|
||||
<select class="form-control required" id="PaymentTerms" name="PaymentTerms">
|
||||
<option >Select Payment method</option>
|
||||
<select class="form-control required" id="PaymentTerms" onchange="Validate()" name="PaymentTerms" required>
|
||||
|
||||
<option value="0"> Please select </option>
|
||||
<?php
|
||||
|
||||
if(!empty($payment))
|
||||
{
|
||||
foreach ($payment as $rl)
|
||||
{
|
||||
?>
|
||||
<option value="<?php echo $rl->ConfigValue ?>"><?php echo $rl->ConfigValue ?></option>
|
||||
<?php
|
||||
<?php echo 'required="true"';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@ -170,7 +173,7 @@
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="submit" class="btn btn-primary" value="Submit" />
|
||||
<input type="submit" class="btn btn-primary" onclick="Validate()" value="Submit" />
|
||||
<input type="reset" class="btn btn-primary" value="Reset" />
|
||||
</div>
|
||||
</form>
|
||||
@ -310,5 +313,12 @@ function validatenumbers() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Validate()
|
||||
{
|
||||
if($("option:selected", $("#PaymentTerms")).val() == '0')
|
||||
{
|
||||
alert('Please Select Payment Terms');
|
||||
return (true);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -56,7 +56,7 @@ if(!empty($userRecords))
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="MaterialName">Material Name</label>
|
||||
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255" value="<?php echo $MaterialCode;?>">
|
||||
<input type="text" class="form-control required " id="MaterialName" name="MaterialName" maxlength="255" value="<?php echo $MaterialName;?>">
|
||||
<input type="hidden" class="form-control required " id="MaterialCode" value="<?php echo $MaterialCode;?>"name="MaterialCode" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -9,11 +9,9 @@ $User = '';
|
||||
$SupplierName = '';
|
||||
$DateOfPurchase = '';
|
||||
$DateOfCommission = '';
|
||||
$CreatedDate = '';
|
||||
$AssetValue = '';
|
||||
$Createdby = '';
|
||||
|
||||
|
||||
|
||||
if(!empty($asset))
|
||||
{
|
||||
foreach ($asset as $uf)
|
||||
@ -21,27 +19,21 @@ if(!empty($asset))
|
||||
$Asset_Code = $uf->Asset_Code;
|
||||
$Asset_Name = $uf->Asset_Name;
|
||||
$Description = $uf->Description;
|
||||
$Department = $uf->Department;
|
||||
$Department = $uf->Department;
|
||||
$Location = $uf->Location;
|
||||
$User = $uf->User;
|
||||
$SupplierName = $uf->SupplierName;
|
||||
$DateOfPurchase = $uf->DateOfPurchase;
|
||||
$DateOfCommission = $uf->DateOfCommission;
|
||||
$Createdby = $uf->Createdby;
|
||||
$CreatedDate = $uf->CreatedDate;
|
||||
$AssetValue = $uf->AssetValue;
|
||||
|
||||
$Createdby = $uf->Createdby;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<script>
|
||||
function demo(){
|
||||
alert("Update this records");
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
@ -49,11 +41,12 @@ function demo(){
|
||||
<center>Asset Details</center>
|
||||
|
||||
</h1>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>assetListing" class="btn btn-info" value="Back"/>Back</a>
|
||||
<a href="<?php echo base_url() ?>assetListing" class="btn btn-info" value="Back">Back</a>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
@ -65,42 +58,34 @@ function demo(){
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<center> <h3 class="box-title">Edit Asset Details</h3><center>
|
||||
<center><h3 class="box-title">Edit Asset Details</h3></center>
|
||||
</div><!-- /.box-header -->
|
||||
<!-- form start -->
|
||||
|
||||
<form role="form" action="<?php echo base_url() ?>assetdetails/editasset" method="post" id="editsupplier" role="form">
|
||||
<form role="form" action="<?php echo base_url() ?>editasset" method="post" id="editasset" role="form">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="Asset_Name">Asset Name</label>
|
||||
<input type="text" class="form-control required" id="Asset_Name" name="Asset_Name" value="<?php echo $Asset_Name;?>" required>
|
||||
|
||||
<input type="hidden" value="<?php echo $Asset_Code; ?>" name="Asset_Code" id="Asset_Code" readonly>
|
||||
</div>
|
||||
<label for="Asset_Name">Asset_Name</label>
|
||||
<input type="text" class="form-control" id="fname" placeholder="Asset_Name" name="Asset_Name" value="<?php echo $Asset_Name; ?>" maxlength="128">
|
||||
<input type="hidden" value="<?php echo $Asset_Code; ?>" name="Asset_Code" id="Asset_Code" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="Description">Description</label>
|
||||
<input type="text" class="form-control required" id="Description" name="Description" value="<?php echo $Description; ?>">
|
||||
<input type="text" class="form-control" id="Description" placeholder="Description" name="Description" value="<?php echo $Description; ?>" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="Department">Department</label>
|
||||
<select class="form-control required" id="Department" name="Department">
|
||||
<option value="<?php echo $Department;?>"><?php echo $Department;?></option>
|
||||
<label for="DepartmentList">DepartmentList</label>
|
||||
<select class="form-control" id="Department" name="Department">
|
||||
<option value="<?php echo $Department ?>"><?php echo $Department ?></option>
|
||||
<?php
|
||||
if(!empty($DepartmentList))
|
||||
{
|
||||
@ -114,32 +99,27 @@ function demo(){
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="Location">Location</label>
|
||||
<input type="text" class="form-control required" id="Location" name="Location"value="<?php echo $Location;?>">
|
||||
<input type="text" class="form-control" value="<?php echo $Location; ?>"id="Location" placeholder="Location" name="Location" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="User">User</label>
|
||||
<input type="text" class="form-control required" id="AssetOwner" name="User" value="<?php echo $User;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="SupplierName">Supplier Name</label>
|
||||
<select class="form-control required" id="SupplierName" name="SupplierName">
|
||||
<option value="<?php echo $SupplierName;?>"><?php echo $SupplierName;?></option>
|
||||
<label for="User">User</label>
|
||||
<input type="text" class="form-control" id="User" placeholder="User" name="User" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="SupplierName">SupplierName</label>
|
||||
<select class="form-control" id="SupplierName" name="SupplierName">
|
||||
<option value="<?php echo $SupplierName; ?>"><?php echo $SupplierName; ?></option>
|
||||
<?php
|
||||
|
||||
if(!empty($SupplierList))
|
||||
@ -153,41 +133,72 @@ function demo(){
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="DateOfPurchase">Date Of Purchase</label>
|
||||
<input type="date" name="DateOfPurchase" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $DateOfPurchase; ?>" class="form-control" placeholder="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="DateOfCommission">Date Of Commission</label>
|
||||
<input type="date" name="DateOfCommission" min=<?php $week = date("Y-m-d",mktime(0, 0, 0, date("m"), date("d")-60,date("Y")));echo $week;?> max=<?php echo date('Y-m-d'); ?> value="<?php echo $DateOfCommission;?>" class="form-control" placeholder="" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="Assetvalue">Asset Value</label>
|
||||
<input type="text" value="<?php echo $AssetValue;?>"class="form-control required" id="Assetvalue" name="Assetvalue" maxlength="255">
|
||||
<input type="hidden" class="form-control required" value="<?php echo $Createdby;?>"id="Createdby" name="Createdby" maxlength="255">
|
||||
<label for="AssetValue">AssetValue</label>
|
||||
<input type="text" class="form-control" id="User" placeholder="AssetValue" name="AssetValue" Value="<?php echo $AssetValue;?>">
|
||||
<input type="hidden" class="form-control" id="Createdby" placeholder="Createdby" name="Createdby" Value="<?php echo $Createdby;?>"readonly>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="submit" class="btn btn-info" onclick="demo()" value="Submit" />
|
||||
<input type="reset" class="btn btn-info" value="Cancel" />
|
||||
<!--<input type="reset" class="btn btn-default" value="Reset" />-->
|
||||
<input type="submit" class="btn btn-info" value="Submit" />
|
||||
<input type="reset" class="btn btn-info" value="Cancel" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<?php
|
||||
$this->load->helper('form');
|
||||
$error = $this->session->flashdata('error');
|
||||
if($error)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$success = $this->session->flashdata('success');
|
||||
if($success)
|
||||
{
|
||||
?>
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo $this->session->flashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>
|
||||
@ -201,14 +201,14 @@ function demo(){
|
||||
<div class="form">
|
||||
<label for="PaymentDays" >Payment Date</label><br/>
|
||||
<span> Before</span>
|
||||
<input type="radio" <?php echo($PaymentDays?'checked="checked"':''); ?> name="PaymentDays" value="before"/>
|
||||
<input type="radio" <?php echo($PaymentDays =='before')?'checked':''; ?> name="PaymentDays" value="before"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xs-6">
|
||||
<div class="form">
|
||||
|
||||
<span> After</span>
|
||||
<input type="radio" <?php echo($PaymentDays?'checked="checked"':''); ?> name="PaymentDays" value="after"/>
|
||||
<input type="radio" <?php echo($PaymentDays =='after')?'checked':''; ?> name="PaymentDays" value="after"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user