PHOTO repeated and Isseus fied
This commit is contained in:
parent
9371165b84
commit
3409d3b21e
@ -2260,7 +2260,7 @@ class PD_Controller extends REST_Controller {
|
||||
if(count($inline_forms_photo_status_check) && $inline_forms_photo_status_check[0]['is_business_photo_saved'] != 1)
|
||||
{
|
||||
$records = INLINEPHOTOTRANSFORM::retransformBusinessFormInlinePhotos($records);
|
||||
$this->PD_Model->saveRecords(array('fk_pd_id' => $pdid,'is_business_photo_saved' => 1),T_PD_INLINE_PHOTO_FORM_STATUS);
|
||||
$this->PD_Model->updateRecords(array('is_business_photo_saved' => 1),T_PD_INLINE_PHOTO_FORM_STATUS,array('fk_pd_id' => $pdid));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3281,7 +3281,7 @@ class PD_Controller extends REST_Controller {
|
||||
unset($record['child']);
|
||||
}
|
||||
$id = "";
|
||||
if($record['sim_id'] != null || $record['sim_id'] != "")
|
||||
if($record['sim_id'] != null || $record['sim_id'] != "" )
|
||||
{
|
||||
$where_condition_array = array('sim_id'=>$record['sim_id']);
|
||||
$id = $this->PD_Model->updateRecords($record,SALESITEMMONTHWISE,$where_condition_array);
|
||||
@ -3297,8 +3297,11 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
else
|
||||
{
|
||||
$child['fk_sim_id'] = $record['sim_id'];
|
||||
$child_id = $this->PD_Model->saveRecords($child,SALESITEMMONTHWISECHILD);
|
||||
if($child['sales_date'] != null || $child['sales_date'] != "")
|
||||
{
|
||||
$child['fk_sim_id'] = $record['sim_id'];
|
||||
$child_id = $this->PD_Model->saveRecords($child,SALESITEMMONTHWISECHILD);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3306,16 +3309,26 @@ class PD_Controller extends REST_Controller {
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $this->PD_Model->saveRecords($record,SALESITEMMONTHWISE);
|
||||
if($id != "" || $id != null)
|
||||
{
|
||||
$count++;
|
||||
foreach($child_data as $ckey => $child)
|
||||
//print_r($child_data);die();
|
||||
|
||||
|
||||
|
||||
$id = $this->PD_Model->saveRecords($record,SALESITEMMONTHWISE);
|
||||
if($id != "" || $id != null)
|
||||
{
|
||||
$child['fk_sim_id'] = $id;
|
||||
$child_id = $this->PD_Model->saveRecords($child,SALESITEMMONTHWISECHILD);
|
||||
$count++;
|
||||
|
||||
foreach($child_data as $ckey => $child)
|
||||
{
|
||||
if($child['sales_date'] != null || $child['sales_date'] != "")
|
||||
{
|
||||
//echo 'true';
|
||||
$child['fk_sim_id'] = $id;
|
||||
$child_id = $this->PD_Model->saveRecords($child,SALESITEMMONTHWISECHILD);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3744,25 +3757,33 @@ class PD_Controller extends REST_Controller {
|
||||
//print_r($sales_by_item_monthwise);die();
|
||||
foreach($sales_by_item_monthwise as $monthwise_key => $sales_by_item_month)
|
||||
{
|
||||
//print_r($sales_by_item_month['items']);
|
||||
//echo isset($sales_by_item_month['items']);die();
|
||||
$month_total = 0;
|
||||
$i = 0;
|
||||
$temp_netprofit = $temp_netprofit + $sales_by_item_month['margin_value'];
|
||||
foreach($sales_by_item_month['items'] as $month_key => $month)
|
||||
if(isset($sales_by_item_month['items']))
|
||||
{
|
||||
$temp = 0;
|
||||
|
||||
$i++;
|
||||
foreach($month as $key => $m)
|
||||
{
|
||||
$temp = $temp + $m['sales_value'];
|
||||
}
|
||||
$month_total = $month_total + $temp;
|
||||
//echo 'insdie if';
|
||||
foreach($sales_by_item_month['items'] as $month_key => $month)
|
||||
{
|
||||
$temp = 0;
|
||||
|
||||
$i++;
|
||||
foreach($month as $key => $m)
|
||||
{
|
||||
$temp = $temp + $m['sales_value'];
|
||||
}
|
||||
$month_total = $month_total + $temp;
|
||||
}
|
||||
}
|
||||
|
||||
//die();
|
||||
$sales_monthwise[] = array('total' => $month_total,'no_of_months' => $i,'sales_type' => $sales_by_item_month['sales_type']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//print_r($sales_monthwise);die();
|
||||
foreach($sales_monthwise as $sale)
|
||||
{
|
||||
//print_r($sale);
|
||||
|
||||
Binary file not shown.
@ -302,7 +302,7 @@ class GETPROCESSEDJSON
|
||||
$master_tables_field_names = $CI->config->item('master_tables_field_names');
|
||||
$master_tables_pkid = $CI->config->item('master_tables_pkid');
|
||||
|
||||
//print_r($raw_json);
|
||||
//print_r($raw_json);die();
|
||||
|
||||
// GET KEYS FROM MASTER TABLE FOR SUPPLIER FORM
|
||||
$fields = array('question', 'key', 'ismaster', 'master_name');
|
||||
@ -428,6 +428,55 @@ class GETPROCESSEDJSON
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('state',$raw_json))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['STATE'] );
|
||||
$CI->db->FROM(STATE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['STATE'] ,$raw_json['state']);
|
||||
$adress_type_name= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($adress_type_name))
|
||||
{
|
||||
$raw_json['state_master'] = $adress_type_name[0][$master_tables_field_names['STATE']];
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('city',$raw_json))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['CITY'] );
|
||||
$CI->db->FROM(CITY);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['CITY'] ,$raw_json['city']);
|
||||
$city= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($city))
|
||||
{
|
||||
$raw_json['city_master'] = $city[0][$master_tables_field_names['CITY']];
|
||||
}
|
||||
}
|
||||
|
||||
if(array_key_exists('pincode',$raw_json))
|
||||
{
|
||||
//print_r($address);
|
||||
$CI->db->SELECT( $master_tables_field_names['PINCODE'] );
|
||||
$CI->db->FROM(PINCODE);
|
||||
$CI->db->WHERE('isactive',1);
|
||||
$CI->db->WHERE($master_tables_pkid['PINCODE'] ,$raw_json['pincode']);
|
||||
$pincode= $CI->db->GET()->result_array();
|
||||
//print_r($CI->db->last_query());
|
||||
if(count($pincode))
|
||||
{
|
||||
$raw_json['pincode_master'] = $pincode[0][$master_tables_field_names['PINCODE']];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$raw_json['owners_list_master'] = $owners_list_master;
|
||||
}
|
||||
|
||||
|
||||
@ -2294,6 +2294,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
{
|
||||
$cRow = $pd_processed_forms[2][$business_count];
|
||||
$clientRow = json_decode($cRow['processed_json'],true);
|
||||
|
||||
$client_form_remarks = isset($clientRow['supplier_info_form_remark']) ? $clientRow['supplier_info_form_remark'] : '';
|
||||
$name_of_the_company = MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
|
||||
// $bindEachResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$clientRow['company_id'],1);
|
||||
@ -2458,11 +2459,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo "<h3>Client Details</h3>";
|
||||
if($to_no_of_clients > 0 )
|
||||
{
|
||||
|
||||
|
||||
echo "<h3>Client Details</h3>";
|
||||
|
||||
|
||||
?>
|
||||
<table class="scorecard_table">
|
||||
@ -2494,7 +2496,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
</table>
|
||||
<?php if($done_on_credit != 0) { echo "<p> Out of total sales done by ".$name_of_the_company .", ".$done_on_credit."% is done on credit.</p>"; }
|
||||
|
||||
echo '<p>'.$client_form_remarks.'</p>';
|
||||
|
||||
//CLient Photo Section
|
||||
// $client_photo_count = $pd_images[2];
|
||||
// $client_img_row_count = ceil(count($client_photo_count) / 3);
|
||||
@ -2537,6 +2539,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
//End of CLient Photo Section
|
||||
?>
|
||||
<?php }
|
||||
echo '<p>'.$client_form_remarks.'</p>';
|
||||
} // ENd of client info available in this current index ?>
|
||||
|
||||
<!-- #################client section end #################-->
|
||||
@ -2667,12 +2670,12 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
}
|
||||
// echo "dsfnsdkfnj**********";
|
||||
//print_r($supplierResult);die();
|
||||
|
||||
echo '<h3 contenteditable="true">Supplier Details</h3>' ;
|
||||
if($total_no_of_suppliers > 0)
|
||||
{
|
||||
?>
|
||||
|
||||
<h3 contenteditable="true">Supplier Details</h3>
|
||||
|
||||
<?php
|
||||
foreach($supplierResult as $k => $fetchRow){
|
||||
echo '<br>Supplier '.($k+1).':<br><br>';
|
||||
@ -3729,7 +3732,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
<!-- #################Final Remarks Section#################-->
|
||||
<div class="page_break"></div>
|
||||
<h3 contenteditable="true">PD OFFICERS REMARKS ON CUSTOMER BEHAVIOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
|
||||
<h3 contenteditable="true">PD OFFICERS` REMARKS ON CUSTOMER BEHAVIOUR, BUSINESS LOCATION & OVERALL PD STATUS</h3>
|
||||
<?php
|
||||
//print_r($final_remark_data);
|
||||
$polite = null;$rude = null; $other_behaviour = null;$other_behaviour_remarks = null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user