<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — how to display report for comment field larger with medium text]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8091&amp;type=atom" />
	<updated>2019-04-12T07:58:56Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8091</id>
		<entry>
			<title type="html"><![CDATA[Re: how to display report for comment field larger with medium text]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34648#p34648" />
			<content type="html"><![CDATA[<p>this should works,<br />add line 810 in pdf_report.inc:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($this-&gt;row &lt; $this-&gt;bottomMargin + (15 * $this-&gt;lineHeight))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;NewPage();</p><p>full line will be:<br />&nbsp; &nbsp; &nbsp; &nbsp; function TextWrapLines($c, $width, $txt, $align=&#039;left&#039;, $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $str = explode(&quot;\n&quot;, $txt);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ($i = 0; $i &lt; count($str); $i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $l = $str[$i];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $l = $this-&gt;TextWrap($c, $this-&gt;row , $width, $l, $align, $border, $fill, $link, $stretch, $spacebreak);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;row -= $this-&gt;lineHeight;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($this-&gt;row &lt; $this-&gt;bottomMargin + (15 * $this-&gt;lineHeight))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;NewPage();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ($l != &#039;&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p>]]></content>
			<author>
				<name><![CDATA[ichtus]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=12975</uri>
			</author>
			<updated>2019-04-12T07:58:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34648#p34648</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[how to display report for comment field larger with medium text]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34647#p34647" />
			<content type="html"><![CDATA[<p>FA 2.4.6<br />PHP 7.2<br />Centos 7.x</p><p>reading: https://frontaccounting.com/punbb/viewtopic.php?id=2932</p><p>idea is to have comment larger and get printed in documents<br />we want to put details for the specification for items in the comments, as the comments will have max char 65,355 this will able break 1 pages (usually do, if we have print documents from excel) </p><p>after modification table:<br />ALTER TABLE `0_comments` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;<br />ALTER TABLE `0_purch_orders` MODIFY COLUMN `comments` MEDIUMTEXT DEFAULT NULL;<br />ALTER TABLE `0_sales_orders` MODIFY COLUMN `comments` MEDIUMTEXT DEFAULT NULL;<br />ALTER TABLE `0_supp_invoice_items` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;<br />ALTER TABLE `0_stock_master` MODIFY COLUMN `long_description` MEDIUMTEXT DEFAULT NULL;<br />ALTER TABLE `0_trans_tax_details` MODIFY COLUMN `memo` MEDIUMTEXT DEFAULT NULL;<br />ALTER TABLE `0_debtor_trans_details` MODIFY COLUMN `description` MEDIUMTEXT DEFAULT NULL;<br />#ALTER TABLE `0_gl_trans` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;<br />#ALTER TABLE `0_voided` MODIFY COLUMN `memo_` MEDIUMTEXT DEFAULT NULL;</p><p>now comments is larger, but how to fix for the printed report<br />109 - Print Sales Orders<br />110 - Print Deliveries - Also handles Packing Lists. | Bin Locations in Packing List<br />111 - Print Sales Quotations<br />209 - Print Purchase Orders</p><p>for example print PO:<br />Lines 156 reporting/rep209.php :</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($myrow[&#039;comments&#039;] != &quot;&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;NewLine();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $rep-&gt;TextColLines(1, 4, $myrow[&#039;comments&#039;], -2);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>Lines 1092 reporting/includes/pdf_report.inc :<br />&nbsp; &nbsp; &nbsp; &nbsp; function TextColLines($c, $n, $txt, $corr=0, $r=0, $border=0, $fill=0, $link=NULL, $stretch=0)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;row -= $r;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;TextWrapLines($this-&gt;cols[$c], $this-&gt;cols[$n] - $this-&gt;cols[$c] + $corr, $txt, $this-&gt;aligns[$c], $border, $fill, $link, $stretch, true);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; function TextWrapLines($c, $width, $txt, $align=&#039;left&#039;, $border=0, $fill=0, $link=NULL, $stretch=0, $spacebreak=true)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $str = explode(&quot;\n&quot;, $txt);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ($i = 0; $i &lt; count($str); $i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $l = $str[$i];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; do<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $l = $this-&gt;TextWrap($c, $this-&gt;row , $width, $l, $align, $border, $fill, $link, $stretch, $spacebreak);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;row -= $this-&gt;lineHeight;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ($l != &#039;&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>it this possible to add for NewPage if BottomMargin have reached? just tryout something but cannot get it works<br />sorry as my PHP skill quite basic, please any assistance will appreciated</p>]]></content>
			<author>
				<name><![CDATA[ichtus]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=12975</uri>
			</author>
			<updated>2019-04-12T07:25:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34647#p34647</id>
		</entry>
</feed>
