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

(-)a/acqui/addorderiso2709.pl (-1 / +35 lines)
Lines 87-94 if ($op eq ""){ Link Here
87
#
87
#
88
} elsif ($op eq "batch_details"){
88
} elsif ($op eq "batch_details"){
89
#display lines inside the selected batch
89
#display lines inside the selected batch
90
    # get currencies (for change rates calcs if needed)
91
    my $active_currency = GetCurrency();
92
    my $default_currency;
93
    if (! $data->{currency} ) { # New order no currency set
94
        if ( $bookseller->{listprice} ) {
95
            $default_currency = $bookseller->{listprice};
96
        }
97
        else {
98
            $default_currency = $active_currency->{currency};
99
        }
100
    }
101
    my @rates = GetCurrencies();
102
103
    # ## @rates
104
105
    my @loop_currency = ();
106
    for my $curr ( @rates ) {
107
        my $selected;
108
        if ($data->{currency} ) {
109
            $selected = $curr->{currency} eq $data->{currency};
110
        }
111
        else {
112
            $selected = $curr->{currency} eq $default_currency;
113
        }
114
        push @loop_currency, {
115
            currcode => $curr->{currency},
116
            rate     => $curr->{rate},
117
            selected => $selected,
118
        }
119
    }
120
90
    $template->param("batch_details" => 1,
121
    $template->param("batch_details" => 1,
91
                     "basketno"      => $cgiparams->{'basketno'});
122
                     "basketno"      => $cgiparams->{'basketno'},
123
                     loop_currencies  => \@loop_currency,
124
                     );
92
    import_biblios_list($template, $cgiparams->{'import_batch_id'});
125
    import_biblios_list($template, $cgiparams->{'import_batch_id'});
93
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber ) {
126
    if ( C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber ) {
94
        # prepare empty item form
127
        # prepare empty item form
Lines 166-171 if ($op eq ""){ Link Here
166
            "budget_id", $budget_id, "uncertainprice", 1,
199
            "budget_id", $budget_id, "uncertainprice", 1,
167
            "sort1", $cgiparams->{'sort1'},"sort2", $cgiparams->{'sort2'},
200
            "sort1", $cgiparams->{'sort1'},"sort2", $cgiparams->{'sort2'},
168
            "notes", $cgiparams->{'notes'}, "budget_id", $cgiparams->{'budget_id'},
201
            "notes", $cgiparams->{'notes'}, "budget_id", $cgiparams->{'budget_id'},
202
            "currency",$cgiparams->{'currency'},
169
        );
203
        );
170
        # get the price if there is one.
204
        # get the price if there is one.
171
        # filter by storing only the 1st number
205
        # filter by storing only the 1st number
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tmpl (-1 / +9 lines)
Lines 156-161 Link Here
156
                        <span class="label">Budget: </span>
156
                        <span class="label">Budget: </span>
157
                                <input type="hidden" size="20" name="budget_id" id="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" /><!-- TMPL_VAR NAME="Budget_name" -->
157
                                <input type="hidden" size="20" name="budget_id" id="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" /><!-- TMPL_VAR NAME="Budget_name" -->
158
                            <!-- TMPL_ELSE -->
158
                            <!-- TMPL_ELSE -->
159
                            <li>
160
                            <label for="currency">Currency:</label>
161
                            <select name="currency" id="currency" onchange="calcNeworderTotal();">
162
                            <!-- TMPL_LOOP name="loop_currencies" -->
163
                                    <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="currcode" -->" selected="selected"><!-- TMPL_VAR name="currcode" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="currcode" -->"><!-- TMPL_VAR name="currcode" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
164
                            </select>
165
                            </li>
166
                            <li>
159
                            <label for="budget_id">Budget: </label>
167
                            <label for="budget_id">Budget: </label>
160
                            <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
168
                            <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
161
                            <!-- TMPL_LOOP NAME="budget_loop" -->
169
                            <!-- TMPL_LOOP NAME="budget_loop" -->
Lines 166-171 Link Here
166
                                <!-- /TMPL_IF -->
174
                                <!-- /TMPL_IF -->
167
                            <!-- /TMPL_LOOP -->
175
                            <!-- /TMPL_LOOP -->
168
                            </select>
176
                            </select>
177
                            </li>
169
                            <!--/TMPL_IF-->
178
                            <!--/TMPL_IF-->
170
                        </li>
179
                        </li>
171
                        <li>
180
                        <li>
172
- 

Return to bug 5961