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

(-)a/acqui/orderreceive.pl (-75 / +31 lines)
Lines 89-118 my $freight = $invoice->{shipmentcost}; Link Here
89
my $ordernumber  = $input->param('ordernumber');
89
my $ordernumber  = $input->param('ordernumber');
90
90
91
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
91
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
92
my $results;
92
my $order = Koha::Acquisition::Orders->find( $ordernumber );
93
$results = SearchOrders({
94
    ordernumber => $ordernumber
95
}) if $ordernumber;
96
93
97
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
94
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
98
    {
95
    {
99
        template_name   => "acqui/orderreceive.tt",
96
        template_name   => "acqui/orderreceive.tt",
100
        query           => $input,
97
        query           => $input,
101
        type            => "intranet",
98
        type            => "intranet",
99
        authnotrequired => 0,
102
        flagsrequired   => {acquisition => 'order_receive'},
100
        flagsrequired   => {acquisition => 'order_receive'},
103
        debug           => 1,
101
        debug           => 1,
104
    }
102
    }
105
);
103
);
106
104
107
unless ( $results and @$results) {
105
unless ( $order ) {
108
    output_html_with_http_headers $input, $cookie, $template->output;
106
    output_html_with_http_headers $input, $cookie, $template->output;
109
    exit;
107
    exit;
110
}
108
}
111
109
112
# prepare the form for receiving
110
# prepare the form for receiving
113
my $order = $results->[0];
111
my $basket = $order->basket;
114
my $order_object = Koha::Acquisition::Orders->find( $ordernumber );
115
my $basket = $order_object->basket;
116
my $currencies = Koha::Acquisition::Currencies->search;
112
my $currencies = Koha::Acquisition::Currencies->search;
117
my $active_currency = $currencies->get_active;
113
my $active_currency = $currencies->get_active;
118
114
Lines 130-216 if ($AcqCreateItem eq 'receiving') { Link Here
130
    );
126
    );
