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

(-)a/C4/Budgets.pm (-7 / +8 lines)
Lines 487-500 sub ModBudgetPeriod { Link Here
487
487
488
# -------------------------------------------------------------------
488
# -------------------------------------------------------------------
489
sub GetBudgetHierarchy {
489
sub GetBudgetHierarchy {
490
	my ($budget_period_id, $branchcode, $owner) = @_;
490
    my ( $budget_period_id, $branchcode, $owner ) = @_;
491
	my @bind_params;
491
    my @bind_params;
492
	my $dbh   = C4::Context->dbh;
492
    my $dbh   = C4::Context->dbh;
493
	my $query = qq|
493
    my $query = qq|
494
                    SELECT aqbudgets.*
494
                    SELECT aqbudgets.*, aqbudgetperiods.budget_period_active
495
                    FROM aqbudgets 
495
                    FROM aqbudgets 
496
                    LEFT JOIN aqbudgetperiods 
496
                    JOIN aqbudgetperiods USING (budget_period_id)|;
497
                    ON aqbudgetperiods.budget_period_id=aqbudgets.budget_period_id |;
497
                        
498
    # show only period X if requested
498
	my @where_strings;
499
	my @where_strings;
499
    # Pick out the active ones
500
    # Pick out the active ones
500
    push @where_strings, 'aqbudgetperiods.budget_period_active=1';
501
    push @where_strings, 'aqbudgetperiods.budget_period_active=1';
(-)a/acqui/neworderempty.pl (+1 lines)
Lines 263-268 foreach my $r (@{$budgets}) { Link Here
263
    push @{$budget_loop}, {
263
    push @{$budget_loop}, {
264
        b_id  => $r->{budget_id},
264
        b_id  => $r->{budget_id},
265
        b_txt => $r->{budget_name},
265
        b_txt => $r->{budget_name},
266
        b_active => $r->{budget_period_active},
266
        b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0,
267
        b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0,
267
    };
268
    };
268
}
269
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl (-4 / +37 lines)
Lines 64-70 ff.submit(); Link Here
64
64
65
}
65
}
66
66
67
67
$(document).ready(function() 
68
    {
69
        //We apply the fonction only for modify option
70
        <!--TMPL_IF NAME="quantityrec"-->
71
        $('#quantity').blur(function() 
72
        {
73
            // if user decreases the quantity
74
            if($(this).val() < <!-- TMPL_VAR name="quantityrec" -->) 
75
            {
76
                alert("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog");   
77
                return true;
78
            } 
79
            else 
80
            {
81
                // if user increases the quantity
82
                alert("You can't add a new item, please create a new order line");
83
                // and we replace the original value
84
                $(this).val(<!-- TMPL_VAR name="quantityrec" -->)
85
                return false;
86
            }
87
        });
88
        <!-- /TMPL_IF -->
89
        
90
        $('#showallbudgets').click(function() {
91
            if ( $('#budget_id .b_inactive').is(":visible") )
92
            {
93
            $('#budget_id .b_inactive').hide();
94
            }
95
            else {
96
            $('#budget_id .b_inactive').show();
97
            }
98
        });
99
    });
68
//]]>
100
//]]>
69
</script>
101
</script>
70
</head>
102
</head>
Lines 273-283 ff.submit(); Link Here
273
                    <!-- TMPL_IF NAME="b_sel" -->
305
                    <!-- TMPL_IF NAME="b_sel" -->
274
                        <option value="<!-- TMPL_VAR NAME='b_id' -->" selected="selected"><!-- TMPL_VAR NAME="b_txt" --></option>
306
                        <option value="<!-- TMPL_VAR NAME='b_id' -->" selected="selected"><!-- TMPL_VAR NAME="b_txt" --></option>
275
                    <!-- TMPL_ELSE -->
307
                    <!-- TMPL_ELSE -->
276
                        <option value="<!-- TMPL_VAR NAME='b_id' -->"><!-- TMPL_VAR NAME="b_txt" --></option>
308
                        <!-- TMPL_IF NAME="b_active" --><option value="<!-- TMPL_VAR NAME='b_id' -->"><!-- TMPL_VAR NAME="b_txt" --></option>
309
                        <!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME='b_id' -->" class="b_inactive" style="display : none;"><!-- TMPL_VAR NAME="b_txt" --></option>    
310
                        <!-- /TMPL_IF -->
277
                    <!-- /TMPL_IF -->
311
                    <!-- /TMPL_IF -->
278
                <!-- /TMPL_LOOP -->
312
                <!-- /TMPL_LOOP -->
279
                </select>
313
                </select>
280
                <!--/TMPL_IF-->
314
                <!--/TMPL_IF--> <span class="label">&nbsp;Show all :</span><input type="checkbox" id="showallbudgets" />
281
            </li>
315
            </li>
282
		<li>
316
		<li>
283
                <!-- TMPL_IF name="close" -->
317
                <!-- TMPL_IF name="close" -->
284
- 

Return to bug 5963