all edit po changes
This commit is contained in:
parent
b13c0cfbe9
commit
dcecd50670
@ -1217,9 +1217,11 @@ function edited(){
|
||||
|
||||
$SpcialInstruction = $this->input->post('SpcialInstruction');
|
||||
$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');
|
||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||
//echo $RowCount . "-" . $DeletedRow;
|
||||
@ -1238,7 +1240,8 @@ function edited(){
|
||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'Status'=>$POStatus,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'UpdateBY'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Supplier_Reference'=>$supplierreference,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Other_Reference'=>$otherreference,'Fincap'=>$fincap,'InsuranceStatus'=>$insurancestatus,'POSubType'=>$revenuetype,'InsuranceNumber'=>$insuranceno,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||
//print_r($POList);
|
||||
//die();
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
$POMaster = $this->purchaseorder_model->updatePOMaster($PONO,$POList);
|
||||
|
||||
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
@ -1273,6 +1276,8 @@ function edited(){
|
||||
$POLineItemNo = $this->input->post('LineItemNo'.$i);
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$LineItemNo = '';
|
||||
|
||||
|
||||
|
||||
|
||||
$SkipInsert = "False";
|
||||
@ -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)
|
||||
@ -1331,7 +1350,10 @@ function edited(){
|
||||
$this->purchaseorder_model->updateRevenueTax($LineItemNo,$RevenueTaxList);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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(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(strlen($POLineItemNo) == 0)
|
||||
|
||||
@ -414,6 +414,20 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
$ItemDescription = $this->input->post('ItemDescription'.$i);
|
||||
$OtherAmt = $this->input->post('OtherAmt'.$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();
|
||||
$LineItemNo = '';
|
||||
|
||||
@ -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
|
||||
{
|
||||
@ -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
|
||||
|
||||
function ponoreset($ponoreset)
|
||||
|
||||
@ -248,10 +248,10 @@ var AvilBudAmt = '';
|
||||
};
|
||||
$(function() {
|
||||
$("#PODate").datepicker({
|
||||
minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
//minDate : d,
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true
|
||||
}); //yearRange: '-100:+0'
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
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 ReqQuantity = parseFloat(RequistQuantity);
|
||||
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();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
// $('#Quantity').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -522,12 +523,12 @@ function ExceedQuantityCheck()
|
||||
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
|
||||
var ReqQuantity = parseFloat(RequistQuantity);
|
||||
//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();
|
||||
return false;
|
||||
// $('#EditQuantity').focus();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -390,9 +390,9 @@ $("#PaymentMethod").select2();
|
||||
|
||||
$("#PODate").datepicker({
|
||||
//minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
// maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true
|
||||
});//,yearRange: '-100:+0'
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
@ -4442,13 +4442,14 @@ Calculateloadingcharge();
|
||||
var ReqQuantity = parseFloat(RequistQuantity);
|
||||
//alert(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();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
// $('#CPQuantity').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
{
|
||||
return true;
|
||||
|
||||
}
|
||||
@ -6497,14 +6498,15 @@ var Freight=parseFloat($('#txtAfterFreightlocview').val() == '' ? '0.00' : $('#t
|
||||
var ReqQuantity = parseFloat(RequistQuantity);
|
||||
|
||||
//alert(ReqQuantity);
|
||||
if(EnterQuantity > ReqQuantity)
|
||||
{
|
||||
alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
if(EnterQuantity != ReqQuantity)
|
||||
// {
|
||||
// alert('Your exceeding the Quantity from the Requisition Quantity:'+ RequistQuantity +'.Please adjust the Quantity to proceed further.');
|
||||
|
||||
$('#EditCPQuantity').focus();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
// $('#EditCPQuantity').focus();
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
{
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@ -315,10 +315,10 @@ var SelectedMaterialCode = [];
|
||||
$(function() {
|
||||
|
||||
$("#PODate").datepicker({
|
||||
minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
//minDate : d,
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: false, changeYear: false
|
||||
});//,yearRange: '-100:+0'
|
||||
$("#Deliverydt").datepicker({
|
||||
minDate : 'now',
|
||||
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 ReqQuantity = parseFloat(RequistQuantity);
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -2030,13 +2031,14 @@ SetVatorCST();
|
||||
// RequistQuantity
|
||||
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
|
||||
var ReqQuantity = parseFloat(RequistQuantity);
|
||||
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{
|
||||
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
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -5073,8 +5075,8 @@ $('#Scheduleby').change(function(){
|
||||
|
||||
$("#Deliverydt").datepicker({
|
||||
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(){
|
||||
|
||||
@ -295,10 +295,10 @@ tinymce.init({
|
||||
var m=new Date(t);
|
||||
|
||||
$("#PODate").datepicker({
|
||||
minDate : d,
|
||||
maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
//minDate : d,
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true
|
||||
});//,yearRange: '-100:+0'
|
||||
|
||||
// $("#PayableAT").datepicker({
|
||||
// minDate : m,
|
||||
@ -3841,13 +3841,14 @@ function ExceedEditQuantityCheck()
|
||||
|
||||
//alert(reqq);
|
||||
//var ReqQuantity=parseFloat($('#EditQuantity').val());
|
||||
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{
|
||||
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
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -4343,13 +4344,14 @@ function ExceedQuantityCheck()
|
||||
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
|
||||
var ReqQuantity = parseFloat(RequistQuantity);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ $(function() {
|
||||
|
||||
<?php $assd=$dep->AssDep;
|
||||
|
||||
if($assd == PURCHASE){?>
|
||||
if($assd == PURCHASE || $DEPCode == PURCHASE){?>
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user