all edit po changes

This commit is contained in:
venbatechnologies 2018-04-19 17:28:57 +05:30
parent b13c0cfbe9
commit dcecd50670
8 changed files with 169 additions and 75 deletions

View File

@ -1220,6 +1220,8 @@ function edited(){
$POStatus = $this->input->post('txtStatus'); $POStatus = $this->input->post('txtStatus');
$updatedBy = $this->session->userdata('userId'); $updatedBy = $this->session->userdata('userId');
//echo($updatedBy);
$RowCount = $this->input->post('txtRowCount'); $RowCount = $this->input->post('txtRowCount');
$DeletedRow = $this->input->post('txtDeletedRow'); $DeletedRow = $this->input->post('txtDeletedRow');
//echo $RowCount . "-" . $DeletedRow; //echo $RowCount . "-" . $DeletedRow;
@ -1240,6 +1242,7 @@ function edited(){
//die(); //die();
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList); $POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
$LineItemStatus = REQITEM_NEW; $LineItemStatus = REQITEM_NEW;
//echo "OUT"; //echo "OUT";
@ -1275,6 +1278,8 @@ function edited(){
$LineItemNo = ''; $LineItemNo = '';
$SkipInsert = "False"; $SkipInsert = "False";
if( count($comma_separated) > 0) if( count($comma_separated) > 0)
{ {
@ -1291,6 +1296,20 @@ function edited(){
} }
} }
/*------------------------------*/
//if($MaterialCode!= ''){
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
//print_r($ReqDetails);
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
// }
/*------------------------------*/
if($SkipInsert == "False") if($SkipInsert == "False")
{ {
@ -1333,6 +1352,9 @@ function edited(){
} }
} }
} }
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ; echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
@ -2214,6 +2236,19 @@ function addNewImportPurchaseOrder()
} }
} }
/*------------------------------*/
//if($MaterialCode!= ''){
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
//print_r($ReqDetails);
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
// }
/*------------------------------*/
if($SkipInsert == "False") if($SkipInsert == "False")
{ {
if(strlen($POLineItemNo) == 0) if(strlen($POLineItemNo) == 0)
@ -2854,6 +2889,25 @@ function addNewImportPurchaseOrder()
} }
} }
/*------------------------------*/
//if($MaterialCode!= ''){
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
//print_r($ReqDetails);
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
// }
/*------------------------------*/
if($SkipInsert == "False") if($SkipInsert == "False")
{ {
if(strlen($POLineItemNo) == 0) if(strlen($POLineItemNo) == 0)

View File

@ -415,6 +415,20 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
$OtherAmt = $this->input->post('OtherAmt'.$i); $OtherAmt = $this->input->post('OtherAmt'.$i);
$Per = $this->input->post('per'.$i); $Per = $this->input->post('per'.$i);
/*------------------------------*/
//if($MaterialCode!= ''){
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
//print_r($ReqDetails);
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
// }
/*------------------------------*/
$POLineItem = array(); $POLineItem = array();
$LineItemNo = ''; $LineItemNo = '';
$SkipInsert = "False"; $SkipInsert = "False";

View File

@ -22,6 +22,25 @@ class purchaseorder_model extends CI_Model
} }
/*------------------------------*/
function updateReqDetails($Reqnumber,$ReqDetails){
//echo'hi';
$this->db->where('ReqNo',$Reqnumber);
$this->db->update('T_Requestion_Details',$ReqDetails);
$r = $this->db->affected_rows();
return $r;
}
/*------------------------------*/
/////////////////// start this function used to pono reset financeyear configuration /////////////////// start this function used to pono reset financeyear configuration
function ponoreset($ponoreset) function ponoreset($ponoreset)

View File

