Log Message Added : ps

This commit is contained in:
VE10-Sanjeev 2023-05-31 17:40:26 +05:30
parent 0a344e0e8b
commit dfd598bb0a
2 changed files with 45 additions and 33 deletions

View File

@ -47,21 +47,17 @@
$active_group = 'default'; $active_group = 'default';
$active_record = TRUE; $active_record = TRUE;
// Testing DB
$db['default']['hostname'] = '52.172.253.20';
$db['default']['username'] = 'kasiram9_prod';
$db['default']['password'] = 'sia!1234';
$db['default']['database'] = 'kasiram9_SIAPROD';
// $db['default']['hostname'] = '52.172.253.20'; // Live DB
// $db['default']['username'] = 'kasiram9_prod'; // $db['default']['hostname'] = '119.18.54.85';
// $db['default']['password'] = 'sia!1234'; // $db['default']['username'] = 'venbaehn_sia';
// $db['default']['database'] = 'kasiram9_SIAPROD'; // $db['default']['password'] = 'gmjGKp8DyyxqnSc';
// $db['default']['database'] = 'venbaehn_sia';
$db['default']['hostname'] = '119.18.54.85';
$db['default']['username'] = 'venbaehn_sia';
$db['default']['password'] = 'gmjGKp8DyyxqnSc';
$db['default']['database'] = 'venbaehn_sia';
// $db['default']['hostname'] = '127.0.0.1';
// $db['default']['username'] = 'seuser';
// $db['default']['password'] = 'Sine@1234';
// $db['default']['database'] = 'kasiram9_SIAPROD';
$db['default']['dbdriver'] = 'mysqli'; $db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = ''; $db['default']['dbprefix'] = '';

View File

