poedit
This commit is contained in:
parent
1b9ae29251
commit
23c8d32edc
@ -376,6 +376,14 @@ function addfile1()
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
|
||||
/*----------------------------*/
|
||||
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
|
||||
$this->purchaseorder_model->newlogpo($logpo);
|
||||
|
||||
|
||||
|
||||
/*----------------------------*/
|
||||
|
||||
|
||||
if(trim($POType) == SERVICE )
|
||||
{
|
||||
@ -609,7 +617,17 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
//echo $LineItemNo;
|
||||
|
||||
/*----------------------------*/
|
||||
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
|
||||
|
||||
$logaddpo = $this->purchaseorder_model->newlogpo($logpo);
|
||||
|
||||
|
||||
|
||||
/*----------------------------*/
|
||||
|
||||
|
||||
if(trim($POType) == REVENUE )
|
||||
{
|
||||
@ -1311,7 +1329,11 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
/*--------------*/
|
||||
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$Rate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
|
||||
|
||||
$addlog= $this->purchaseorder_model->newlogpo($logpo);
|
||||
/*--------------*/
|
||||
if(trim($POType) == REVENUE )
|
||||
{
|
||||
// echo 'Success';
|
||||
@ -1333,6 +1355,13 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
|
||||
|
||||
/*-----------------------------------*/
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
/*-----------------------------------*/
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
@ -1369,6 +1398,10 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
/*-----------------------------------*/
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
|
||||
$DiscountType = $this->input->post('DisType'.$i);
|
||||
$DiscountValue = $this->input->post('DisVal'.$i);
|
||||
@ -1400,6 +1433,21 @@ $RequestedBy = $this->input->post('drpDepartment');
|
||||
$LineItemNo = '';
|
||||
|
||||
|
||||
/*---------start---------------------*/
|
||||
|
||||
if(($PODate != $b4podate )||( $SupplierID != $b4supplier) || ($itemRate !=$b4rate) ||
|
||||
($Quantity != $b4qty ))
|
||||
{
|
||||
$logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
}
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
|
||||
@ -529,7 +529,9 @@ function edited(){
|
||||
$data['getdata'] = $this->purchaseorder_model->getfunction($PONO);
|
||||
|
||||
//s print_r($data['getdata']);
|
||||
|
||||
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||
|
||||
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
//$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||
|
||||
@ -542,6 +544,9 @@ function edited(){
|
||||
|
||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
|
||||
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||
|
||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||
@ -567,6 +572,7 @@ function edited(){
|
||||
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
||||
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||
|
||||
//print_r($data['PaymentTerms']);
|
||||
$unicode ='';
|
||||
@ -606,7 +612,7 @@ function edited(){
|
||||
}
|
||||
$data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO);
|
||||
|
||||
|
||||
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||
//$CapitalRange='';
|
||||
foreach($data['POItem'] as $Rate)
|
||||
{
|
||||
@ -1158,7 +1164,11 @@ function edited(){
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
|
||||
/*---------*/
|
||||
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$Rate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
|
||||
|
||||
$addlog= $this->purchaseorder_model->newlogpo($logpo);
|
||||
/*---------*/
|
||||
if(trim($POType) == REVENUE )
|
||||
{
|
||||
// echo 'Success';
|
||||
@ -1194,9 +1204,11 @@ function edited(){
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
$DeliverySchedule = '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------*/
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
/*-----------------------------------*/
|
||||
$Modeofshipment=$this->input->post('editmodeofshipment');
|
||||
$supplierreference=$this->input->post('editsupplierreference');
|
||||
$supplieroffno=$this->input->post('editsupplierofferno');
|
||||
@ -1252,6 +1264,10 @@ function edited(){
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
/*-----------------------------------*/
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
$per=$this->input->post('per'.$i);
|
||||
$DiscountType = $this->input->post('DisType'.$i);
|
||||
@ -1277,8 +1293,19 @@ function edited(){
|
||||
$CostCenter = $this->input->post('costCode'.$i);
|
||||
$LineItemNo = '';
|
||||
|
||||
/*---------start---------------------*/
|
||||
|
||||
|
||||
if(($PODate != $b4podate )||( $SupplierID != $b4supplier) || ($itemRate !=$b4rate) ||
|
||||
($Quantity != $b4qty ))
|
||||
{
|
||||
$logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
}
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
@ -1296,17 +1323,64 @@ function edited(){
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------*/
|
||||
/*-------------start-----------------*/
|
||||
//if($MaterialCode!= ''){
|
||||
|
||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
// }
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
$recqty=0;
|
||||
|
||||
if($POStatus == SPECIAL_PO)
|
||||
{
|
||||
|
||||
$recqty= $Quantity;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$IGRD= $this->purchaseorder_model->IGRDetailsupdate($PONO);
|
||||
|
||||
$IGRItem=0;
|
||||
$IGRNO=0;
|
||||
|
||||
foreach($IGRD as $value)
|
||||
{
|
||||
|
||||
|
||||
$IGRItemNo=$value['IGRItemNo'];
|
||||
$IGRNO= $value['IGRNO'];
|
||||
|
||||
}
|
||||
|
||||
|
||||
// print_r($IGRD); die;
|
||||
$IGRDs = array('QuantityAsPerInvoice'=>$Quantity,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
//print_r($IGRDs);die;
|
||||
$this->purchaseorder_model->updateIGR($IGRItemNo,$IGRNO,$MaterialCode,$IGRDs);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//print_r($data['IGRDetails']);
|
||||
|
||||
/*-----------end-------------------*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1330,6 +1404,8 @@ function edited(){
|
||||
$LineItemNo = $POLineItemNo;
|
||||
|
||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||
|
||||
|
||||
//print_r($POLineItemList);
|
||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
||||
|
||||
@ -1987,7 +2063,13 @@ function addNewImportPurchaseOrder()
|
||||
{
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
//echo $LineItemNo;
|
||||
//echo $LineItemNo;
|
||||
|
||||
/* --------------------------------------------*/
|
||||
|
||||
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=> $itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
|
||||
$this->purchaseorder_model->newlogpo($logpo);
|
||||
/* --------------------------------------------*/
|
||||
|
||||
if(trim($POType) == IMPORT )
|
||||
{
|
||||
@ -2003,7 +2085,9 @@ function addNewImportPurchaseOrder()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
|
||||
@ -2019,6 +2103,12 @@ function addNewImportPurchaseOrder()
|
||||
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
|
||||
/*-----------------------------------*/
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
/*-----------------------------------*/
|
||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
$Deliverydt = $this->getDateformat($dt);
|
||||
@ -2131,7 +2221,10 @@ function addNewImportPurchaseOrder()
|
||||
//echo $Quantity;
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
;
|
||||
/*-----------------------------------*/
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
//die();
|
||||
|
||||
//$Exchangerate = $this->input->post('Exchangerate'.$i);
|
||||
@ -2217,6 +2310,20 @@ function addNewImportPurchaseOrder()
|
||||
// echo $per;
|
||||
//die();
|
||||
$LineItemNo = '';
|
||||
|
||||
/*---------start---------------------*/
|
||||
|
||||
if(($PODate != $b4podate )||( $SupplierID != $b4supplier) || ($itemRate !=$b4rate) ||
|
||||
($Quantity != $b4qty ))
|
||||
{
|
||||
$logpo =array('UpdateBy'=>$CreateBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
}
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
//echo "sdsfsd";
|
||||
//die();
|
||||
|
||||
@ -2239,13 +2346,10 @@ function addNewImportPurchaseOrder()
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
//if($MaterialCode!= ''){
|
||||
|
||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
|
||||
// }
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
@ -2309,7 +2413,7 @@ function addNewImportPurchaseOrder()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
|
||||
@ -2629,7 +2733,11 @@ function addNewImportPurchaseOrder()
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
|
||||
|
||||
/* --------------------------------------------*/
|
||||
|
||||
$logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=> $itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$LineItemNo);
|
||||
$this->purchaseorder_model->newlogpo($logpo);
|
||||
/* --------------------------------------------*/
|
||||
if(trim($POType) == CAPITAL )
|
||||
{
|
||||
if($CapitalRange=='1')
|
||||
@ -2660,7 +2768,9 @@ function addNewImportPurchaseOrder()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
|
||||
@ -2691,7 +2801,11 @@ function addNewImportPurchaseOrder()
|
||||
$Deliverydt = '';
|
||||
$DeliverySchedule = '';
|
||||
} */
|
||||
|
||||
/*-----------------------------------*/
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
/*-----------------------------------*/
|
||||
|
||||
$DeliveryOption = $this->input->post('DateRange');
|
||||
|
||||
@ -2785,7 +2899,10 @@ function addNewImportPurchaseOrder()
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
|
||||
/*-----------------------------------*/
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
$Exchangerate = $this->input->post('echangeRate'.$i);
|
||||
$BasicPriceinmton = $this->input->post('rateInUs'.$i);
|
||||
$Productprice = $this->input->post('basicvalInINR'.$i);
|
||||
@ -2871,7 +2988,19 @@ function addNewImportPurchaseOrder()
|
||||
|
||||
// die();
|
||||
|
||||
/*---------start---------------------*/
|
||||
|
||||
if(($PODate != $b4podate )||( $SupplierID != $b4supplier) || ($itemRate !=$b4rate) ||
|
||||
($Quantity != $b4qty ))
|
||||
{
|
||||
$logpo =array('UpdateBy'=>$CreateBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
}
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
|
||||
$SkipInsert = "False";
|
||||
@ -2891,13 +3020,11 @@ function addNewImportPurchaseOrder()
|
||||
}
|
||||
|
||||
/*------------------------------*/
|
||||
//if($MaterialCode!= ''){
|
||||
|
||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
|
||||
// }
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
@ -2970,7 +3097,8 @@ function addNewImportPurchaseOrder()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||
}
|
||||
@ -3884,7 +4012,60 @@ public function enquiry()
|
||||
}
|
||||
|
||||
}
|
||||
/*--------------------------------------------------------------------------------------*/
|
||||
function uploadfile()
|
||||
{
|
||||
$bill= $this->input->post('param1');
|
||||
$oldfile= $this->input->post('param2');
|
||||
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$Picture = $this->add();
|
||||
}
|
||||
|
||||
$uploadfile = $this->purchaseorder_model->updatefile($bill,$Picture,$oldfile);
|
||||
|
||||
if($uploadfile > 0){
|
||||
echo "file updated successfully!";
|
||||
}
|
||||
else{
|
||||
echo "file not updated!";
|
||||
}
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
$picture = '';
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['file_name'] = $_FILES['file']['name'];
|
||||
//print_r($config) ;
|
||||
//Load upload library and initialize configuration
|
||||
$this->load->library('upload',$config);
|
||||
$this->upload->initialize($config);
|
||||
if($this->upload->do_upload('file'))
|
||||
{
|
||||
$uploadData = $this->upload->data();
|
||||
$picture = $uploadData['file_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
$picture = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
return $picture ;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -342,7 +342,11 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
//echo $PONO;
|
||||
$POdt =$this->input->post('PODate');
|
||||
$PODate = $this->getDateformat($POdt);
|
||||
|
||||
/*-----------------------------------*/
|
||||
$b4supplier=$this->input->post('b4supplier');
|
||||
$b4date=$this->input->post('b4podate');
|
||||
$b4podate = $this->getDateformat($b4date);
|
||||
/*-----------------------------------*/
|
||||
$SupplierID = $this->input->post('drpSupplier');
|
||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||
$dt = $this->input->post('Deliverydt');
|
||||
@ -399,6 +403,10 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
{
|
||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||
$Quantity = $this->input->post('quantity'.$i);
|
||||
/*-----------------------------------*/
|
||||
$b4qty=$this->input->post('b4qty'.$i);
|
||||
$b4rate=$this->input->post('b4rate'.$i);
|
||||
/*-----------------------------------*/
|
||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||
$itemRate = $this->input->post('itemRate'.$i);
|
||||
$Cgst = $this->input->post('Cgst'.$i);
|
||||
@ -419,18 +427,36 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
|
||||
/*------------------------------*/
|
||||
//if($MaterialCode!= ''){
|
||||
|
||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
//print_r($ReqDetails);
|
||||
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$ReqDetails);
|
||||
$this->purchaseorder_model->updateReqDetails($Reqnumber,$MaterialCode,$ReqDetails);
|
||||
// }
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*---------start---------------------*/
|
||||
|
||||
if(($PODate != $b4podate )||($SupplierID != $b4supplier) || ($itemRate!=$b4rate) ||
|
||||
($Quantity != $b4qty ))
|
||||
{
|
||||
$logpo =array('UpdateBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||
|
||||
|
||||
$this->purchaseorder_model->updatelogpo($MaterialCode,$POLineItemNo,$logpo);
|
||||
}
|
||||
|
||||
|
||||
/*----------end--------------------*/
|
||||
|
||||
$POLineItem = array();
|
||||
$LineItemNo = '';
|
||||
|
||||
|
||||
|
||||
$SkipInsert = "False";
|
||||
if( count($comma_separated) > 0)
|
||||
{
|
||||
@ -505,6 +531,71 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
||||
}
|
||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------*/
|
||||
|
||||
function uploadfile()
|
||||
{
|
||||
$bill= $this->input->post('param1');
|
||||
$oldfile= $this->input->post('param2');
|
||||
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$Picture = $this->add();
|
||||
}
|
||||
|
||||
$uploadfile = $this->purchaseorder_model->updatefile($bill,$Picture,$oldfile);
|
||||
|
||||
if($uploadfile > 0){
|
||||
echo "file updated successfully!";
|
||||
}
|
||||
else{
|
||||
echo "file not updated!";
|
||||
}
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
$picture = '';
|
||||
if(!empty($_FILES['file']['name']))
|
||||
{
|
||||
$config['upload_path'] = 'uploads/BillFiles/';
|
||||
$config['allowed_types'] = 'docx|pdf|doc|png|jpg';
|
||||
$config['file_name'] = $_FILES['file']['name'];
|
||||
//print_r($config) ;
|
||||
//Load upload library and initialize configuration
|
||||
$this->load->library('upload',$config);
|
||||
$this->upload->initialize($config);
|
||||
if($this->upload->do_upload('file'))
|
||||
{
|
||||
$uploadData = $this->upload->data();
|
||||
$picture = $uploadData['file_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = array('error' => $this->upload->display_errors());
|
||||
$picture = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$picture = '';
|
||||
}
|
||||
|
||||
return $picture ;
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------*/
|
||||
|
||||
function pageNotFound()
|
||||
{
|
||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
||||
|
||||
@ -24,18 +24,62 @@ class purchaseorder_model extends CI_Model
|
||||
|
||||
/*------------------------------*/
|
||||
|
||||
function updateReqDetails($Reqnumber,$ReqDetails){
|
||||
|
||||
function updateReqDetails($Reqnumber,$MaterialCode,$ReqDetail){
|
||||
//echo'hi';
|
||||
|
||||
$this->db->where('ReqNo',$Reqnumber);
|
||||
$this->db->where('ReqNo',$Reqnumber,'MaterialCode',$MaterialCode);
|
||||
//$this->db->where('MaterialCode',$MaterialCode);
|
||||
// $this->db->where('Quantity',$Quantity);
|
||||
|
||||
$this->db->update('T_Requestion_Details',$ReqDetails);
|
||||
$this->db->update('T_Requestion_Details',$ReqDetail);
|
||||
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
}
|
||||
|
||||
|
||||
function IGRDetailsupdate($PONO)
|
||||
{
|
||||
//echo 'hi';
|
||||
|
||||
|
||||
$subQuery ='select IGRM.PONO,IGRD.IGRItemNo,IGRD.IGRNO from
|
||||
T_IGR_Master IGRM
|
||||
join T_IGR_Details IGRD on IGRD.IGRNO = IGRM.IGRNO
|
||||
Where IGRM.PONO = ? ';
|
||||
|
||||
$query = $this->db->query($subQuery,array($PONO));
|
||||
|
||||
return $query->result_array();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function updateIGR($IGRItemNo,$IGRNO,$MaterialCode,$IGRDs)
|
||||
{
|
||||
|
||||
// echo $IGRItemNo;
|
||||
// echo $IGRNO;
|
||||
// die();
|
||||
$this->db->where('IGRItemNo',$IGRItemNo,'IGRNO',$IGRNO,'MaterialCode',$MaterialCode);
|
||||
|
||||
|
||||
$this->db->update('T_IGR_Details',$IGRDs);
|
||||
|
||||
$r = $this->db->affected_rows();
|
||||
|
||||
// print_r( $this->db->last_query());
|
||||
|
||||
return $r;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*------------------------------*/
|
||||
@ -2153,5 +2197,149 @@ function DeleteCounter($DelId)
|
||||
//print_r($this->db->last_query());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
function updatefile($bill,$Picture,$oldfile)
|
||||
{
|
||||
|
||||
if($oldfile != ''){
|
||||
unlink("uploads/BillFiles/".$oldfile);//this deletes the file on particular folder too
|
||||
}
|
||||
|
||||
$this->db->set('FilePath', $Picture); //value that used to update column
|
||||
$this->db->where('BillNo', $bill); //which row want to upgrade
|
||||
$this->db->update('T_PurchaseOrder_BillUpload');
|
||||
$afftectedRows = $this->db->affected_rows();
|
||||
return $afftectedRows;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function newlogpo($logpo)
|
||||
{
|
||||
|
||||
$this->db->trans_start();
|
||||
$this->db->insert('T_ponewlogs_Details',$logpo);
|
||||
$insert_id = $this->db->affected_rows();
|
||||
$this->db->trans_complete();
|
||||
return $insert_id;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updatelogpo($MaterialCode,$POLineItemNo,$logpo){
|
||||
|
||||
|
||||
|
||||
|
||||
$this->db->where('MaterialCode',$MaterialCode,'LineItemNos',$POLineItemNo);
|
||||
$this->db->update('T_ponewlogs_Details',$logpo);
|
||||
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
|
||||
}
|
||||
function getlogpodtl($PONO){
|
||||
|
||||
|
||||
|
||||
// $SQL = "select
|
||||
// log.Date as Ldate,log.PONO as LPONO,log.Quantity as Lqty,log.LineItemNos,log.MaterialCode as lmaterial,
|
||||
// log.Rate as Lrate,log.SupplierID as LSuppid,log.UpdateBy,log.UpdatedOn,pm.PONO,pm.PODate,pm.SupplierID,pl.MaterialCode,pl.Quantity,pl.Rate
|
||||
// from T_ponewlogs_Details log
|
||||
// join T_PurchaseOrder_LineItem pl on log.LineItemNos = pl.LineItemNo
|
||||
|
||||
// join T_PurchaseOrder_Master pm on pm.PONO = log.PONO
|
||||
|
||||
// where pm.PONO ='".$PONO."'";
|
||||
|
||||
|
||||
|
||||
// select distinct log.PONO as LPONO,
|
||||
// case
|
||||
// WHEN log.Quantity <> pl.Quantity THEN log.Quantity
|
||||
// else '-'
|
||||
// ENd as Lqty,
|
||||
|
||||
// case
|
||||
// WHEN log.SupplierID <> pm.SupplierID THEN log.SupplierID
|
||||
// else '-'
|
||||
// ENd as LSuppid,
|
||||
// case
|
||||
// WHEN log.Date <> pm.PODate THEN log.Date
|
||||
// else '-'
|
||||
// ENd as logDate ,
|
||||
// case
|
||||
// WHEN log.Rate <> pl.Rate THEN log.Rate
|
||||
// else '-'
|
||||
// ENd as logRate ,
|
||||
|
||||
|
||||
// log.LineItemNos,log.MaterialCode,log.UpdatedOn,log.UpdateBy
|
||||
|
||||
|
||||
// from T_ponewlogs_Details log
|
||||
// join T_PurchaseOrder_LineItem pl on log.LineItemNos = pl.LineItemNo
|
||||
// join T_PurchaseOrder_Master pm on pm.PONO = log.PONO
|
||||
// where pm.PONO
|
||||
|
||||
|
||||
|
||||
$SQL = "select distinct log.PONO as LPONO,
|
||||
case
|
||||
WHEN log.Quantity <> pl.Quantity THEN log.Quantity
|
||||
else '-'
|
||||
ENd as Lqty,
|
||||
|
||||
case
|
||||
WHEN log.SupplierID <> pm.SupplierID THEN sup.Suppliername
|
||||
else '-'
|
||||
ENd as LSuppid,
|
||||
case
|
||||
WHEN log.Date <> pm.PODate THEN log.Date
|
||||
else '-'
|
||||
ENd as logDate ,
|
||||
case
|
||||
WHEN log.Rate <> pl.Rate THEN log.Rate
|
||||
else '-'
|
||||
ENd as logRate ,
|
||||
|
||||
|
||||
log.LineItemNos,log.MaterialCode,log.UpdatedOn,log.UpdateBy,emp.FirstName
|
||||
|
||||
|
||||
from T_ponewlogs_Details log
|
||||
join T_PurchaseOrder_LineItem pl on log.LineItemNos = pl.LineItemNo
|
||||
join T_PurchaseOrder_Master pm on pm.PONO = log.PONO
|
||||
join tbl_users user on user.userId = log.UpdateBy
|
||||
left join T_Employee_Details emp on emp.EmpID= user.EmpID
|
||||
left join T_SupplierDetailsN sup on sup.SupplierID = log.SupplierID
|
||||
where log.PONO ='".$PONO."'";
|
||||
|
||||
|
||||
$logpodtl = $this->db->query($SQL);
|
||||
|
||||
return $logpodtl->result();
|
||||
}
|
||||
|
||||
|
||||
// function EditpoValues($pono)
|
||||
// {
|
||||
// $this->db->select('*');
|
||||
// $this->db->from('T_ponewlogs_Details');
|
||||
// $this->db->where('PONO',$pono);
|
||||
// // $this->db->where('MaterialCode',$materialcode);
|
||||
// $query = $this->db->get();
|
||||
// return $query->result_array();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -126,7 +126,13 @@ foreach ($PaymentTerms as $TER)
|
||||
$Terms=$TER->PaymentTerms;
|
||||
}
|
||||
|
||||
|
||||
if(!empty($getlogpodtl ))
|
||||
{
|
||||
foreach ($getlogpodtl as $values )
|
||||
{
|
||||
$update=$values->UpdateBy;
|
||||
}
|
||||
}
|
||||
|
||||
// foreach ($POSTATUS as $PST )
|
||||
// {
|
||||
@ -200,6 +206,22 @@ else
|
||||
}
|
||||
|
||||
|
||||
/*****************************/
|
||||
var update = '<?php echo json_encode($update)?>';
|
||||
|
||||
|
||||
if(update !='null')
|
||||
|
||||
{
|
||||
$('#editpodiv').show();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$('#editpodiv').hide();
|
||||
}
|
||||
/*****************************/
|
||||
|
||||
|
||||
|
||||
|
||||
@ -505,7 +527,7 @@ function ExceedQuantityCheck()
|
||||
{
|
||||
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
|
||||
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.');
|
||||
|
||||
@ -513,9 +535,9 @@ function ExceedQuantityCheck()
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
{
|
||||
//{
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
}
|
||||
function EditExceedQuantityCheck()
|
||||
{
|
||||
@ -523,13 +545,13 @@ 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.');
|
||||
|
||||
// $('#EditQuantity').focus();
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
function ExceedBudget(ValuetoCheck,budgetAmount)
|
||||
@ -746,7 +768,7 @@ $(document).ready(function () {
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate;?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -771,7 +793,7 @@ $(document).ready(function () {
|
||||
|
||||
echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId ),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
?> <input type="hidden" name="b4supplier" id="b4supplier" value="<?php echo $SupId;?>">
|
||||
|
||||
</div>
|
||||
<div class="col-md-12"><br/>
|
||||
@ -2091,8 +2113,11 @@ $(document).ready(function () {
|
||||
<input type="hidden" name="<?php echo 'per'.$index ?>" id="<?php echo 'per'.$index ?>" value="<?php echo $record->Per ; ?>" />
|
||||
|
||||
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'b4qty'.$index ?>" id="<?php echo 'b4qty'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
|
||||
|
||||
<input type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'b4rate'.$index ?>" id="<?php echo 'b4rate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
|
||||
<input type="hidden" name="<?php echo 'Cgst'.$index ?>" id="<?php echo 'Cgst'.$index ?>" value="<?php echo $record->CGST ; ?>" />
|
||||
|
||||
@ -2123,7 +2148,7 @@ $(document).ready(function () {
|
||||
|
||||
<?php
|
||||
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ||$PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus==PO_APPROVED)
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ||$PONOStatus == REQITEM_Emergency_PO_CREATED || $PONOStatus==PO_APPROVED || $PONOStatus== SPECIAL_PO)
|
||||
{?>
|
||||
<td> <a data-target='#EDITSERVICE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITSERVICE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<?php
|
||||
@ -2249,7 +2274,7 @@ $(document).ready(function () {
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tbody id="spl">
|
||||
<?php
|
||||
if(!empty($getdata))
|
||||
{
|
||||
@ -2266,8 +2291,18 @@ $(document).ready(function () {
|
||||
<td><?php echo $gd->VehicleNo?></td>
|
||||
<td><?php echo $gd->CourierNo?></td> -->
|
||||
<!-- <td><?php echo $gd->QuantityAsPerInvoice?></td> -->
|
||||
<td><?php echo $gd->FilePath?></td>
|
||||
<td><a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a></td>
|
||||
<!-- <td><?php echo $gd->FilePath?></td>
|
||||
<td><a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a></td> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<td><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></td>
|
||||
<td><a data-target='#EditServiceSplPOModel' data-toggle="modal" href="#EditServiceSplPOModel"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to Edit the Revenue SplPO details"></i></a>
|
||||
<?php if(!empty($gd->FilePath)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
@ -2280,6 +2315,110 @@ $(document).ready(function () {
|
||||
|
||||
|
||||
|
||||
<?php if(!empty($update)){?>
|
||||
<div class="col-md-12" id="editpodiv">
|
||||
<div class="col-md-12"><label>Editable POScreen</label>
|
||||
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<!-- <th>PONO</th> -->
|
||||
<!-- <th>Material</th> -->
|
||||
<th>Date</th>
|
||||
<th>Quantity</th>
|
||||
<th>Rate</th>
|
||||
<th>Supplier</th>
|
||||
<th>UpdatedBy</th>
|
||||
<th>UpdateOn</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
//print_r($getlogpodtl); die;
|
||||
$inde = 0;
|
||||
foreach($getlogpodtl as $oldpo)
|
||||
{
|
||||
$inde = $inde+1;
|
||||
?>
|
||||
<tr id="<?php echo $inde ; ?>">
|
||||
|
||||
<td><?php echo $inde; ?></td>
|
||||
|
||||
|
||||
<td><?php echo empty($oldpo->logdate)?"-":date('d-m-Y',strtotime($oldpo->logdate)); ?></td>
|
||||
<td><?php echo $oldpo->Lqty;?></td>
|
||||
<td><?php echo $oldpo->logRate?></td>
|
||||
<td><?php echo $oldpo->LSuppid?></td>
|
||||
<td><?php echo $oldpo->FirstName ?></td>
|
||||
|
||||
<td><?php $date = new DateTime($oldpo->UpdatedOn);
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<?php } else {}?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Service Special PO Modal Starts Here -->
|
||||
<div id="EditServiceSplPOModel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel" >
|
||||
<div class="modal-dialog">
|
||||
|
||||
|
||||
|
||||
<div class="modal-content" style="width:950px;">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Update <?php echo $getdata[0]->BillNo ?> Bill Details</h4>
|
||||
</div>
|
||||
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data" >
|
||||
<div class="modal-body" style="padding:0px;">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
<?php if($getdata[0]->FilePath != '') { ?>
|
||||
<label for="oldimagename">Old file Name :</label><?php echo $getdata[0]->FilePath; ?> <br/><?php } ?>
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="imag" name="images" onChange="filecheck();"/>
|
||||
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="hideoldfile" id="hideoldfile" value="<?php echo $getdata[0]->FilePath; ?>" class="form-control" readonly>
|
||||
<input type="hidden" name="hidebillno" id="hidebillno" value="<?php echo $getdata[0]->BillNo ?>" class="form-control" readonly>
|
||||
</div><!-- /.modal body -->
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="col-md-12 text-right">
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<a class="btn btn-primary" onclick="splpoupdate()" > <span class="bold">Update</span>
|
||||
|
||||
<!-- <input id="tag-form-submit" type="submit" class="btn btn-primary bold" value="Update"> --></a>
|
||||
<!-- <a class="btn btn-primary ok" ID="ExciseOption12" onclick="splpoupdate()" ><span class="bold">Update</span></a> -->
|
||||
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal footer -->
|
||||
</form>
|
||||
</div><!-- /.modal content -->
|
||||
</div><!-- /.modal dialog -->
|
||||
</div><!-- /#filemodal -->
|
||||
<!-- Revenue Special PO Modal Ends Here -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3506,8 +3645,65 @@ $('#insuranceTxtDiv').hide();
|
||||
$('#insuranceNo').val('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function splpoupdate(){
|
||||
var formData = new FormData();
|
||||
|
||||
var file = $("#imag").prop('files')[0];
|
||||
var param1 = $('#hidebillno').val();
|
||||
var param2 = $('#hideoldfile').val();
|
||||
var filename = $("#imag").val();
|
||||
filename = filename.split('\\');
|
||||
|
||||
formData.append('file',file);
|
||||
formData.append('param1',param1);
|
||||
formData.append('param2',param2);
|
||||
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:formData,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>servicepurchaseorder/uploadfile",
|
||||
cache : false,
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success:function(data) {
|
||||
if(data){
|
||||
alert(data);
|
||||
$('.content').loader('hide');
|
||||
$('#spl').find('td').eq(1).text(filename[2]);
|
||||
$('#EditServiceSplPOModel').modal('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function filecheck()
|
||||
{
|
||||
var sizef = document.getElementById('imag').files[0].size;
|
||||
var file = $('#imag').val();
|
||||
|
||||
if(file!='' && sizef < 2100000)
|
||||
{ // alert('Your file added successfully');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Sorry Your File is Large To 2MB');
|
||||
$('#imag').val('');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -138,6 +138,13 @@ if(!empty($RequistionDetails))
|
||||
// {
|
||||
// $POStatus=$PST->StatusName;
|
||||
// }
|
||||
if(!empty($getlogpodtl ))
|
||||
{
|
||||
foreach ($getlogpodtl as $values )
|
||||
{
|
||||
$update=$values->UpdateBy;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
@ -240,8 +247,22 @@ else
|
||||
{
|
||||
$('#splpodiv').hide();
|
||||
}
|
||||
/*****************************/
|
||||
var update = '<?php echo json_encode($update)?>';
|
||||
|
||||
|
||||
if(update !='null')
|
||||
|
||||
{
|
||||
$('#editpodiv').show();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$('#editpodiv').hide();
|
||||
}
|
||||
/*****************************/
|
||||
|
||||
|
||||
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
||||
if(DelOpt=="0"){
|
||||
@ -2013,7 +2034,7 @@ SetVatorCST();
|
||||
// RequistQuantity
|
||||
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
|
||||
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);
|
||||
@ -2021,9 +2042,9 @@ SetVatorCST();
|
||||
// return false;
|
||||
// }
|
||||
//else
|
||||
{
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
function ExceedEditQuantityCheck()
|
||||
@ -2031,16 +2052,16 @@ SetVatorCST();
|
||||
// RequistQuantity
|
||||
var EnterQuantity = $("#EditQuantity").val()== '' ? "0.00" : parseFloat($("#EditQuantity").val());
|
||||
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
|
||||
{
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
// }
|
||||
}
|
||||
// To Reset the Tax calculation
|
||||
function resetTaxField()
|
||||
@ -2265,7 +2286,8 @@ function calculateEditTaxValue()
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate;?>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2289,7 +2311,7 @@ function calculateEditTaxValue()
|
||||
|
||||
echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
?> <input type="hidden" name="b4supplier" id="b4supplier" value="<?php echo $SupId;?>">
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label>Purchase Order Type</label>
|
||||
@ -3961,7 +3983,10 @@ function calculateEditTaxValue()
|
||||
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo htmlentities($record->MaterialName);?>" />
|
||||
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
|
||||
<input align="right" type="hidden" name="<?php echo 'b4qty'.$index ?>" id="<?php echo 'b4qty'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'b4rate'.$index ?>" id="<?php echo 'b4rate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'per'.$index ?>" id="<?php echo 'per'.$index ?>" value="<?php echo $record->Per ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'service_description'.$index ?>" id="<?php echo 'service_description'.$index ?>" value="<?php echo $record->ServiceMaterialDescription ; ?>" />
|
||||
|
||||
@ -3985,18 +4010,19 @@ function calculateEditTaxValue()
|
||||
<input align="right"type="hidden" name="<?php echo 'basicval'.$index ?>" id="<?php echo 'basicval'.$index ?>" value="<?php echo $record->BasicValue ; ?>"/>
|
||||
<input align="right" type="hidden" name="<?php echo 'Insval'.$index ?>" id="<?php echo 'Insval'.$index ?>" value="<?php echo $record->Insurance ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
||||
<?php
|
||||
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED|| $PONOStatus==REQITEM_Emergency_PO_CREATED || $PONOStatus==PO_APPROVED)
|
||||
{?>
|
||||
<td> <a data-target='#EDITREVENUE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<?php
|
||||
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED|| $PONOStatus==REQITEM_Emergency_PO_CREATED || $PONOStatus==PO_APPROVED ||$PONOStatus== SPECIAL_PO)
|
||||
{?>
|
||||
<td> <a data-target='#EDITREVENUE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#EDITREVENUE"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> <a href='#' onclick = "DeleteRow(<?php echo $index ; ?>)" class="link" data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" id="Del" ><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<?php
|
||||
} else {?>
|
||||
<td> <a data-target='#VIEWREVENUE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#VIEWREVENUE"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> </td>
|
||||
|
||||
} else {?>
|
||||
<td> <a data-target='#VIEWREVENUE' data-id="<?php echo $index ; ?>" data-userid="<?php echo $index ; ?>" data-toggle="modal" href="#VIEWREVENUE"><i class="fa fa-eye" data-toggle="tooltip" title="Click here to view the <?php echo $record->ReqNo ; ?> Requisition details"></i> </a> </td>
|
||||
|
||||
|
||||
<?php
|
||||
}?>
|
||||
}?>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@ -4144,8 +4170,7 @@ function calculateEditTaxValue()
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tbody id="spl">
|
||||
<?php
|
||||
if(!empty($getdata))
|
||||
{
|
||||
@ -4161,18 +4186,162 @@ function calculateEditTaxValue()
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
<td><?php echo $gd->VehicleNo?></td>
|
||||
<td><?php echo $gd->CourierNo?></td>
|
||||
<!-- <td><?php echo $gd->QuantityAsPerInvoice?></td> -->
|
||||
<td><?php echo $gd->FilePath?></td>
|
||||
<td><a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a></td>
|
||||
|
||||
|
||||
<td><?php echo (!empty($gd->FilePath))?$gd->FilePath:"No File"; ?></td>
|
||||
<td><a data-target='#EditRevenueSplPOModel' data-toggle="modal" href="#EditRevenueSplPOModel"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to Edit the Revenue SplPO details"></i></a>
|
||||
<?php if(!empty($gd->FilePath)) { ?>
|
||||
<a target="_blank" href="<?php echo base_url().'uploads/BillFiles/'?><?php echo $gd->FilePath ?>"><i class="fa fa-download" ></i></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!--################################################################## -->
|
||||
<div class="col-md-12" id="editpodiv">
|
||||
<div class="col-md-12"><label>Editable POScreen</label>
|
||||
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<!-- <th>PONO</th> -->
|
||||
<!-- <th>Material</th> -->
|
||||
<th>Date</th>
|
||||
<th>Quantity</th>
|
||||
<th>Rate</th>
|
||||
<th>Supplier</th>
|
||||
<th>UpdatedBy</th>
|
||||
<th>UpdateOn</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
//print_r($getlogpodtl); die;
|
||||
$inde = 0;
|
||||
foreach($getlogpodtl as $oldpo)
|
||||
{
|
||||
$inde = $inde+1;
|
||||
?>
|
||||
<tr id="<?php echo $inde ; ?>">
|
||||
|
||||
<td><?php echo $inde; ?></td>
|
||||
|
||||
|
||||
<td><?php echo empty($oldpo->logdate)?"-":date('d-m-Y',strtotime($oldpo->logdate)); ?></td>
|
||||
<td><?php echo $oldpo->Lqty;?></td>
|
||||
<td><?php echo $oldpo->logRate?></td>
|
||||
<td><?php echo $oldpo->LSuppid?></td>
|
||||
<td><?php echo $oldpo->FirstName ?></td>
|
||||
|
||||
<td><?php $date = new DateTime($oldpo->UpdatedOn);
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Revenue Special PO Modal Starts Here -->
|
||||
<div id="EditRevenueSplPOModel" class="modal fade" data-backdrop-limit="1" role="dialog" aria-labelledby="myModalLabel" >
|
||||
<div class="modal-dialog">
|
||||
<?php $date = new DateTime($getdata[0]->DeliveryChellanDate);
|
||||
$date = $date->format('d-m-Y'); ?>
|
||||
|
||||
|
||||
<div class="modal-content" style="width:950px;">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Update <?php echo $getdata[0]->BillNo ?> Bill Details</h4>
|
||||
</div>
|
||||
<form class="tagForm" id="tag-form" method="post" enctype="multipart/form-data" >
|
||||
<div class="modal-body" style="padding:0px;">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4 pad"><strong>Delivery Challan /Inv No</strong>
|
||||
<input type="text" name="ChallanInvNo" id="ChallanInvNo" maxlength="12" class="form-control" value="<?php echo $getdata[0]->DeliveryChellanOrInvoiceNo ?>" readonly onkeypress="return isNumberKey(event)">
|
||||
</div>
|
||||
<div class="col-md-4 pad"><strong>Delivery Challan /Inv Date</strong>
|
||||
<?php
|
||||
$data = array('name' => 'Date1','value' => set_value('Date1',$date),'id'=>'Date1', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-4 pad"><strong>Vehicle No</strong>
|
||||
<input type="text" name="VehicleNo" id="VehicleNo" maxlength="13" class="form-control" value="<?php echo $getdata[0]->VehicleNo; ?>" readonly>
|
||||
</div>
|
||||
<div class="col-md-4 pad"><strong>Courier No</strong>
|
||||
<input type="text" name="CourierNo" id="CourierNo" maxlength="12" class="form-control" value="<?php echo $getdata[0]->CourierNo; ?>" readonly>
|
||||
</div>
|
||||
<!-- <div class="col-md-4" id="QualityChecked"><strong>Is Quality Check Required</strong>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="Quality" checked="checked" value='0' id="Quality">Yes</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label><input type="radio" name="Quality" id="Quality" value='1' >No</label>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<!--
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
<?php if($getdata[0]->FilePath != '') { ?>
|
||||
<label for="oldimagename">Old file Name :</label><?php echo $getdata[0]->FilePath; ?> <br/><?php } ?>
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="imag" name="images" />
|
||||
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-5">
|
||||
<?php if($getdata[0]->FilePath != '') { ?>
|
||||
<label for="oldimagename">Old file Name :</label><?php echo $getdata[0]->FilePath; ?> <br/><?php } ?>
|
||||
<input type = "file" size = "20" input accept=".docx,.pdf,.doc.JPG,.PNG,.jpg" id="imag" name="images" onChange="filecheck();"/>
|
||||
<label for="images">Select file <br/><small>(only .pdf,.excel,.doc,.png,.jpg)</small></label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="hideoldfile" id="hideoldfile" value="<?php echo $getdata[0]->FilePath; ?>" class="form-control" readonly>
|
||||
<input type="hidden" name="hidebillno" id="hidebillno" value="<?php echo $getdata[0]->BillNo ?>" class="form-control" readonly>
|
||||
</div><!-- /.modal body -->
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="col-md-12 text-right">
|
||||
<div class="col-md-4 col-md-offset-8">
|
||||
<a class="btn btn-primary" onclick="splpoupdate()" > <span class="bold">Update</span>
|
||||
|
||||
<!-- <input id="tag-form-submit" type="submit" class="btn btn-primary bold" value="Update"> --></a>
|
||||
<!-- <a class="btn btn-primary ok" ID="ExciseOption12" onclick="splpoupdate()" ><span class="bold">Update</span></a> -->
|
||||
<a class="btn btn-primary" data-dismiss="modal" onclick="SetExciseCalculationCancel();" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal footer -->
|
||||
</form>
|
||||
</div><!-- /.modal content -->
|
||||
</div><!-- /.modal dialog -->
|
||||
</div><!-- /#filemodal -->
|
||||
<!-- Revenue Special PO Modal Ends Here -->
|
||||
|
||||
|
||||
|
||||
@ -4189,17 +4358,23 @@ function calculateEditTaxValue()
|
||||
|
||||
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<?php }
|
||||
|
||||
|
||||
|
||||
else if($PONOStatus == SPECIAL_PO) {?>
|
||||
<a class="btn btn-primary" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a>
|
||||
<!-- <a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> --> <?php }
|
||||
|
||||
|
||||
else {?>
|
||||
<!-- <a class="btn btn-primary" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a> -->
|
||||
<a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
<a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
|
||||
|
||||
|
||||
@ -5503,6 +5678,66 @@ $("#insuranceno").val("Yes");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function splpoupdate(){
|
||||
var formData = new FormData();
|
||||
|
||||
var file = $("#imag").prop('files')[0];
|
||||
var param1 = $('#hidebillno').val();
|
||||
var param2 = $('#hideoldfile').val();
|
||||
var filename = $("#imag").val();
|
||||
filename = filename.split('\\');
|
||||
|
||||
formData.append('file',file);
|
||||
formData.append('param1',param1);
|
||||
formData.append('param2',param2);
|
||||
|
||||
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:formData,
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>purchaseorder/uploadfile",
|
||||
cache : false,
|
||||
contentType : false,
|
||||
processData : false,
|
||||
success:function(data) {
|
||||
if(data){
|
||||
alert(data);
|
||||
$('.content').loader('hide');
|
||||
$('#spl').find('td').eq(5).text(filename[2]);
|
||||
$('#EditRevenueSplPOModel').modal('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function filecheck()
|
||||
{
|
||||
var sizef = document.getElementById('imag').files[0].size;
|
||||
var file = $('#imag').val();
|
||||
|
||||
if(file!='' && sizef < 2100000)
|
||||
{ // alert('Your file added successfully');
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Sorry Your File is Large To 2MB');
|
||||
$('#imag').val('');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ $Currencycode=$currencycode;
|
||||
//echo $Currencycode;
|
||||
$Terms='';
|
||||
$DeliverySchedule='';
|
||||
|
||||
|
||||
foreach ($CurrencyDetail as $Detail)
|
||||
{
|
||||
$Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
|
||||
@ -151,7 +151,7 @@ if(!empty($POMaster))
|
||||
// $PaymentDays=$Req->PaymentDays;
|
||||
$StatusName=$Req->StatusName;
|
||||
$Currency_Type=$Req->CurrencyType;
|
||||
$parentPO =$Req->ParentPO;
|
||||
$parentPO =$Req->ParentPO;
|
||||
$DeliverySchedule=$Req->DeliverySchedule;
|
||||
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
||||
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
||||
@ -209,6 +209,17 @@ if(!empty($RequistionDetails))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
|
||||
|
||||
foreach ($getlogpodtl as $values )
|
||||
{
|
||||
$update=$values->UpdateBy;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<style>
|
||||
@ -285,9 +296,27 @@ tinymce.init({
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************/
|
||||
var update = '<?php echo json_encode($update)?>';
|
||||
|
||||
|
||||
if(update !='null')
|
||||
|
||||
{
|
||||
$('#editpodiv').show();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$('#editpodiv').hide();
|
||||
}
|
||||
/*****************************/
|
||||
|
||||
//Initialize Select2 Elements
|
||||
//$("#drpSupplier").select2();
|
||||
$("#currencytype").select2();
|
||||
$("#currencytype").select2();
|
||||
var POMaxDate = '<?php echo $MaxPoDate;?>';
|
||||
var d = new Date(POMaxDate);
|
||||
|
||||
@ -340,17 +369,17 @@ tinymce.init({
|
||||
|
||||
<div style="border:2px solid #333">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-11">
|
||||
<?php if ($parentPO == '') { ?>
|
||||
<center><b><h2>Siddharth Industries - Edit Import Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
||||
<?php } else {?>
|
||||
<center><b><h2>Siddharth Industries - Amended Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!--<div class="col-md-1"><br/>
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" target="_blank">Print</a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<?php if ($parentPO == '') { ?>
|
||||
<center><b><h2>Siddharth Industries - Edit Import Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
||||
<?php } else {?>
|
||||
<center><b><h2>Siddharth Industries - Amended Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!--<div class="col-md-1"><br/>
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" target="_blank">Print</a>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="padding:0px;">
|
||||
@ -455,7 +484,7 @@ tinymce.init({
|
||||
|
||||
echo form_dropdown('drpSupplier', $options,set_value('drpSupplier',$SupId),'id="drpSupplier"' ,'required="true"' ,'class="form-control select2');
|
||||
|
||||
?>
|
||||
?> <input type="hidden" name="b4supplier" id="b4supplier" value="<?php echo $SupId;?>">
|
||||
|
||||
|
||||
|
||||
@ -505,7 +534,7 @@ tinymce.init({
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||
echo form_input($data);
|
||||
?>
|
||||
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate;?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2087,9 +2116,9 @@ echo form_textarea($data);
|
||||
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -2751,7 +2780,9 @@ echo form_textarea($data);
|
||||
<input type="hidden" name="<?php echo 'materialName'.$index ?>" id="<?php echo 'materialName'.$index ?>" value="<?php echo $record->MaterialName ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'uom'.$index ?>" id="<?php echo 'uom'.$index ?>" value="<?php echo $record->UOM ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'quantity'.$index ?>" id="<?php echo 'quantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'b4qty'.$index ?>" id="<?php echo 'b4qty'.$index ?>" value="<?php echo $record->Quantity ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'itemRate'.$index ?>" id="<?php echo 'itemRate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
<input align="right" type="hidden" name="<?php echo 'b4rate'.$index ?>" id="<?php echo 'b4rate'.$index ?>" value="<?php echo $record->Rate ; ?>" />
|
||||
<input type="hidden" name="<?php echo 'LandingCharge'.$index ?>" id="<?php echo 'LandingCharge'.$index ?>" value="<?php echo $record->LandingCharge; ?>" />
|
||||
<input type="hidden" name="<?php echo 'AfterLandingCharge'.$index ?>" id="<?php echo 'AfterLandingCharge'.$index ?>" value="<?php echo $record->AfterLandingCharge; ?>" />
|
||||
|
||||
@ -3038,7 +3069,61 @@ echo form_textarea($data);
|
||||
</div>
|
||||
<input type="hidden" name="txttot" id="txttot" value=<?php echo $totalhidden?>>
|
||||
|
||||
|
||||
<!--################################################################## -->
|
||||
<?php if(!empty($update)){?>
|
||||
<div class="col-md-12" id="editpodiv">
|
||||
<div class="col-md-12"><label>Editable POScreen</label>
|
||||
<table id="edittable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Sno</th>
|
||||
<!-- <th>PONO</th> -->
|
||||
<!-- <th>Material</th> -->
|
||||
<th>Date</th>
|
||||
<th>Quantity</th>
|
||||
<th>Rate</th>
|
||||
<th>Supplier</th>
|
||||
<th>UpdatedBy</th>
|
||||
<th>UpdateOn</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($getlogpodtl))
|
||||
{
|
||||
//print_r($getlogpodtl); die;
|
||||
$inde = 0;
|
||||
foreach($getlogpodtl as $oldpo)
|
||||
{
|
||||
$inde = $inde+1;
|
||||
?>
|
||||
<tr id="<?php echo $inde ; ?>">
|
||||
|
||||
<td><?php echo $inde; ?></td>
|
||||
|
||||
|
||||
<td><?php echo empty($oldpo->logdate)?"-":date('d-m-Y',strtotime($oldpo->logdate)); ?></td>
|
||||
<td><?php echo $oldpo->Lqty;?></td>
|
||||
<td><?php echo $oldpo->logRate?></td>
|
||||
<td><?php echo $oldpo->LSuppid?></td>
|
||||
<td><?php echo $oldpo->FirstName?></td>
|
||||
|
||||
<td><?php $date = new DateTime($oldpo->UpdatedOn);
|
||||
echo $date->format('d-m-Y'); ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } else {}?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
@ -3049,7 +3134,7 @@ echo form_textarea($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div align="right" style="padding-right:10px">
|
||||
|
||||
<div class="col-md-3 col-md-offset-9"><br/>
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
@ -3064,8 +3149,8 @@ echo form_textarea($data);
|
||||
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
if($PONOStatus == PO_DRAFT){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
<a class="btn btn-primary Submit" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<!-- <input type="reset" class="btn btn-primary" value="Reset"> -->
|
||||
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
@ -3087,13 +3172,13 @@ echo form_textarea($data);
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<label>Request On :</label><?php echo $Reqon;?><br/>
|
||||
<label>Request By :</label><?php echo $RequesterName;?><br/>
|
||||
<label>Status :</label><?php echo $StatusName;?>
|
||||
<label>Request On :</label><?php echo $Reqon;?><br/>
|
||||
<label>Request By :</label><?php echo $RequesterName;?><br/>
|
||||
<label>Status :</label><?php echo $StatusName;?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@ -3699,7 +3784,7 @@ function Ratechange()
|
||||
$('#EditimBasicPrice').val(parseFloat(txtbasics).toFixed(2));
|
||||
$('#EditExchangeRt').val(parseFloat(txtexchangerate).toFixed());
|
||||
$('#EditINRBasicvalue').val(parseFloat(txtINRvalue).toFixed(2));
|
||||
Calculateloadingcharge();
|
||||
Calculateloadingcharge();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3841,16 +3926,16 @@ function ExceedEditQuantityCheck()
|
||||
|
||||
//alert(reqq);
|
||||
//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
|
||||
{
|
||||
// {
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@ -4343,7 +4428,7 @@ function ExceedQuantityCheck()
|
||||
// RequistQuantity
|
||||
var EnterQuantity = $("#Quantity").val()== '' ? "0.00" : parseFloat($("#Quantity").val());
|
||||
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);
|
||||
@ -4351,9 +4436,9 @@ function ExceedQuantityCheck()
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
{
|
||||
//{
|
||||
return true;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user