***********************************************************************/
//$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;
td('50%');
source_graphic($today, $title[0], _("Supplier"), $pg);
br(3);
- echo "<div class='square square2'>"._('Purchable Total')."<p class='span1'>";
+ echo "<div class='square square2'>"._('Purchasable Total')."<p class='span1'>";
echo number_format2($title[1])."</p></div>";
br(3);
echo "<div class='square square2'>"._('Aging Total')."<p class='span1'>";
headers($th);
check_page_security('SA_SALESTRANSVIEW');
$k = 0; //row colour counter
- $i = 1;
$names = $totals = array();
$sales = 0;
while ($myrow = db_fetch($result))
{
$sales += round($myrow['total']);
- if ($i++ < $limit)
+ alt_table_row_color($k);
+ $name = $myrow["debtor_no"]." ".htmlspecialchars_decode($myrow["name"]);
+ label_cell($name);
+ amount_cell($myrow['total']);
+ if ($pg != null)
{
- alt_table_row_color($k);
- $name = $myrow["debtor_no"]." ".htmlspecialchars_decode($myrow["name"]);
- label_cell($name);
- amount_cell($myrow['total']);
- if ($pg != null)
- {
- $names[] = $name;
- $totals[] = round($myrow['total']);
- }
- end_row();
- }
+ $names[] = $name;
+ $totals[] = round($myrow['total']);
+ }
+ end_row();
}
if ($pg != null)
{
headers($th);
check_page_security('SA_SUPPTRANSVIEW');
$k = 0; //row colour counter
- $i = 1;
$names = $totals = array();
$total = 0;
while ($myrow = db_fetch($result))
{
$total += $myrow['total'];
- if ($i++ < $limit)
+ alt_table_row_color($k);
+ $name = $myrow["supplier_id"]." ".htmlspecialchars_decode($myrow["supp_name"]);
+ label_cell($name);
+ amount_cell($myrow['total']);
+ if ($pg != null)
{
- alt_table_row_color($k);
- $name = $myrow["supplier_id"]." ".htmlspecialchars_decode($myrow["supp_name"]);
- label_cell($name);
- amount_cell($myrow['total']);
- if ($pg != null)
- {
- $names[] = $name;
- $totals[] = round($myrow['total']);
- }
- end_row();
- }
+ $names[] = $name;
+ $totals[] = round($myrow['total']);
+ }
+ end_row();
}
if ($pg != null)
{
headers($th);
check_page_security($sec);
$k = 0; //row colour counter
- $i = 1;
$names = $totals = $costs = $results = array();
$sales = $cost = $res = 0;
while ($myrow = db_fetch($result))
$cost += $myrow['costs'];
$res += ($myrow['total'] - $myrow['costs']);
}
- if ($i++ < $limit)
+ alt_table_row_color($k);
+ $name = $myrow["description"];
+ label_cell($name);
+ amount_cell($myrow['total']);
+ if ($type == 0)
{
- alt_table_row_color($k);
- $name = $myrow["description"];
- label_cell($name);
- amount_cell($myrow['total']);
+ amount_cell($myrow['costs']);
+ amount_cell($myrow['total'] - $myrow['costs']);
+ }
+ qty_cell($myrow['qty']);
+ if ($pg != NULL)
+ {
+ $names[] = $name;
+ $totals[] = round($myrow['total']);
if ($type == 0)
{
- amount_cell($myrow['costs']);
- amount_cell($myrow['total'] - $myrow['costs']);
+ $costs[] = round($myrow['costs']);
+ $results[] = round($myrow['total'] - $myrow['costs']);
}
- qty_cell($myrow['qty']);
- if ($pg != NULL)
- {
- $names[] = $name;
- $totals[] = round($myrow['total']);
- if ($type == 0)
- {
- $costs[] = round($myrow['costs']);
- $results[] = round($myrow['total'] - $myrow['costs']);
- }
- }
- end_row();
- }
+ }
+ end_row();
}
if ($pg != null)
{
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))
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))
$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);