@ -271,7 +271,7 @@ function add($pathname)
{ {
//echo "t54"; //echo "t54";
log_message('error'," Service Emr-po FNS.");
//die(); //die();
@ -379,6 +379,7 @@ function add($pathname)
if(count($Req)>0) if(count($Req)>0)
{ {
$RegNo = $Req[0]['ReqNo']; $RegNo = $Req[0]['ReqNo'];
log_message('error'," Service Emr-po Requistion Number. ".$RegNo);
} }
@ -390,6 +391,7 @@ function add($pathname)
if(count($POMaster)>0) if(count($POMaster)>0)
{ {
$PONO = $POMaster[0]['PONO']; $PONO = $POMaster[0]['PONO'];
log_message('error'," Service Emr-po Number. ".$PONO);
} }
$RegDetailsStatus=REQITEM_POCREATED; $RegDetailsStatus=REQITEM_POCREATED;
@ -445,6 +447,7 @@ function add($pathname)
if(count($ReqDetQuery)>0) if(count($ReqDetQuery)>0)
{ {
$ItemNo = $ReqDetQuery[0]['ItemNo']; $ItemNo = $ReqDetQuery[0]['ItemNo'];
log_message('error'," Service Emr-po Requistion Lineitem . ".$ItemNo);
} }
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceMaterialDescription'=>$ServiceMaterialDescription,'ServiceFrequency'=>$ServiceFrequency,'Per'=>$Per,'ItemNo'=>$ItemNo); $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'ServiceMaterialDescription'=>$ServiceMaterialDescription,'ServiceFrequency'=>$ServiceFrequency,'Per'=>$Per,'ItemNo'=>$ItemNo);
@ -455,6 +458,7 @@ function add($pathname)
if(count($POLineItem)>0) if(count($POLineItem)>0)
{ {
$LineItemNo = $POLineItem[0]['LineItemNo']; $LineItemNo = $POLineItem[0]['LineItemNo'];
log_message('error'," Service Emr-po Lineitem . ".$LineItemNo);
} }
if(trim($POType) == SERVICE ) if(trim($POType) == SERVICE )
{ {
@ -462,6 +466,7 @@ function add($pathname)
$ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt); $ServiceTaxList = array('LineItemNo'=>$LineItemNo, 'CGST'=>$Cgst,'After_CGST'=>$AfterCgst,'SGST'=>$Sgst,'After_SGST'=>$AfterSgst,'IGST'=>$Igst,'After_IGST'=>$AfterIgst,'otherallowance'=>$OtherAmt,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt);
$ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList); $ServiceTax = $this->purchaseorder_model->addServiceTax($ServiceTaxList);
log_message('error'," Service Emr-po Tax ID . ".$ServiceTax);
} }
} }
@ -494,11 +499,12 @@ $prefile =array();
$pathname = 'browseFiles'.$i; $pathname = 'browseFiles'.$i;
log_message('error'," Service Emr-po Browse File Path Name ".$pathname);
if(!empty($_FILES[$pathname]['name'])) if(!empty($_FILES[$pathname]['name']))
{ {
$files = str_replace(" ","",$_FILES[$pathname]['name']); $files = str_replace(" ","",$_FILES[$pathname]['name']);
log_message('error'," Service Emr-po File Name ".$files);
$fcount = 0; $fcount = 0;
@ -521,7 +527,8 @@ $prefile =array();
if($fcount == 0) if($fcount == 0)
{ {
$Picture = $this->add($pathname); $Picture = $this->add($pathname);
//echo $Picture; //echo $Picture;
log_message('error'," Revenue Emr-po File status ".$Picture);
$arr[] = array($Picture); $arr[] = array($Picture);
} }
@ -548,7 +555,8 @@ $prefile =array();
{ {
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO); $myfile = array('FilePath'=>$filename,'PONO'=>$PONO);
$this->purchaseorder_model->fileupload($myfile); $fileno = $this->purchaseorder_model->fileupload($myfile);
log_message('error'," Revenue Emr-po File Number.".$fileno);
} }
@ -564,6 +572,7 @@ $prefile =array();
echo "<script>alert('You Have Successfully Saved the Purchase order! $PONO');</script>"; echo "<script>alert('You Have Successfully Saved the Purchase order! $PONO');</script>";
log_message('error'," Service Emr-po successfully created. ".$PONO."-".$POStatus);
redirect('purchaseorder/PurchaseOrderList','refresh'); redirect('purchaseorder/PurchaseOrderList','refresh');
} }
@ -572,6 +581,7 @@ $prefile =array();
// echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO; // echo 'Emergency Service Purchase Order Created Successfully!The PO NO Is: '.$PONO;
echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>"; echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
log_message('error'," Service Emr-po successfully created. ".$PONO."-".$POStatus);
redirect('purchaseorder/PurchaseOrderList','refresh'); redirect('purchaseorder/PurchaseOrderList','refresh');
} }
@ -584,7 +594,7 @@ $prefile =array();
//This used to Create Revenue Emergency Purchase Order //This used to Create Revenue Emergency Purchase Order
function addNewRevenuePurchaseOrder() function addNewRevenuePurchaseOrder()
{ {
log_message('error'," Revenue E-PO FNS."); log_message('error'," Revenue Emr-po FNS.");
$txtspl=$this->input->post('txtSpecial'); $txtspl=$this->input->post('txtSpecial');
@ -664,7 +674,7 @@ $prefile =array();
if(count($Req)>0) if(count($Req)>0)
{ {
$RegNo = $Req[0]['ReqNo']; $RegNo = $Req[0]['ReqNo'];
log_message('error'," Revenue E-PO Req Raised Number".$RegNo); log_message('error'," Revenue Emr-po Req Raised Number".$RegNo);
} }
// echo "i HAVE".$RegNo; // echo "i HAVE".$RegNo;
// die(); // die();
@ -678,7 +688,7 @@ $prefile =array();
if(count($POMaster)>0) if(count($POMaster)>0)
{ {
$PONO = $POMaster[0]['PONO']; $PONO = $POMaster[0]['PONO'];
log_message('error'," Revenue E-PO Number .".$PONO); log_message('error'," Revenue Emr-po Number .".$PONO);
} }
//echo $PONO; //echo $PONO;
// PO Line Items // PO Line Items
@ -736,7 +746,7 @@ $prefile =array();
//add requistion details //add requistion details
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt); $ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails); $ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
log_message('error'," Revenue E-PO RequistionDetails . ".$ReqDetQuery); log_message('error'," Revenue Emr-po RequistionDetails count . ".count($ReqDetQuery)." ReqNo".isset($ReqDetQuery[0]['ItemNo'])?$ReqDetQuery[0]['ItemNo']:" -- ");
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription); $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription);
//print_r($POLineItemList); //print_r($POLineItemList);
@ -746,7 +756,7 @@ $prefile =array();
if(count($POLineItem)>0) if(count($POLineItem)>0)
{ {
$LineItemNo = $POLineItem[0]['LineItemNo']; $LineItemNo = $POLineItem[0]['LineItemNo'];
log_message('error'," Revenue E-PO Line Item Number . ".$LineItemNo); log_message('error'," Revenue Emr-po Line Item Number . ".$LineItemNo);
} }
//echo $LineItemNo; //echo $LineItemNo;
@ -765,7 +775,7 @@ $prefile =array();
//print_r($RevenueTaxList); //print_r($RevenueTaxList);
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList); $RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
//echo 'Revenue tax Success'; //echo 'Revenue tax Success';
log_message('error'," Revenue E-PO tax Success . "); log_message('error'," Revenue Emr-po tax Successfully . ");
} }
} }
@ -817,7 +827,7 @@ $prefile =array();
foreach ($igrM as $key ) foreach ($igrM as $key )
{ {
$IGRNO=$key->IGRNO; $IGRNO=$key->IGRNO;
log_message('error'," Revenue E-PO IGR Number.".$IGRNO); log_message('error'," Revenue Emr-po IGR Number.".$IGRNO);
} }
} }
if($Qualitycheck==0) if($Qualitycheck==0)
@ -837,7 +847,7 @@ $prefile =array();
foreach ($mrirmaster as $key ) { foreach ($mrirmaster as $key ) {
$MRIRNO=$key->MRIRNo; } $MRIRNO=$key->MRIRNo; }
log_message('error'," Revenue E-PO MRIR Number.".$MRIRNO); log_message('error'," Revenue Emr-po MRIR Number.".$MRIRNO);
} }
@ -857,7 +867,7 @@ $prefile =array();
$mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues); $mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues);
log_message('error'," Revenue E-PO MRIR Item Number.".$mrirdetails[0]['MRIRItemNo']); log_message('error'," Revenue Emr-po MRIR Item Number.".$mrirdetails[0]['MRIRItemNo']);
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode)); $getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode));
if(count($getAvailableqty)>0) if(count($getAvailableqty)>0)
@ -927,14 +937,15 @@ $prefile =array();
{ {
$IGRItemNo = $value->IGRItemNo; $IGRItemNo = $value->IGRItemNo;
log_message('error'," Revenue E-PO IGR Item Number.".$IGRItemNo); log_message('error'," Revenue Emr-po IGR Item Number.".$IGRItemNo);
} }
//echo $IGRItemNo; //echo $IGRItemNo;
$MaterialstockHistoryadd= array('Ref_No'=>$IGRItemNo,'MaterialCode'=>$MaterialCode,'Transaction_type'=>'Add','Ref_Type'=>'IGR','SupplierID'=>$SupplierID,'Quantity'=>$QuantityAsPerInvoice,'ItemValue'=>$itemRate,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt); $MaterialstockHistoryadd= array('Ref_No'=>$IGRItemNo,'MaterialCode'=>$MaterialCode,'Transaction_type'=>'Add','Ref_Type'=>'IGR','SupplierID'=>$SupplierID,'Quantity'=>$QuantityAsPerInvoice,'ItemValue'=>$itemRate,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
$this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd); $MStockHistory = $this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
log_message('error'," Revenue Emr-po Material Stock History added. count ".count($MStockHistory));
//*=====================================================*/ //*=====================================================*/
@ -955,7 +966,8 @@ $prefile =array();
$current_qty= array('Current_stock'=>$currentav_qty); $current_qty= array('Current_stock'=>$currentav_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode); $mMaster = $this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
log_message('error'," Revenue Emr-po Material Master Qty added.".$mMaster);
//*==================================================*/ //*==================================================*/
@ -976,7 +988,8 @@ $prefile =array();
$POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt ); $POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode); $pod = $this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode);
log_message('error'," Revenue Emr-po updating PO.sub details totalReceivedqty,Status ".$totalReceivedqty." ".$ItemStatus." ".$pod);
} }
@ -1013,11 +1026,13 @@ $prefile =array();
for($i=1;$i<=$constants;$i++) for($i=1;$i<=$constants;$i++)
{ {
$pathname = 'browseFiles'.$i; $pathname = 'browseFiles'.$i;
log_message('error'," Revenue Emr-po Browse File Path Name ".$pathname);
if(!empty($_FILES[$pathname]['name'])) if(!empty($_FILES[$pathname]['name']))
{ {
$files = str_replace(" ","",$_FILES[$pathname]['name']); $files = str_replace(" ","",$_FILES[$pathname]['name']);
log_message('error'," Revenue Emr-po File Name ".$files);
$fcount = 0; $fcount = 0;
@ -1031,7 +1046,7 @@ $prefile =array();
if($fcount == 0) if($fcount == 0)
{ {
$Picture = $this->addfile($pathname); $Picture = $this->addfile($pathname);
echo $Picture; log_message('error'," Revenue Emr-po File status ".$Picture);
$arr[] = array($Picture); $arr[] = array($Picture);
} }
@ -1059,7 +1074,7 @@ $prefile =array();
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO); $myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
$fileno = $this->purchaseorder_model->fileupload($myfile); $fileno = $this->purchaseorder_model->fileupload($myfile);
log_message('error'," Revenue E-po FIle Number.".$fileno); log_message('error'," Revenue Emr-po File Number.".$fileno);
} }
@ -1073,6 +1088,7 @@ $prefile =array();
} }
echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>"; echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
log_message('error'," Revenue Emr-po successfully created. ".$PONO);
redirect('purchaseorder/PurchaseOrderList','refresh'); redirect('purchaseorder/PurchaseOrderList','refresh');