Some documents views didn't show new lines in comments. Fixed.
authorJoe <unknown>
Thu, 26 Sep 2013 10:57:59 +0000 (12:57 +0200)
committerJoe <unknown>
Thu, 26 Sep 2013 10:57:59 +0000 (12:57 +0200)
includes/ui/ui_view.inc
purchasing/includes/db/po_db.inc
sales/view/view_sales_order.php

index f382fba595e74ce67c3f285c35ed130af1e977f3..9a9eb0932ed8988373c844462bed9c19c9a641d7 100644 (file)
@@ -358,7 +358,7 @@ function comments_display_row($type, $id)
                echo "<tr><td colspan=15>";
        while ($comment = db_fetch($comments))
        {
-               echo $comment["memo_"] . "<br>";
+               echo nl2br($comment["memo_"]) . "<br>";
        }
                echo "</td></tr>";
        }
index e841d5e8caa34208d56c97069d823a5e096939f1..ea541dcf47b087c64675bec5d70396ae8d1241fe 100644 (file)
@@ -147,7 +147,7 @@ function read_po_header($order_no, &$order)
                $order->credit = get_current_supp_credit($order->supplier_id);
 
        $order->orig_order_date = sql2date($myrow["ord_date"]);
-       $order->Comments = $myrow["comments"];
+       $order->Comments = nl2br($myrow["comments"]);
        $order->Location = $myrow["into_stock_location"];
        $order->supp_ref = $myrow["requisition_no"];
        $order->reference = $myrow["reference"];
index 405f1d6653589024b7e0fe315783a511644136f6..6790f20d8148696da8cb1e0aa6b36c70445b0769 100644 (file)
@@ -82,7 +82,7 @@ label_row(_("Reference"), $_SESSION['View']->reference, "class='tableheader2'",
 label_row(_("Telephone"), $_SESSION['View']->phone, "class='tableheader2'", "colspan=3");
 label_row(_("E-mail"), "<a href='mailto:" . $_SESSION['View']->email . "'>" . $_SESSION['View']->email . "</a>",
        "class='tableheader2'", "colspan=3");
-label_row(_("Comments"), $_SESSION['View']->Comments, "class='tableheader2'", "colspan=3");
+label_row(_("Comments"), nl2br($_SESSION['View']->Comments), "class='tableheader2'", "colspan=3");
 end_table();
 
 if ($_GET['trans_type'] != ST_SALESQUOTE)