145 lines
7.0 KiB
PHP
Executable File
145 lines
7.0 KiB
PHP
Executable File
|
||
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1>
|
||
Add Purchase order Line Item
|
||
</h1>
|
||
</section>
|
||
|
||
<section class="content">
|
||
|
||
<div class="row">
|
||
<!-- left column -->
|
||
<div class="col-md-6">
|
||
<!-- general form elements -->
|
||
<div class="box box-primary">
|
||
<div class="box-header">
|
||
<h3 class="box-title">Enter PO Line Item</h3>
|
||
</div><!-- /.box-header -->
|
||
<!-- form start -->
|
||
|
||
<form role="form" action="<?php echo base_url() ?>purchaseorder/addNewPOLineItem" method="post" id="AddPOLineItem" role="form">
|
||
<div class="box-body">
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
|
||
<div class="form-group">
|
||
<label for="ProductDescription">Product Description</label>
|
||
<select class="form-control" name="ProductDescription" required>
|
||
<option value="null">Select Product Description</option>
|
||
<?php
|
||
if(!empty($RawMaterials))
|
||
{
|
||
foreach ($RawMaterials as $RID)
|
||
{
|
||
?>
|
||
<option value="<?php echo $RID->MaterialCode ?>"><?php echo $RID->MaterialCode ?> - <?php echo $RID->MaterialName ?></option>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="UOM">UOM</label>
|
||
<select class="form-control required" id="UOM" name="UOM">
|
||
<option value="null">Select UOM</option>
|
||
<?php
|
||
if(!empty($UOM))
|
||
{
|
||
foreach ($UOM as $UID)
|
||
{
|
||
?>
|
||
<option value="<?php echo $UID->ConfigValue ?>"><?php echo $UID->ConfigValue ?></option>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="Quantity">Quantity</label>
|
||
<input type="text" class="form-control required digits" id="Quantity" name="Quantity" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="UnitPrice">Unit Price</label>
|
||
<input type="text" class="form-control required digits" id="UnitPrice" name="UnitPrice" onchange="change()" >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="form-group">
|
||
<label for="ProductPrice">Product Price</label>
|
||
<input type="text" class="form-control required digits" id="ProductPrice" name="ProductPrice" disabled >
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box-footer">
|
||
<input type="submit" class="btn btn-primary" value="Submit" />
|
||
<input type="reset" class="btn btn-default" value="Reset" />
|
||
</div>
|
||
</form>
|
||
</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>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
function change(){
|
||
|
||
var txtQuantity = document.getElementById('Quantity').value;
|
||
var txtUnitPrice = document.getElementById('UnitPrice').value;
|
||
var Tot = txtQuantity * txtUnitPrice
|
||
document.getElementById('ProductPrice').value = Tot;
|
||
// Do Something
|
||
}
|
||
</script>
|
||
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>
|