131
} elsif ($AcqCreateItem eq 'ordering') {
127
} elsif ($AcqCreateItem eq 'ordering') {
132
    my $fw = ($acq_fw) ? 'ACQ' : '';
128
    my $fw = ($acq_fw) ? 'ACQ' : '';
133
    my $items = $order_object->items;
129
    my $items = $order->items;
134
    my @items;
130
    $template->param(items => $items);
135
    while ( my $i = $items->next ) {
136
        my $item = $i->unblessed;
137
        my $descriptions;
138
        $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.notforloan', authorised_value => $item->{notforloan} });
139
        $item->{notforloan} = $descriptions->{lib} // '';
140
141
        $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.restricted', authorised_value => $item->{restricted} });
142
        $item->{restricted} = $descriptions->{lib} // '';
143
144
        $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.location', authorised_value => $item->{location} });
145
        $item->{location} = $descriptions->{lib} // '';
146
147
        $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.ccode', authorised_value => $item->{ccode} });
148
        $item->{collection} = $descriptions->{lib} // '';
149
150
        $descriptions = Koha::AuthorisedValues->get_description_by_koha_field({frameworkcode => $fw, kohafield => 'items.materials', authorised_value => $item->{materials} });
151
        $item->{materials} = $descriptions->{lib} // '';
152
153
        my $itemtype = Koha::ItemTypes->find($i->effective_itemtype);
154
        if (defined $itemtype) {
155
            # We should not do that here, but call ->itemtype->description when needed instead
156
            $item->{itemtype} = $itemtype->description; # FIXME Should not it be translated_description?
157
        }
158
        push @items, $item;
159
    }
160
    $template->param(items => \@items);
161
}
131
}
162
132
163
$order->{quantityreceived} = '' if $order->{quantityreceived} == 0;
133
$order->quantityreceived = '' if $order->quantityreceived == 0;
164
134
165
my $unitprice = $order->{unitprice};
135
my $unitprice = $order->unitprice;
166
my ( $rrp, $ecost );
136
my ( $rrp, $ecost );
167
if ( $bookseller->invoiceincgst ) {
137
if ( $bookseller->invoiceincgst ) {
168
    $rrp = $order->{rrp_tax_included};
138
    $rrp = $order->rrp_tax_included;
169
    $ecost = $order->{ecost_tax_included};
139
    $ecost = $order->ecost_tax_included;
170
    unless ( $unitprice != 0 and defined $unitprice) {
140
    unless ( $unitprice != 0 and defined $unitprice) {
171
        $unitprice = $order->{ecost_tax_included};
141
        $unitprice = $order->ecost_tax_included;
172
    }
142
    }
173
} else {
143
} else {
174
    $rrp = $order->{rrp_tax_excluded};
144
    $rrp = $order->rrp_tax_excluded;
175
    $ecost = $order->{ecost_tax_excluded};
145
    $ecost = $order->ecost_tax_excluded;
176
    unless ( $unitprice != 0 and defined $unitprice) {
146
    unless ( $unitprice != 0 and defined $unitprice) {
177
        $unitprice = $order->{ecost_tax_excluded};
147
        $unitprice = $order->ecost_tax_excluded;
178
    }
148
    }
179
}
149
}
180
150
181
my $tax_rate;
151
my $tax_rate;
182
if( defined $order->{tax_rate_on_receiving} ) {
152
if( defined $order->tax_rate_on_receiving ) {
183
    $tax_rate = $order->{tax_rate_on_receiving} + 0.0;
153
    $tax_rate = $order->tax_rate_on_receiving + 0.0;
184
} else {
154
} else {
185
    $tax_rate = $order->{tax_rate_on_ordering} + 0.0;
155
    $tax_rate = $order->tax_rate_on_ordering + 0.0;
186
}
156
}
187
157
188
my $creator = Koha::Patrons->find( $order->{created_by} );
158
my $creator = Koha::Patrons->find( $order->created_by );
189
159
190
my $budget = GetBudget( $order->{budget_id} );
160
my $budget = GetBudget( $order->budget_id );
191
161
192
my $datereceived = $order->{datereceived} ? dt_from_string( $order->{datereceived} ) : dt_from_string;
162
my $datereceived = $order->datereceived ? dt_from_string( $order->datereceived ) : dt_from_string;
193
163
194
# get option values for gist syspref
164
# get option values for gist syspref
195
my @gst_values = map {
165
my @gst_values = map {
196
    option => $_ + 0.0
166
    option => $_ + 0.0
197
}, split( '\|', C4::Context->preference("gist") );
167
}, split( '\|', C4::Context->preference("gist") );
198
168
199
my $order_internalnote = $order->{order_internalnote};
169
my $order_internalnote = $order->order_internalnote;
200
my $order_vendornote   = $order->{order_vendornote};
170
my $order_vendornote   = $order->order_vendornote;
201
if ( $order->{subscriptionid} ) {
171
if ( $order->subscriptionid ) {
202
    # Order from a subscription, we will display an history of what has been received
172
    # Order from a subscription, we will display an history of what has been received
203
    my $orders = Koha::Acquisition::Orders->search(
173
    my $orders = Koha::Acquisition::Orders->search(
204
        {
174
        {
205
            subscriptionid     => $order->{subscriptionid},
175
            subscriptionid     => $order->subscriptionid,
206
            parent_ordernumber => $order->{ordernumber},
176
            parent_ordernumber => $order->ordernumber,
207
            ordernumber        => { '!=' => $order->{ordernumber} }
177
            ordernumber        => { '!=' => $order->ordernumber }
208
        }
178
        }
209
    );
179
    );
210
    if ( $order->{parent_ordernumber} != $order->{ordernumber} ) {
180
    if ( $order->parent_ordernumber != $order->ordernumber ) {
211
        my $parent_order = Koha::Acquisition::Orders->find($order->{parent_ordernumber});
181
        my $parent_order = Koha::Acquisition::Orders->find($order->parent_ordernumber);
212
        $order_internalnote = $parent_order->{order_internalnote};
182
        $order_internalnote = $parent_order->order_internalnote;
213
        $order_vendornote   = $parent_order->{order_vendornote};
183
        $order_vendornote   = $parent_order->order_vendornote;
214
    }
184
    }
215
    $template->param(
185
    $template->param(
216
        orders => $orders,
186
        orders => $orders,
Lines 220-248 if ( $order->{subscriptionid} ) { Link Here
220
$template->param(
190
$template->param(
221
    AcqCreateItem         => $AcqCreateItem,
191
    AcqCreateItem         => $AcqCreateItem,
222
    count                 => 1,
192
    count                 => 1,
223
    biblionumber          => $order->{'biblionumber'},
193
    order                 => $order,
224
    ordernumber           => $order->{'ordernumber'},
225
    subscriptionid        => $order->{subscriptionid},
226
    booksellerid          => $order->{'booksellerid'},
227
    freight               => $freight,
194
    freight               => $freight,
228
    name                  => $bookseller->name,
195
    name                  => $bookseller->name,
229
    active_currency       => $active_currency,
196
    active_currency       => $active_currency,
230
    currencies            => scalar $currencies->search({ rate => { '!=' => 1 } }),
197
    currencies            => scalar $currencies->search({ rate => { '!=' => 1 } }),
231
    invoiceincgst         => $bookseller->invoiceincgst,
198
    invoiceincgst         => $bookseller->invoiceincgst,
232
    title                 => $order->{'title'},
233
    author                => $order->{'author'},
234
    copyrightdate         => $order->{'copyrightdate'},
235
    isbn                  => $order->{'isbn'},
236
    seriestitle           => $order->{'seriestitle'},
237
    bookfund              => $budget->{budget_name},
199
    bookfund              => $budget->{budget_name},
238
    quantity              => $order->{'quantity'},
239
    quantityreceivedplus1 => $order->{'quantityreceived'} + 1,
240
    quantityreceived      => $order->{'quantityreceived'},
241
    rrp                   => $rrp,
200
    rrp                   => $rrp,
242
    replacementprice      => $order->{'replacementprice'},
243
    ecost                 => $ecost,
201
    ecost                 => $ecost,
244
    unitprice             => $unitprice,
245
    tax_rate              => $tax_rate,
246
    creator               => $creator,
202
    creator               => $creator,
247
    invoiceid             => $invoice->{invoiceid},
203
    invoiceid             => $invoice->{invoiceid},
248
    invoice               => $invoice->{invoicenumber},
204
    invoice               => $invoice->{invoicenumber},
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-40 / +55 lines)
Lines 3-8 Link Here
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE AuthorisedValues %]
5
[% USE AuthorisedValues %]
6
[% USE ItemTypes %]
6
[% USE Price %]
7
[% USE Price %]
7
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
8
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
Lines 14-27 Link Here
14
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'acquisitions-search.inc' %]
16
[% INCLUDE 'acquisitions-search.inc' %]
16
17
17
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% name | html %]</a> &rsaquo; Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]][% END %] (order #[% ordernumber | html %])</div>
18
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.basket.booksellerid | html %]">[% name | html %]</a> &rsaquo; Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]][% END %] (order #[% order.ordernumber | html %])</div>
18
19
19
<div class="main container-fluid">
20
<div class="main container-fluid">
20
    <div class="row">
21
    <div class="row">
21
        <div class="col-sm-10 col-sm-push-2">
22
        <div class="col-sm-10 col-sm-push-2">
22
            <main>
23
            <main>
23
24
24
<h1>Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]] [% END %] (order #[% ordernumber | html %])</h1>
25
<h1>Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]] [% END %] (order #[% order.ordernumber | html %])</h1>
25
26
26
[% IF ( count ) %]
27
[% IF ( count ) %]
27
    <form action="/cgi-bin/koha/acqui/finishreceive.pl" class="noEnterSubmit" method="post" onsubmit="return Check(this);">
28
    <form action="/cgi-bin/koha/acqui/finishreceive.pl" class="noEnterSubmit" method="post" onsubmit="return Check(this);">
Lines 31-45 Link Here
31
32
32
    <fieldset class="rows">
33
    <fieldset class="rows">
33
    <legend>Catalog details</legend>
34
    <legend>Catalog details</legend>
34
    <ol><li><span class="label">Title: </span><span class="title">[% title | html %]</span></li>
35
    <ol><li><span class="label">Title: </span><span class="title">[% order.biblio.title | html %]</span></li>
35
    <li> <span class="label">Author: </span>
36
    <li> <span class="label">Author: </span>
36
        [% author | html %]</li>
37
        [% order.biblio.author | html %]</li>
37
    <li><span class="label">Copyright: </span>
38
    <li><span class="label">Copyright: </span>
38
        [% copyrightdate | html %]</li>
39
        [% order.biblio.copyrightdate | html %]</li>
39
    <li> <span class="label">ISBN: </span>
40
    <li> <span class="label">ISBN: </span>
40
        [% isbn | html %]</li>
41
        [% order.biblio.biblioitem.isbn | html %]</li>
41
    <li> <span class="label">Series: </span>
42
    <li> <span class="label">Series: </span>
42
        [% seriestitle | html %]</li>
43
        [% order.biblio.seriestitle | html %]</li>
43
    </ol>
44
    </ol>
44
	</fieldset>
45
	</fieldset>
45
46
Lines 85-91 Link Here
85
        </fieldset>
86
        </fieldset>
86
    [% END %]
87
    [% END %]
87
88
88
    [% IF subscriptionid and orders.count %]
89
    [% IF order.subscriptionid and orders.count %]
89
        <fieldset class="rows">
90
        <fieldset class="rows">
90
            <legend>Receipt history for this subscription</legend>
91
            <legend>Receipt history for this subscription</legend>
91
            <table id="orders">
92
            <table id="orders">
Lines 169-175 Link Here
169
            </div>
170
            </div>
170
        </div>
171
        </div>
171
172
172
        [% UNLESS subscriptionid %]
173
        [% UNLESS order.subscriptionid %]
173
          <fieldset class="rows" id="itemfieldset">
174
          <fieldset class="rows" id="itemfieldset">
174
              <legend>Item</legend>
175
              <legend>Item</legend>
175
              [% IF ( NoACQframework ) %]
176
              [% IF ( NoACQframework ) %]
Lines 183-189 Link Here
183
          </fieldset>
184
          </fieldset>
184
        [% END %]
185
        [% END %]
185
    [% ELSIF (AcqCreateItem == 'ordering') %]
186
    [% ELSIF (AcqCreateItem == 'ordering') %]
186
        [% IF (items.size) %]
187
        [% IF (items.count) %]
187
            <h5>Items</h5>
188
            <h5>Items</h5>
188
            <div style="width:100%;overflow:auto">
189
            <div style="width:100%;overflow:auto">
189
                <table>
190
                <table>
Lines 214-228 Link Here
214
                                <td>[% item.barcode | html %]</td>
215
                                <td>[% item.barcode | html %]</td>
215
                                <td>[% Branches.GetName( item.homebranch ) | html %]</td>
216
                                <td>[% Branches.GetName( item.homebranch ) | html %]</td>
216
                                <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
217
                                <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
217
                                <td>[% item.notforloan | html %]</td>
218
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]</td>
218
                                <td>[% item.restricted | html %]</td>
