#$locale->text('ea');
use POSIX qw(strftime);
+use List::Util qw(max);
use SL::IC;
use SL::ReportGenerator;
$form->{eur} = $eur; # config dumps into namespace - yuck
$form->{pg_keys} = sub { "$_[0]->{partsgroup}--$_[0]->{id}" };
$form->{description_area} = ($form->{rows} = $form->numtextrows($form->{description}, 40)) > 1;
+ $form->{notes_rows} = max 4, $form->numtextrows($form->{notes}, 40), $form->numtextrows($form->{formel}, 40);
map { $form->{"is_$_"} = ($form->{item} eq $_) } qw(part service assembly);
map { $form->{$_} =~ s/"/"/g; } qw(unit);
$form->get_lists('price_factors' => 'ALL_PRICE_FACTORS',
'partsgroup' => 'all_partsgroup');
- $rows = 4 if $rows = $form->numtextrows($form->{notes}, 40) < 2;
- $form->{notes_rows} = $rows;
-
IC->retrieve_buchungsgruppen(\%myconfig, $form);
@{ $form->{BUCHUNGSGRUPPEN} } = grep { $_->{id} eq $form->{buchungsgruppen_id} || ($form->{id} && $form->{orphaned}) || !$form->{id} } @{ $form->{BUCHUNGSGRUPPEN} };
<td>
<ilayer>
<layer onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('Die Formeln müssen in der folgenden Syntax eingegeben werden:<br>Bei normalen Artikeln:<br>Variablenname= Variable Einheit;<br>Variablenname2= Variable2 Einheit2;<br>...<br>###<br>Variable + Variable2 * ( Variable - Variable2 )<br>Bitte achten Sie auf die Leerzeichen in der Formel<br>Es muss jeweils die Gesamte Zeile eingegeben werden')">
- <textarea name="formel" rows="4" cols="30" wrap="soft">[% HTML.escape(formel) %]</textarea></layer></ilayer>
+ <textarea name="formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft">[% HTML.escape(formel) %]</textarea></layer></ilayer>
</td>
[%- END %]
</tr>
<td>
<ilayer>
<layer onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('<translate>The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br></translate>')">
- <textarea name="formel" rows="4" cols="30" wrap="soft">[% HTML.escape(formel) %]</textarea></layer></ilayer>
+ <textarea name="formel" rows="[% HTML.escape(notes_rows) %]" cols="30" wrap="soft">[% HTML.escape(formel) %]</textarea></layer></ilayer>
</td>
[%- END %]
</tr>