Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
[% USE Branches %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE AuthorisedValues %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Acquisitions ›
[% IF ( op_save ) %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Acquisitions ›
[% IF ( op_save ) %]
<tbody>
<tr>
<th><span class="label">Suggestion creation</span> </th>
<tbody>
<tr>
<th><span class="label">Suggestion creation</span> </th>
- <td>[% suggesteddate %]</td>
+ <td>[% suggesteddate | $KohaDates %]</td>
<td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% Branches.GetName( suggestedby_branchcode ) %] ([% suggestedby_description %])[% END %]
</td>
</tr>
<tr>
<th><span class="label">Suggestion management</span> </th>
<td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% Branches.GetName( suggestedby_branchcode ) %] ([% suggestedby_description %])[% END %]
</td>
</tr>
<tr>
<th><span class="label">Suggestion management</span> </th>
- <td>[% manageddate %]</td>
+ <td>[% manageddate | $KohaDates %]</td>
<td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% Branches.GetName( managedby_branchcode ) %] ([% managedby_description %])[% END %]</td>
</tr>
<tr>
<th><span class="label">Suggestion accepted</span> </th>
<td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% Branches.GetName( managedby_branchcode ) %] ([% managedby_description %])[% END %]</td>
</tr>
<tr>
<th><span class="label">Suggestion accepted</span> </th>
- <td>[% accepteddate %]</td>
+ <td>[% accepteddate | $KohaDates %]</td>
<td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% Branches.GetName( acceptedby_branchcode ) %] ([% acceptedby_description %])[% END %]</td>
</tr>
</tbody>
<td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% Branches.GetName( acceptedby_branchcode ) %] ([% acceptedby_description %])[% END %]</td>
</tr>
</tbody>
<tbody>
<tr>
<th><label for="suggesteddate">Suggestion creation</label> </th>
<tbody>
<tr>
<th><label for="suggesteddate">Suggestion creation</label> </th>
- <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate %]"/></td>
+ <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/></td>
<td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% Branches.GetName( suggestedby_branchcode ) %] ([% suggestedby_description %])[% END %]
</td>
</tr>
<tr>
<th><label for="managedon">Suggestion management</label> </th>
<td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% Branches.GetName( suggestedby_branchcode ) %] ([% suggestedby_description %])[% END %]
</td>
</tr>
<tr>
<th><label for="managedon">Suggestion management</label> </th>
- <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate %]" /></td>
+ <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" /></td>
<td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% Branches.GetName( managedby_branchcode ) %] ([% managedby_description %])[% END %]</td>
</tr>
<tr>
<th><label for="accepteddate">Suggestion accepted</label> </th>
<td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% Branches.GetName( managedby_branchcode ) %] ([% managedby_description %])[% END %]</td>
</tr>
<tr>
<th><label for="accepteddate">Suggestion accepted</label> </th>
- <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate %]" /></td>
+ <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" /></td>
<td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% Branches.GetName( acceptedby_branchcode ) %] ([% acceptedby_description %])[% END %]</td>
</tr>
</tbody>
<td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% Branches.GetName( acceptedby_branchcode ) %] ([% acceptedby_description %])[% END %]</td>
</tr>
</tbody>
</td>
<td>
[% IF ( suggestions_loo.emailsuggestedby ) %]<a href="mailto:[% suggestions_loo.emailsuggestedby %]">[% END %][% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF ( suggestions_loo.emailsuggestedby ) %]</a>[% END %]
</td>
<td>
[% IF ( suggestions_loo.emailsuggestedby ) %]<a href="mailto:[% suggestions_loo.emailsuggestedby %]">[% END %][% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF ( suggestions_loo.emailsuggestedby ) %]</a>[% END %]
- [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate %][% END %]
+ [% IF ( suggestions_loo.suggesteddate ) %] - [% suggestions_loo.suggesteddate | $KohaDates %][% END %]
</td>
<td>
[% IF ( suggestions_loo.emailmanagedby ) %]<a href="mailto:[% suggestions_loo.emailmanagedby %]">[% END %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %] [% IF ( suggestions_loo.emailmanagedby ) %]</a>[% END %]
</td>
<td>
[% IF ( suggestions_loo.emailmanagedby ) %]<a href="mailto:[% suggestions_loo.emailmanagedby %]">[% END %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby %][% END %] [% IF ( suggestions_loo.emailmanagedby ) %]</a>[% END %]
- [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %]
+ [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate | $KohaDates %][% END %]
</td>
<td>
[% Branches.GetName( suggestions_loo.branchcode ) %]
</td>
<td>
[% Branches.GetName( suggestions_loo.branchcode ) %]
use C4::Branch;
use C4::Budgets;
use C4::Search;
use C4::Branch;
use C4::Budgets;
use C4::Search;
-use C4::Dates qw(format_date);
use C4::Members;
use C4::Debug;
use C4::Members;
use C4::Debug;
# "Managed by" is used only when a suggestion is being edited (not when created)
if ($suggestion->{'suggesteddate'} eq "0000-00-00" ||$suggestion->{'suggesteddate'} eq "") {
# new suggestion
# "Managed by" is used only when a suggestion is being edited (not when created)
if ($suggestion->{'suggesteddate'} eq "0000-00-00" ||$suggestion->{'suggesteddate'} eq "") {
# new suggestion
- $suggestion->{'suggesteddate'} = C4::Dates->today;
+ $suggestion->{suggesteddate} = dt_from_string;
$suggestion->{'suggestedby'} = C4::Context->userenv->{"number"} unless ($suggestion->{'suggestedby'});
}
else {
# editing of an existing suggestion
$suggestion->{'suggestedby'} = C4::Context->userenv->{"number"} unless ($suggestion->{'suggestedby'});
}
else {
# editing of an existing suggestion
- $suggestion->{'manageddate'} = C4::Dates->today;
+ $suggestion->{manageddate} = dt_from_string;
$suggestion->{'managedby'} = C4::Context->userenv->{"number"} unless ($suggestion->{'managedby'});
$suggestion->{'managedby'} = C4::Context->userenv->{"number"} unless ($suggestion->{'managedby'});
- # suggesteddate, when coming from the DB, needs to be formated
- $suggestion->{'suggesteddate'} = format_date($suggestion->{'suggesteddate'});
- }
- foreach my $date ( qw(rejecteddate accepteddate) ){
- $suggestion->{$date}=(($suggestion->{$date} eq "0000-00-00" ||$suggestion->{$date} eq "")?
- "":
- format_date($suggestion->{$date})
- );
}
$suggestion->{'branchcode'}=C4::Context->userenv->{"branch"} unless ($suggestion->{'branchcode'});
}
}
$suggestion->{'branchcode'}=C4::Context->userenv->{"branch"} unless ($suggestion->{'branchcode'});
}
my $bud = GetBudget( $suggestion->{budgetid} );
$suggestion->{budget_name} = $bud->{budget_name} if $bud;
}
my $bud = GetBudget( $suggestion->{budgetid} );
$suggestion->{budget_name} = $bud->{budget_name} if $bud;
}
- foreach my $date (qw(suggesteddate manageddate accepteddate)) {
- if ($suggestion->{$date} and $suggestion->{$date} ne "0000-00-00") {
- $suggestion->{$date} = format_date( $suggestion->{$date} );
- } else {
- $suggestion->{$date} = "";
- }
- }
}
push @allsuggestions,{
"suggestiontype"=>$criteriumvalue||"suggest",
}
push @allsuggestions,{
"suggestiontype"=>$criteriumvalue||"suggest",