219
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %]</td>
219
                                <td><span class="shelvingloc">[% item.location | html %]</span></td>
220
                                <td><span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]</span></td>
220
                                <td>[% item.itemcallnumber | html %]</td>
221
                                <td>[% item.itemcallnumber | html %]</td>
221
                                <td>[% item.copynumber | html %]</td>
222
                                <td>[% item.copynumber | html %]</td>
222
                                <td>[% item.stocknumber | html %]</td>
223
                                <td>[% item.stocknumber | html %]</td>
223
                                <td>[% item.collection | html %]</td>
224
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>
224
                                <td>[% item.itemtype | html %]</td>
225
                                <td>[% ItemTypes.GetDescription( item.itype ) | html %]</td>
225
                                <td>[% item.materials | html %]</td>
226
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.materials', authorised_value => item.materials ) | html %]</td>
226
                                <td>[% item.itemnotes | html %]</td>
227
                                <td>[% item.itemnotes | html %]</td>
227
                            </tr>
228
                            </tr>
228
                        [% END %]
229
                        [% END %]
Lines 231-240 Link Here
231
            </div>
232
            </div>
232
        [% END %]
233
        [% END %]
233
    [% END %]
234
    [% END %]
234
    <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
235
    <input type="hidden" name="biblionumber" value="[% order.biblionumber | html %]" />
