File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868$ autofill = new Util \Autofill ($ columns );
6969$ rows_per_page = 22 ;
7070$ rows_first_page = 36 ;
71- $ autofill ->setRows ($ rows_per_page , 0 , $ rows_first_page );
72-
7371// Conto le righe da diminuire
7472$ c = 0 ;
75- $ destinazione ? $ c += 2 : null ;
73+ $ destinazione ? $ c += 2 : 0 ;
74+
75+ $ descrizione_righe = 0 ;
76+ if (!empty ($ documento ['descrizione ' ])) {
77+ $ descrizione_text = (string ) $ documento ['descrizione ' ];
78+ $ descrizione_lines = explode ("\n" , $ descrizione_text );
79+ foreach ($ descrizione_lines as $ line ) {
80+ $ descrizione_righe += ceil (strlen ($ line ) / 70 );
81+ }
82+ $ descrizione_righe += 2 ;
83+ $ c += $ descrizione_righe ;
84+ }
7685
7786// Diminuisco le righe disponibili per pagina
7887$ autofill ->setRows ($ rows_per_page - $ c , 0 , $ rows_first_page - $ c );
8291 echo '
8392<p> ' .nl2br ((string ) $ documento ['descrizione ' ]).'</p>
8493<br> ' ;
85- $ autofill ->count ($ documento ['descrizione ' ]);
8694}
8795
8896// Intestazione tabella per righe
204212
205213 echo '
206214 <br><small class="text-muted"> ' .$ text .'</small> ' ;
215+ $ autofill ->count ($ text , true );
207216 }
208217
209218 echo '
You can’t perform that action at this time.
0 commit comments