return;
// first have a look through the directory,
// and remove old temporary pdfs and pngs
return;
// first have a look through the directory,
// and remove old temporary pdfs and pngs
table_one();
$title = customer_top($today, 3, 66, $pg);
source_graphic($today, $title, _("Customer"), $pg, _("Sales"));
table_one();
$title = customer_top($today, 3, 66, $pg);
source_graphic($today, $title, _("Customer"), $pg, _("Sales"));
$title = supplier_top($today, 3, 66, $pg);
source_graphic($today, $title, _("Supplier"), $pg, _("Purchases"));
$title = supplier_top($today, 3, 66, $pg);
source_graphic($today, $title, _("Supplier"), $pg, _("Purchases"));
$title = stock_top($today, 3, 66, 0, $pg);
source_graphic($today, $title, _("Items"), $pg, _("Sales"), _("Costs"));
table_two();
dimension_top($today, 3, 66);
$title = stock_top($today, 3, 66, 0, $pg);
source_graphic($today, $title, _("Items"), $pg, _("Sales"), _("Costs"));
table_two();
dimension_top($today, 3, 66);
$title = gl_top($today, 66, $pg);
source_graphic($today, $title, _("Class"), $pg, _("Amount"), null, 5);
stock_top($today, 3, 66, 2);
$title = gl_top($today, 66, $pg);
source_graphic($today, $title, _("Class"), $pg, _("Amount"), null, 5);
stock_top($today, 3, 66, 2);
SUM(qty) AS qty FROM ".TB_PREF."stock_master AS s, ".TB_PREF."stock_moves AS m
WHERE s.stock_id=m.stock_id ";
if ($type == 1)
SUM(qty) AS qty FROM ".TB_PREF."stock_master AS s, ".TB_PREF."stock_moves AS m
WHERE s.stock_id=m.stock_id ";
if ($type == 1)
$pg = new graph();
$begin = begin_fiscalyear();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
$pg = new graph();
$begin = begin_fiscalyear();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
SUM(IF(c.ctype = 4, amount * -1, 0)) AS sales,
SUM(IF(c.ctype = 6, amount, 0)) AS costs FROM
".TB_PREF."gl_trans, ".TB_PREF."chart_master AS a, ".TB_PREF."chart_types AS t,
".TB_PREF."chart_class AS c WHERE(c.ctype = 4 OR c.ctype = 6)
AND account = a.account_code AND a.account_type = t.id AND t.class_id = c.cid
AND tran_date >= '$begin1' AND tran_date <= '$today1'
SUM(IF(c.ctype = 4, amount * -1, 0)) AS sales,
SUM(IF(c.ctype = 6, amount, 0)) AS costs FROM
".TB_PREF."gl_trans, ".TB_PREF."chart_master AS a, ".TB_PREF."chart_types AS t,
".TB_PREF."chart_class AS c WHERE(c.ctype = 4 OR c.ctype = 6)
AND account = a.account_code AND a.account_type = t.id AND t.class_id = c.cid
AND tran_date >= '$begin1' AND tran_date <= '$today1'
GROUP BY week_name ORDER BY week_name ASC";
$result = db_query($sql, "Transactions could not be calculated");
$title = _("Last $weeks weeks Performance");
GROUP BY week_name ORDER BY week_name ASC";
$result = db_query($sql, "Transactions could not be calculated");
$title = _("Last $weeks weeks Performance");