view,model,controller,helper server code : ps
This commit is contained in:
parent
6074d6496c
commit
48eb7b0ef7
@ -47,18 +47,22 @@
|
|||||||
|
|
||||||
$active_group = 'default';
|
$active_group = 'default';
|
||||||
$active_record = TRUE;
|
$active_record = TRUE;
|
||||||
// old DB
|
|
||||||
// $db['default']['hostname'] = '52.172.253.20';
|
// $db['default']['hostname'] = 'localhost';
|
||||||
// $db['default']['username'] = 'kasiram9_prod';
|
// $db['default']['username'] = 'kasiram9_prod';
|
||||||
// $db['default']['password'] = 'sia!1234';
|
// $db['default']['password'] = 'sia!1234';
|
||||||
// $db['default']['database'] = 'kasiram9_SIAPROD';
|
// $db['default']['database'] = 'kasiram9_SIAPROD';
|
||||||
|
|
||||||
// new DB
|
|
||||||
$db['default']['hostname'] = '119.18.54.85';
|
$db['default']['hostname'] = '119.18.54.85';
|
||||||
$db['default']['username'] = 'venbaehn_sia';
|
$db['default']['username'] = 'venbaehn_sia';
|
||||||
$db['default']['password'] = 'gmjGKp8DyyxqnSc';
|
$db['default']['password'] = 'gmjGKp8DyyxqnSc';
|
||||||
$db['default']['database'] = 'venbaehn_sia';
|
$db['default']['database'] = 'venbaehn_sia';
|
||||||
|
|
||||||
|
// $db['default']['hostname'] = 'vprodb1.mysql.database.azure.com';
|
||||||
|
// $db['default']['username'] = 'dbroot';
|
||||||
|
// $db['default']['password'] = 'root@DB23';
|
||||||
|
// $db['default']['database'] = 'sia_prod';
|
||||||
|
|
||||||
$db['default']['dbdriver'] = 'mysqli';
|
$db['default']['dbdriver'] = 'mysqli';
|
||||||
$db['default']['dbprefix'] = '';
|
$db['default']['dbprefix'] = '';
|
||||||
$db['default']['pconnect'] = TRUE;
|
$db['default']['pconnect'] = TRUE;
|
||||||
|
|||||||
@ -271,7 +271,7 @@ function add($pathname)
|
|||||||
{
|
{
|
||||||
|
|
||||||
//echo "t54";
|
//echo "t54";
|
||||||
log_message('error'," Service Emr-po FNS.");
|
|
||||||
|
|
||||||
//die();
|
//die();
|
||||||
|
|
||||||
@ -379,7 +379,6 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -391,7 +390,6 @@ 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;
|
||||||
@ -447,7 +445,6 @@ 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);
|
||||||
@ -458,7 +455,6 @@ 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 )
|
||||||
{
|
{
|
||||||
@ -466,7 +462,6 @@ 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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -499,12 +494,11 @@ $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;
|
||||||
|
|
||||||
@ -527,8 +521,7 @@ $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);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -555,8 +548,7 @@ $prefile =array();
|
|||||||
{
|
{
|
||||||
|
|
||||||
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO);
|
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO);
|
||||||
$fileno = $this->purchaseorder_model->fileupload($myfile);
|
$this->purchaseorder_model->fileupload($myfile);
|
||||||
log_message('error'," Revenue Emr-po File Number.".$fileno);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -572,7 +564,6 @@ $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');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -581,7 +572,6 @@ $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');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -594,25 +584,25 @@ $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 Emr-po FNS.");
|
|
||||||
|
|
||||||
$txtspl=$this->input->post('txtSpecial');
|
$txtspl=$this->input->post('txtSpecial');
|
||||||
// echo "\n *** txtspl".$txtspl;
|
|
||||||
|
|
||||||
$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');
|
||||||
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
$DeliveryAddr = $this->input->post('DeliveryAddr');
|
||||||
$dt = $this->input->post('Deliverydt');
|
$dt = $this->input->post('Deliverydt');
|
||||||
$DeliveryOption = $this->input->post('DateRange');
|
$DeliveryOption = $this->input->post('DateRange');
|
||||||
// echo "\n DeliveryOption ".$DeliveryOption;
|
if($DeliveryOption==1){
|
||||||
if($DeliveryOption==1){
|
$Deliverydt = '';
|
||||||
$Deliverydt = '';
|
$DeliverySchedule = $this->input->post('Scheduleby');
|
||||||
$DeliverySchedule = $this->input->post('Scheduleby');
|
}
|
||||||
}
|
else{
|
||||||
else{
|
$Deliverydt = $this->getDateformat($dt);
|
||||||
$Deliverydt = $this->getDateformat($dt);
|
$DeliverySchedule = '';
|
||||||
$DeliverySchedule = '';
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$Modeofshipment=$this->input->post('emergmodeofshipment');
|
$Modeofshipment=$this->input->post('emergmodeofshipment');
|
||||||
$supplierreference=$this->input->post('emergsupplierreference');
|
$supplierreference=$this->input->post('emergsupplierreference');
|
||||||
@ -621,23 +611,30 @@ $prefile =array();
|
|||||||
$fincap=$this->input->post('emergfincap');
|
$fincap=$this->input->post('emergfincap');
|
||||||
$revenuetype=$this->input->post('PoTypeOptions');
|
$revenuetype=$this->input->post('PoTypeOptions');
|
||||||
$insurancestatus=$this->input->post('insuranceStatus');
|
$insurancestatus=$this->input->post('insuranceStatus');
|
||||||
if($insurancestatus == 1) $insuranceno=$this->input->post('insuranceNo');
|
if($insurancestatus == 1){
|
||||||
else $insuranceno="";
|
$insuranceno=$this->input->post('insuranceNo');
|
||||||
|
}else{
|
||||||
$CostCenterName = $this->input->post('CostCenterName');
|
$insuranceno="";
|
||||||
|
}
|
||||||
|
$CostCenterName = $this->input->post('CostCenterName');
|
||||||
$POType = $this->input->post('POType');
|
$POType = $this->input->post('POType');
|
||||||
$PoRange = $this->input->post('txtPoRange');
|
$PoRange = $this->input->post('txtPoRange');
|
||||||
|
|
||||||
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
$SpcialInstruction = $this->input->post('txtSpcialInstruction');
|
||||||
$RequistionComments = "Created Emergency Revenue PO";
|
$RequistionComments = "Created Emergency Revenue PO";
|
||||||
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
$TotalOrderValueSummary = $this->input->post('txtTotalOrderValueSummary');
|
||||||
|
|
||||||
if($txtspl==0) $POStatus=REQITEM_Emergency_PO_CREATED;
|
if($txtspl==0)
|
||||||
else $POStatus=SPECIAL_PO;
|
{
|
||||||
|
$POStatus=REQITEM_Emergency_PO_CREATED;
|
||||||
// echo "\n *** POStatus ".$POStatus;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$POStatus=SPECIAL_PO;
|
||||||
|
}
|
||||||
|
|
||||||
//$POStatus = $this->input->post('TextStatus');
|
//$POStatus = $this->input->post('TextStatus');
|
||||||
$RequestedBy = $this->input->post('drpDepartment');
|
$RequestedBy = $this->input->post('drpDepartment');
|
||||||
$CreateBy = $this->session->userdata ( 'userId' );
|
$CreateBy = $this->session->userdata ( 'userId' );
|
||||||
// $RowCount = $this->input->post('TextRowCount');
|
// $RowCount = $this->input->post('TextRowCount');
|
||||||
|
|
||||||
@ -649,56 +646,62 @@ $prefile =array();
|
|||||||
// $DeletedRow = $this->input->post('TextDeletedRowCount');
|
// $DeletedRow = $this->input->post('TextDeletedRowCount');
|
||||||
|
|
||||||
$DeletedRow = $this->input->post('txtDeletedRow1');
|
$DeletedRow = $this->input->post('txtDeletedRow1');
|
||||||
$splRow = $this->input->post('splrow');
|
|
||||||
|
|
||||||
|
|
||||||
|
$splRow = $this->input->post('splrow');
|
||||||
|
|
||||||
// echo $DeletedRow;
|
// echo $DeletedRow;
|
||||||
|
|
||||||
$ReqStatus = REQITEM_Emergency_PO_CREATED;
|
$ReqStatus = REQITEM_Emergency_PO_CREATED;
|
||||||
$Local_Interstate=$this->input->post('Range');
|
$Local_Interstate=$this->input->post('Range');
|
||||||
|
|
||||||
$comma_separated = explode(':', $DeletedRow);
|
$comma_separated = explode(':', $DeletedRow);
|
||||||
|
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
$PaymentTerms=$this->input->post('PaymentMethod');
|
$PaymentTerms=$this->input->post('PaymentMethod');
|
||||||
$OtherPayment=$this->input->post('Otherpayment');
|
$OtherPayment=$this->input->post('Otherpayment');
|
||||||
|
|
||||||
if($POStatus==SPECIAL_PO) $Qualitycheck=$this->input->post('txtQuality');
|
if($POStatus==SPECIAL_PO)
|
||||||
else $Qualitycheck=1;
|
{
|
||||||
|
$Qualitycheck=$this->input->post('txtQuality');
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$Qualitycheck=1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//add requistion
|
//add requistion
|
||||||
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
$Request = array('ReqType'=>$POType, 'RequestedDept'=>$RequestedBy,'CostCenterCode'=>$CostCenterName,'Status'=>$ReqStatus,'Comments'=>$RequistionComments,'ReqDate'=>$createddt,'CreatedDate'=>$createddt,'CreatedBy'=>$CreateBy);
|
||||||
// print_r($Request);
|
|
||||||
// echo "\n *** ";
|
|
||||||
|
|
||||||
$Req = $this->requistion_model->addRequistion($Request);
|
$Req = $this->requistion_model->addRequistion($Request);
|
||||||
//$RegNo='01';
|
|
||||||
$RegNo='';
|
$RegNo='';
|
||||||
if(count($Req)>0)
|
if(count($Req)>0)
|
||||||
{
|
{
|
||||||
$RegNo = $Req[0]['ReqNo'];
|
$RegNo = $Req[0]['ReqNo'];
|
||||||
log_message('error'," Revenue Emr-po Req Raised Number".$RegNo);
|
}
|
||||||
}
|
|
||||||
// echo "i HAVE".$RegNo;
|
|
||||||
// die();
|
|
||||||
// PO Master
|
// PO Master
|
||||||
|
|
||||||
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
$POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>$POStatus,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'PORange'=>$Local_Interstate,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'CapitalRange'=>$Local_Interstate,'PaymentOtherDescription'=>$OtherPayment,'Mode_Of_Shipment'=>$Modeofshipment,'Supplier_Offer_No'=>$supplieroffno,'Supplier_Reference'=>$supplierreference,'Other_Reference'=>$otherreference,'InsuranceNumber'=>$insuranceno,'InsuranceStatus'=>$insurancestatus,'Fincap'=>$fincap,'POSubType'=>$revenuetype,'IsQualityChkReqired'=>$Qualitycheck,'BudgetType'=>$BudgetType);
|
||||||
//print_r($POList);
|
//print_r($POList);
|
||||||
//echo "\n *** ";
|
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
|
||||||
$POMaster = $this->purchaseorder_model->addPOMaster($POList,$POType,$revenuetype);
|
|
||||||
|
|
||||||
$PONO = '';
|
$PONO = '';
|
||||||
if(count($POMaster)>0)
|
if(count($POMaster)>0)
|
||||||
{
|
{
|
||||||
$PONO = $POMaster[0]['PONO'];
|
$PONO = $POMaster[0]['PONO'];
|
||||||
log_message('error'," Revenue Emr-po Number .".$PONO);
|
}
|
||||||
}
|
//echo $PONO;
|
||||||
//echo $PONO;
|
// PO Line Items
|
||||||
// PO Line Items
|
$RegDetailsStatus=REQITEM_POCREATED;
|
||||||
$RegDetailsStatus=REQITEM_POCREATED;
|
$LineItemStatus = REQITEM_NEW;
|
||||||
$LineItemStatus = REQITEM_NEW;
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
@ -718,7 +721,7 @@ $prefile =array();
|
|||||||
$FreightType = $this->input->post('FreightType'.$i);
|
$FreightType = $this->input->post('FreightType'.$i);
|
||||||
$FreightValue = $this->input->post('FreightVal'.$i);
|
$FreightValue = $this->input->post('FreightVal'.$i);
|
||||||
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
$AfterFreightValue = $this->input->post('AfterFreightVal'.$i);
|
||||||
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
$NOOfTrip = $this->input->post('NoOfTrip'.$i);
|
||||||
$InsuranceValue = $this->input->post('Insval'.$i);
|
$InsuranceValue = $this->input->post('Insval'.$i);
|
||||||
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
$TotalOrderValue = $this->input->post('TotalOrderValue'.$i);
|
||||||
$revenuedescription = $this->input->post('service_description'.$i);
|
$revenuedescription = $this->input->post('service_description'.$i);
|
||||||
@ -743,196 +746,231 @@ $prefile =array();
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($SkipInsert == "False")
|
if($SkipInsert == "False")
|
||||||
{
|
{
|
||||||
//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);
|
||||||
// print_r($ReqDetails);
|
|
||||||
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
|
|
||||||
log_message('error'," Revenue Emr-po RequistionDetails count . ".count($ReqDetQuery)." ReqNo".isset($ReqDetQuery[0]['ItemNo'])?$ReqDetQuery[0]['ItemNo']:" -- ");
|
$ReqDetQuery = $this->requistion_model->addRequistionDetails($ReqDetails);
|
||||||
|
|
||||||
$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);
|
||||||
//echo "\n *** ";
|
|
||||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||||
|
|
||||||
//$LineItemNo = 'LI000';
|
|
||||||
$LineItemNo = '';
|
$LineItemNo = '';
|
||||||
if(count($POLineItem)>0)
|
if(count($POLineItem)>0)
|
||||||
{
|
{
|
||||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||||
log_message('error'," Revenue Emr-po Line Item Number . ".$LineItemNo);
|
|
||||||
}
|
}
|
||||||
//echo $LineItemNo;
|
//echo $LineItemNo;
|
||||||
|
|
||||||
/*----------------------------*/
|
/*----------------------------*/
|
||||||
// $logpo =array('PONO'=>$PONO,'Date'=>$PODate,'POType'=>$POType,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'SupplierID'=>$SupplierID,'LineItemNos'=>$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);
|
||||||
|
|
||||||
|
|
||||||
// $logaddpo = $this->purchaseorder_model->newlogpo($logpo);
|
|
||||||
|
|
||||||
/*----------------------------*/
|
/*----------------------------*/
|
||||||
|
|
||||||
|
|
||||||
if(trim($POType) == REVENUE )
|
if(trim($POType) == REVENUE )
|
||||||
{
|
{
|
||||||
// echo 'Success';
|
// echo 'Success';
|
||||||
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt, 'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip);
|
$RevenueTaxList = array('LineItemNo'=>$LineItemNo, 'DiscountType'=>$DiscountType,'DiscountValue'=>$DiscountValue,'AfterDiscount'=>$AfterDiscount,'PackagingType'=>$PackagingType,'PackagingValue'=>$PackagingValue,'PackagingCalulatedOn'=>$PackagingOption,'AfterPackagingValue'=>$AfterPackagingValue,'FreightType'=>$FreightType, 'FreightValue'=>$FreightValue,'AfterFreightValue'=>$AfterFreightValue,'Insurance'=>$InsuranceValue,'TotalValue'=>$TotalOrderValue, 'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt, 'CGST'=>$Cgst,'AfterCGST'=>$AfterCgst,'SGST'=>$Sgst,'AfterSGST'=>$AfterSgst,'IGST'=>$Igst,'AfterIGST'=>$AfterIgst,'NoOfTrip'=>$NOOfTrip);
|
||||||
//print_r($RevenueTaxList);
|
//print_r($RevenueTaxList);
|
||||||
//echo "\n";
|
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
||||||
$RevenueList = $this->purchaseorder_model->addRevenueTax($RevenueTaxList);
|
//echo 'Revenue tax Success';
|
||||||
//echo 'Revenue tax Success';
|
|
||||||
log_message('error'," Revenue Emr-po tax Successfully . ");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($txtspl==1 || $txtspl==2)
|
if($txtspl==1 || $txtspl==2)
|
||||||
{
|
{
|
||||||
$PONOigr = $PONO;
|
|
||||||
|
//secho "cwwe";
|
||||||
|
//die();
|
||||||
|
|
||||||
|
$PONOigr = $PONO;
|
||||||
|
|
||||||
|
//echo $PONOigr;
|
||||||
|
//die();
|
||||||
|
//IGR Data Entry
|
||||||
|
//$DeliveryChellanOrInvoiceNo = $this->input->post('ChallanInvNo');
|
||||||
|
|
||||||
|
$DeliveryChellanInvoiceNo=$this->input->post('ChallanInvNo');
|
||||||
|
|
||||||
//IGR Data Entry
|
$DeliveryChellan = $this->input->post('ChallanInvDate');
|
||||||
//$DeliveryChellanOrInvoiceNo = $this->input->post('ChallanInvNo');
|
$DeliveryChellanDate = $this->getDateformat($DeliveryChellan);
|
||||||
|
|
||||||
|
$MaterialReceive = $this->input->post('MRC');
|
||||||
|
$MaterialReceivedate = $this->getDateformat($MaterialReceive);
|
||||||
|
|
||||||
$DeliveryChellanInvoiceNo=$this->input->post('ChallanInvNo');
|
$Vehicle = $this->input->post('VehicleNo');
|
||||||
|
$Courier = $this->input->post('CourierNo');
|
||||||
$DeliveryChellan = $this->input->post('ChallanInvDate');
|
|
||||||
$DeliveryChellanDate = $this->getDateformat($DeliveryChellan);
|
|
||||||
|
|
||||||
$MaterialReceive = $this->input->post('MRC');
|
|
||||||
$MaterialReceivedate = $this->getDateformat($MaterialReceive);
|
|
||||||
|
|
||||||
$Vehicle = $this->input->post('VehicleNo');
|
$CreatedBy = $this->session->userdata('userId');
|
||||||
$Courier = $this->input->post('CourierNo');
|
|
||||||
|
|
||||||
|
|
||||||
$CreatedBy = $this->session->userdata('userId');
|
$Remarksmrir='Emergency PO without Quality Check';
|
||||||
|
//$Remarks = $this->input->post('Remarks');
|
||||||
$Remarksmrir='Emergency PO without Quality Check';
|
//$RowCount = $this->input->post('TextRowCount');
|
||||||
//$Remarks = $this->input->post('Remarks');
|
//echo $RowCount;
|
||||||
//$RowCount = $this->input->post('TextRowCount');
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
//echo $RowCount;
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
|
||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$IGRStatus = IGR_CREATED;
|
||||||
|
|
||||||
$IGRStatus = IGR_CREATED;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$igr = array();
|
$igr = array();
|
||||||
$paymentstatus = NO_PAIDIGR;
|
$paymentstatus = NO_PAIDIGR;
|
||||||
$igr = array('PONO'=>$PONO,'VehicleNo'=>$Vehicle,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$DeliveryChellanDate,'CourierNo'=>$Courier,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt,'MaterialRcvdDate'=>$MaterialReceivedate,'Paymentstatus'=>$paymentstatus);
|
$igr = array('PONO'=>$PONO,'VehicleNo'=>$Vehicle,'DeliveryChellanOrInvoiceNo'=>$DeliveryChellanInvoiceNo,'DeliveryChellanDate'=>$DeliveryChellanDate,'MaterialRcvdDate'=>$DeliveryChellanDate,'CourierNo'=>$Courier,'IGRStatus'=>$IGRStatus,'CreatedBy'=>$CreatedBy,'CreatedDate' =>$createddt,'MaterialRcvdDate'=>$MaterialReceivedate,'Paymentstatus'=>$paymentstatus);
|
||||||
|
|
||||||
//print_r($igr);
|
//print_r($igr);
|
||||||
//echo "\n";
|
|
||||||
|
|
||||||
$igrM = $this->inwardgateregister_model->addigrM($igr);
|
$igrM = $this->inwardgateregister_model->addigrM($igr);
|
||||||
//$IGRNO = 'igr001';
|
|
||||||
$IGRNO = '';
|
|
||||||
if(count($igrM)>0)
|
|
||||||
{
|
|
||||||
foreach ($igrM as $key )
|
|
||||||
{
|
|
||||||
$IGRNO=$key->IGRNO;
|
|
||||||
log_message('error'," Revenue Emr-po IGR Number.".$IGRNO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($Qualitycheck==0)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
$mrirmastervalues = array('MRIRStatus'=>MRIR_APPROVED,'IGRNO'=>$IGRNO,'PONO'=>$PONO,'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt,'Remarks'=>$Remarksmrir);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$IGRNO = '';
|
||||||
|
if(count($igrM)>0)
|
||||||
|
{
|
||||||
|
foreach ($igrM as $key )
|
||||||
|
{
|
||||||
|
$IGRNO=$key->IGRNO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// echo $IGRNO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if($Qualitycheck==0)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$mrirmastervalues = array('MRIRStatus'=>MRIR_APPROVED,'IGRNO'=>$IGRNO,'PONO'=>$PONO,'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt,'Remarks'=>$Remarksmrir);
|
||||||
|
|
||||||
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
||||||
|
|
||||||
|
|
||||||
// $MRIRNO = 'MRIR001';
|
$MRIRNO = '';
|
||||||
$MRIRNO = '';
|
|
||||||
|
|
||||||
|
|
||||||
if(count($mrirmaster)>0)
|
if(count($mrirmaster)>0)
|
||||||
{
|
|
||||||
foreach ($mrirmaster as $key ) {
|
{
|
||||||
|
foreach ($mrirmaster as $key ) {
|
||||||
|
|
||||||
$MRIRNO=$key->MRIRNo; }
|
$MRIRNO=$key->MRIRNo; }
|
||||||
log_message('error'," Revenue Emr-po MRIR Number.".$MRIRNO);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$MaterialCode = $this->input->post('materialCode'.$i);
|
$MaterialCode = $this->input->post('materialCode'.$i);
|
||||||
$Quantity = $this->input->post('quantity'.$i);
|
$Quantity = $this->input->post('quantity'.$i);
|
||||||
$Remarked = "Special PO Without Quality Check";
|
|
||||||
$MRIRStatus=MRIR_APPROVED;
|
$Remarked = "Special PO Without Quality Check";
|
||||||
|
|
||||||
|
$MRIRStatus=MRIR_APPROVED;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//this array to store the value in child table..
|
//this array to store the value in child table..
|
||||||
$mrirdetailvalues = array('MRIRNO'=>$MRIRNO,'MaterialCode'=>$MaterialCode,'ActualQuantityReceived'=>$Quantity,'Remarks'=>$Remarked,'MRIRStatus'=>$MRIRStatus);
|
$mrirdetailvalues = array('MRIRNO'=>$MRIRNO,'MaterialCode'=>$MaterialCode,'ActualQuantityReceived'=>$Quantity,'Remarks'=>$Remarked,'MRIRStatus'=>$MRIRStatus);
|
||||||
|
|
||||||
// print_r($mrirdetailvalues);
|
|
||||||
// echo 'MRIRItemNo001';
|
//print_r($mrirdetailvalues);
|
||||||
$mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues);
|
//die();
|
||||||
log_message('error'," Revenue Emr-po MRIR Item Number.".$mrirdetails[0]['MRIRItemNo']);
|
|
||||||
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode));
|
$mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues);
|
||||||
// print_r($getAvailableqty);
|
|
||||||
// echo "\n get available Qty";
|
|
||||||
if(count($getAvailableqty)>0)
|
|
||||||
|
|
||||||
|
|
||||||
|
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode));
|
||||||
|
|
||||||
|
if(count($getAvailableqty)>0)
|
||||||
{
|
{
|
||||||
$avlQty = $getAvailableqty[0]['Quantity'];
|
$avlQty = $getAvailableqty[0]['Quantity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$updatStock = array('Quantity'=>($Quantity+$avlQty),'Status'=>'0','UpdatedOn'=>$createddt,'UpdatedBy'=>$CreatedBy,'Remarks'=>'Stock added for '. $MRIRNO);
|
$updatStock = array('Quantity'=>($Quantity+$avlQty),'Status'=>'0','UpdatedOn'=>$createddt,'UpdatedBy'=>$CreatedBy,'Remarks'=>'Stock added for '. $MRIRNO);
|
||||||
// print_r($updatStock);
|
|
||||||
// echo "\n updat Stock";
|
$this->mrir_model->UpdateStock($updatStock,trim($MaterialCode));
|
||||||
$this->mrir_model->UpdateStock($updatStock,trim($MaterialCode));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$IGRItemStatus = REQITEM_NEW;
|
|
||||||
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
|
||||||
{
|
|
||||||
|
$IGRItemStatus = REQITEM_NEW;
|
||||||
|
|
||||||
|
|
||||||
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
|
{
|
||||||
|
|
||||||
$MaterialCode = trim($this->input->post('materialCode'.$i));
|
$MaterialCode = trim($this->input->post('materialCode'.$i));
|
||||||
|
|
||||||
$QuantityAsPerInvoice = $this->input->post('quantity'.$i);
|
$QuantityAsPerInvoice = $this->input->post('quantity'.$i);
|
||||||
|
|
||||||
$OrderedQuantity = $this->input->post('quantity'.$i);
|
$OrderedQuantity = $this->input->post('quantity'.$i);
|
||||||
|
|
||||||
$ReceivedQty = $this->input->post('AQuantity'.$i);
|
$ReceivedQty = $this->input->post('AQuantity'.$i);
|
||||||
|
|
||||||
$emergencyitemcode = $this->input->post('emergencyitemcode');
|
$emergencyitemcode = $this->input->post('emergencyitemcode');
|
||||||
|
|
||||||
$PendingQty = 0;
|
$PendingQty = 0;
|
||||||
//echo $QuantityAsPerInvoice;
|
//echo $QuantityAsPerInvoice;
|
||||||
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
|
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
|
||||||
//echo ' ';
|
//echo ' ';
|
||||||
|
|
||||||
if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
|
if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
|
||||||
{
|
{
|
||||||
$Remarks = "Special PO Created";
|
$Remarks = "Special PO Created";
|
||||||
$ItemStatus = '';
|
$ItemStatus = '';
|
||||||
//if($QuantityAsPerInvoice == $OrderedQuantity)
|
//if($QuantityAsPerInvoice == $OrderedQuantity)
|
||||||
|
|
||||||
if($PendingQty == 0.00 )
|
if($PendingQty == 0.00 )
|
||||||
{
|
|
||||||
$ItemStatus = IGR_CREATED;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
|
||||||
}
|
|
||||||
|
|
||||||
$CreatedBy = $this->session->userdata('userId');
|
{
|
||||||
|
$ItemStatus = IGR_CREATED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$ItemStatus = POLINEITEM_IGRPARTIAL_CREATED;
|
||||||
|
}
|
||||||
|
|
||||||
|
$CreatedBy = $this->session->userdata('userId');
|
||||||
|
|
||||||
|
|
||||||
$igrDetails = array('IGRNO'=>$IGRNO,'MaterialCode'=>$MaterialCode,'QuantityAsPerInvoice'=>$QuantityAsPerInvoice,'Remarks'=>$Remarks,'IGRItemStatus'=>$IGRItemStatus,'CreatedBy'=>$CreatedBy,'CreatedDate'=>$createddt);
|
$igrDetails = array('IGRNO'=>$IGRNO,'MaterialCode'=>$MaterialCode,'QuantityAsPerInvoice'=>$QuantityAsPerInvoice,'Remarks'=>$Remarks,'IGRItemStatus'=>$IGRItemStatus,'CreatedBy'=>$CreatedBy,'CreatedDate'=>$createddt);
|
||||||
@ -940,52 +978,52 @@ $prefile =array();
|
|||||||
|
|
||||||
//print_r($igrDetails);
|
//print_r($igrDetails);
|
||||||
|
|
||||||
//echo "\n **** ";
|
|
||||||
|
|
||||||
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
$igrD = $this->inwardgateregister_model->addigrD($igrDetails);
|
||||||
|
|
||||||
//print_r($igrD);
|
|
||||||
//* ================================================== * /
|
|
||||||
//$IGRItemNo = 'IGRItemNo001';
|
//print_r($igrD);
|
||||||
|
//* ================================================== * /
|
||||||
$IGRItemNo = '';
|
$IGRItemNo = '';
|
||||||
foreach($igrD as $value)
|
foreach($igrD as $value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$IGRItemNo = $value->IGRItemNo;
|
$IGRItemNo = $value->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);
|
||||||
|
|
||||||
|
|
||||||
$MStockHistory = $this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
|
$this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
|
||||||
//print_r($MaterialstockHistoryadd);
|
//*=====================================================*/
|
||||||
log_message('error'," Revenue Emr-po Material Stock History added. count ".count($MStockHistory));
|
|
||||||
//*=====================================================*/
|
|
||||||
|
|
||||||
|
|
||||||
//*===================================================*/
|
//*===================================================*/
|
||||||
|
|
||||||
$get_pre_qty= $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
|
$get_pre_qty= $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
|
||||||
$av_qty=0;
|
$av_qty=0;
|
||||||
if(!empty($get_pre_qty))
|
if(!empty($get_pre_qty))
|
||||||
{
|
{
|
||||||
foreach($get_pre_qty as $gt)
|
foreach($get_pre_qty as $gt)
|
||||||
{
|
{
|
||||||
$av_qty=$gt->Current_stock;
|
$av_qty=$gt->Current_stock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$currentav_qty= $QuantityAsPerInvoice+$av_qty;
|
$currentav_qty= $QuantityAsPerInvoice+$av_qty;
|
||||||
|
|
||||||
|
|
||||||
$current_qty= array('Current_stock'=>$currentav_qty);
|
$current_qty= array('Current_stock'=>$currentav_qty);
|
||||||
// print_r($current_qty);
|
|
||||||
// echo "\n ****";
|
|
||||||
$mMaster = $this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
|
|
||||||
log_message('error'," Revenue Emr-po Material Master Qty added.".$mMaster);
|
|
||||||
|
|
||||||
//*==================================================*/
|
$this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//*==================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -998,115 +1036,123 @@ $prefile =array();
|
|||||||
$ReceivedQuantity=$key->ReceivedQuantity;
|
$ReceivedQuantity=$key->ReceivedQuantity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
|
$totalReceivedqty = $ReceivedQuantity + $QuantityAsPerInvoice;
|
||||||
|
|
||||||
//echo '';
|
//echo '';
|
||||||
|
|
||||||
$POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );
|
$POLineItem = array('ReceivedQuantity'=>$totalReceivedqty,'Status'=>$ItemStatus,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt );
|
||||||
|
|
||||||
$pod = $this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode);
|
$this->inwardgateregister_model->UpdatePOLineItem($POLineItem,$PONO,$MaterialCode);
|
||||||
log_message('error'," Revenue Emr-po updating PO.sub details totalReceivedqty,Status ".$totalReceivedqty." ".$ItemStatus." ".$pod);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//$myfile = array('FilePath'=>$filename);
|
|
||||||
// $emergencyitemcode = $this->input->post('emergencyitemcode'.$i);
|
|
||||||
// ($this->input->post('materialCode'.$i));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//$myfile = array('FilePath'=>$filename);
|
||||||
|
// $emergencyitemcode = $this->input->post('emergencyitemcode'.$i);
|
||||||
|
// ($this->input->post('materialCode'.$i));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$counts = $this->input->post('hidecounter');
|
$counts = $this->input->post('hidecounter');
|
||||||
$constants = $this->input->post('hideconstant');
|
$constants = $this->input->post('hideconstant');
|
||||||
|
|
||||||
|
|
||||||
// $arr = [];
|
// $arr = [];
|
||||||
|
|
||||||
// for($i=1;$i<=$constants;$i++){
|
// for($i=1;$i<=$constants;$i++){
|
||||||
// $pathname = 'browseFiles'.$i;
|
// $pathname = 'browseFiles'.$i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if(!empty($_FILES[$pathname]['name']))
|
// if(!empty($_FILES[$pathname]['name']))
|
||||||
// {
|
// {
|
||||||
// $Picture = $this->addfile($pathname);
|
// $Picture = $this->addfile($pathname);
|
||||||
// //echo $Picture;
|
// //echo $Picture;
|
||||||
// $arr[$i] = array($Picture);
|
// $arr[$i] = array($Picture);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$prefile =array();
|
$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;
|
||||||
|
|
||||||
foreach ($prefile as $value)
|
foreach ($prefile as $value)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($value == $files) $fcount++;
|
|
||||||
|
|
||||||
}
|
if($value == $files)
|
||||||
|
|
||||||
if($fcount == 0)
|
|
||||||
{
|
|
||||||
$Picture = $this->addfile($pathname);
|
|
||||||
log_message('error'," Revenue Emr-po File status ".$Picture);
|
|
||||||
$arr[] = array($Picture);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$prefile[] = $files;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($arr))
|
|
||||||
{
|
{
|
||||||
foreach($arr as $ma)
|
|
||||||
{
|
|
||||||
|
$fcount++;
|
||||||
$index = 0;
|
}
|
||||||
$filename = null;
|
|
||||||
foreach($ma as $key=>$value)
|
|
||||||
{
|
|
||||||
$index++;
|
|
||||||
if($index == 1){
|
|
||||||
$filename = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!empty($filename)){
|
|
||||||
|
|
||||||
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
|
|
||||||
//print_r($myfile);
|
|
||||||
$fileno = $this->purchaseorder_model->fileupload($myfile);
|
|
||||||
log_message('error'," Revenue Emr-po File Number.".$fileno);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($fcount == 0)
|
||||||
|
{
|
||||||
|
$Picture = $this->addfile($pathname);
|
||||||
|
//echo $Picture;
|
||||||
|
$arr[] = array($Picture);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$prefile[] = $files;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($arr))
|
||||||
|
{
|
||||||
|
foreach($arr as $ma)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$index = 0;
|
||||||
|
$filename = null;
|
||||||
|
foreach($ma as $key=>$value)
|
||||||
|
{
|
||||||
|
$index++;
|
||||||
|
if($index == 1){
|
||||||
|
$filename = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!empty($filename))
|
||||||
|
{
|
||||||
|
|
||||||
|
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
|
||||||
|
$this->purchaseorder_model->fileupload($myfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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');
|
|
||||||
|
echo "<script>alert('You Have Successfully created the Purchase order! $PONO');</script>";
|
||||||
|
redirect('purchaseorder/PurchaseOrderList','refresh');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -588,7 +588,7 @@ $prefile =array();
|
|||||||
$IGRNO=$key->IGRNO;
|
$IGRNO=$key->IGRNO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo $IGRNO;
|
//echo $IGRNO;
|
||||||
|
|
||||||
$IGRItemStatus = REQITEM_NEW;
|
$IGRItemStatus = REQITEM_NEW;
|
||||||
$TotalPendingQty = '';
|
$TotalPendingQty = '';
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -984,9 +984,12 @@ function phpAlert($msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Estimate_first = explode(".",$Estimate);
|
$Estimate_first = explode(".",$Estimate);
|
||||||
if(!is_numeric($Estimate) || (strlen((string)$Estimate))>8 || (strlen((string)$Estimate_first[0]))> 5)
|
if(!is_numeric($Estimate) || (strlen((string)$Estimate))>8 || (strlen((string)$Estimate_first[0]))> 7)
|
||||||
{
|
{
|
||||||
//echo $EmpID . "-Loan Recoverd Invalid Data!";
|
// echo $Estimate;
|
||||||
|
// print_r($Estimate_first);
|
||||||
|
|
||||||
|
// echo $EmpID . "-Loan Recoverd Invalid Data!";
|
||||||
$ErrorFlag++;
|
$ErrorFlag++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1008,6 +1011,9 @@ function phpAlert($msg) {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// echo $TotalErrorFlag;
|
||||||
|
// echo $ErrorEmpId;
|
||||||
|
// die();
|
||||||
|
|
||||||
if($TotalErrorFlag == 0)
|
if($TotalErrorFlag == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -514,8 +514,8 @@ class report extends BaseController
|
|||||||
$PO= $this->input->post('id');
|
$PO= $this->input->post('id');
|
||||||
|
|
||||||
//$PONO= substr($PO,10);
|
//$PONO= substr($PO,10);
|
||||||
$split_id = explode('-', $PO,2);
|
$split_id = explode('-', $PO,2);
|
||||||
$PONO=$split_id[1];
|
$PONO=$split_id[1];
|
||||||
$data = $this->dahsboard_Model->getfile($PONO);
|
$data = $this->dahsboard_Model->getfile($PONO);
|
||||||
|
|
||||||
// print_r( $data);die;
|
// print_r( $data);die;
|
||||||
@ -535,10 +535,8 @@ class report extends BaseController
|
|||||||
//echo $PONO; die;
|
//echo $PONO; die;
|
||||||
|
|
||||||
$igrfile= $this->dahsboard_Model->getfiles($igr,$PONO);
|
$igrfile= $this->dahsboard_Model->getfiles($igr,$PONO);
|
||||||
print_r($igrfile);
|
|
||||||
// $igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
// $igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
||||||
$billfile = $this->dahsboard_Model->viewIGRFile1($igr,$PONO);
|
$billfile = $this->dahsboard_Model->viewIGRFile1($igr,$PONO);
|
||||||
print_r($billfile);
|
|
||||||
|
|
||||||
$data = array_merge($igrfile,$billfile);
|
$data = array_merge($igrfile,$billfile);
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,6 @@ class requisitionform extends BaseController
|
|||||||
*/
|
*/
|
||||||
function requisitionlisting()
|
function requisitionlisting()
|
||||||
{
|
{
|
||||||
log_message('error'," Requisition Listing Fns Called");
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
$this->global['pageTitle'] = 'Siddharth : Requisition Listing';
|
||||||
|
|
||||||
$userID = $this->session->userdata ( 'userId' );
|
$userID = $this->session->userdata ( 'userId' );
|
||||||
@ -52,7 +51,6 @@ class requisitionform extends BaseController
|
|||||||
|
|
||||||
function requisition()
|
function requisition()
|
||||||
{
|
{
|
||||||
log_message('error'," Raise Requisition Fns Called");
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Raise Requisition';
|
$this->global['pageTitle'] = 'Siddharth : Raise Requisition';
|
||||||
|
|
||||||
$data['RequestType'] = $this->requistion_model->getConfigValue('C020');
|
$data['RequestType'] = $this->requistion_model->getConfigValue('C020');
|
||||||
@ -60,7 +58,6 @@ class requisitionform extends BaseController
|
|||||||
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
$data['EmpList'] = $this->requistion_model->getAllEmployees();
|
||||||
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
$data['ServiceOption'] = $this->requistion_model->getConfigValue('C022');
|
||||||
$userID = $this->session->userdata ( 'userId' );
|
$userID = $this->session->userdata ( 'userId' );
|
||||||
log_message('error'," Raise Requisition userId ".$userID);
|
|
||||||
|
|
||||||
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
$data['Emp'] = $this->requistion_model->getEmpIdByUserID($userID);
|
||||||
|
|
||||||
@ -355,7 +352,6 @@ class requisitionform extends BaseController
|
|||||||
function addNewRequistion()
|
function addNewRequistion()
|
||||||
{
|
{
|
||||||
|
|
||||||
log_message('error'," add new Requisition Fns Called");
|
|
||||||
$this->form_validation->set_rules('RequestType','RequestType','trim|required');
|
$this->form_validation->set_rules('RequestType','RequestType','trim|required');
|
||||||
$this->form_validation->set_rules('EmpID','EmpID','trim|required');
|
$this->form_validation->set_rules('EmpID','EmpID','trim|required');
|
||||||
|
|
||||||
@ -365,18 +361,17 @@ class requisitionform extends BaseController
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_message('error'," add new Requisition GET[ID] ".$_GET['ID']);
|
|
||||||
$Status= $_GET['ID'];
|
$Status= $_GET['ID'];
|
||||||
|
log_message('error'," add new Requisition GET[ID] ".$_GET['ID']);
|
||||||
|
|
||||||
$RequestType = strtoupper(trim($this->input->post('RequestType')));
|
$RequestType = strtoupper(trim($this->input->post('RequestType')));
|
||||||
$Requestedby = strtoupper(trim($this->input->post('EmpID')));
|
$Requestedby = strtoupper(trim($this->input->post('EmpID')));
|
||||||
log_message('error'," add new Requisition empid ".$Requestedby);
|
|
||||||
$RequestedbyDept = $this->session->userdata ( 'DEPCode' );
|
$RequestedbyDept = $this->session->userdata ( 'DEPCode' );
|
||||||
$CostCenter = $this->input->post('CostCenter');
|
$CostCenter = $this->input->post('CostCenter');
|
||||||
$CreateBy = $this->session->userdata ( 'userId' );
|
$CreateBy = $this->session->userdata ( 'userId' );
|
||||||
$UpdatedBy = $this->session->userdata ( 'userId' );
|
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
$UpdatedBy = $this->session->userdata ( 'userId' );
|
||||||
$DeletedRow = $this->input->post('txtDeletedRow');
|
$DeletedRow = $this->input->post('txtDeletedRow');
|
||||||
$RowCount = $this->input->post('txtRowCount');
|
$RowCount = $this->input->post('txtRowCount');
|
||||||
|
|
||||||
@ -439,8 +434,8 @@ class requisitionform extends BaseController
|
|||||||
$Quantity = $this->input->post('Quantity'.$i);
|
$Quantity = $this->input->post('Quantity'.$i);
|
||||||
$OtherD = $this->input->post('otherD'.$i);
|
$OtherD = $this->input->post('otherD'.$i);
|
||||||
|
|
||||||
//$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD);
|
// $ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD);
|
||||||
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD,'UpdatedBy'=>$UpdatedBy);
|
$ReqDetails = array('ReqNo'=>$ReqNumber, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'MaterialDescription'=>$OtherD,'UpdatedBy'=>$UpdatedBy);
|
||||||
$this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber);
|
$this->requistion_model->addRequistionDetails($ReqDetails,$ReqNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -131,10 +131,10 @@ where (CurrentStock+OpeningStock)<reorder";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $query=$CI->db->query($subQuery,array());
|
$query=$CI->db->query($subQuery,array());
|
||||||
//print_r($this->db->last_query());
|
//print_r($this->db->last_query());
|
||||||
|
|
||||||
return array();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -1,73 +1,73 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* InvoicePlane
|
* InvoicePlane
|
||||||
*
|
*
|
||||||
* @author InvoicePlane Developers & Contributors
|
* @author InvoicePlane Developers & Contributors
|
||||||
* @copyright Copyright (c) 2012 - 2017 InvoicePlane.com
|
* @copyright Copyright (c) 2012 - 2017 InvoicePlane.com
|
||||||
* @license https://invoiceplane.com/license.txt
|
* @license https://invoiceplane.com/license.txt
|
||||||
* @link https://invoiceplane.com
|
* @link https://invoiceplane.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function generateNewToken()
|
function generateNewToken()
|
||||||
{
|
{
|
||||||
$ch=curl_init();
|
$ch=curl_init();
|
||||||
$refresh_token = '1000.6608673cee76166874b326b8183a38ab.5fa4b2fa427fe64c5a8700f7170e3a58';
|
$refresh_token = '1000.6608673cee76166874b326b8183a38ab.5fa4b2fa427fe64c5a8700f7170e3a58';
|
||||||
$client_id = '1000.T9H4WV9XTGUJRB6HRDMQANB6VT04NH';
|
$client_id = '1000.T9H4WV9XTGUJRB6HRDMQANB6VT04NH';
|
||||||
$client_secret = '91ec3fc047493706ae9c15c086741d90ef1de3cd6c';
|
$client_secret = '91ec3fc047493706ae9c15c086741d90ef1de3cd6c';
|
||||||
$redirect_uri = 'https://sia.sidharthindustries.com/SIA/';
|
$redirect_uri = 'https://sia.sidharthindustries.com/SIA/';
|
||||||
$url_getauthtoken = 'https://accounts.zoho.com/oauth/v2/token?refresh_token='.$refresh_token.'&client_id='.$client_id.'&client_secret='.$client_secret.'&redirect_uri='.$redirect_uri.'&grant_type=refresh_token';
|
$url_getauthtoken = 'https://accounts.zoho.com/oauth/v2/token?refresh_token='.$refresh_token.'&client_id='.$client_id.'&client_secret='.$client_secret.'&redirect_uri='.$redirect_uri.'&grant_type=refresh_token';
|
||||||
$accesstoken = '1000.095b66fc95fc81874c1cfc7d15b0904e.10bc9956d9b9ec14cce1350ee0cf8254';
|
$accesstoken = '1000.095b66fc95fc81874c1cfc7d15b0904e.10bc9956d9b9ec14cce1350ee0cf8254';
|
||||||
$headers=array('Authorization:Zoho-oauthtoken '.$accesstoken,'Content-Type:application/json');
|
$headers=array('Authorization:Zoho-oauthtoken '.$accesstoken,'Content-Type:application/json');
|
||||||
curl_setopt($ch, CURLOPT_URL, $url_getauthtoken);
|
curl_setopt($ch, CURLOPT_URL, $url_getauthtoken);
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
$body = '{}';
|
$body = '{}';
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
|
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
$res_token=curl_exec($ch);
|
$res_token=curl_exec($ch);
|
||||||
$ress = json_decode($res_token);
|
$ress = json_decode($res_token);
|
||||||
return $ress->access_token;
|
return $ress->access_token;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getheringInvoiceDetails($date_today , $date_yesterday , $accesstoken)
|
function getheringInvoiceDetails($date_today , $date_yesterday , $accesstoken)
|
||||||
{
|
{
|
||||||
$ch=curl_init();
|
$ch=curl_init();
|
||||||
$organization_id = '655654572';
|
$organization_id = '655654572';
|
||||||
$url_org ="https://books.zoho.com/api/v3/invoices?";
|
$url_org ="https://books.zoho.com/api/v3/invoices?";
|
||||||
$fields=array("usestate" => "true","organization_id" => $organization_id,"date_start" => $date_yesterday,"date_end" => $date_today);
|
$fields=array("usestate" => "true","organization_id" => $organization_id,"date_start" => $date_yesterday,"date_end" => $date_today);
|
||||||
$data_all = http_build_query($fields);
|
$data_all = http_build_query($fields);
|
||||||
$headers=array('Authorization:Zoho-oauthtoken '.$accesstoken,'Content-Type:application/json');
|
$headers=array('Authorization:Zoho-oauthtoken '.$accesstoken,'Content-Type:application/json');
|
||||||
$data_access = $url_org.$data_all;
|
$data_access = $url_org.$data_all;
|
||||||
curl_setopt($ch, CURLOPT_URL, $url_org.$data_access);
|
curl_setopt($ch, CURLOPT_URL, $url_org.$data_access);
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
$body = '{}';
|
$body = '{}';
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
|
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
$result=curl_exec($ch);
|
$result=curl_exec($ch);
|
||||||
$data['headers_new'] = $headers;
|
$data['headers_new'] = $headers;
|
||||||
$data['data'] = curl_exec($ch);
|
$data['data'] = curl_exec($ch);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getheringInvoiceSubDetails($invoice_id , $organization_id , $headers)
|
function getheringInvoiceSubDetails($invoice_id , $organization_id , $headers)
|
||||||
{
|
{
|
||||||
$ch=curl_init();
|
$ch=curl_init();
|
||||||
$url2 = 'https://books.zoho.com/api/v3/invoices/'.$invoice_id.'?organization_id='.$organization_id;
|
$url2 = 'https://books.zoho.com/api/v3/invoices/'.$invoice_id.'?organization_id='.$organization_id;
|
||||||
curl_setopt($ch, CURLOPT_URL, $url2);
|
curl_setopt($ch, CURLOPT_URL, $url2);
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
$body2 = '{}';
|
$body2 = '{}';
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS,$body2);
|
curl_setopt($ch, CURLOPT_POSTFIELDS,$body2);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
return curl_exec($ch);
|
return curl_exec($ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,176 +1,176 @@
|
|||||||
<?php defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' );
|
<?php defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class : BaseController
|
* Class : BaseController
|
||||||
* Base Class to control over all the classes
|
* Base Class to control over all the classes
|
||||||
* @author : Kishor Mali
|
* @author : Kishor Mali
|
||||||
* @version : 1.1
|
* @version : 1.1
|
||||||
* @since : 15 November 2016
|
* @since : 15 November 2016
|
||||||
*/
|
*/
|
||||||
class BaseController extends CI_Controller {
|
class BaseController extends CI_Controller {
|
||||||
protected $role = '';
|
protected $role = '';
|
||||||
protected $vendorId = '';
|
protected $vendorId = '';
|
||||||
protected $name = '';
|
protected $name = '';
|
||||||
protected $Designation = '';
|
protected $Designation = '';
|
||||||
protected $DEPCode = '';
|
protected $DEPCode = '';
|
||||||
protected $HeadDept = '';
|
protected $HeadDept = '';
|
||||||
protected $DepartmentName = '';
|
protected $DepartmentName = '';
|
||||||
protected $roleText = '';
|
protected $roleText = '';
|
||||||
protected $global = array ();
|
protected $global = array ();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes mixed data and optionally a status code, then creates the response
|
* Takes mixed data and optionally a status code, then creates the response
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array|NULL $data
|
* @param array|NULL $data
|
||||||
* Data to output to the user
|
* Data to output to the user
|
||||||
* running the script; otherwise, exit
|
* running the script; otherwise, exit
|
||||||
*/
|
*/
|
||||||
public function response($data = NULL) {
|
public function response($data = NULL) {
|
||||||
$this->output->set_status_header ( 200 )->set_content_type ( 'application/json', 'utf-8' )->set_output ( json_encode ( $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) )->_display ();
|
$this->output->set_status_header ( 200 )->set_content_type ( 'application/json', 'utf-8' )->set_output ( json_encode ( $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) )->_display ();
|
||||||
exit ();
|
exit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to check the user is logged in or not
|
* This function used to check the user is logged in or not
|
||||||
*/
|
*/
|
||||||
function isLoggedIn() {
|
function isLoggedIn() {
|
||||||
$isLoggedIn = $this->session->userdata ( 'isLoggedIn' );
|
$isLoggedIn = $this->session->userdata ( 'isLoggedIn' );
|
||||||
|
|
||||||
if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) {
|
if (! isset ( $isLoggedIn ) || $isLoggedIn != TRUE) {
|
||||||
$this->load->library('uri');
|
$this->load->library('uri');
|
||||||
if ($this->uri->segment(2) == 'zohobooks_api_fetch_all') {
|
if ($this->uri->segment(2) == 'zohobooks_api_fetch_all') {
|
||||||
redirect('login/zohobooks_api_fetch_all');
|
redirect('login/zohobooks_api_fetch_all');
|
||||||
}
|
}
|
||||||
redirect ( 'login' );
|
redirect ( 'login' );
|
||||||
} else {
|
} else {
|
||||||
$this->role = $this->session->userdata ( 'role' );
|
$this->role = $this->session->userdata ( 'role' );
|
||||||
// print_r($this->role);die();
|
// print_r($this->role);die();
|
||||||
// session_start();
|
// session_start();
|
||||||
log_message('ERROR','#####In BaseController - isLoggedIn function ci session : ' . $this->session->userdata ( 'name' ));
|
log_message('ERROR','#####In BaseController - isLoggedIn function ci session : ' . $this->session->userdata ( 'name' ));
|
||||||
// log_message('ERR?OR','#####In BaseController - isLoggedIn function session super global methid : ' . $_SESSION['name']);
|
// log_message('ERR?OR','#####In BaseController - isLoggedIn function session super global methid : ' . $_SESSION['name']);
|
||||||
$this->vendorId = $this->session->userdata ( 'userId' );
|
$this->vendorId = $this->session->userdata ( 'userId' );
|
||||||
$this->name = $this->session->userdata ( 'name' );
|
$this->name = $this->session->userdata ( 'name' );
|
||||||
$this->roleText = $this->session->userdata ( 'roleText' );
|
$this->roleText = $this->session->userdata ( 'roleText' );
|
||||||
//$this->Designation = $this->session->userdata ( 'Designation' );
|
//$this->Designation = $this->session->userdata ( 'Designation' );
|
||||||
$this->DEPCode = $this->session->userdata ( 'DEPCode' );
|
$this->DEPCode = $this->session->userdata ( 'DEPCode' );
|
||||||
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
$this->HeadDept = $this->session->userdata ( 'HeadDept' );
|
||||||
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
$this->DepartmentName = $this->session->userdata ( 'DepartmentName' );
|
||||||
$this->EmpID = $this->session->userdata ( 'EmpID' );
|
$this->EmpID = $this->session->userdata ( 'EmpID' );
|
||||||
$this->depaccess = $this->session->userdata ('depaccess');
|
$this->depaccess = $this->session->userdata ('depaccess');
|
||||||
$this->global ['name'] = $this->name;
|
$this->global ['name'] = $this->name;
|
||||||
$this->global ['role'] = $this->role;
|
$this->global ['role'] = $this->role;
|
||||||
$this->global ['role_text'] = $this->roleText;
|
$this->global ['role_text'] = $this->roleText;
|
||||||
$this->global ['DEPCode'] = $this->DEPCode;
|
$this->global ['DEPCode'] = $this->DEPCode;
|
||||||
$this->global ['Designation'] = $this->Designation;
|
$this->global ['Designation'] = $this->Designation;
|
||||||
$this->global ['DepAccesslist'] = $this->depaccess;
|
$this->global ['DepAccesslist'] = $this->depaccess;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to check the access
|
* This function is used to check the access
|
||||||
*/
|
*/
|
||||||
function isAdmin() {
|
function isAdmin() {
|
||||||
if ($this->role != ROLE_ADMIN) {
|
if ($this->role != ROLE_ADMIN) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to check the access
|
* This function is used to check the access
|
||||||
*/
|
*/
|
||||||
function isTicketter() {
|
function isTicketter() {
|
||||||
if ($this->role != ROLE_ADMIN || $this->role != ROLE_MANAGER) {
|
if ($this->role != ROLE_ADMIN || $this->role != ROLE_MANAGER) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to load the set of views
|
* This function is used to load the set of views
|
||||||
*/
|
*/
|
||||||
function loadThis() {
|
function loadThis() {
|
||||||
$this->global ['pageTitle'] = 'CodeInsect : Access Denied';
|
$this->global ['pageTitle'] = 'CodeInsect : Access Denied';
|
||||||
|
|
||||||
$this->load->view ( 'includes/header', $this->global );
|
$this->load->view ( 'includes/header', $this->global );
|
||||||
$this->load->view ( 'access' );
|
$this->load->view ( 'access' );
|
||||||
$this->load->view ( 'includes/footer' );
|
$this->load->view ( 'includes/footer' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to logged out user from system
|
* This function is used to logged out user from system
|
||||||
*/
|
*/
|
||||||
function logout() {
|
function logout() {
|
||||||
ob_start();
|
ob_start();
|
||||||
$this->load->driver('cache');
|
$this->load->driver('cache');
|
||||||
$this->session->set_userdata();
|
$this->session->set_userdata();
|
||||||
delete_cookie('ci_session');
|
delete_cookie('ci_session');
|
||||||
//$this->session->userdata = array('test' => 'tst');
|
//$this->session->userdata = array('test' => 'tst');
|
||||||
$this->session->sess_destroy();
|
$this->session->sess_destroy();
|
||||||
$this->cache->clean();
|
$this->cache->clean();
|
||||||
ob_clean();
|
ob_clean();
|
||||||
redirect ( 'login' );
|
redirect ( 'login' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to load views
|
* This function used to load views
|
||||||
* @param {string} $viewName : This is view name
|
* @param {string} $viewName : This is view name
|
||||||
* @param {mixed} $headerInfo : This is array of header information
|
* @param {mixed} $headerInfo : This is array of header information
|
||||||
* @param {mixed} $pageInfo : This is array of page information
|
* @param {mixed} $pageInfo : This is array of page information
|
||||||
* @param {mixed} $footerInfo : This is array of footer information
|
* @param {mixed} $footerInfo : This is array of footer information
|
||||||
* @return {null} $result : null
|
* @return {null} $result : null
|
||||||
*/
|
*/
|
||||||
function loadViews($viewName = "", $headerInfo = NULL, $pageInfo = NULL, $footerInfo = NULL){
|
function loadViews($viewName = "", $headerInfo = NULL, $pageInfo = NULL, $footerInfo = NULL){
|
||||||
|
|
||||||
$this->load->view('includes/header', $headerInfo);
|
$this->load->view('includes/header', $headerInfo);
|
||||||
$this->load->view($viewName, $pageInfo);
|
$this->load->view($viewName, $pageInfo);
|
||||||
$this->load->view('includes/footer', $footerInfo);
|
$this->load->view('includes/footer', $footerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used provide the pagination resources
|
* This function used provide the pagination resources
|
||||||
* @param {string} $link : This is page link
|
* @param {string} $link : This is page link
|
||||||
* @param {number} $count : This is page count
|
* @param {number} $count : This is page count
|
||||||
* @param {number} $perPage : This is records per page limit
|
* @param {number} $perPage : This is records per page limit
|
||||||
* @return {mixed} $result : This is array of records and pagination data
|
* @return {mixed} $result : This is array of records and pagination data
|
||||||
*/
|
*/
|
||||||
function paginationCompress($link, $count, $perPage = 10) {
|
function paginationCompress($link, $count, $perPage = 10) {
|
||||||
$this->load->library ( 'pagination' );
|
$this->load->library ( 'pagination' );
|
||||||
|
|
||||||
$config ['base_url'] = base_url () . $link;
|
$config ['base_url'] = base_url () . $link;
|
||||||
$config ['total_rows'] = $count;
|
$config ['total_rows'] = $count;
|
||||||
$config ['uri_segment'] = SEGMENT;
|
$config ['uri_segment'] = SEGMENT;
|
||||||
$config ['per_page'] = $perPage;
|
$config ['per_page'] = $perPage;
|
||||||
$config ['num_links'] = 5;
|
$config ['num_links'] = 5;
|
||||||
$config ['full_tag_open'] = '<nav><ul class="pagination">';
|
$config ['full_tag_open'] = '<nav><ul class="pagination">';
|
||||||
$config ['full_tag_close'] = '</ul></nav>';
|
$config ['full_tag_close'] = '</ul></nav>';
|
||||||
$config ['first_tag_open'] = '<li class="arrow">';
|
$config ['first_tag_open'] = '<li class="arrow">';
|
||||||
$config ['first_link'] = 'First';
|
$config ['first_link'] = 'First';
|
||||||
$config ['first_tag_close'] = '</li>';
|
$config ['first_tag_close'] = '</li>';
|
||||||
$config ['prev_link'] = 'Previous';
|
$config ['prev_link'] = 'Previous';
|
||||||
$config ['prev_tag_open'] = '<li class="arrow">';
|
$config ['prev_tag_open'] = '<li class="arrow">';
|
||||||
$config ['prev_tag_close'] = '</li>';
|
$config ['prev_tag_close'] = '</li>';
|
||||||
$config ['next_link'] = 'Next';
|
$config ['next_link'] = 'Next';
|
||||||
$config ['next_tag_open'] = '<li class="arrow">';
|
$config ['next_tag_open'] = '<li class="arrow">';
|
||||||
$config ['next_tag_close'] = '</li>';
|
$config ['next_tag_close'] = '</li>';
|
||||||
$config ['cur_tag_open'] = '<li class="active"><a href="#">';
|
$config ['cur_tag_open'] = '<li class="active"><a href="#">';
|
||||||
$config ['cur_tag_close'] = '</a></li>';
|
$config ['cur_tag_close'] = '</a></li>';
|
||||||
$config ['num_tag_open'] = '<li>';
|
$config ['num_tag_open'] = '<li>';
|
||||||
$config ['num_tag_close'] = '</li>';
|
$config ['num_tag_close'] = '</li>';
|
||||||
$config ['last_tag_open'] = '<li class="arrow">';
|
$config ['last_tag_open'] = '<li class="arrow">';
|
||||||
$config ['last_link'] = 'Last';
|
$config ['last_link'] = 'Last';
|
||||||
$config ['last_tag_close'] = '</li>';
|
$config ['last_tag_close'] = '</li>';
|
||||||
|
|
||||||
$this->pagination->initialize ( $config );
|
$this->pagination->initialize ( $config );
|
||||||
$page = $config ['per_page'];
|
$page = $config ['per_page'];
|
||||||
$segment = $this->uri->segment ( SEGMENT );
|
$segment = $this->uri->segment ( SEGMENT );
|
||||||
|
|
||||||
return array (
|
return array (
|
||||||
"page" => $page,
|
"page" => $page,
|
||||||
"segment" => $segment
|
"segment" => $segment
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,194 +1,194 @@
|
|||||||
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
||||||
|
|
||||||
class configmodel extends CI_Model
|
class configmodel extends CI_Model
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to get the user listing count
|
* This function is used to get the user listing count
|
||||||
* @param string $searchText : This is optional search text
|
* @param string $searchText : This is optional search text
|
||||||
* @param number $page : This is pagination offset
|
* @param number $page : This is pagination offset
|
||||||
* @param number $segment : This is pagination limit
|
* @param number $segment : This is pagination limit
|
||||||
* @return array $result : This is result
|
* @return array $result : This is result
|
||||||
*/
|
*/
|
||||||
function Configlisting()
|
function Configlisting()
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->select('Config.Config_ID, Config.ConfigName ,Config.Comments,Config.CreatedDate');
|
$this->db->select('Config.Config_ID, Config.ConfigName ,Config.Comments,Config.CreatedDate');
|
||||||
$this->db->from('T_ConfigMaster as Config');
|
$this->db->from('T_ConfigMaster as Config');
|
||||||
// $this->db->join('t_configdetails as Con','Con.Config_ID=Config.Config_ID');
|
// $this->db->join('t_configdetails as Con','Con.Config_ID=Config.Config_ID');
|
||||||
$this->db->order_by('Config.CreatedDate','desc');
|
$this->db->order_by('Config.CreatedDate','desc');
|
||||||
//$this->db->order_by('hourlyid','desc');
|
//$this->db->order_by('hourlyid','desc');
|
||||||
|
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
$result = $query->result();
|
$result = $query->result();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This function used to get user information by id
|
* This function used to get user information by id
|
||||||
* @param number $userId : This is user id
|
* @param number $userId : This is user id
|
||||||
* @return array $result : This is user information
|
* @return array $result : This is user information
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function addconfigmaster($config)
|
function addconfigmaster($config)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
$this->db->insert('T_ConfigMaster', $config);
|
$this->db->insert('T_ConfigMaster', $config);
|
||||||
|
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
|
|
||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
|
|
||||||
//return $insert_id;
|
//return $insert_id;
|
||||||
$sql='SELECT Config_ID as Config_ID FROM T_ConfigMaster Order by CreatedDate desc limit 1';
|
$sql='SELECT Config_ID as Config_ID FROM T_ConfigMaster Order by CreatedDate desc limit 1';
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
return $res->result_array();
|
return $res->result_array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function addconfigdetails($configvalue)
|
function addconfigdetails($configvalue)
|
||||||
{
|
{
|
||||||
//print_r($configvalue);
|
//print_r($configvalue);
|
||||||
// $this->db->trans_start();
|
// $this->db->trans_start();
|
||||||
$this->db->insert('T_ConfigDetails', $configvalue);
|
$this->db->insert('T_ConfigDetails', $configvalue);
|
||||||
|
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
|
|
||||||
// $this->db->trans_complete();
|
// $this->db->trans_complete();
|
||||||
// print_r( $this->db->last_query());
|
// print_r( $this->db->last_query());
|
||||||
//print_r ($insert_id);die();
|
//print_r ($insert_id);die();
|
||||||
return $insert_id;
|
return $insert_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* This function used to Department list which is not available in the Costcenter master
|
/* This function used to Department list which is not available in the Costcenter master
|
||||||
* @param number $CostCenterCode : CostCenterCode as Parameter
|
* @param number $CostCenterCode : CostCenterCode as Parameter
|
||||||
* @return array $result : This is user information
|
* @return array $result : This is user information
|
||||||
*/
|
*/
|
||||||
function GetBudgetTypeNotinCostCenter($CostCenterCode,$ConfigID)
|
function GetBudgetTypeNotinCostCenter($CostCenterCode,$ConfigID)
|
||||||
{
|
{
|
||||||
|
|
||||||
$subQuery = 'select ConfigValue from T_ConfigDetails Bud where ConfigValue not in
|
$subQuery = 'select ConfigValue from T_ConfigDetails Bud where ConfigValue not in
|
||||||
(select BudgetType from T_CostCenter_Budget where CostCenterCode=? and BudgetYear=(select max(BudgetYear) from T_CostCenter_Budget)) and Config_ID=?';
|
(select BudgetType from T_CostCenter_Budget where CostCenterCode=? and BudgetYear=(select max(BudgetYear) from T_CostCenter_Budget)) and Config_ID=?';
|
||||||
|
|
||||||
$query = $this->db->query($subQuery, array($CostCenterCode,$ConfigID));
|
$query = $this->db->query($subQuery, array($CostCenterCode,$ConfigID));
|
||||||
|
|
||||||
// print_r($this->db->last_query());
|
// print_r($this->db->last_query());
|
||||||
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetConfigCenterMaster($ConfigID='')
|
function GetConfigCenterMaster($ConfigID='')
|
||||||
{
|
{
|
||||||
//echo $ConfigID ;die();
|
//echo $ConfigID ;die();
|
||||||
$this->db->select('*' );
|
$this->db->select('*' );
|
||||||
$this->db->from('T_ConfigMaster ');
|
$this->db->from('T_ConfigMaster ');
|
||||||
//$this->db->join('T_ConfigDetails con','con.Config_ID = COM.Config_ID','left');
|
//$this->db->join('T_ConfigDetails con','con.Config_ID = COM.Config_ID','left');
|
||||||
$this->db->where('Config_ID', $ConfigID);
|
$this->db->where('Config_ID', $ConfigID);
|
||||||
|
|
||||||
|
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetConfigCenterDetails($ConfigID='')
|
function GetConfigCenterDetails($ConfigID='')
|
||||||
{
|
{
|
||||||
//echo $ConfigID ;die();
|
//echo $ConfigID ;die();
|
||||||
$this->db->select('*' );
|
$this->db->select('*' );
|
||||||
$this->db->from('T_ConfigMaster COM');
|
$this->db->from('T_ConfigMaster COM');
|
||||||
$this->db->join('T_ConfigDetails con','con.Config_ID = COM.Config_ID','left');
|
$this->db->join('T_ConfigDetails con','con.Config_ID = COM.Config_ID','left');
|
||||||
|
|
||||||
$this->db->where('COM.Config_ID', $ConfigID);
|
$this->db->where('COM.Config_ID', $ConfigID);
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function updateconfig($config,$Configid)
|
function updateconfig($config,$Configid)
|
||||||
{
|
{
|
||||||
$this->db->where('Config_ID', $Configid);
|
$this->db->where('Config_ID', $Configid);
|
||||||
|
|
||||||
$this->db->update('T_ConfigMaster', $config);
|
$this->db->update('T_ConfigMaster', $config);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
function updateconfigvalue($configval,$Key)
|
function updateconfigvalue($configval,$Key)
|
||||||
{
|
{
|
||||||
$this->db->where('Key', $Key);
|
$this->db->where('Key', $Key);
|
||||||
|
|
||||||
$this->db->update('T_ConfigDetails', $configval);
|
$this->db->update('T_ConfigDetails', $configval);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function EditBudget($Budget)
|
function EditBudget($Budget)
|
||||||
{
|
{
|
||||||
$this->db->trans_start();
|
$this->db->trans_start();
|
||||||
$this->db->insert('T_CostCenter_Budget', $Budget);
|
$this->db->insert('T_CostCenter_Budget', $Budget);
|
||||||
|
|
||||||
$insert_id = $this->db->affected_rows();
|
$insert_id = $this->db->affected_rows();
|
||||||
|
|
||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
// print_r( $this->db->last_query());
|
// print_r( $this->db->last_query());
|
||||||
return $insert_id;
|
return $insert_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function DeleteBudget($BudgetType='',$BudgetYear='',$CostCenterCode ='')
|
function DeleteBudget($BudgetType='',$BudgetYear='',$CostCenterCode ='')
|
||||||
{
|
{
|
||||||
$this->db->where("BudgetType", $BudgetType);
|
$this->db->where("BudgetType", $BudgetType);
|
||||||
$this->db->where("BudgetYear", $BudgetYear);
|
$this->db->where("BudgetYear", $BudgetYear);
|
||||||
$this->db->where("CostCenterCode", $CostCenterCode);
|
$this->db->where("CostCenterCode", $CostCenterCode);
|
||||||
$this->db->delete('T_CostCenter_Budget');
|
$this->db->delete('T_CostCenter_Budget');
|
||||||
//print_r( $this->db->last_query());
|
//print_r( $this->db->last_query());
|
||||||
}
|
}
|
||||||
|
|
||||||
function DeleteDepartment($DepCode='',$CostCode='')
|
function DeleteDepartment($DepCode='',$CostCode='')
|
||||||
{
|
{
|
||||||
$this->db->where("DEPCode", $DepCode);
|
$this->db->where("DEPCode", $DepCode);
|
||||||
$this->db->where("CostCenterCode", $CostCode);
|
$this->db->where("CostCenterCode", $CostCode);
|
||||||
$this->db->delete('T_CostCenter_Departments');
|
$this->db->delete('T_CostCenter_Departments');
|
||||||
//print_r( $this->db->last_query());
|
//print_r( $this->db->last_query());
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkDeptCostExists($DepCode='',$CostCode='')
|
function checkDeptCostExists($DepCode='',$CostCode='')
|
||||||
{
|
{
|
||||||
$this->db->select('CostCenterCode,DEPCode');
|
$this->db->select('CostCenterCode,DEPCode');
|
||||||
$this->db->from('T_CostCenter_Departments');
|
$this->db->from('T_CostCenter_Departments');
|
||||||
$this->db->where('DEPCode',$DepCode);
|
$this->db->where('DEPCode',$DepCode);
|
||||||
$this->db->where('CostCenterCode',$CostCode);
|
$this->db->where('CostCenterCode',$CostCode);
|
||||||
|
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
|
||||||
if ($query->num_rows > 0) {
|
if ($query->num_rows > 0) {
|
||||||
return $query->result_array();
|
return $query->result_array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is used to get the Config value from configuration table
|
* This function is used to get the Config value from configuration table
|
||||||
* @return array $result : This is result of the query
|
* @return array $result : This is result of the query
|
||||||
*/
|
*/
|
||||||
function getConfigValue($ConfigID )
|
function getConfigValue($ConfigID )
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db->select('ConfigValue');
|
$this->db->select('ConfigValue');
|
||||||
$this->db->from('T_ConfigDetails');
|
$this->db->from('T_ConfigDetails');
|
||||||
$this->db->where('Config_id ',$ConfigID );
|
$this->db->where('Config_id ',$ConfigID );
|
||||||
$query = $this->db->get();
|
$query = $this->db->get();
|
||||||
|
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -1772,10 +1772,10 @@ if ($cname!= ''){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.=" group by pono,igrn";
|
$sql.="group by pono,igrn";
|
||||||
// echo $m;
|
// echo $m;
|
||||||
// echo $sid;
|
// echo $sid;
|
||||||
// echo $sql;exit;
|
//echo $sql;
|
||||||
$query = $this->db->query($sql);
|
$query = $this->db->query($sql);
|
||||||
|
|
||||||
$filequery = $query->result();
|
$filequery = $query->result();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -189,8 +189,7 @@ TMD.QuantityRejected,ST.StatusName,TMD.Remarks,AdvanceAmount ');
|
|||||||
|
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
// $subQuery = 'select max(MRIRNO) as MRIRNo from T_MRIR_Master';
|
$subQuery = 'select max(MRIRNO) as MRIRNo from T_MRIR_Master';
|
||||||
$subQuery = 'select MRIRNO from T_MRIR_Master order by Createdon desc limit 1';
|
|
||||||
$query = $this->db->query($subQuery);
|
$query = $this->db->query($subQuery);
|
||||||
return $query->result();//_array();
|
return $query->result();//_array();
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -451,8 +451,7 @@ function purchaseorderListing($forwhat='')
|
|||||||
// print_r($this->db->last_query());
|
// print_r($this->db->last_query());
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
// $subQuery = 'select max(PONO) as PONO from T_PurchaseOrder_Master';
|
$subQuery = 'select max(PONO) as PONO from T_PurchaseOrder_Master';
|
||||||
$subQuery = 'select PONO from T_PurchaseOrder_Master order by CreatedDate desc limit 1';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery);
|
$query = $this->db->query($subQuery);
|
||||||
|
|
||||||
@ -491,8 +490,7 @@ function purchaseorderListing($forwhat='')
|
|||||||
// print_r($this->db->last_query());
|
// print_r($this->db->last_query());
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
//$subQuery = 'select max(LineItemNo) as LineItemNo from T_PurchaseOrder_LineItem';
|
$subQuery = 'select max(LineItemNo) as LineItemNo from T_PurchaseOrder_LineItem';
|
||||||
$subQuery = 'select LineItemNo from T_PurchaseOrder_LineItem order by CreatedDate desc limit 1';
|
|
||||||
|
|
||||||
$query = $this->db->query($subQuery);
|
$query = $this->db->query($subQuery);
|
||||||
|
|
||||||
|
|||||||
@ -547,4 +547,4 @@ ifnull(Po.Quantity,0) as POQTY,sta.StatusName
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -350,7 +350,7 @@ class requistion_model extends CI_Model
|
|||||||
$this->db->trans_complete();
|
$this->db->trans_complete();
|
||||||
if($insert_id>0)
|
if($insert_id>0)
|
||||||
{
|
{
|
||||||
$subQuery = 'select ReqNo from T_Requestion_Master order by CreatedDate desc limit 1';
|
$subQuery = 'select max(ReqNo) as ReqNo from T_Requestion_Master';
|
||||||
|
|
||||||
$query = $this->db->query($subQuery);
|
$query = $this->db->query($subQuery);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
78
application/models/zohobook_api_model.php
Normal file
78
application/models/zohobook_api_model.php
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
class Zohobook_api_model extends CI_Model {
|
||||||
|
|
||||||
|
public function ip_tax_rates($gst)
|
||||||
|
{
|
||||||
|
$this->db->select();
|
||||||
|
$this->db->from('ip_tax_rates');
|
||||||
|
$this->db->where('tax_rate_percent', $gst);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$query = $query->result_array();
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ip_clients($gst_no)
|
||||||
|
{
|
||||||
|
$this->db->select();
|
||||||
|
$this->db->from('ip_clients');
|
||||||
|
$this->db->where('client_tax_code', $gst_no);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$query = $query->result_array();
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ip_products($sku)
|
||||||
|
{
|
||||||
|
$this->db->select();
|
||||||
|
$this->db->from('ip_products');
|
||||||
|
$this->db->where('sku', $sku);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$query = $query->result_array();
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function ip_invoices($invoice_number , $invoice_date)
|
||||||
|
{
|
||||||
|
$this->db->select();
|
||||||
|
$this->db->from('ip_invoices');
|
||||||
|
$this->db->where('invoice_number', $invoice_number);
|
||||||
|
$this->db->where('invoice_date_created', $invoice_date);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$query = $query->num_rows();
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function insert($data,$table)
|
||||||
|
{
|
||||||
|
$this->db->insert($table,$data);
|
||||||
|
return $this->db->insert_id();
|
||||||
|
}
|
||||||
|
|
||||||
|
function sql_invoice_update($action, $invoice_number, $invoice_date_created ,$table)
|
||||||
|
{
|
||||||
|
// echo 'model';
|
||||||
|
// print_r($action);
|
||||||
|
// echo '<br>';
|
||||||
|
$this->db->where('invoice_number',$invoice_number);
|
||||||
|
$this->db->where('invoice_date_created',$invoice_date_created);
|
||||||
|
$this->db->update($table,$action);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_data($table ,$col_name ,$id)
|
||||||
|
{
|
||||||
|
$this->db->select();
|
||||||
|
$this->db->from($table);
|
||||||
|
$this->db->where($col_name , $id);
|
||||||
|
$query = $this->db->get();
|
||||||
|
$query = $query->result_array();
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
function update($action,$id,$table){
|
||||||
|
$this->db->where('id',$id);
|
||||||
|
$this->db->update($table,$action);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,170 +1,170 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
//print_r($records);
|
//print_r($records);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Product Test Reports List</center>
|
<center>Product Test Reports List</center>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div id="loader_wrapper" style="display:none;">
|
<div id="loader_wrapper" style="display:none;">
|
||||||
<div id="loadingDiv" style="height: 120%;position: absolute;width: 100%;top: 0px;background: white;text-align: center;z-index: 9999999999999999999999999999999999;left: -0px;">
|
<div id="loadingDiv" style="height: 120%;position: absolute;width: 100%;top: 0px;background: white;text-align: center;z-index: 9999999999999999999999999999999999;left: -0px;">
|
||||||
|
|
||||||
<div style="position: relative;top:200px" id="load-img">
|
<div style="position: relative;top:200px" id="load-img">
|
||||||
|
|
||||||
<img src="<?php echo base_url();?>uploads/spinner.gif" class="img-fluid">
|
<img src="<?php echo base_url();?>uploads/spinner.gif" class="img-fluid">
|
||||||
<h3>Syncing with zoho books...</h3>
|
<h3>Syncing with zoho books...</h3>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<!--<center><h3 class="box-title">-->
|
<!--<center><h3 class="box-title">-->
|
||||||
<div class="box-tools">
|
<div class="box-tools">
|
||||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<a href=" <?php echo base_url().'quality/report';?> " type="button" class="btn btn-primary">Add New</a>
|
<a href=" <?php echo base_url().'quality/report';?> " type="button" class="btn btn-primary">Add New</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 col-md-offset-1" style="margin-bottom:2px">
|
<div class="col-md-3 col-md-offset-1" style="margin-bottom:2px">
|
||||||
<a href=" javascript:void(0)" type="button" class="btn btn-primary" onclick="synczohobooks()">Sync With Zoho Books</a>
|
<a href=" javascript:void(0)" type="button" class="btn btn-primary" onclick="synczohobooks()">Sync With Zoho Books</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div><!--</h3></center>-->
|
</div><!--</h3></center>-->
|
||||||
|
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
|
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
<!-- <div class="row">
|
<!-- <div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<?php echo form_dropdown('name="product"',$products2,set_value('product',$products2[-1]),'id="product"' ,'class="form-control select2');?>
|
<?php echo form_dropdown('name="product"',$products2,set_value('product',$products2[-1]),'id="product"' ,'class="form-control select2');?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<?php echo form_dropdown('name="customer"',$customers2,set_value('customer',$customers2[-1]),'id="customer"' ,'class="form-control select2');?>
|
<?php echo form_dropdown('name="customer"',$customers2,set_value('customer',$customers2[-1]),'id="customer"' ,'class="form-control select2');?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="button" id="addspec" class="btn btn-primary" value = "Add New Specification">
|
<input type="button" id="addspec" class="btn btn-primary" value = "Add New Specification">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
<br/>
|
<br/>
|
||||||
<table id="testspecifications" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
<table id="testspecifications" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color:#ddf">
|
<thead style="background-color:#ddf">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>Test Report ID</th>
|
<th>Test Report ID</th>
|
||||||
<th>Invoice ID</th>
|
<th>Invoice ID</th>
|
||||||
<th>Batch Date</th>
|
<th>Batch Date</th>
|
||||||
<th>Product Name</th>
|
<th>Product Name</th>
|
||||||
<th>Customer Name</th>
|
<th>Customer Name</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="specAppend">
|
<tbody id="specAppend">
|
||||||
<?php
|
<?php
|
||||||
if(!empty($records))
|
if(!empty($records))
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach($records as $data)
|
foreach($records as $data)
|
||||||
{
|
{
|
||||||
|
|
||||||
//print_r($data);echo "</br></br>";
|
//print_r($data);echo "</br></br>";
|
||||||
?>
|
?>
|
||||||
<tr> <td><a href="<?php echo base_url()?>quality/viewIndReport/<?php echo $data->testreport_id ?>"><?php echo $data->testreport_id?></a>
|
<tr> <td><a href="<?php echo base_url()?>quality/viewIndReport/<?php echo $data->testreport_id ?>"><?php echo $data->testreport_id?></a>
|
||||||
<?php if(!empty($data->document)){?>
|
<?php if(!empty($data->document)){?>
|
||||||
<a target="_blank" href="<?php echo base_url()?>uploads/QAD/<?php echo $data->document ?>"><span class="fa fa-file-o"></span></a>
|
<a target="_blank" href="<?php echo base_url()?>uploads/QAD/<?php echo $data->document ?>"><span class="fa fa-file-o"></span></a>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</td> <td><?php echo $data->invoiceid?></td> <td style="text-align:right;"><?php echo date_format(date_create($data->batchdate),'d-m-Y');?></td><td><?php echo $data->product_name;?></td><td><?php echo $data->client_name;?></td></tr>
|
</td> <td><?php echo $data->invoiceid?></td> <td style="text-align:right;"><?php echo date_format(date_create($data->batchdate),'d-m-Y');?></td><td><?php echo $data->product_name;?></td><td><?php echo $data->client_name;?></td></tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
<!-- <div class="box-footer clearfix">
|
<!-- <div class="box-footer clearfix">
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
$.fn.dataTable.moment( 'DD-MM-YYYY' );
|
||||||
$('#testspecifications').DataTable({
|
$('#testspecifications').DataTable({
|
||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
//"columnDefs" : [{"targets":2, "type":"date-eu"}],
|
//"columnDefs" : [{"targets":2, "type":"date-eu"}],
|
||||||
|
|
||||||
"aaSorting": [[ 2, "desc" ]],
|
"aaSorting": [[ 2, "desc" ]],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
<!-- <script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script> -->
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function synczohobooks(){
|
function synczohobooks(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var sync = true
|
var sync = true
|
||||||
$('#loader_wrapper').css("display", "block");
|
$('#loader_wrapper').css("display", "block");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// $('#loadingDiv').show();
|
// $('#loadingDiv').show();
|
||||||
|
|
||||||
url:"<?php echo base_url() ?>login/zohobooks_api_fetch_all",
|
url:"<?php echo base_url() ?>login/zohobooks_api_fetch_all",
|
||||||
type:"post",
|
type:"post",
|
||||||
data:{sync},
|
data:{sync},
|
||||||
|
|
||||||
success:function(data){
|
success:function(data){
|
||||||
console.log(data);
|
console.log(data);
|
||||||
alert("Sync Completed");
|
alert("Sync Completed");
|
||||||
// alert(data.invoice);
|
// alert(data.invoice);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
complete: function(){
|
complete: function(){
|
||||||
$('#loader_wrapper').css("display", "none");
|
$('#loader_wrapper').css("display", "none");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -37,8 +37,6 @@ foreach($reportdata['company'] as $c)
|
|||||||
$pic = $c->ProfilePic;
|
$pic = $c->ProfilePic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// echo $pic;die;
|
|
||||||
// echo base_url().'uploads/images/'.$pic;die;
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
td{
|
td{
|
||||||
@ -74,7 +72,6 @@ td{
|
|||||||
<td colspan="6"><h2>PRE DISPATCH INSPECTION REPORT</h2></td>
|
<td colspan="6"><h2>PRE DISPATCH INSPECTION REPORT</h2></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<!-- <td rowspan="5" ><img src="http://localhost/siddharth_application/uploads/images/LOGO_SI_ISO_90012.png" alt="no image"/></td> -->
|
|
||||||
<td rowspan="5" ><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
|
<td rowspan="5" ><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
|
||||||
<td rowspan="5" width="38%"><b><?php echo $cname;?></b><br><?php echo $caddress;?></td>
|
<td rowspan="5" width="38%"><b><?php echo $cname;?></b><br><?php echo $caddress;?></td>
|
||||||
<td width="8%" >CUSTOMER NAME</td>
|
<td width="8%" >CUSTOMER NAME</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user