Amendment issue
This commit is contained in:
parent
8f06ecb619
commit
a4f6ecb955
@ -1,3 +1,6 @@
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
@ -86,7 +89,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-6">
|
||||
<label>Supplier Name </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -95,23 +98,9 @@
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Supplier Address</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Address','value' => set_value('Address'),'id'=>'Add', 'class' => 'form-control' ,'readonly' => 'true' , 'rows'=>'3' ,'columns'=> '3');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Comments Of Special Instructions</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Comments','value' => set_value('Comments'),'id'=>'ser', 'class' => 'form-control' ,'readonly' => 'true' , 'rows'=>'3' ,'columns'=> '3');
|
||||
echo Form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
@ -134,7 +123,7 @@
|
||||
<div class="col-md-3">
|
||||
<label>Vechicle NO</label>
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'),'pattern=>"^[A-Z]{2}\s[0-9]{2}\s[A-Z]{2}\s[0-9]{4}$"','id'=>'VehicleNo', 'class' => 'form-control', 'onchange'=>'validate_Vechicle();' );
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo'),'pattern=>"^[A-Z]{2}\s[0-9]{2}\s[A-Z]{2}\s[0-9]{4}$"','id'=>'VehicleNo', 'class' => 'form-control', 'onchange'=>'validate_Vechicle();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<span pattern="" required="true"></span>
|
||||
@ -159,8 +148,11 @@
|
||||
<th>Item Code</th>
|
||||
<th>Material</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Ordered Quantity</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Pending Quantity</th>
|
||||
<th>Advised Quantity</th>
|
||||
|
||||
<th>Remarks</th>
|
||||
|
||||
</tr>
|
||||
@ -180,7 +172,7 @@
|
||||
<div class="col-md-1 col-md-offset-10">
|
||||
|
||||
<!--<a class="btn btn-primary" type="submit" id="Save" onclick="Save(0);">Generate IGR</a>-->
|
||||
<a class="btn btn-primary" onclick="Save();">Generate IGR</a>
|
||||
<a class="btn btn-primary" id='IGRLink' name='IGRLink' onclick="Save();">Generate IGR</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -336,11 +328,12 @@ function validate()
|
||||
|
||||
<script>
|
||||
// $(function() {
|
||||
|
||||
|
||||
$('#PONO').change(function() {
|
||||
$("#IGRappend").empty();
|
||||
|
||||
var id = $('#PONO').val();
|
||||
var status= '';
|
||||
if(id != '-1')
|
||||
{
|
||||
|
||||
@ -353,10 +346,10 @@ function validate()
|
||||
{
|
||||
$("#po").val(obj.PONO);
|
||||
$("#Sup").val(obj.SupplierName);
|
||||
$("#Add").val(obj.Address);
|
||||
//$("#Add").val(obj.Address);
|
||||
$("#del").val(obj.DeliveryDate);
|
||||
$("#ser").val(obj.ServiceDescription);
|
||||
|
||||
//$("#ser").val(obj.ServiceDescription);
|
||||
status = obj.status;
|
||||
}
|
||||
});
|
||||
|
||||
@ -379,8 +372,11 @@ function validate()
|
||||
'<td name="MaterialName" id="MaterialCode" >' + item.MaterialCode + '</td>' +
|
||||
'<td>' + item.MaterialName + '</td>' +
|
||||
'<td name="UOM">' + item.UOM + '</td>' +
|
||||
'<td align="right" name="Quantity1'+i+'" id="Quantity_1'+i+'">' + item.Quantity + '</td>' +
|
||||
'<td align="right" data-name="sel" ><input type="text" onchange="validateReceivedQuantity('+i+')"id="QuantityAsPerInvoice'+ i +'" name="QuantityAsPerInvoice'+ i +'" class="form required" value="" onkeypress="return isNumberKey(event);"></td>' +
|
||||
'<td name="Quantity1'+i+'" id="Quantity_1'+i+'">' + item.Quantity + '</td>' +
|
||||
'<td name="ReceivedQuantity'+i+'" id="ReceivedQuantity'+i+'">'+ item.ReceivedQuantity +'</td>'+
|
||||
'<td name="PendingQuantity'+i+'" id="PendingQuantity'+i+'">'+ item.PendingQty +'</td>'+
|
||||
'<td data-name="sel" ><input type="text" onchange="validateReceivedQuantity('+i+')"id="QuantityAsPerInvoice'+ i +'" name="QuantityAsPerInvoice'+ i +'" class="form required" value="" onkeypress="return isNumberKey(event);"></td>' +
|
||||
|
||||
'<td><input type="text" id="Remark'+ i +'" name="Remark'+ i +'" class="form" onchange="SetRemarks('+i+')"> </td>' +
|
||||
'</tr>';
|
||||
$('#txtRowCount').val(i);
|
||||
@ -421,9 +417,18 @@ $('<input>').attr({
|
||||
|
||||
$('#IGRappend').append(trHTML);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
if(status == '<?php echo IGR_CREATED ?>' || status == '<?php echo MRIR_CREATED ?>' )
|
||||
{
|
||||
alert('The Order is completed!!');
|
||||
$("#IGRLink").hide();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@ -443,16 +448,18 @@ $('<input>').attr({
|
||||
function validateReceivedQuantity(Rowid){
|
||||
//alert(Rowid);
|
||||
|
||||
var InvoiceQty =$("#QuantityAsPerInvoice"+Rowid).val();
|
||||
|
||||
var InvoiceQty = parseFloat( $('#QuantityAsPerInvoice'+Rowid).val() == '' ? '0.00' : $('#QuantityAsPerInvoice'+Rowid).val());
|
||||
|
||||
var PendingQty = parseFloat( $('#PendingQuantity'+Rowid).text() == '' ? '0.00' : $('#PendingQuantity'+Rowid).text());
|
||||
//alert(PendingQty);
|
||||
var r =$("#Remark"+Rowid).val();
|
||||
|
||||
var OrderedQty =($("#Quantity_1"+Rowid).text());
|
||||
var OrderedQty =parseFloat($("#Quantity_1"+Rowid).text());
|
||||
|
||||
|
||||
|
||||
|
||||
if(InvoiceQty >= OrderedQty){
|
||||
if(InvoiceQty > OrderedQty){
|
||||
|
||||
alert("Advised Quantity is exceeding the Ordered Quantity.Please Contact Purchase Team for further Process ")
|
||||
$("#QuantityAsPerInvoice"+Rowid).focus();
|
||||
@ -460,8 +467,15 @@ function validateReceivedQuantity(Rowid){
|
||||
|
||||
|
||||
}
|
||||
else if(PendingQty == '0.00'){
|
||||
alert("Order is completed.")
|
||||
$("#QuantityAsPerInvoice"+Rowid).focus();
|
||||
$('#QuantityAsPerInvoice'+Rowid).val('');
|
||||
return false;
|
||||
}
|
||||
|
||||
else {
|
||||
else {
|
||||
$('#PendingQuantity'+Rowid).text(OrderedQty - InvoiceQty );
|
||||
$("#ReceivedQuantity"+Rowid).val(InvoiceQty);
|
||||
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user