View | Details | Raw Unified | Return to bug 5072
Collapse All | Expand All

(-)a/.gitignore (+2 lines)
Line 0 Link Here
1
*.swp
2
*~
(-)a/C4/Budgets.pm (-6 / +6 lines)
Lines 660-670 sub GetBudget { Link Here
660
    return $result;
660
    return $result;
661
}
661
}
662
662
663
=head2 GetBudgets
663
=head2 GetChildBudgetsSpent
664
664
665
  &GetBudgets($filter, $order_by);
665
  &GetChildBudgetsSpent($budget-id);
666
666
667
gets all budgets
667
gets the total spent of the level and sublevels of $budget_id
668
668
669
=cut
669
=cut
670
670
Lines 687-697 sub GetChildBudgetsSpent { Link Here
687
    return $total_spent;
687
    return $total_spent;
688
}
688
}
689
689
690
=head2 GetChildBudgetsSpent
690
=head2 GetBudgets
691
691
692
  &GetChildBudgetsSpent($budget-id);
692
  &GetBudgets($filter, $order_by);
693
693
694
gets the total spent of the level and sublevels of $budget_id
694
gets all budgets
695
695
696
=cut
696
=cut
697
697
(-)a/acqui/basket.pl (+13 lines)
Lines 287-292 if ( $op eq 'delete_confirm' ) { Link Here
287
287
288
    my $contract = &GetContract($basket->{contractnumber});
288
    my $contract = &GetContract($basket->{contractnumber});
289
    my @orders = GetOrders($basketno);
289
    my @orders = GetOrders($basketno);
290
291
    my $borrower= GetMember('borrowernumber' => $loggedinuser);
292
    my $budgets = GetBudgetHierarchy(q{},$borrower->{branchcode},$borrower->{borrowernumber});
293
    my $has_budgets = 0;
294
    foreach my $r (@{$budgets}) {
295
        if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) {
296
            next;
297
        }
298
        $has_budgets = 1;
299
        last;
300
    }
301
290
    $template->param(
302
    $template->param(
291
        basketno             => $basketno,
303
        basketno             => $basketno,
292
        basketname           => $basket->{'basketname'},
304
        basketname           => $basket->{'basketname'},
Lines 316-321 if ( $op eq 'delete_confirm' ) { Link Here
316
        basketgroups         => $basketgroups,
328
        basketgroups         => $basketgroups,
317
        grouped              => $basket->{basketgroupid},
329
        grouped              => $basket->{basketgroupid},
318
        unclosable           => @orders ? 0 : 1, 
330
        unclosable           => @orders ? 0 : 1, 
331
        has_budgets          => $has_budgets,
319
    );
332
    );
320
}
333
}
321
334
(-)a/acqui/neworderempty.pl (-1 / +1 lines)
Lines 92-98 use C4::ImportBatch qw/GetImportRecordMarc SetImportRecordStatus/; Link Here
92
92
93
my $input           = new CGI;
93
my $input           = new CGI;
94
my $booksellerid    = $input->param('booksellerid');	# FIXME: else ERROR!
94
my $booksellerid    = $input->param('booksellerid');	# FIXME: else ERROR!
95
my $budget_id       = $input->param('budget_id') || 0;	# FIXME: else ERROR!
95
my $budget_id       = $input->param('budget_id') || 0;
96
my $title           = $input->param('title');
96
my $title           = $input->param('title');
97
my $author          = $input->param('author');
97
my $author          = $input->param('author');
98
my $publicationyear = $input->param('publicationyear');
98
my $publicationyear = $input->param('publicationyear');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl (-1 / +4 lines)
Lines 288-293 Link Here
288
        <!-- TMPL_UNLESS name="closedate" -->
288
        <!-- TMPL_UNLESS name="closedate" -->
289
        <fieldset id="acqui_basket_add">
289
        <fieldset id="acqui_basket_add">
290
            <legend>Add Order To Basket</legend>
290
            <legend>Add Order To Basket</legend>
291
            <!-- TMPL_IF NAME="has_budgets" -->
291
            <form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
292
            <form action="/cgi-bin/koha/acqui/neworderbiblio.pl" method="post">
292
                <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
293
                <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
293
                <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
294
                <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
Lines 299-304 Link Here
299
                <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->"> From a staged file</a></li>
300
                <li><a href="/cgi-bin/koha/acqui/addorderiso2709.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->"> From a staged file</a></li>
300
                </ul>
301
                </ul>
301
            </form>
302
            </form>
303
            <!-- TMPL_ELSE -->
304
                You can't create any orders unless you first <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">define a budget and a fund</a>.
305
            <!-- /TMPL_IF -->
302
        </fieldset>
306
        </fieldset>
303
        <!-- /TMPL_UNLESS -->
307
        <!-- /TMPL_UNLESS -->
304
        <!-- /TMPL_UNLESS -->
308
        <!-- /TMPL_UNLESS -->
305
- 

Return to bug 5072