235
    <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
236
    <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
236
    <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
237
    <input type="hidden" name="ordernumber" value="[% order.ordernumber | html %]" />
237
    <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
238
    <input type="hidden" name="booksellerid" value="[% order.basket.booksellerid | html %]" />
238
	</div>
239
	</div>
239
    <div class="col-sm-6">
240
    <div class="col-sm-6">
240
    <fieldset class="rows">
241
    <fieldset class="rows">
Lines 245-251 Link Here
245
                <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
246
                <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
246
            </li>
247
            </li>
247
       <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
248
       <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
248
            <option value="">Keep current ([% budget_period_description | html %] - [% bookfund | html %])</option>
249
            <option value="">Keep current ([% budget_period_description | html %] - [% order.fund.budget_name | html %])</option>
249
            [% FOREACH period IN budget_loop %]
250
            [% FOREACH period IN budget_loop %]
250
                <optgroup label="[% period.description | html %]">
251
                <optgroup label="[% period.description | html %]">
251
                [% FOREACH fund IN period.funds %]
252
                [% FOREACH fund IN period.funds %]
Lines 266-295 Link Here
266
        </span>
267
        </span>
267
       </li>
268
       </li>
268
       <li><label for="quantity_to_receive">Quantity ordered: </label><span class="label">
269
       <li><label for="quantity_to_receive">Quantity ordered: </label><span class="label">
