Bug 5490: qty_done is not updated correctly when partial invoice is voided. Fixed...
[fa-stable.git] / includes / dashboard.inc
index 56f69a56dc1e87c276b1ca470788e65fba175fc6..9c2f6d23d52fc31511dede3b945c97212524dfff 100644 (file)
 ***********************************************************************/
 //$colors = array('#008cc9','#4db625','#ef5500','#eef100','#05c6e6', '#5ee66a'); // Current in Use      
 $colors = Chart::$palette;
+$align = $_SESSION['language']->dir == 'rtl' ? 'right' : 'left';
 $style = "<style>
 div.square {
        display: inline-block;
        width: 200px;
        height:40px;
-       padding: 3px 0 0 5px;
+       padding: 3px 5px 0 5px;
        font-size:12px;
        font-weight:normal;
-       text-align: left;
+       text-align: $align;
        line-height: 1.2;
        color:#fff;
        border-radius:6px;
@@ -735,7 +736,7 @@ function gl_week_performance($today, $width="33", $weeks=4)
                        GROUP BY week_name ORDER BY week_name DESC LIMIT 0, $weeks) b 
                GROUP BY week_name ORDER BY week_name ASC";
        $result = db_query($sql, "Transactions could not be calculated");
-       $title = _("Last $weeks weeks Performance");
+       $title = sprintf(_("Last %s weeks Performance"), $weeks);
        check_page_security('SA_GLANALYTIC');
        $week_names = $sales = $costs = $results = array();
        while ($myrow = db_fetch($result))
@@ -774,7 +775,7 @@ function gl_month_performance($today, $width="33", $months=5)
                        GROUP BY month_name ORDER BY month_name DESC LIMIT 0, $months) b 
                GROUP BY month_name ORDER BY month_name ASC";
        $result = db_query($sql, "Transactions could not be calculated");
-       $title = _("Last $months Months Performance");
+       $title = sprintf(_("Last %s Months Performance"), $months);
        check_page_security('SA_GLANALYTIC');
        $month_names = $sales = $costs = $results = array();
        while ($myrow = db_fetch($result))
@@ -964,7 +965,7 @@ function cash_flow($today)
                $date[$i] = $y.$sep.$m;
                $total[$i] = round($total[$i]);
        }
-       $title = _("Last $months Months Cash Flow");
+       $title = sprintf(_("Last %s Months Cash Flow"), $months);
        check_page_security('SA_BANKREP');
        $pg->setLabels($date);
        $pg->addSerie(_('Balances'), $total, false, true);