Changeset 634

Show
Ignore:
Timestamp:
04/08/08 09:52:21 (9 months ago)
Author:
areski
Message:

bug to fix currency issue on customer UI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/A2BCustomer_UI/A2B_entity_call_details.php

    r566 r634  
    66if (!$A2B->config["webcustomerui"]['invoice']) exit(); 
    77 
    8 if (! has_rights (ACX_ACCESS)){  
     8if (! has_rights (ACX_ACCESS)){ 
    99        Header ("HTTP/1.0 401 Unauthorized"); 
    10         Header ("Location: PP_error.php?c=accessdenied");          
     10        Header ("Location: PP_error.php?c=accessdenied"); 
    1111        die(); 
    1212} 
  • trunk/A2BCustomer_UI/userinfo.php

    r566 r634  
    77if (! has_rights (ACX_ACCESS)){  
    88        Header ("HTTP/1.0 401 Unauthorized"); 
    9         Header ("Location: PP_error.php?c=accessdenied");          
    10         die();     
     9        Header ("Location: PP_error.php?c=accessdenied"); 
     10        die(); 
    1111} 
    1212 
    1313 
    14 $QUERY = "SELECT  username, credit, lastname, firstname, address, city, state, country, zipcode, phone, email, fax, lastuse, activated, status, freetimetocall, label, packagetype, billingtype, startday, id_cc_package_offer, cc_card.id FROM cc_card RIGHT JOIN cc_tariffgroup ON cc_tariffgroup.id=cc_card.tariff LEFT JOIN cc_package_offer ON cc_package_offer.id=cc_tariffgroup.id_cc_package_offer WHERE username = '".$_SESSION["pr_login"]."' AND uipass = '".$_SESSION["pr_password"]."'"; 
     14$QUERY = "SELECT  username, credit, lastname, firstname, address, city, state, country, zipcode, phone, email, fax, lastuse, activated, status, freetimetocall, label, packagetype, billingtype, startday, id_cc_package_offer, cc_card.id, currency FROM cc_card RIGHT JOIN cc_tariffgroup ON cc_tariffgroup.id=cc_card.tariff LEFT JOIN cc_package_offer ON cc_package_offer.id=cc_tariffgroup.id_cc_package_offer WHERE username = '".$_SESSION["pr_login"]."' AND uipass = '".$_SESSION["pr_password"]."'"; 
    1515 
    1616$DBHandle_max = DbConnect(); 
     
    3333$currencies_list = get_currencies(); 
    3434 
    35 if (!isset($currencies_list[strtoupper($customer_info [14])][2]) || !is_numeric($currencies_list[strtoupper($customer_info [14])][2])) $mycur = 1; 
    36 else $mycur = $currencies_list[strtoupper($customer_info [14])][2]; 
     35if (!isset($currencies_list[strtoupper($customer_info [22])][2]) || !is_numeric($currencies_list[strtoupper($customer_info [22])][2])) $mycur = 1; 
     36else $mycur = $currencies_list[strtoupper($customer_info [22])][2]; 
    3737$credit_cur = $customer_info[1] / $mycur; 
    3838$credit_cur = round($credit_cur,3); 
     
    4141 
    4242$smarty->display( 'main.tpl'); 
    43          
     43 
    4444?> 
    4545 
     
    9494                        </td> 
    9595                        <td width="50%"> 
    96                         <br><font class="fontstyle_002"><?php echo gettext("BALANCE REMAINING");?> :</font><font class="fontstyle_007"> <?php echo $credit_cur.' '.$customer_info[14]; ?> </font> 
     96                        <br><font class="fontstyle_002"><?php echo gettext("BALANCE REMAINING");?> :</font><font class="fontstyle_007"> <?php echo $credit_cur.' '.$customer_info[22]; ?> </font> 
    9797                        <br></br> 
    9898                        </td> 
  • trunk/A2Billing_UI/Public/graph_statbar.php

    r542 r634  
    191191$numm=0; 
    192192foreach ($list_total as $recordset){ 
    193                $numm++; 
    194                $mydate= substr($recordset[0],0,10); 
    195                $mydate_hours= substr($recordset[0],0,13); 
    196                //echo "$mydate<br>"; 
    197                if (is_array($table_graph_hours[$mydate_hours])){ 
    198                        $table_graph_hours[$mydate_hours][0]++; 
    199                        $table_graph_hours[$mydate_hours][1]=$table_graph_hours[$mydate_hours][1]+$recordset[1]; 
    200                }else{ 
    201                        $table_graph_hours[$mydate_hours][0]=1; 
    202                        $table_graph_hours[$mydate_hours][1]=$recordset[1]; 
    203                
    204                 
    205                 
    206                if (is_array($table_graph[$mydate])){ 
    207                        $table_graph[$mydate][0]++; 
    208                        $table_graph[$mydate][1]=$table_graph[$mydate][1]+$recordset[1]; 
    209                }else{ 
    210                        $table_graph[$mydate][0]=1; 
    211                        $table_graph[$mydate][1]=$recordset[1]; 
    212                }                
     193        $numm++; 
     194        $mydate= substr($recordset[0],0,10); 
     195        $mydate_hours= substr($recordset[0],0,13); 
     196        //echo "$mydate<br>"; 
     197        if (is_array($table_graph_hours[$mydate_hours])){ 
     198                $table_graph_hours[$mydate_hours][0]++; 
     199                $table_graph_hours[$mydate_hours][1]=$table_graph_hours[$mydate_hours][1]+$recordset[1]; 
     200        }else{ 
     201                $table_graph_hours[$mydate_hours][0]=1; 
     202                $table_graph_hours[$mydate_hours][1]=$recordset[1]; 
     203       
     204         
     205         
     206        if (is_array($table_graph[$mydate])){ 
     207                $table_graph[$mydate][0]++; 
     208                $table_graph[$mydate][1]=$table_graph[$mydate][1]+$recordset[1]; 
     209        }else{ 
     210                $table_graph[$mydate][0]=1; 
     211                $table_graph[$mydate][1]=$recordset[1]; 
     212        } 
    213213} 
    214214 
     
    365365// initialisaton fixe de AXE X 
    366366$tableau_hours[0] = array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"); 
    367 $graph->xaxis->SetTickLabels($tableau_hours[0]);   
     367$graph->xaxis->SetTickLabels($tableau_hours[0]); 
    368368 
    369369 


Google