poedit
This commit is contained in:
parent
1b9ae29251
commit
23c8d32edc
@ -376,6 +376,14 @@ function addfile1()
|
|||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$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 )
|
if(trim($POType) == SERVICE )
|
||||||
{
|
{
|
||||||
@ -609,7 +617,17 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
{
|
{
|
||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$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 )
|
if(trim($POType) == REVENUE )
|
||||||
{
|
{
|
||||||
@ -1311,7 +1329,11 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||||
}
|
}
|
||||||
//echo $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 )
|
if(trim($POType) == REVENUE )
|
||||||
{
|
{
|
||||||
// echo 'Success';
|
// echo 'Success';
|
||||||
@ -1333,6 +1355,13 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
$POdt =$this->input->post('PODate');
|
$POdt =$this->input->post('PODate');
|
||||||
$PODate = $this->getDateformat($POdt);
|
$PODate = $this->getDateformat($POdt);
|
||||||
$SupplierID = $this->input->post('drpSupplier');
|
$SupplierID = $this->input->post('drpSupplier');
|
||||||
|
|
||||||
|
|
||||||
|
/*-----------------------------------*/
|
||||||
|
$b4supplier=$this->input->post('b4supplier');
|
||||||
|
$b4date=$this->input->post('b4podate');
|
||||||
|
$b4podate = $this->getDateformat($b4date);
|
||||||
|
/*-----------------------------------*/
|
||||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||||
$dt = $this->input->post('Deliverydt');
|
$dt = $this->input->post('Deliverydt');
|
||||||
$Deliverydt = $this->getDateformat($dt);
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
@ -1369,6 +1398,10 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
$Quantity = $this->input->post('quantity'.$i);
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
$itemRate = $this->input->post('itemRate'.$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);
|
$DiscountType = $this->input->post('DisType'.$i);
|
||||||
$DiscountValue = $this->input->post('DisVal'.$i);
|
$DiscountValue = $this->input->post('DisVal'.$i);
|
||||||
@ -1400,6 +1433,21 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
$LineItemNo = '';
|
$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";
|
$SkipInsert = "False";
|
||||||
if( count($comma_separated) > 0)
|
if( count($comma_separated) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -529,7 +529,9 @@ function edited(){
|
|||||||
$data['getdata'] = $this->purchaseorder_model->getfunction($PONO);
|
$data['getdata'] = $this->purchaseorder_model->getfunction($PONO);
|
||||||
|
|
||||||
//s print_r($data['getdata']);
|
//s print_r($data['getdata']);
|
||||||
|
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||||
|
|
||||||
|
|
||||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||||
//$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
//$data['WorkStatus']=$this->purchaseorder_model->GetWorkStatus('C019');
|
||||||
|
|
||||||
@ -542,6 +544,9 @@ function edited(){
|
|||||||
|
|
||||||
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
$data['POItem'] = $this->purchaseorder_model->GetRevenuePurchaseOrderDetails($PONO);
|
||||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||||
|
|
||||||
|
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||||
|
|
||||||
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
$data['WorkStatus']=$this->purchaseorder_model->getStatus(7);
|
||||||
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
$this->global['pageTitle'] = 'Siddharth : Edit Revenue Purchase order form';
|
||||||
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
$this->loadViews("editRevenuepurchaseorder", $this->global, $data, NULL);
|
||||||
@ -567,6 +572,7 @@ function edited(){
|
|||||||
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
||||||
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
|
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
|
||||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||||
|
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||||
|
|
||||||
//print_r($data['PaymentTerms']);
|
//print_r($data['PaymentTerms']);
|
||||||
$unicode ='';
|
$unicode ='';
|
||||||
@ -606,7 +612,7 @@ function edited(){
|
|||||||
}
|
}
|
||||||
$data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO);
|
$data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO);
|
||||||
|
|
||||||
|
$data['getlogpodtl']=$this->purchaseorder_model->getlogpodtl($PONO);
|
||||||
//$CapitalRange='';
|
//$CapitalRange='';
|
||||||
foreach($data['POItem'] as $Rate)
|
foreach($data['POItem'] as $Rate)
|
||||||
{
|
{
|
||||||
@ -1158,7 +1164,11 @@ function edited(){
|
|||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||||
}
|
}
|
||||||
//echo $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 )
|
if(trim($POType) == REVENUE )
|
||||||
{
|
{
|
||||||
// echo 'Success';
|
// echo 'Success';
|
||||||
@ -1194,9 +1204,11 @@ function edited(){
|
|||||||
$Deliverydt = $this->getDateformat($dt);
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
$DeliverySchedule = '';
|
$DeliverySchedule = '';
|
||||||
}
|
}
|
||||||
|
/*-----------------------------------*/
|
||||||
|
$b4supplier=$this->input->post('b4supplier');
|
||||||
|
$b4date=$this->input->post('b4podate');
|
||||||
|
$b4podate = $this->getDateformat($b4date);
|
||||||
|
/*-----------------------------------*/
|
||||||
$Modeofshipment=$this->input->post('editmodeofshipment');
|
$Modeofshipment=$this->input->post('editmodeofshipment');
|
||||||
$supplierreference=$this->input->post('editsupplierreference');
|
$supplierreference=$this->input->post('editsupplierreference');
|
||||||
$supplieroffno=$this->input->post('editsupplierofferno');
|
$supplieroffno=$this->input->post('editsupplierofferno');
|
||||||
@ -1252,6 +1264,10 @@ function edited(){
|
|||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
$Quantity = $this->input->post('quantity'.$i);
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
$Reqnumber = $this->input->post('Reqnumber'.$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);
|
$itemRate = $this->input->post('itemRate'.$i);
|
||||||
$per=$this->input->post('per'.$i);
|
$per=$this->input->post('per'.$i);
|
||||||
$DiscountType = $this->input->post('DisType'.$i);
|
$DiscountType = $this->input->post('DisType'.$i);
|
||||||
@ -1277,8 +1293,19 @@ function edited(){
|
|||||||
$CostCenter = $this->input->post('costCode'.$i);
|
$CostCenter = $this->input->post('costCode'.$i);
|
||||||
$LineItemNo = '';
|
$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";
|
$SkipInsert = "False";
|
||||||
if( count($comma_separated) > 0)
|
if( count($comma_separated) > 0)
|
||||||
@ -1296,17 +1323,64 @@ function edited(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------*/
|
/*-------------start-----------------*/
|
||||||
//if($MaterialCode!= ''){
|
//if($MaterialCode!= ''){
|
||||||
|
|
||||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||||
//print_r($ReqDetails);
|
//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;
|
$LineItemNo = $POLineItemNo;
|
||||||
|
|
||||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdateBY'=>$updatedBy,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter);
|
||||||
|
|
||||||
|
|
||||||
//print_r($POLineItemList);
|
//print_r($POLineItemList);
|
||||||
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
$POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList);
|
||||||
|
|
||||||
@ -1987,7 +2063,13 @@ function addNewImportPurchaseOrder()
|
|||||||
{
|
{
|
||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$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 )
|
if(trim($POType) == IMPORT )
|
||||||
{
|
{
|
||||||
@ -2003,7 +2085,9 @@ function addNewImportPurchaseOrder()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2019,6 +2103,12 @@ function addNewImportPurchaseOrder()
|
|||||||
|
|
||||||
$PODate = $this->getDateformat($POdt);
|
$PODate = $this->getDateformat($POdt);
|
||||||
$SupplierID = $this->input->post('drpSupplier');
|
$SupplierID = $this->input->post('drpSupplier');
|
||||||
|
|
||||||
|
/*-----------------------------------*/
|
||||||
|
$b4supplier=$this->input->post('b4supplier');
|
||||||
|
$b4date=$this->input->post('b4podate');
|
||||||
|
$b4podate = $this->getDateformat($b4date);
|
||||||
|
/*-----------------------------------*/
|
||||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||||
$dt = $this->input->post('Deliverydt');
|
$dt = $this->input->post('Deliverydt');
|
||||||
$Deliverydt = $this->getDateformat($dt);
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
@ -2131,7 +2221,10 @@ function addNewImportPurchaseOrder()
|
|||||||
//echo $Quantity;
|
//echo $Quantity;
|
||||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
$itemRate = $this->input->post('itemRate'.$i);
|
$itemRate = $this->input->post('itemRate'.$i);
|
||||||
;
|
/*-----------------------------------*/
|
||||||
|
$b4qty=$this->input->post('b4qty'.$i);
|
||||||
|
$b4rate=$this->input->post('b4rate'.$i);
|
||||||
|
/*-----------------------------------*/
|
||||||
//die();
|
//die();
|
||||||
|
|
||||||
//$Exchangerate = $this->input->post('Exchangerate'.$i);
|
//$Exchangerate = $this->input->post('Exchangerate'.$i);
|
||||||
@ -2217,6 +2310,20 @@ function addNewImportPurchaseOrder()
|
|||||||
// echo $per;
|
// echo $per;
|
||||||
//die();
|
//die();
|
||||||
$LineItemNo = '';
|
$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";
|
//echo "sdsfsd";
|
||||||
//die();
|
//die();
|
||||||
|
|
||||||
@ -2239,13 +2346,10 @@ function addNewImportPurchaseOrder()
|
|||||||
|
|
||||||
|
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
//if($MaterialCode!= ''){
|
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$updateddt);
|
||||||
|
|
||||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
|
||||||
//print_r($ReqDetails);
|
//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 ;
|
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2629,7 +2733,11 @@ function addNewImportPurchaseOrder()
|
|||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$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(trim($POType) == CAPITAL )
|
||||||
{
|
{
|
||||||
if($CapitalRange=='1')
|
if($CapitalRange=='1')
|
||||||
@ -2660,7 +2768,9 @@ function addNewImportPurchaseOrder()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2691,7 +2801,11 @@ function addNewImportPurchaseOrder()
|
|||||||
$Deliverydt = '';
|
$Deliverydt = '';
|
||||||
$DeliverySchedule = '';
|
$DeliverySchedule = '';
|
||||||
} */
|
} */
|
||||||
|
/*-----------------------------------*/
|
||||||
|
$b4supplier=$this->input->post('b4supplier');
|
||||||
|
$b4date=$this->input->post('b4podate');
|
||||||
|
$b4podate = $this->getDateformat($b4date);
|
||||||
|
/*-----------------------------------*/
|
||||||
|
|
||||||
$DeliveryOption = $this->input->post('DateRange');
|
$DeliveryOption = $this->input->post('DateRange');
|
||||||
|
|
||||||
@ -2785,7 +2899,10 @@ function addNewImportPurchaseOrder()
|
|||||||
$Quantity = $this->input->post('quantity'.$i);
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
$itemRate = $this->input->post('itemRate'.$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);
|
$Exchangerate = $this->input->post('echangeRate'.$i);
|
||||||
$BasicPriceinmton = $this->input->post('rateInUs'.$i);
|
$BasicPriceinmton = $this->input->post('rateInUs'.$i);
|
||||||
$Productprice = $this->input->post('basicvalInINR'.$i);
|
$Productprice = $this->input->post('basicvalInINR'.$i);
|
||||||
@ -2871,7 +2988,19 @@ function addNewImportPurchaseOrder()
|
|||||||
|
|
||||||
// die();
|
// 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";
|
$SkipInsert = "False";
|
||||||
@ -2891,13 +3020,11 @@ function addNewImportPurchaseOrder()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
//if($MaterialCode!= ''){
|
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$updateddt);
|
||||||
|
|
||||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
|
||||||
//print_r($ReqDetails);
|
//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 ;
|
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;
|
//echo $PONO;
|
||||||
$POdt =$this->input->post('PODate');
|
$POdt =$this->input->post('PODate');
|
||||||
$PODate = $this->getDateformat($POdt);
|
$PODate = $this->getDateformat($POdt);
|
||||||
|
/*-----------------------------------*/
|
||||||
|
$b4supplier=$this->input->post('b4supplier');
|
||||||
|
$b4date=$this->input->post('b4podate');
|
||||||
|
$b4podate = $this->getDateformat($b4date);
|
||||||
|
/*-----------------------------------*/
|
||||||
$SupplierID = $this->input->post('drpSupplier');
|
$SupplierID = $this->input->post('drpSupplier');
|
||||||
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
$DeliveryAddr = $this->input->post('txtDeliveryAddress');
|
||||||
$dt = $this->input->post('Deliverydt');
|
$dt = $this->input->post('Deliverydt');
|
||||||
@ -399,6 +403,10 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
|||||||
{
|
{
|
||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
$Quantity = $this->input->post('quantity'.$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);
|
$Reqnumber = $this->input->post('Reqnumber'.$i);
|
||||||
$itemRate = $this->input->post('itemRate'.$i);
|
$itemRate = $this->input->post('itemRate'.$i);
|
||||||
$Cgst = $this->input->post('Cgst'.$i);
|
$Cgst = $this->input->post('Cgst'.$i);
|
||||||
@ -419,18 +427,36 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
|||||||
|
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
//if($MaterialCode!= ''){
|
//if($MaterialCode!= ''){
|
||||||
|
$ReqDetails = array('Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
||||||
$ReqDetails = array( 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'UpdatedBy'=>$updatedBy,'UpdatedOn'=>$updateddt);
|
|
||||||
//print_r($ReqDetails);
|
//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();
|
$POLineItem = array();
|
||||||
$LineItemNo = '';
|
$LineItemNo = '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$SkipInsert = "False";
|
$SkipInsert = "False";
|
||||||
if( count($comma_separated) > 0)
|
if( count($comma_separated) > 0)
|
||||||
{
|
{
|
||||||
@ -505,6 +531,71 @@ $result = $this->purchaseorder_model->GetPODetailforBillingServicePO($PO);
|
|||||||
}
|
}
|
||||||
echo 'Purchase Order Updated Successfully! PO Number Is: '.$PONO;
|
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()
|
function pageNotFound()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
$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';
|
//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();
|
$r = $this->db->affected_rows();
|
||||||
return $r;
|
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());
|
//print_r($this->db->last_query());
|
||||||
return TRUE;
|
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;
|
$Terms=$TER->PaymentTerms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($getlogpodtl ))
|
||||||
|
{
|
||||||
|
foreach ($getlogpodtl as $values )
|
||||||
|
{
|
||||||
|
$update=$values->UpdateBy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// foreach ($POSTATUS as $PST )
|
// 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 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.');
|
||||||
|
|
||||||
@ -513,9 +535,9 @@ function ExceedQuantityCheck()
|
|||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
{
|
//{
|
||||||
return true;
|
return true;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
function EditExceedQuantityCheck()
|
function EditExceedQuantityCheck()
|
||||||
{
|
{
|
||||||
@ -523,13 +545,13 @@ 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 true;
|
return true;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ExceedBudget(ValuetoCheck,budgetAmount)
|
function ExceedBudget(ValuetoCheck,budgetAmount)
|
||||||
@ -746,7 +768,7 @@ $(document).ready(function () {
|
|||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
|
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate;?>">
|
||||||
</div>
|
</div>
|
||||||
</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');
|
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>
|
||||||
<div class="col-md-12"><br/>
|
<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 '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 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 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 ; ?>" />
|
<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
|
<?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>
|
<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
|
<?php
|
||||||
@ -2249,7 +2274,7 @@ $(document).ready(function () {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody id="spl">
|
||||||
<?php
|
<?php
|
||||||
if(!empty($getdata))
|
if(!empty($getdata))
|
||||||
{
|
{
|
||||||
@ -2266,8 +2291,18 @@ $(document).ready(function () {
|
|||||||
<td><?php echo $gd->VehicleNo?></td>
|
<td><?php echo $gd->VehicleNo?></td>
|
||||||
<td><?php echo $gd->CourierNo?></td> -->
|
<td><?php echo $gd->CourierNo?></td> -->
|
||||||
<!-- <td><?php echo $gd->QuantityAsPerInvoice?></td> -->
|
<!-- <td><?php echo $gd->QuantityAsPerInvoice?></td> -->
|
||||||
<td><?php echo $gd->FilePath?></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><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>
|
</tr>
|
||||||
<?php
|
<?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('');
|
$('#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>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -138,6 +138,13 @@ if(!empty($RequistionDetails))
|
|||||||
// {
|
// {
|
||||||
// $POStatus=$PST->StatusName;
|
// $POStatus=$PST->StatusName;
|
||||||
// }
|
// }
|
||||||
|
if(!empty($getlogpodtl ))
|
||||||
|
{
|
||||||
|
foreach ($getlogpodtl as $values )
|
||||||
|
{
|
||||||
|
$update=$values->UpdateBy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
@ -240,8 +247,22 @@ else
|
|||||||
{
|
{
|
||||||
$('#splpodiv').hide();
|
$('#splpodiv').hide();
|
||||||
}
|
}
|
||||||
|
/*****************************/
|
||||||
|
var update = '<?php echo json_encode($update)?>';
|
||||||
|
|
||||||
|
|
||||||
|
if(update !='null')
|
||||||
|
|
||||||
|
{
|
||||||
|
$('#editpodiv').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#editpodiv').hide();
|
||||||
|
}
|
||||||
|
/*****************************/
|
||||||
|
|
||||||
|
|
||||||
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
$('#PoTypeOptions').attr("style", "pointer-events: none;");
|
||||||
if(DelOpt=="0"){
|
if(DelOpt=="0"){
|
||||||
@ -2013,7 +2034,7 @@ SetVatorCST();
|
|||||||
// RequistQuantity
|
// RequistQuantity
|
||||||
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);
|
||||||
@ -2021,9 +2042,9 @@ SetVatorCST();
|
|||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
//else
|
//else
|
||||||
{
|
// {
|
||||||
return true;
|
return true;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ExceedEditQuantityCheck()
|
function ExceedEditQuantityCheck()
|
||||||
@ -2031,16 +2052,16 @@ 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;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
// To Reset the Tax calculation
|
// To Reset the Tax calculation
|
||||||
function resetTaxField()
|
function resetTaxField()
|
||||||
@ -2265,7 +2286,8 @@ function calculateEditTaxValue()
|
|||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
|
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control num' ,'required' => 'true','onkeypress'=>'return false;');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate;?>">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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');
|
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>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Purchase Order Type</label>
|
<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 '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 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 '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 '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 '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 ; ?>" />
|
<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 '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 '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 ; ?>" />
|
<input align="right" type="hidden" name="<?php echo 'TotalOrderValue'.$index ?>" id="<?php echo 'TotalOrderValue'.$index ?>" value="<?php echo $record->TotalValue ; ?>" />
|
||||||
<?php
|
<?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='#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>
|
<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
|
<?php
|
||||||
} else {?>
|
} 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>
|
<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
|
<?php
|
||||||
}?>
|
}?>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -4144,8 +4170,7 @@ function calculateEditTaxValue()
|
|||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
<tbody id="spl">
|
||||||
<tbody>
|
|
||||||
<?php
|
<?php
|
||||||
if(!empty($getdata))
|
if(!empty($getdata))
|
||||||
{
|
{
|
||||||
@ -4161,18 +4186,162 @@ function calculateEditTaxValue()
|
|||||||
echo $date->format('d-m-Y'); ?></td>
|
echo $date->format('d-m-Y'); ?></td>
|
||||||
<td><?php echo $gd->VehicleNo?></td>
|
<td><?php echo $gd->VehicleNo?></td>
|
||||||
<td><?php echo $gd->CourierNo?></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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</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; ?>" />
|
<input type="hidden" name="Budget" id="Budget" value="<?php echo $BudgetType; ?>" />
|
||||||
|
|
||||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
|
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED || $PONOStatus == REQITEM_Emergency_PO_CREATED ) {
|
||||||
if($PONOStatus == PO_DRAFT || $PONOStatus == 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="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="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>
|
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||||
<?php }
|
<?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 {?>
|
else {?>
|
||||||
<!-- <a class="btn btn-primary" ID="Viewsave" onclick="Save(2)"> <span class="bold">Submit</span></a> -->
|
<!-- <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>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ $Currencycode=$currencycode;
|
|||||||
//echo $Currencycode;
|
//echo $Currencycode;
|
||||||
$Terms='';
|
$Terms='';
|
||||||
$DeliverySchedule='';
|
$DeliverySchedule='';
|
||||||
|
|
||||||
foreach ($CurrencyDetail as $Detail)
|
foreach ($CurrencyDetail as $Detail)
|
||||||
{
|
{
|
||||||
$Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
|
$Cur=$Detail->Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency;
|
||||||
@ -151,7 +151,7 @@ if(!empty($POMaster))
|
|||||||
// $PaymentDays=$Req->PaymentDays;
|
// $PaymentDays=$Req->PaymentDays;
|
||||||
$StatusName=$Req->StatusName;
|
$StatusName=$Req->StatusName;
|
||||||
$Currency_Type=$Req->CurrencyType;
|
$Currency_Type=$Req->CurrencyType;
|
||||||
$parentPO =$Req->ParentPO;
|
$parentPO =$Req->ParentPO;
|
||||||
$DeliverySchedule=$Req->DeliverySchedule;
|
$DeliverySchedule=$Req->DeliverySchedule;
|
||||||
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
||||||
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
||||||
@ -209,6 +209,17 @@ if(!empty($RequistionDetails))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($getlogpodtl))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($getlogpodtl as $values )
|
||||||
|
{
|
||||||
|
$update=$values->UpdateBy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<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
|
//Initialize Select2 Elements
|
||||||
//$("#drpSupplier").select2();
|
//$("#drpSupplier").select2();
|
||||||
$("#currencytype").select2();
|
$("#currencytype").select2();
|
||||||
var POMaxDate = '<?php echo $MaxPoDate;?>';
|
var POMaxDate = '<?php echo $MaxPoDate;?>';
|
||||||
var d = new Date(POMaxDate);
|
var d = new Date(POMaxDate);
|
||||||
|
|
||||||
@ -340,17 +369,17 @@ tinymce.init({
|
|||||||
|
|
||||||
<div style="border:2px solid #333">
|
<div style="border:2px solid #333">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-11">
|
<div class="col-md-11">
|
||||||
<?php if ($parentPO == '') { ?>
|
<?php if ($parentPO == '') { ?>
|
||||||
<center><b><h2>Siddharth Industries - Edit Import Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
<center><b><h2>Siddharth Industries - Edit Import Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
||||||
<?php } else {?>
|
<?php } else {?>
|
||||||
<center><b><h2>Siddharth Industries - Amended Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
<center><b><h2>Siddharth Industries - Amended Purchase Order-<?php echo "$PONO"?></h2></b></center>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<!--<div class="col-md-1"><br/>
|
<!--<div class="col-md-1"><br/>
|
||||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" target="_blank">Print</a>
|
<a class="btn btn-primary" href="<?php echo base_url(); ?>purchaseorder/CreateimportPOPrint" target="_blank">Print</a>
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" style="padding:0px;">
|
<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');
|
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
|
<?php
|
||||||
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
$data = array('name' => 'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?> <input type="hidden" name="b4podate" id="b4podate" value="<?php echo $PODate;?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -2087,9 +2116,9 @@ echo form_textarea($data);
|
|||||||
|
|
||||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</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 '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 '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 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 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 '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; ?>" />
|
<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>
|
</div>
|
||||||
<input type="hidden" name="txttot" id="txttot" value=<?php echo $totalhidden?>>
|
<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">
|
<div class="col-md-12">
|
||||||
@ -3049,7 +3134,7 @@ echo form_textarea($data);
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</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/>
|
<div class="col-md-3 col-md-offset-9"><br/>
|
||||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||||
@ -3064,8 +3149,8 @@ echo form_textarea($data);
|
|||||||
|
|
||||||
|
|
||||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) {
|
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) {
|
||||||
if($PONOStatus == PO_DRAFT){?>
|
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 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>
|
<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"> -->
|
<!-- <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>
|
<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/>
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label>Request On :</label><?php echo $Reqon;?><br/>
|
<label>Request On :</label><?php echo $Reqon;?><br/>
|
||||||
<label>Request By :</label><?php echo $RequesterName;?><br/>
|
<label>Request By :</label><?php echo $RequesterName;?><br/>
|
||||||
<label>Status :</label><?php echo $StatusName;?>
|
<label>Status :</label><?php echo $StatusName;?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -3699,7 +3784,7 @@ function Ratechange()
|
|||||||
$('#EditimBasicPrice').val(parseFloat(txtbasics).toFixed(2));
|
$('#EditimBasicPrice').val(parseFloat(txtbasics).toFixed(2));
|
||||||
$('#EditExchangeRt').val(parseFloat(txtexchangerate).toFixed());
|
$('#EditExchangeRt').val(parseFloat(txtexchangerate).toFixed());
|
||||||
$('#EditINRBasicvalue').val(parseFloat(txtINRvalue).toFixed(2));
|
$('#EditINRBasicvalue').val(parseFloat(txtINRvalue).toFixed(2));
|
||||||
Calculateloadingcharge();
|
Calculateloadingcharge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3841,16 +3926,16 @@ 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,7 +4428,7 @@ function ExceedQuantityCheck()
|
|||||||
// RequistQuantity
|
// RequistQuantity
|
||||||
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);
|
||||||
@ -4351,9 +4436,9 @@ function ExceedQuantityCheck()
|
|||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
{
|
//{
|
||||||
return true;
|
return true;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user