Lines 36-41
use C4::Acquisition qw( GetInvoices GetInvoice );
Link Here
|
36 |
use C4::Budgets qw( GetBudget GetBudgets CanUserUseBudget ); |
36 |
use C4::Budgets qw( GetBudget GetBudgets CanUserUseBudget ); |
37 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
37 |
use Koha::DateUtils qw( dt_from_string output_pref ); |
38 |
use Koha::Acquisition::Booksellers; |
38 |
use Koha::Acquisition::Booksellers; |
|
|
39 |
use Koha::Patrons; |
39 |
|
40 |
|
40 |
my $input = CGI->new; |
41 |
my $input = CGI->new; |
41 |
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( |
42 |
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( |
Lines 47-52
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
Link Here
|
47 |
} |
48 |
} |
48 |
); |
49 |
); |
49 |
|
50 |
|
|
|
51 |
my $logged_in_patron = Koha::Patrons->find($loggedinuser); |
52 |
my $logged_in_patron_unblessed = $logged_in_patron->unblessed; |
53 |
|
50 |
my $invoicenumber = $input->param('invoicenumber'); |
54 |
my $invoicenumber = $input->param('invoicenumber'); |
51 |
my $supplierid = $input->param('supplierid'); |
55 |
my $supplierid = $input->param('supplierid'); |
52 |
my $shipmentdatefrom = $input->param('shipmentdatefrom'); |
56 |
my $shipmentdatefrom = $input->param('shipmentdatefrom'); |
Lines 107-113
foreach (@suppliers) {
Link Here
|
107 |
my $budgets = GetBudgets(); |
111 |
my $budgets = GetBudgets(); |
108 |
my @budgets_loop; |
112 |
my @budgets_loop; |
109 |
foreach my $budget (@$budgets) { |
113 |
foreach my $budget (@$budgets) { |
110 |
push @budgets_loop, $budget if CanUserUseBudget( $loggedinuser, $budget, $flags ); |
114 |
push @budgets_loop, $budget if CanUserUseBudget( $logged_in_patron_unblessed, $budget, $flags ); |
111 |
} |
115 |
} |
112 |
|
116 |
|
113 |
my (@openedinvoices, @closedinvoices); |
117 |
my (@openedinvoices, @closedinvoices); |