my %params;
$params{not_id} = $form->{id} if ($form->{id});
$params{trans_id} = $form->{LINKS}->[0]->{trans_id} if (@{ $form->{LINKS} });
- $form->{FOLLOW_UPS} = FU->follow_ups(%params);
+
+ $form->{sort} = 'follow_up_date';
+ $form->{FOLLOW_UPS_DONE} = FU->follow_ups(%params, done => 1);
+ $form->{FOLLOW_UPS_PENDING} = FU->follow_ups(%params, not_done => 1);
setup_fu_display_form_action_bar() unless $::form->{POPUP_MODE};
'Existing contacts (with column \'cp_id\')' => 'Existierende Ansprechpersonen (mit Spalte \'cp_id\')',
'Existing customers/vendors with same customer/vendor number' => 'Existierende Kunden/Lieferanten mit derselben Kunden-/Lieferantennummer',
'Existing file on server' => 'Auf dem Server existierende Datei',
+ 'Existing finished follow-ups for this item' => 'Erledigte Wiedervorlagen für dieses Dokument',
'Existing pending follow-ups for this item' => 'Noch nicht erledigte Wiedervorlagen für dieses Dokument',
'Existing profiles' => 'Existierende Profile',
'Existing templates' => 'Vorhandene Belegvorlagen',
'Existing contacts (with column \'cp_id\')' => '',
'Existing customers/vendors with same customer/vendor number' => '',
'Existing file on server' => '',
+ 'Existing finished follow-ups for this item' => '',
'Existing pending follow-ups for this item' => '',
'Existing profiles' => '',
'Existing templates' => '',
<input type="submit" class="submit" onclick="window.close()" value="[% 'Cancel' | $T8 %]">
</p>
- [%- IF FOLLOW_UPS.size %]
+ [%- IF FOLLOW_UPS_PENDING.size %]
<hr height="3" noshade>
<h2>[% 'Existing pending follow-ups for this item' | $T8 %]</h2>
<th class="listheading">[% 'Follow-up for' | $T8 %]</th>
</tr>
- [%- FOREACH row = FOLLOW_UPS %]
+ [%- FOREACH row = FOLLOW_UPS_PENDING %]
<tr class="listrow[% loop.count % 2 %]">
<td valign="top">[% HTML.escape(row.follow_up_date) %]</td>
<td valign="top"><a href="fu.pl?action=edit&id=[% HTML.escape(row.id) %][% IF POPUP_MODE %]&POPUP_MODE=1[% END %]">[% HTML.escape(row.subject) %]</a></td>
[%- END %]
</table>
[%- END %]
+
+ [%- IF FOLLOW_UPS_DONE.size %]
+ <hr height="3" noshade>
+
+ <h2>[% 'Existing finished follow-ups for this item' | $T8 %]</h2>
+
+ <table>
+ <tr>
+ <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
+ <th class="listheading">[% 'Subject' | $T8 %]</th>
+ <th class="listheading">[% 'Created by' | $T8 %]</th>
+ <th class="listheading">[% 'Follow-up for' | $T8 %]</th>
+ </tr>
+
+ [%- FOREACH row = FOLLOW_UPS_DONE %]
+ <tr class="listrow[% loop.count % 2 %]">
+ <td valign="top">[% HTML.escape(row.follow_up_date) %]</td>
+ <td valign="top"><a href="fu.pl?action=edit&id=[% HTML.escape(row.id) %][% IF POPUP_MODE %]&POPUP_MODE=1[% END %]">[% HTML.escape(row.subject) %]</a></td>
+ <td valign="top">[% HTML.escape(row.created_by_name) %]</td>
+ <td valign="top">[% HTML.escape(row.created_for_user_name) %]</td>
+ </tr>
+ [%- END %]
+ </table>
+ [%- END %]
+
[%- END %]
[%- FOREACH row = LINKS %]