all edit po changes
This commit is contained in:
parent
b13c0cfbe9
commit
dcecd50670
@ -1217,9 +1217,11 @@ function edited(){
|
|||||||
|
|
||||||
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
||||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||||
$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,7 +1296,21 @@ function edited(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($SkipInsert == "False")
|
/*------------------------------*/
|
||||||
|
//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(strlen($POLineItemNo) == 0)
|
if(strlen($POLineItemNo) == 0)
|
||||||
@ -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)
|
||||||
|
|||||||
@ -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";
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
class purchaseorder_model extends CI_Model
|
class purchaseorder_model extends CI_Model
|
||||||
{
|
{
|
||||||
@ -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)
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -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.');
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||||
//$('#Quantity').val(RequistQuantity);
|
// //$('#Quantity').val(RequistQuantity);
|
||||||
$('#Quantity').focus();
|
// $('#Quantity').focus();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else{
|
//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.');
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||||
$('#EditQuantity').focus();
|
// $('#EditQuantity').focus();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else{
|
//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(){
|
||||||
|
|||||||
@ -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.');
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||||
$('#EditQuantity').focus();
|
// $('#EditQuantity').focus();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else{
|
// 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.');
|
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||||
//$('#Quantity').val(RequistQuantity);
|
// //$('#Quantity').val(RequistQuantity);
|
||||||
$('#Quantity').focus();
|
// $('#Quantity').focus();
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else{
|
// else
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user