Rerun. Changed query_size in users table to unsigned tinyint(1)
[fa-stable.git] / reporting / rep109.php
index 0497392fba0f0cb6df11a3e5cdad3b5b53b2e24d..1f7270c4840e1c1885d3b013430ee38fea7dede7 100644 (file)
@@ -61,6 +61,7 @@ function print_sales_orders()
 
        if ($email == 0)
        {
+
                if ($print_as_quote == 0)
                        $rep = new FrontReport(_("SALES ORDER"), "SalesOrderBulk", user_pagesize(), 9, $orientation);
                else
@@ -76,6 +77,11 @@ function print_sales_orders()
                $params['bankaccount'] = $baccount['id'];
                $branch = get_branch($myrow["branch_code"]);
                if ($email == 1)
+                       $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
+               $rep->SetHeaderType('Header2');
+               $rep->currency = $cur;
+               $rep->Font();
+               if ($print_as_quote == 1)
                {
                        $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
                        if ($print_as_quote == 1)
@@ -96,7 +102,7 @@ function print_sales_orders()
                $rep->Font();
                $rep->Info($params, $cols, null, $aligns);
 
-               $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], false);
+               $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], true);
                $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts);
                $rep->NewPage();
 
@@ -129,7 +135,7 @@ function print_sales_orders()
                                $rep->TextCol(4, 5,     $DisplayPrice, -2);
                                $rep->TextCol(5, 6,     $DisplayDiscount, -2);
                                $rep->TextCol(6, 7,     $DisplayNet, -2);
-                       }       
+                       }
                        $rep->row = $newrow;
                        //$rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))