Rerun of dashboard.inc file
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 14 Dec 2015 23:36:59 +0000 (00:36 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 14 Dec 2015 23:36:59 +0000 (00:36 +0100)
includes/dashboard.inc

index 13a94629f8c3b6a55fe95251bf8a08d36dcf5b63..eaaf4a559649c1c0b9365e2e8b068497f9ea67c1 100644 (file)
@@ -53,20 +53,10 @@ function dashboard($sel_app)
                display_all();
 }
 
-function display_customer_topten()
+function display_title($title, $colspan=2)
 {
-       $pg = new graph();
-
-       echo "<table width='100%'>";
-       echo "<tr valign=top><td style='width:50%'>\n"; // outer table
-       $today = Today();
-       $title = customer_top($today, 10, 66, $pg);
-       customer_trans($today);
-       echo "</td><td style='width:50%'>\n";
-       source_graphic($today, $title, _("Customer"), $pg);
-       customer_recurrent_invoices($today);
-       echo "</td></tr></table>\n";
-}
+       echo "<tr><td colspan=$colspan class='headingtext' style='text-align:center;border:0;height:40px;'>$title</td></tr>\n";
+}      
 
 function table_one()
 {
@@ -84,6 +74,20 @@ function table_end()
        echo "</td></tr></table>\n";
 }
 
+function display_customer_topten()
+{
+       $pg = new graph();
+
+       table_one();
+       $today = Today();
+       $title = customer_top($today, 10, 66, $pg);
+       customer_trans($today);
+       table_two();
+       source_graphic($today, $title, _("Customer"), $pg);
+       customer_recurrent_invoices($today);
+       table_end();
+}
+
 function display_supplier_topten()
 {
        $pg = new graph();
@@ -161,11 +165,6 @@ function display_all()
        table_end();
 }
 
-function display_title($title, $colspan=2)
-{
-       echo "<tr><td colspan=$colspan class='headingtext' style='text-align:center;border:0;height:40px;'>$title</td></tr>\n";
-}      
-
 function customer_top($today, $limit=10, $width="33", &$pg=null)
 {
        $begin = begin_fiscalyear();