Lines 67-73
use C4::Koha; # GetKohaAuthorisedValues GetItemTypes
Link Here
|
67 |
use C4::Acquisition; |
67 |
use C4::Acquisition; |
68 |
use C4::Auth; |
68 |
use C4::Auth; |
69 |
use C4::Output; |
69 |
use C4::Output; |
70 |
use C4::Dates qw/format_date/; |
|
|
71 |
use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /; |
70 |
use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /; |
72 |
use C4::Members; |
71 |
use C4::Members; |
73 |
use C4::Branch; # GetBranches |
72 |
use C4::Branch; # GetBranches |
Lines 76-82
use C4::Biblio;
Link Here
|
76 |
use C4::Suggestions; |
75 |
use C4::Suggestions; |
77 |
|
76 |
|
78 |
use Koha::Acquisition::Bookseller; |
77 |
use Koha::Acquisition::Bookseller; |
79 |
|
78 |
use Koha::DateUtils; |
80 |
|
79 |
|
81 |
my $input = new CGI; |
80 |
my $input = new CGI; |
82 |
|
81 |
|
Lines 88-94
my $freight = $invoice->{shipmentcost};
Link Here
|
88 |
my $datereceived = $invoice->{shipmentdate}; |
87 |
my $datereceived = $invoice->{shipmentdate}; |
89 |
my $ordernumber = $input->param('ordernumber'); |
88 |
my $ordernumber = $input->param('ordernumber'); |
90 |
|
89 |
|
91 |
$datereceived = $datereceived ? C4::Dates->new($datereceived, 'iso') : C4::Dates->new(); |
90 |
$datereceived = eval{ dt_from_string( $datereceived ); }; |
92 |
|
91 |
|
93 |
my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid }); |
92 |
my $bookseller = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid }); |
94 |
my $results; |
93 |
my $results; |
Lines 196-201
my $member = GetMember( borrowernumber => $authorisedby );
Link Here
|
196 |
|
195 |
|
197 |
my $budget = GetBudget( $order->{budget_id} ); |
196 |
my $budget = GetBudget( $order->{budget_id} ); |
198 |
|
197 |
|
|
|
198 |
my $orderentrydate = eval{ dt_from_string( $order->{entrydate} ); }; |
199 |
$orderentrydate = output_pref( { dt => $orderentrydate, dateonly => 1 } ) if ( $orderentrydate ); |
200 |
|
199 |
$template->param( |
201 |
$template->param( |
200 |
AcqCreateItem => $AcqCreateItem, |
202 |
AcqCreateItem => $AcqCreateItem, |
201 |
count => 1, |
203 |
count => 1, |
Lines 205-211
$template->param(
Link Here
|
205 |
booksellerid => $order->{'booksellerid'}, |
207 |
booksellerid => $order->{'booksellerid'}, |
206 |
freight => $freight, |
208 |
freight => $freight, |
207 |
name => $bookseller->{'name'}, |
209 |
name => $bookseller->{'name'}, |
208 |
date => format_date($order->{entrydate}), |
210 |
date => $orderentrydate, |
209 |
title => $order->{'title'}, |
211 |
title => $order->{'title'}, |
210 |
author => $order->{'author'}, |
212 |
author => $order->{'author'}, |
211 |
copyrightdate => $order->{'copyrightdate'}, |
213 |
copyrightdate => $order->{'copyrightdate'}, |
Lines 221-228
$template->param(
Link Here
|
221 |
membersurname => $member->{surname} || "", |
223 |
membersurname => $member->{surname} || "", |
222 |
invoiceid => $invoice->{invoiceid}, |
224 |
invoiceid => $invoice->{invoiceid}, |
223 |
invoice => $invoice->{invoicenumber}, |
225 |
invoice => $invoice->{invoicenumber}, |
224 |
datereceived => $datereceived->output(), |
226 |
datereceived => output_pref( { dt => $datereceived, dateonly => 1 } ), |
225 |
datereceived_iso => $datereceived->output('iso'), |
227 |
datereceived_iso => output_pref( { dt => $datereceived, dateonly => 1, dateformat => 'iso' } ), |
226 |
order_internalnote => $order->{order_internalnote}, |
228 |
order_internalnote => $order->{order_internalnote}, |
227 |
order_vendornote => $order->{order_vendornote}, |
229 |
order_vendornote => $order->{order_vendornote}, |
228 |
suggestionid => $suggestion->{suggestionid}, |
230 |
suggestionid => $suggestion->{suggestionid}, |