diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index c411b444..d94c5f47 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -118,6 +118,8 @@ OTHER CHANGES: 22. Added option in the web-based lead loader to convert state names to their two-letter abbreviations. +23. Added option to Secondary Lead Sort by vendor lead code + diff --git a/agc_2-X/trunk/bin/AST_VDhopper.pl b/agc_2-X/trunk/bin/AST_VDhopper.pl index aa6257c3..8af94ab7 100644 --- a/agc_2-X/trunk/bin/AST_VDhopper.pl +++ b/agc_2-X/trunk/bin/AST_VDhopper.pl @@ -85,10 +85,11 @@ # 150117-1415 - Added list local call time validation # 150312-1459 - Allow for single quotes in data fields without crashing # 150717-1050 - Added force index to some vicidial_list queries, set with $VLforce_index variable +# 150728-1050 - Added option for secondary sorting by vendor_lead_code, Issue #833 # # constants -$build = '150312-1459'; +$build = '150728-1050'; $DB=0; # Debug flag, set to 0 for no debug messages. Can be overriden with CLI --debug flag $US='__'; $MT[0]=''; @@ -2562,6 +2563,8 @@ foreach(@campaign_id) if ($lead_order_secondary[$i] =~ /LEAD_DESCEND/) {$last_order = "lead_id desc";} if ($lead_order_secondary[$i] =~ /CALLTIME_ASCEND/) {$last_order = "last_local_call_time asc";} if ($lead_order_secondary[$i] =~ /CALLTIME_DESCEND/) {$last_order = "last_local_call_time desc";} + if ($lead_order_secondary[$i] =~ /VENDOR_ASCEND/) {$last_order = "vendor_lead_code+0 asc, vendor_lead_code asc";} + if ($lead_order_secondary[$i] =~ /VENDOR_DESCEND/) {$last_order = "vendor_lead_code+0 desc, vendor_lead_code desc";} } if ($lead_order[$i] =~ /^DOWN/) {$order_stmt = "order by lead_id asc";} diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index ee12ec60..abf774e4 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -858,7 +858,7 @@ api_manual_dial ENUM('STANDARD','QUEUE','QUEUE_AND_AUTOCALL') default 'STANDARD' manual_dial_call_time_check ENUM('DISABLED','ENABLED') default 'DISABLED', display_leads_count ENUM('Y','N') default 'N', lead_order_randomize ENUM('Y','N') default 'N', -lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND') default 'LEAD_ASCEND', +lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND','VENDOR_ASCEND','VENDOR_DESCEND') default 'LEAD_ASCEND', per_call_notes ENUM('ENABLED','DISABLED') default 'DISABLED', my_callback_option ENUM('CHECKED','UNCHECKED') default 'UNCHECKED', agent_lead_search ENUM('ENABLED','LIVE_CALL_INBOUND','LIVE_CALL_INBOUND_AND_MANUAL','DISABLED') default 'DISABLED', @@ -3546,4 +3546,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version'; UPDATE system_settings set vdc_agent_api_active='1'; -UPDATE system_settings SET db_schema_version='1423',db_schema_update_date=NOW(),reload_timestamp=NOW(); +UPDATE system_settings SET db_schema_version='1424',db_schema_update_date=NOW(),reload_timestamp=NOW(); diff --git a/agc_2-X/trunk/extras/upgrade_2.12.sql b/agc_2-X/trunk/extras/upgrade_2.12.sql index 4f3b6748..12d7d780 100644 --- a/agc_2-X/trunk/extras/upgrade_2.12.sql +++ b/agc_2-X/trunk/extras/upgrade_2.12.sql @@ -243,3 +243,7 @@ UPDATE system_settings SET db_schema_version='1422',db_schema_update_date=NOW() ALTER TABLE system_settings ADD default_language VARCHAR(100) default 'default English'; UPDATE system_settings SET db_schema_version='1423',db_schema_update_date=NOW() where db_schema_version < 1423; + +ALTER TABLE vicidial_campaigns MODIFY lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND','VENDOR_ASCEND','VENDOR_DESCEND') default 'LEAD_ASCEND'; + +UPDATE system_settings SET db_schema_version='1424',db_schema_update_date=NOW() where db_schema_version < 1424; diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 980ebbb5..f1258c96 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -386,10 +386,11 @@ # 150723-1705 - Added ajax logging # 150725-1613 - Added entry_date as a variable # 150727-0910 - Added default_language +# 150728-1049 - Added option for secondary sorting by vendor_lead_code, Issue #833 # -$version = '2.12-281'; -$build = '150727-0910'; +$version = '2.12-282'; +$build = '150728-1049'; $php_script = 'vdc_db_query.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=616; @@ -3264,6 +3265,8 @@ if ($ACTION == 'manDiaLnextCaLL') if ($lead_order_secondary == 'LEAD_DESCEND') {$last_order = "lead_id desc";} if ($lead_order_secondary == 'CALLTIME_ASCEND') {$last_order = "last_local_call_time asc";} if ($lead_order_secondary == 'CALLTIME_DESCEND') {$last_order = "last_local_call_time desc";} + if ($lead_order_secondary == 'VENDOR_ASCEND') {$last_order = "vendor_lead_code+0 asc, vendor_lead_code asc";} + if ($lead_order_secondary == 'VENDOR_DESCEND') {$last_order = "vendor_lead_code+0 desc, vendor_lead_code desc";} } $order_stmt = ''; diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index d5e27f61..9e14f805 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -3542,12 +3542,13 @@ else # 150725-1341 - Added agent_display_fields campaign options # 150727-0903 - Added default_language System Setting option # 150728-1012 - Added $DB hidden variable in Filter Text form, Issue #845 +# 150728-1048 - Added option for secondary sorting by vendor_lead_code, Issue #833 # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.12-501a'; -$build = '150728-1012'; +$admin_version = '2.12-502a'; +$build = '150728-1048'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -19190,7 +19191,7 @@ if ($ADD==31) } else { - echo "$NWB#campaigns-lead_order_secondary$NWE"; + echo "$NWB#campaigns-lead_order_secondary$NWE"; } echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/admin_campaign_multi_alt.php b/agc_2-X/trunk/www/vicidial/admin_campaign_multi_alt.php index 1abe4c9d..1b491bc2 100644 --- a/agc_2-X/trunk/www/vicidial/admin_campaign_multi_alt.php +++ b/agc_2-X/trunk/www/vicidial/admin_campaign_multi_alt.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2015 Matt Florell LICENSE: AGPLv2 # # this screen will control the campaign settings needed for alternate number # dialing using multiple leads with the same account number and different phone @@ -18,10 +18,11 @@ # 130902-0755 - Changed to mysqli PHP functions # 141001-2200 - Finalized adding QXZ translation to all admin files # 141230-0024 - Added code for on-the-fly language translations display +# 150728-1046 - Added option for secondary sorting by vendor_lead_code, Issue #833 # -$admin_version = '2.10-8'; -$build = '141230-0024'; +$admin_version = '2.12-9'; +$build = '150728-1046'; require("dbconnect_mysqli.php"); require("functions.php"); @@ -406,7 +407,7 @@ if ($action == "BLANK") echo "\n"; echo ""._QXZ("List Order Randomize").": \n"; - echo ""._QXZ("List Order Secondary").": \n"; + echo ""._QXZ("List Order Secondary").": \n"; echo "\n"; echo "\n"; @@ -418,11 +419,6 @@ if ($action == "BLANK") - - - - - $ENDtime = date("U"); $RUNtime = ($ENDtime - $STARTtime); echo "\n\n\n


\n "._QXZ("runtime").": $RUNtime "._QXZ("seconds")."         "._QXZ("Version").": $admin_version     "._QXZ("Build").": $build";