Added message when no file is selected for view or download.
[fa-stable.git] / reporting / rep111.php
index a16a1d7fc0efd7fc7e23657804b90aa9542453f1..5db2f9d06dd40f8ce9281e46d4c1eea7228f35fa 100644 (file)
@@ -78,7 +78,7 @@ function print_sales_quotations()
                        $rep->Info($params, $cols, null, $aligns);
                }
                $rep->title = _("SALES QUOTATION");
-               $rep->Header2($myrow, $branch, $myrow, $baccount, 7);
+               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE);
 
                $result = get_sales_order_details($i, ST_SALESQUOTE);
                $SubTotal = 0;
@@ -107,7 +107,7 @@ function print_sales_quotations()
                        $rep->row = $newrow;
                        //$rep->NewLine(1);
                        if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
-                               $rep->Header2($myrow, $branch, $myrow, $baccount, 9);
+                               $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE);
                }
                if ($myrow['comments'] != "")
                {
@@ -119,7 +119,7 @@ function print_sales_quotations()
 
                $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
                $linetype = true;
-               $doctype = 9;
+               $doctype = ST_SALESQUOTE;
                if ($rep->currency != $myrow['curr_code'])
                {
                        include($path_to_root . "/reporting/includes/doctext2.inc");
@@ -137,8 +137,17 @@ function print_sales_quotations()
                $rep->NewLine();
                $DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec);
                $rep->Font('bold');
-               $rep->TextCol(3, 6, $doc_TOTAL_ORDER, - 2);
+               if ($myrow['tax_included'] == 0)
+                       $rep->TextCol(3, 6, $doc_TOTAL_ORDER, - 2);
+               else    
+                       $rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2);
                $rep->TextCol(6, 7,     $DisplayTotal, -2);
+               $words = price_in_words($myrow["freight_cost"] + $SubTotal, ST_SALESQUOTE);
+               if ($words != "")
+               {
+                       $rep->NewLine(1);
+                       $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, - 2);
+               }       
                $rep->Font();
                if ($email == 1)
                {