@ -248,10 +248,10 @@ var AvilBudAmt = '';
}; };
$(function() { $(function() {
$("#PODate").datepicker({ $("#PODate").datepicker({
minDate : d, //minDate : d,
maxDate : 'now', //maxDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true
}); }); //yearRange: '-100:+0'
$("#Deliverydt").datepicker({ $("#Deliverydt").datepicker({
minDate : 'now', minDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10' dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
@ -506,13 +506,14 @@ function ExceedQuantityCheck()
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val()); var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity > ReqQuantity)
{ // {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.'); // alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
$('#Quantity').focus(); // $('#Quantity').focus();
return false; // return false;
} // }
else { // else
{
return true; return true;
} }
} }
@ -522,12 +523,12 @@ function ExceedQuantityCheck()
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val()); var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
//alert(ReqQuantity); //alert(ReqQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity != ReqQuantity)
{ {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.'); // alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
$('#EditQuantity').focus(); // $('#EditQuantity').focus();
return false; return true;
} }
} }

View File

@ -390,9 +390,9 @@ $("#PaymentMethod").select2();
$("#PODate").datepicker({ $("#PODate").datepicker({
//minDate : d, //minDate : d,
maxDate : 'now', // maxDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true
}); });//,yearRange: '-100:+0'
$("#Deliverydt").datepicker({ $("#Deliverydt").datepicker({
minDate : 'now', minDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10' dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
@ -4442,13 +4442,14 @@ Calculateloadingcharge();
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
//alert(ReqQuantity); //alert(ReqQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity > ReqQuantity)
{ // {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.'); // alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
$('#CPQuantity').focus(); // $('#CPQuantity').focus();
return false; // return false;
} // }
else { // else
{
return true; return true;
} }
@ -6497,14 +6498,15 @@ var Freight=parseFloat($('#txtAfterFreightlocview').val() == '' ? '0.00' : $('#t
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
//alert(ReqQuantity); //alert(ReqQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity != ReqQuantity)
{ // {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.'); // alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
$('#EditCPQuantity').focus(); // $('#EditCPQuantity').focus();
return false; // return false;
} // }
else { // else
{
return true; return true;

View File

@ -315,10 +315,10 @@ var SelectedMaterialCode = [];
$(function() { $(function() {
$("#PODate").datepicker({ $("#PODate").datepicker({
minDate : d, //minDate : d,
maxDate : 'now', //maxDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' dateFormat: 'dd-mm-yy',changeMonth: false, changeYear: false
}); });//,yearRange: '-100:+0'
$("#Deliverydt").datepicker({ $("#Deliverydt").datepicker({
minDate : 'now', minDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10' dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
@ -2014,13 +2014,14 @@ SetVatorCST();
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val()); var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity > ReqQuantity)
// {
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
// //$('#Quantity').val(RequistQuantity);
// $('#Quantity').focus();
// return false;
// }
//else
{ {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
//$('#Quantity').val(RequistQuantity);
$('#Quantity').focus();
return false;
}
else{
return true; return true;
} }
} }
@ -2030,13 +2031,14 @@ SetVatorCST();
// RequistQuantity // RequistQuantity
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val()); var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity != ReqQuantity)
// {
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
// $('#EditQuantity').focus();
// return false;
// }
//else
{ {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
$('#EditQuantity').focus();
return false;
}
else{
return true; return true;
} }
} }
@ -5073,8 +5075,8 @@ $('#Scheduleby').change(function(){
$("#Deliverydt").datepicker({ $("#Deliverydt").datepicker({
minDate : 'now', minDate : 'now',
dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true
}); }); //,yearRange: '0:+10's
}); });
$('#Deliverydt').change(function(){ $('#Deliverydt').change(function(){

View File

@ -295,10 +295,10 @@ tinymce.init({
var m=new Date(t); var m=new Date(t);
$("#PODate").datepicker({ $("#PODate").datepicker({
minDate : d, //minDate : d,
maxDate : 'now', //maxDate : 'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true
}); });//,yearRange: '-100:+0'
// $("#PayableAT").datepicker({ // $("#PayableAT").datepicker({
// minDate : m, // minDate : m,
@ -3841,13 +3841,14 @@ function ExceedEditQuantityCheck()
//alert(reqq); //alert(reqq);
//var ReqQuantity=parseFloat($('#EditQuantity').val()); //var ReqQuantity=parseFloat($('#EditQuantity').val());
if(EnterQuantity > ReqQuantity) if(EnterQuantity != ReqQuantity)
// {
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
// $('#EditQuantity').focus();
// return false;
// }
// else
{ {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
$('#EditQuantity').focus();
return false;
}
else{
return true; return true;
} }
} }
@ -4343,13 +4344,14 @@ function ExceedQuantityCheck()
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val()); var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
var ReqQuantity = parseFloat(RequistQuantity); var ReqQuantity = parseFloat(RequistQuantity);
if(EnterQuantity > ReqQuantity) if(EnterQuantity > ReqQuantity)
// {
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
// //$('#Quantity').val(RequistQuantity);
// $('#Quantity').focus();
// return false;
// }
// else
{ {
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
//$('#Quantity').val(RequistQuantity);
$('#Quantity').focus();
return false;
}
else{
return true; return true;
} }
} }

View File

@ -279,7 +279,7 @@ $(function() {
<?php $assd=$dep->AssDep; <?php $assd=$dep->AssDep;
if($assd == PURCHASE){?> if($assd == PURCHASE || $DEPCode == PURCHASE){?>
<li class="treeview"> <li class="treeview">