269
           [% IF edit or subscriptionid %]
270
           [% IF edit or order.subscriptionid %]
270
               <input type="text" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
271
               <input type="text" id="quantity_to_receive" name="quantity" value="[% order.quantity | html %]" />
271
           [% ELSE%]
272
           [% ELSE%]
272
               <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
273
               <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% order.quantity | html %]" />
273
           [% END %]
274
           [% END %]
274
           </span></li>
275
           </span></li>
275
        <li><label for="quantity">Quantity received: </label>
276
        <li><label for="quantity">Quantity received: </label>
276
          [% IF subscriptionid %]
277
          [% IF order.subscriptionid %]
277
              <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantity | html %]" />
278
              <input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantity | html %]" />
278
              <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
279
              <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" />
279
          [% ELSIF AcqCreateItemReceiving %]
280
          [% ELSIF AcqCreateItemReceiving %]
280
              <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
281
              <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
281
          [% ELSE %]
282
          [% ELSE %]
282
            [% IF ( quantityreceived ) %]
283
            [% IF ( order.quantityreceived ) %]
283
                [% IF ( edit ) %]
284
                [% IF ( edit ) %]
284
                    <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived | html %]" />
285
                    <input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived | html %]" />
285
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
286
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" />
286
                [% ELSE %]
287
                [% ELSE %]
287
                    [% IF ( items ) %]
288
                    [% IF ( items ) %]
288
                        <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
289
                        <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived + 1 | html %]" />
289
                    [% ELSE %]
290
                    [% ELSE %]
290
                        <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
291
                        <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived + 1 | html %]" />
291
                    [% END %]
292
                    [% END %]
292
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
293
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" />
293
                [% END %]
294
                [% END %]
294
            [% ELSE %]
295
            [% ELSE %]
295
                <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
296
                <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
Lines 299-311 Link Here
299
                <p class="error">Warning, you have entered more items than expected.
300
                <p class="error">Warning, you have entered more items than expected.
300
                Items will not be created.</p>
301
                Items will not be created.</p>
301
            </div>
302
            </div>
