Added memo/comments print in remittance and receipt. Optimized memo/prints in other...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 16 Dec 2011 09:21:17 +0000 (10:21 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 16 Dec 2011 09:21:17 +0000 (10:21 +0100)
reporting/rep107.php
reporting/rep110.php
reporting/rep112.php
reporting/rep113.php
reporting/rep210.php
reporting/rep409.php

index 620117f775f595b0dfe62d7acd9f1b6b4f3923ff..17fbd69dd3640d7b734c39eae78562786915d9bc 100644 (file)
@@ -129,12 +129,11 @@ function print_invoices()
                                        $rep->NewPage();
                        }
 
-                       $comments = get_comments(ST_SALESINVOICE, $i);
-                       if ($comments && db_num_rows($comments))
+                       $memo = get_comments_string(ST_SALESINVOICE, $i);
+                       if ($memo != "")
                        {
                                $rep->NewLine();
-                       while ($comment=db_fetch($comments))
-                               $rep->TextColLines(0, 6, $comment['memo_'], -2);
+                               $rep->TextColLines(1, 5, $memo, -2);
                        }
 
                        $DisplaySubTot = number_format2($SubTotal,$dec);
index cadfc522faaa708d481783878d95e297ff1d7d3f..bcb89665d280686ee01253197e153d27887844ea 100644 (file)
@@ -141,12 +141,11 @@ function print_deliveries()
                                        $rep->NewPage();
                        }
 
-                       $comments = get_comments(ST_CUSTDELIVERY, $i);
-                       if ($comments && db_num_rows($comments))
+                       $memo = get_comments_string(ST_CUSTDELIVERY, $i);
+                       if ($memo != "")
                        {
                                $rep->NewLine();
-                       while ($comment=db_fetch($comments))
-                               $rep->TextColLines(0, 6, $comment['memo_'], -2);
+                               $rep->TextColLines(1, 5, $memo, -2);
                        }
 
                        $DisplaySubTot = number_format2($SubTotal,$dec);
index c13df00d862f25f6b372d6419d3f716a45ed2758..ba6c94653b4571ccf24f83b4ff94a1294ad7efd4 100644 (file)
@@ -138,6 +138,13 @@ function print_receipts()
                                        $rep->NewPage();
                        }
 
+                       $memo = get_comments_string($j, $i);
+                       if ($memo != "")
+                       {
+                               $rep->NewLine();
+                               $rep->TextColLines(1, 5, $memo, -2);
+                       }
+
                        $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
 
                        $rep->TextCol(3, 6, _("Total Allocated"), -2);
index bca06d1b2cea99c4dd07da2ade2d4e9b25be8ad6..7a612243ff6a2b313f6b92b17e6b94e4a18e0ad9 100644 (file)
@@ -131,12 +131,11 @@ function print_credits()
                                        $rep->NewPage();
                        }
 
-                       $comments = get_comments(ST_CUSTCREDIT, $i);
-                       if ($comments && db_num_rows($comments))
+                       $memo = get_comments_string(ST_CUSTCREDIT, $i);
+                       if ($memo != "")
                        {
                                $rep->NewLine();
-                       while ($comment=db_fetch($comments))
-                               $rep->TextColLines(0, 6, $comment['memo_'], -2);
+                               $rep->TextColLines(1, 5, $memo, -2);
                        }
 
                        $DisplaySubTot = number_format2($SubTotal,$dec);
index f177fbc1b480c71d210a9542d84a5608df2d5522..136f0d2c9fe355b542fc8dd06cbad64d5f112d27 100644 (file)
@@ -152,6 +152,12 @@ function print_remittances()
                                        $rep->NewPage();
                        }
 
+                       $memo = get_comments_string($j, $i);
+                       if ($memo != "")
+                       {
+                               $rep->NewLine();
+                               $rep->TextColLines(1, 5, $memo, -2);
+                       }
                        $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
 
                        $rep->TextCol(3, 6, _("Total Allocated"), -2);
index a4d41c7008f741b7f2ca8ffaee50ded4e054db07..57ed978d603d8d340024bc2518df4f4ed7d1c292 100644 (file)
@@ -131,13 +131,13 @@ function print_workorders()
                $rep->NewLine(1);
                $rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2);
 
-               $comments = get_comments(ST_WORKORDER, $i);
-               if ($comments && db_num_rows($comments))
+               $memo = get_comments_string(ST_WORKORDER, $i);
+               if ($memo != "")
                {
                        $rep->NewLine();
-                       while ($comment=db_fetch($comments))
-                               $rep->TextColLines(0, 6, $comment['memo_'], -2);
+                       $rep->TextColLines(1, 5, $memo, -2);
                }
+
                if ($email == 1)
                {
                        $myrow['DebtorName'] = $myrow['contact'];