diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index e1af72e6..b1388df3 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1428,6 +1428,8 @@ function addNewImportPurchaseOrder() $Freightrate=$this->input->post('FreightRate'.$i); $Freightamount=$this->input->post('AfterFreightRate'.$i); + $per=$this->input->post('Per'.$i); + @@ -1448,7 +1450,7 @@ function addNewImportPurchaseOrder() } if($SkipInsert == "False") { - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per); //print_r($POLineItemList); //die(); diff --git a/application/views/importpo.php b/application/views/importpo.php index 99bb317b..fee9a893 100755 --- a/application/views/importpo.php +++ b/application/views/importpo.php @@ -3841,9 +3841,15 @@ $('.AddImport').click(function() var Nooftrip=$('#NOOfTrips').val(); var Freightrate=$('#txtFreight').val(); var AfterFreightAmount=$('#txtAfterFreight').val(); + + var per=$('#AddPer').val(); + if(per=='') + { + var per=$('#UOM').val(); + } //var Nooftrip=$('#NOOfTrips').val(); - + //console.log(per); // console.log(FreightType); // console.log(Nooftrip); @@ -3933,15 +3939,17 @@ $('.AddImport').click(function() addHidden(theForm,"NoofTrip"+temp,Nooftrip); addHidden(theForm,"FreightRate"+temp,Freightrate); addHidden(theForm,"AfterFreightRate"+temp,AfterFreightAmount); + addHidden(theForm,"Per"+temp,per.trim()); + // alert(JSON.stringify(totalexp)); - // var a=$('#FreightType'+temp).val(); + //var a=$('#Per'+temp).val(); // var b=$('#NoofTrip'+temp).val(); // var c=$('#FreightRate'+temp).val(); // var d=$('#AfterFreightRate'+temp).val(); - // console.log(a); + //console.log(a); // console.log(b); // console.log(c); // console.log(d); @@ -4126,6 +4134,8 @@ function clearTaxField() $('#txtFreight').val(''); $('#txtAfterFreight').val(''); + + $('#AddPer').val(''); } @@ -4214,7 +4224,7 @@ $("#editimportpomodel").on("shown.bs.modal", function(e) { } - + $('#EditPer').val($('#Per'+userid).val()); $('#EditTotalOrderValue').val(cellval[8].innerHTML); @@ -4313,6 +4323,7 @@ $('.EditImport').click(function(){ var FreightRate=$('#txtEditFreight').val(); var FreightRateAmount=$('#edittxtAfterFreight').val(); var Nooftrip=$('#editNOOfTrips').val(); + var per=$('#EditPer').val(); var FreightTypename = $('#drpeditFreight').val(); @@ -4383,6 +4394,8 @@ if (FreightTypename != "PER TRIP") $('#AfterFreightRate'+userid).val(FreightRateAmount); + $('#Per'+userid).val(per); + // var a=$('#FreightType'+userid).val(); // var b=$('#NoofTrip'+userid).val();