302
          [% END %][%# IF (subscriptionid) ELSIF (AcqCreateItemReceiving) %]
303
          [% END %][%# IF (order.subscriptionid) ELSIF (AcqCreateItemReceiving) %]
303
		</li>
304
		</li>
304
305
305
        [% IF ( gst_values ) %]
306
        [% IF ( gst_values ) %]
306
            <li>
307
            <li>
307
                <label for="tax_rate">Tax rate: </label>
308
                <label for="tax_rate">Tax rate: </label>
308
                <select name="tax_rate" id="tax_rate">
309
                <select name="tax_rate" id="tax_rate">
310
                [% tax_rate = order.tax_rate_on_receiving || order.tax_rate_on_ordering %]
309
                [% FOREACH gst IN gst_values %]
311
                [% FOREACH gst IN gst_values %]
310
                    [% IF gst.option == tax_rate %]
312
                    [% IF gst.option == tax_rate %]
311
                        <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
313
                        <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
Lines 319-334 Link Here
319
            <input type="hidden" name="tax_rate" value="0" />
321
            <input type="hidden" name="tax_rate" value="0" />
320
        [% END %]
322
        [% END %]
321
323
322
        <li><label for="rrp">Retail price: </label>[% rrp | $Price %] <span class="hint">(adjusted for [% active_currency.currency | html %], [% IF (invoiceincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])</span></li>
324
        <li><label for="rrp">Retail price: </label>
325
            [% IF (invoiceincgst == 1) %]
326
                [% order.rrp_tax_included | $Price %]<span class="hint">(adjusted for [% active_currency.currency | html %],tax inclusive)</span></li>
327
            [% ELSE %]
328
                [% order.rrp_tax_excluded | $Price %]<span class="hint">(adjusted for [% active_currency.currency | html %],tax exclusive)</span></li>
329
            [% END %]
323
        <li>
330
        <li>
324
            <label for="replacementprice">Replacement price:</label>
331
            <label for="replacementprice">Replacement price:</label>
325
            <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price on_editing => 1 %]" />
332
            <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% order.replacementprice | $Price on_editing => 1 %]" />
326
        </li>
333
        </li>
327
        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %] <span class="hint">[% IF (invoiceincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]</span></li>
334
        <li>
335
            [% IF (invoiceincgst) %]
336
                <label for="ecost">Budgeted cost: </label>[% order.ecost_tax_included | $Price %] <span class="hint">(tax inclusive)</span>
337
            [% ELSE %]
338
                <label for="ecost">Budgeted cost: </label>[% order.ecost_tax_excluded | $Price %] <span class="hint">(tax exclusive)</span>
339
            [% END %]
340
            </li>
328
        <li>
341
        <li>
329
            <label for="unitprice">Actual cost:</label>
342
            <label for="unitprice">Actual cost:</label>
330
            <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 %]" />
343
            [% IF (invoiceincgst) %]
331
            <span class="hint">[% IF (invoiceincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]</span>
344
                <input type="text" size="20" name="unitprice" id="unitprice" value="[% order.unitprice_tax_included | $Price on_editing => 1 %]" /> <span class="hint">(tax inclusive)</span>
345
            [% ELSE %]
346
                <input type="text" size="20" name="unitprice" id="unitprice" value="[% order.unitprice_tax_excluded | $Price on_editing => 1 %]" /> <span class="hint">(tax exclusive)</span>
347
            [% END %]
332
            <label style="font-weight: inherit; float:none;"><input type="checkbox" name="change_currency">Change currency</label>
348
            <label style="font-weight: inherit; float:none;"><input type="checkbox" name="change_currency">Change currency</label>
333
        </li>
349
        </li>
334
        <li id="select_currency">
350
        <li id="select_currency">
Lines 464-470 Link Here
464
        $(document).ready(function() {
480
        $(document).ready(function() {
465
            [% IF (AcqCreateItemReceiving) %]
481
            [% IF (AcqCreateItemReceiving) %]
466
                cloneItemBlock(0, '[% UniqueItemFields | html %]');
482
                cloneItemBlock(0, '[% UniqueItemFields | html %]');
467
            [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
483
            [% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %]
468
                $("input[name='items_to_receive']").change(function() {
484
                $("input[name='items_to_receive']").change(function() {
469
                    CalcQtyToReceive();
485
                    CalcQtyToReceive();
470
                });
486
                });
471
- 

Return to bug 23376