SINEBOT & ADDTIONAL PD
This commit is contained in:
parent
f1ff065395
commit
bd09defdc5
@ -109,8 +109,10 @@ else if(ENVIRONMENT == 'testing')
|
|||||||
|
|
||||||
defined('LOGTOSYS') OR define('LOGTOSYS',1);
|
defined('LOGTOSYS') OR define('LOGTOSYS',1);
|
||||||
defined('PROCESSJSON') OR define('PROCESSJSON',1);
|
defined('PROCESSJSON') OR define('PROCESSJSON',1);
|
||||||
//defined('BOTURL') OR define('BOTURL','https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=467975ee8e33abf1549803925eaace0f');
|
//defined('BOTURLZ') OR define('BOTURLZ','https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=467975ee8e33abf1549803925eaace0f');
|
||||||
defined('BOTURL') OR define('BOTURLVENBA','https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=4eb460042d45d28a898b5ea11b5b103e');
|
defined('BOTURLVENBA') OR define('BOTURLVENBA','https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=4eb460042d45d28a898b5ea11b5b103e');
|
||||||
|
|
||||||
|
defined('BOTURLSINEEDGE') OR define('BOTURLSINEEDGE','https://cliq.zoho.com/api/v2/bots/sample/incoming?authtoken=24e66f9d4e32303f473c011493a8fea6');
|
||||||
|
|
||||||
/*******************Constants PD status*********************************/
|
/*******************Constants PD status*********************************/
|
||||||
defined('TRIGGERED') OR define('TRIGGERED','TRIGGERED'); //First time PD Trigger.
|
defined('TRIGGERED') OR define('TRIGGERED','TRIGGERED'); //First time PD Trigger.
|
||||||
|
|||||||
@ -729,6 +729,7 @@ class PD_Controller extends REST_Controller {
|
|||||||
|
|
||||||
if($primary_address_id != null)
|
if($primary_address_id != null)
|
||||||
{
|
{
|
||||||
|
$pd_details['fk_address_id'] = $primary_address_id;
|
||||||
$where_condition_array = array('pd_address_id' => primary_address_id);
|
$where_condition_array = array('pd_address_id' => primary_address_id);
|
||||||
$temp_data = array('is_primary' => 1);
|
$temp_data = array('is_primary' => 1);
|
||||||
$id = $this->PD_Model->updateRecords($temp_data,PDADDRESS,$where_condition_array);
|
$id = $this->PD_Model->updateRecords($temp_data,PDADDRESS,$where_condition_array);
|
||||||
@ -3588,11 +3589,11 @@ class PD_Controller extends REST_Controller {
|
|||||||
if(isset($overall_summary_report['sales_calculated_by_monthwise']['netprofit'])){ $temp_netmargin_array = array_merge($temp_netmargin_array,array($overall_summary_report['sales_calculated_by_monthwise']['netprofit'])); }
|
if(isset($overall_summary_report['sales_calculated_by_monthwise']['netprofit'])){ $temp_netmargin_array = array_merge($temp_netmargin_array,array($overall_summary_report['sales_calculated_by_monthwise']['netprofit'])); }
|
||||||
if(isset($overall_summary_report['sales_calculated_by_itemwise']['netprofit'])){ $temp_netmargin_array = array_merge($temp_netmargin_array,array($overall_summary_report['sales_calculated_by_itemwise']['netprofit'])); }
|
if(isset($overall_summary_report['sales_calculated_by_itemwise']['netprofit'])){ $temp_netmargin_array = array_merge($temp_netmargin_array,array($overall_summary_report['sales_calculated_by_itemwise']['netprofit'])); }
|
||||||
|
|
||||||
$overall_summary_report['consolidated_report']['consolidated_sales_revenue'] = round(array_sum($temp_sales_array) / count($temp_sales_array),2);
|
$overall_summary_report['consolidated_report']['consolidated_sales_revenue'] = round(array_sum($temp_sales_array) / count($temp_sales_array));
|
||||||
|
|
||||||
$overall_summary_report['consolidated_report']['consolidated_nerprofit'] = round(array_sum($temp_netmargin_array) / count($temp_netmargin_array),2);
|
$overall_summary_report['consolidated_report']['consolidated_nerprofit'] = round(array_sum($temp_netmargin_array) / count($temp_netmargin_array));
|
||||||
|
|
||||||
$overall_summary_report['consolidated_report'][' consolidated_nermagin'] = round((($overall_summary_report['consolidated_report']['consolidated_nerprofit']/$overall_summary_report['consolidated_report']['consolidated_sales_revenue'])*100) ,2);
|
$overall_summary_report['consolidated_report'][' consolidated_nermagin'] = round((($overall_summary_report['consolidated_report']['consolidated_nerprofit']/$overall_summary_report['consolidated_report']['consolidated_sales_revenue'])*100),2);
|
||||||
|
|
||||||
|
|
||||||
return ($overall_summary_report);
|
return ($overall_summary_report);
|
||||||
|
|||||||
@ -1352,7 +1352,7 @@ class PD_Model extends SPARQ_Model {
|
|||||||
|
|
||||||
|
|
||||||
//Get purchase_details
|
//Get purchase_details
|
||||||
$fields = array('purchase_id','purchase_item','purchase_qty','UOM.name as uom_name','fk_uom_id','FREQUENCY.name as frequency_name','rate_per_unit','fk_frequency_id','annual_purchase_value','uom_other','comments');
|
$fields = array('purchase_id','purchase_item','purchase_qty','UOM.name as uom_name','fk_uom_id','FREQUENCY.name as frequency_name','rate_per_unit','fk_frequency_id','annual_purchase_value','uom_other','comments','purchase_type');
|
||||||
$table = PDPURCHASEDETAILS.' as PDPURCHASEDETAILS';
|
$table = PDPURCHASEDETAILS.' as PDPURCHASEDETAILS';
|
||||||
$where_condition_array = array('fk_pd_id'=>$pdid,'PDPURCHASEDETAILS.isactive'=>1);
|
$where_condition_array = array('fk_pd_id'=>$pdid,'PDPURCHASEDETAILS.isactive'=>1);
|
||||||
$joins = array(
|
$joins = array(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user