Log Message : ps
This commit is contained in:
parent
dfd598bb0a
commit
2c830802fc
@ -597,14 +597,14 @@ $prefile =array();
|
|||||||
log_message('error'," Revenue Emr-po FNS.");
|
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');
|
||||||
@ -635,7 +635,7 @@ $prefile =array();
|
|||||||
if($txtspl==0) $POStatus=REQITEM_Emergency_PO_CREATED;
|
if($txtspl==0) $POStatus=REQITEM_Emergency_PO_CREATED;
|
||||||
else $POStatus=SPECIAL_PO;
|
else $POStatus=SPECIAL_PO;
|
||||||
|
|
||||||
|
// echo "\n *** POStatus ".$POStatus;
|
||||||
//$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' );
|
||||||
@ -667,9 +667,11 @@ $prefile =array();
|
|||||||
|
|
||||||
//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);die();
|
// 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)
|
||||||
{
|
{
|
||||||
@ -682,6 +684,7 @@ $prefile =array();
|
|||||||
|
|
||||||
$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 = '';
|
||||||
@ -745,13 +748,16 @@ $prefile =array();
|
|||||||
{
|
{
|
||||||
//add requistion details
|
//add requistion details
|
||||||
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
|
$ReqDetails = array('ReqNo'=>$RegNo, 'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Status'=>$RegDetailsStatus,'UpdatedBy'=>$CreateBy,'UpdatedOn'=>$createddt);
|
||||||
|
// print_r($ReqDetails);
|
||||||
$ReqDetQuery = $this->requistion_model->addRequistionDetails($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']:" -- ");
|
log_message('error'," Revenue Emr-po RequistionDetails count . ".count($ReqDetQuery)." ReqNo".isset($ReqDetQuery[0]['ItemNo'])?$ReqDetQuery[0]['ItemNo']:" -- ");
|
||||||
|
|
||||||
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription);
|
$POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$RegNo,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per,'ServiceMaterialDescription'=>$revenuedescription);
|
||||||
//print_r($POLineItemList);
|
//print_r($POLineItemList);
|
||||||
|
//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)
|
||||||
{
|
{
|
||||||
@ -773,6 +779,7 @@ $prefile =array();
|
|||||||
// 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 . ");
|
log_message('error'," Revenue Emr-po tax Successfully . ");
|
||||||
@ -819,8 +826,10 @@ $prefile =array();
|
|||||||
$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 = '';
|
$IGRNO = '';
|
||||||
if(count($igrM)>0)
|
if(count($igrM)>0)
|
||||||
{
|
{
|
||||||
@ -839,6 +848,7 @@ $prefile =array();
|
|||||||
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
||||||
|
|
||||||
|
|
||||||
|
// $MRIRNO = 'MRIR001';
|
||||||
$MRIRNO = '';
|
$MRIRNO = '';
|
||||||
|
|
||||||
|
|
||||||
@ -865,18 +875,21 @@ $prefile =array();
|
|||||||
//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';
|
||||||
$mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues);
|
$mrirdetails = $this->mrir_model->detail_mrir($mrirdetailvalues);
|
||||||
log_message('error'," Revenue Emr-po MRIR Item Number.".$mrirdetails[0]['MRIRItemNo']);
|
log_message('error'," Revenue Emr-po MRIR Item Number.".$mrirdetails[0]['MRIRItemNo']);
|
||||||
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode));
|
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock(trim($MaterialCode));
|
||||||
|
// print_r($getAvailableqty);
|
||||||
|
// echo "\n get available Qty";
|
||||||
if(count($getAvailableqty)>0)
|
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));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -927,11 +940,12 @@ $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);
|
//print_r($igrD);
|
||||||
//* ================================================== * /
|
//* ================================================== * /
|
||||||
|
//$IGRItemNo = 'IGRItemNo001';
|
||||||
$IGRItemNo = '';
|
$IGRItemNo = '';
|
||||||
foreach($igrD as $value)
|
foreach($igrD as $value)
|
||||||
{
|
{
|
||||||
@ -945,6 +959,7 @@ $prefile =array();
|
|||||||
|
|
||||||
|
|
||||||
$MStockHistory = $this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
|
$MStockHistory = $this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
|
||||||
|
//print_r($MaterialstockHistoryadd);
|
||||||
log_message('error'," Revenue Emr-po Material Stock History added. count ".count($MStockHistory));
|
log_message('error'," Revenue Emr-po Material Stock History added. count ".count($MStockHistory));
|
||||||
//*=====================================================*/
|
//*=====================================================*/
|
||||||
|
|
||||||
@ -965,7 +980,8 @@ $prefile =array();
|
|||||||
|
|
||||||
|
|
||||||
$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);
|
$mMaster = $this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
|
||||||
log_message('error'," Revenue Emr-po Material Master Qty added.".$mMaster);
|
log_message('error'," Revenue Emr-po Material Master Qty added.".$mMaster);
|
||||||
|
|
||||||
@ -1073,6 +1089,7 @@ $prefile =array();
|
|||||||
if(!empty($filename)){
|
if(!empty($filename)){
|
||||||
|
|
||||||
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
|
$myfile = array('FilePath'=>$filename,'PONO'=>$PONO,'IGRNO'=>$IGRNO);
|
||||||
|
//print_r($myfile);
|
||||||
$fileno = $this->purchaseorder_model->fileupload($myfile);
|
$fileno = $this->purchaseorder_model->fileupload($myfile);
|
||||||
log_message('error'," Revenue Emr-po File Number.".$fileno);
|
log_message('error'," Revenue Emr-po File Number.".$fileno);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,10 +212,11 @@ class quality extends BaseController
|
|||||||
$filename = 'INWARD MATERIAL INSPECTION REPORT'.$reportid;
|
$filename = 'INWARD MATERIAL INSPECTION REPORT'.$reportid;
|
||||||
$html = $this->load->View("viewindinwardreportpdf",$data,true);
|
$html = $this->load->View("viewindinwardreportpdf",$data,true);
|
||||||
}
|
}
|
||||||
|
// echo $html;die;
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
|
$mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6);
|
||||||
$mpdf->SetDisplayMode('fullpage');
|
$mpdf->SetDisplayMode('fullpage');
|
||||||
|
$mpdf->showImageErrors = true;
|
||||||
$mpdf->list_indent_first_level = 1;
|
$mpdf->list_indent_first_level = 1;
|
||||||
$mpdf->setAutoTopMargin = 'stretch';
|
$mpdf->setAutoTopMargin = 'stretch';
|
||||||
$mpdf->setAutoBottomMargin = 'stretch';
|
$mpdf->setAutoBottomMargin = 'stretch';
|
||||||
@ -540,7 +541,7 @@ class quality extends BaseController
|
|||||||
function zohobooks_api_fetch_all(){
|
function zohobooks_api_fetch_all(){
|
||||||
|
|
||||||
//echo 'scuess';die();
|
//echo 'scuess';die();
|
||||||
|
log_message('error'," ***ZOHO***");
|
||||||
if (isset($_POST['sync']))
|
if (isset($_POST['sync']))
|
||||||
{
|
{
|
||||||
$con = new mysqli($this->db->hostname,$this->db->username,$this->db->password,$this->db->database);
|
$con = new mysqli($this->db->hostname,$this->db->username,$this->db->password,$this->db->database);
|
||||||
@ -555,6 +556,7 @@ class quality extends BaseController
|
|||||||
|
|
||||||
$date_today = date('Y-m-d');
|
$date_today = date('Y-m-d');
|
||||||
$date_yesterday = date('Y-m-d',strtotime('-7 day',strtotime($date_today)));
|
$date_yesterday = date('Y-m-d',strtotime('-7 day',strtotime($date_today)));
|
||||||
|
log_message('error'," ***ZOHO***".$date_today."**".$date_yesterday);
|
||||||
// $date_yesterday = '2022-09-01';
|
// $date_yesterday = '2022-09-01';
|
||||||
|
|
||||||
// echo $date_yesterday.'-'.$date_today;//die();
|
// echo $date_yesterday.'-'.$date_today;//die();
|
||||||
@ -594,14 +596,14 @@ class quality extends BaseController
|
|||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
|
||||||
$result=curl_exec($ch);
|
$result=curl_exec($ch);
|
||||||
|
log_message('error'," Response ".$result);
|
||||||
$res = json_decode($result);
|
$res = json_decode($result);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($res->code=="57")
|
if($res->code=="57")
|
||||||
{
|
{
|
||||||
log('error'," IF cond. ");
|
log_message('error'," IF condition ");
|
||||||
$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';
|
||||||
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);
|
||||||
@ -667,17 +669,18 @@ class quality extends BaseController
|
|||||||
$res2[] = $resall['invoice'];
|
$res2[] = $resall['invoice'];
|
||||||
log_message('error', "Zoho URL Invoice ( " . $invoice_id . " )");
|
log_message('error', "Zoho URL Invoice ( " . $invoice_id . " )");
|
||||||
log_message('error', "Response : ".$result2);
|
log_message('error', "Response : ".$result2);
|
||||||
print_r($result2);
|
// print_r($result2);
|
||||||
exit();
|
// exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo count($res2);
|
//echo count($res2);
|
||||||
|
log_message('error', "Zoho URL Invoice ( " . $invoice_id . " ) count ".count($res2));
|
||||||
|
|
||||||
$insert_count = 0;
|
$insert_count = 0;
|
||||||
$update_count = 0;
|
$update_count = 0;
|
||||||
|
|
||||||
foreach($res2 as $rs)
|
foreach($res2 as $rs)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -743,6 +746,7 @@ class quality extends BaseController
|
|||||||
|
|
||||||
$gst_sql = "SELECT * FROM ip_clients WHERE client_tax_code='$gst_no'";
|
$gst_sql = "SELECT * FROM ip_clients WHERE client_tax_code='$gst_no'";
|
||||||
$res_gst = $con->query($gst_sql);
|
$res_gst = $con->query($gst_sql);
|
||||||
|
|
||||||
// $r_gst[] = $res_gst->fetch_assoc()['client_id'];
|
// $r_gst[] = $res_gst->fetch_assoc()['client_id'];
|
||||||
$client_id = $res_gst->fetch_assoc()['client_id'];
|
$client_id = $res_gst->fetch_assoc()['client_id'];
|
||||||
|
|
||||||
@ -751,14 +755,14 @@ class quality extends BaseController
|
|||||||
$res_sku = $con->query($sku_sql);
|
$res_sku = $con->query($sku_sql);
|
||||||
// $r_sku[] = $res_sku->fetch_assoc()['product_id'];
|
// $r_sku[] = $res_sku->fetch_assoc()['product_id'];
|
||||||
$product_id = $res_sku->fetch_assoc()['product_id'];
|
$product_id = $res_sku->fetch_assoc()['product_id'];
|
||||||
|
log_message('error invoice_number',$invoice_number);
|
||||||
$sql_invoice_chk = "SELECT * FROM ip_invoices WHERE invoice_number='$invoice_number' AND invoice_date_created='$invoice_date'";
|
$sql_invoice_chk = "SELECT * FROM ip_invoices WHERE invoice_number='$invoice_number' AND invoice_date_created='$invoice_date'";
|
||||||
$res_invoice = $con->query($sql_invoice_chk);
|
$res_invoice = $con->query($sql_invoice_chk);
|
||||||
|
log_message('error invoice chk ',$sql_invoice_chk);
|
||||||
|
log_message('error return rows ',$res_invoice->num_rows);
|
||||||
if($res_invoice->num_rows<=0)
|
if($res_invoice->num_rows<=0)
|
||||||
{
|
{
|
||||||
|
log_message('error ',$res_invoice->num_rows);
|
||||||
|
|
||||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||||
$charactersLength = strlen($characters);
|
$charactersLength = strlen($characters);
|
||||||
@ -774,7 +778,10 @@ class quality extends BaseController
|
|||||||
|
|
||||||
$sql_invoice_insert = "INSERT INTO ip_invoices(user_id,client_id,invoice_group_id,invoice_status_id,invoice_date_created,invoice_time_created,invoice_date_due,invoice_number,invoice_url_key,receivedstatus,credit_status)VALUES(1,'$client_id',6,2,'$invoice_date','$invoice_time','$due_date','$invoice_number','$url_key','ST066',0)";
|
$sql_invoice_insert = "INSERT INTO ip_invoices(user_id,client_id,invoice_group_id,invoice_status_id,invoice_date_created,invoice_time_created,invoice_date_due,invoice_number,invoice_url_key,receivedstatus,credit_status)VALUES(1,'$client_id',6,2,'$invoice_date','$invoice_time','$due_date','$invoice_number','$url_key','ST066',0)";
|
||||||
$result_invoice_insert = $con->query($sql_invoice_insert);
|
$result_invoice_insert = $con->query($sql_invoice_insert);
|
||||||
|
log_message('error'," Invoice Inserted ".$result_invoice_insert);
|
||||||
|
log_message('error'," Invoice Inserted id ".$con->insert_id);
|
||||||
|
log_message('error',"query invoice => ",$sql_invoice_insert);
|
||||||
|
//exit();
|
||||||
$invoice_insert_id=$con->insert_id;
|
$invoice_insert_id=$con->insert_id;
|
||||||
|
|
||||||
$sql_invoiceitem_insert = "INSERT INTO ip_invoice_items(invoice_id,item_product_id,item_date_added,item_name,item_description,item_quantity,item_price,item_order,item_product_unit,Sgst_item_tax_rate_id,Cgst_item_tax_rate_id)
|
$sql_invoiceitem_insert = "INSERT INTO ip_invoice_items(invoice_id,item_product_id,item_date_added,item_name,item_description,item_quantity,item_price,item_order,item_product_unit,Sgst_item_tax_rate_id,Cgst_item_tax_rate_id)
|
||||||
|
|||||||
@ -37,6 +37,8 @@ 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{
|
||||||
@ -72,6 +74,7 @@ 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>
|
||||||
|
|||||||
BIN
uploads/images/LOGO_SI_ISO_90012.png
Normal file
BIN
uploads/images/LOGO_SI_ISO_90012.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
Loading…
Reference in New Issue
Block a user