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

(-)a/acqui/orderreceive.pl (-95 / +19 lines)
Lines 42-49 to know on what supplier this script has to display receive order. Link Here
42
42
43
the id of this invoice.
43
the id of this invoice.
44
44
45
=item freight
46
47
=item biblio
45
=item biblio
48
46
49
The biblionumber of this order.
47
The biblionumber of this order.
Lines 85-98 my $dbh = C4::Context->dbh; Link Here
85
my $invoiceid    = $input->param('invoiceid');
83
my $invoiceid    = $input->param('invoiceid');
86
my $invoice      = GetInvoice($invoiceid);
84
my $invoice      = GetInvoice($invoiceid);
87
my $booksellerid   = $invoice->{booksellerid};
85
my $booksellerid   = $invoice->{booksellerid};
88
my $freight      = $invoice->{shipmentcost};
89
my $ordernumber  = $input->param('ordernumber');
86
my $ordernumber  = $input->param('ordernumber');
90
87
91
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
88
my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid );
92
my $results;
89
my $order = Koha::Acquisition::Orders->find( $ordernumber );
93
$results = SearchOrders({
94
    ordernumber => $ordernumber
95
}) if $ordernumber;
96
90
97
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
91
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
98
    {
92
    {
Lines 105-119 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( Link Here
105
    }
99
    }
106
);
100
);
107
101
108
unless ( $results and @$results) {
102
unless ( $order ) {
109
    output_html_with_http_headers $input, $cookie, $template->output;
103
    output_html_with_http_headers $input, $cookie, $template->output;
110
    exit;
104
    exit;
111
}
105
}
112
106
113
# prepare the form for receiving
107
# prepare the form for receiving
114
my $order = $results->[0];
108
my $basket = $order->basket;
115
my $order_object = Koha::Acquisition::Orders->find( $ordernumber );
116
my $basket = $order_object->basket;
117
my $active_currency = Koha::Acquisition::Currencies->get_active;
109
my $active_currency = Koha::Acquisition::Currencies->get_active;
118
110
119
# Check if ACQ framework exists
111
# Check if ACQ framework exists
Lines 130-218 if ($AcqCreateItem eq 'receiving') { Link Here
130
    );
122
    );
131
} elsif ($AcqCreateItem eq 'ordering') {
123
} elsif ($AcqCreateItem eq 'ordering') {
132
    my $fw = ($acq_fw) ? 'ACQ' : '';
124
    my $fw = ($acq_fw) ? 'ACQ' : '';
133
    my $items = $order_object->items;
125
    my $items = $order->items;
134
    my @items;
126
    $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
}
162
163
$order->{quantityreceived} = '' if $order->{quantityreceived} == 0;
164
165
my $unitprice = $order->{unitprice};
166
my ( $rrp, $ecost );
167
if ( $bookseller->invoiceincgst ) {
168
    $rrp = $order->{rrp_tax_included};
169
    $ecost = $order->{ecost_tax_included};
170
    unless ( $unitprice != 0 and defined $unitprice) {
171
        $unitprice = $order->{ecost_tax_included};
172
    }
173
} else {
174
    $rrp = $order->{rrp_tax_excluded};
175
    $ecost = $order->{ecost_tax_excluded};
176
    unless ( $unitprice != 0 and defined $unitprice) {
177
        $unitprice = $order->{ecost_tax_excluded};
178
    }
179
}
180
181
my $tax_rate;
182
if( defined $order->{tax_rate_on_receiving} ) {
183
    $tax_rate = $order->{tax_rate_on_receiving} + 0.0;
184
} else {
185
    $tax_rate = $order->{tax_rate_on_ordering} + 0.0;
186
}
127
}
187
128
188
my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber});
129
my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber});
189
130
190
my $creator = Koha::Patrons->find( $order->{created_by} );
131
my $creator = Koha::Patrons->find( $order->created_by );
191
132
192
my $budget = GetBudget( $order->{budget_id} );
133
my $budget = GetBudget( $order->budget_id );
193
134
194
my $datereceived = $order->{datereceived} ? dt_from_string( $order->{datereceived} ) : dt_from_string;
135
my $datereceived = $order->datereceived ? dt_from_string( $order->datereceived ) : dt_from_string;
195
136
196
# get option values for gist syspref
137
# get option values for gist syspref
197
my @gst_values = map {
138
my @gst_values = map {
198
    option => $_ + 0.0
139
    option => $_ + 0.0
199
}, split( '\|', C4::Context->preference("gist") );
140
}, split( '\|', C4::Context->preference("gist") );
200
141
201
my $order_internalnote = $order->{order_internalnote};
142
my $order_internalnote = $order->order_internalnote;
202
my $order_vendornote   = $order->{order_vendornote};
143
my $order_vendornote   = $order->order_vendornote;
203
if ( $order->{subscriptionid} ) {
144
if ( $order->subscriptionid ) {
204
    # Order from a subscription, we will display an history of what has been received
145
    # Order from a subscription, we will display an history of what has been received
205
    my $orders = Koha::Acquisition::Orders->search(
146
    my $orders = Koha::Acquisition::Orders->search(
206
        {
147
        {
207
            subscriptionid     => $order->{subscriptionid},
148
            subscriptionid     => $order->subscriptionid,
208
            parent_ordernumber => $order->{ordernumber},
149
            parent_ordernumber => $order->ordernumber,
209
            ordernumber        => { '!=' => $order->{ordernumber} }
150
            ordernumber        => { '!=' => $order->ordernumber }
210
        }
151
        }
211
    );
152
    );
212
    if ( $order->{parent_ordernumber} != $order->{ordernumber} ) {
153
    if ( $order->parent_ordernumber != $order->ordernumber ) {
213
        my $parent_order = Koha::Acquisition::Orders->find($order->{parent_ordernumber});
154
        my $parent_order = Koha::Acquisition::Orders->find($order->parent_ordernumber);
214
        $order_internalnote = $parent_order->{order_internalnote};
155
        $order_internalnote = $parent_order->order_internalnote;
215
        $order_vendornote   = $parent_order->{order_vendornote};
156
        $order_vendornote   = $parent_order->order_vendornote;
216
    }
157
    }
217
    $template->param(
158
    $template->param(
218
        orders => $orders,
159
        orders => $orders,
Lines 222-250 if ( $order->{subscriptionid} ) { Link Here
222
$template->param(
163
$template->param(
223
    AcqCreateItem         => $AcqCreateItem,
164
    AcqCreateItem         => $AcqCreateItem,
224
    count                 => 1,
165
    count                 => 1,
225
    biblionumber          => $order->{'biblionumber'},
166
    order                 => $order,
226
    ordernumber           => $order->{'ordernumber'},
227
    subscriptionid        => $order->{subscriptionid},
228
    booksellerid          => $order->{'booksellerid'},
229
    freight               => $freight,
230
    name                  => $bookseller->name,
167
    name                  => $bookseller->name,
231
    cur_active_sym        => $active_currency->symbol,
168
    cur_active_sym        => $active_currency->symbol,
232
    cur_active            => $active_currency->currency,
169
    cur_active            => $active_currency->currency,
233
    invoiceincgst         => $bookseller->invoiceincgst,
170
    invoiceincgst         => $bookseller->invoiceincgst,
234
    title                 => $order->{'title'},
235
    author                => $order->{'author'},
236
    copyrightdate         => $order->{'copyrightdate'},
237
    isbn                  => $order->{'isbn'},
238
    seriestitle           => $order->{'seriestitle'},
239
    bookfund              => $budget->{budget_name},
171
    bookfund              => $budget->{budget_name},
240
    quantity              => $order->{'quantity'},
241
    quantityreceivedplus1 => $order->{'quantityreceived'} + 1,
242
    quantityreceived      => $order->{'quantityreceived'},
243
    rrp                   => $rrp,
244
    replacementprice      => $order->{'replacementprice'},
245
    ecost                 => $ecost,
246
    unitprice             => $unitprice,
247
    tax_rate              => $tax_rate,
248
    creator               => $creator,
172
    creator               => $creator,
249
    invoiceid             => $invoice->{invoiceid},
173
    invoiceid             => $invoice->{invoiceid},
250
    invoice               => $invoice->{invoicenumber},
174
    invoice               => $invoice->{invoicenumber},
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-39 / +56 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE Branches %]
4
[% USE Branches %]
5
[% USE AuthorisedValues %]
6
[% USE ItemTypes %]
5
[% USE Price %]
7
[% USE Price %]
6
[% SET footerjs = 1 %]
8
[% SET footerjs = 1 %]
7
[% INCLUDE 'doc-head-open.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
Lines 13-26 Link Here
13
[% INCLUDE 'header.inc' %]
15
[% INCLUDE 'header.inc' %]
14
[% INCLUDE 'acquisitions-search.inc' %]
16
[% INCLUDE 'acquisitions-search.inc' %]
15
17
16
<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>
17
19
18
<div class="main container-fluid">
20
<div class="main container-fluid">
19
    <div class="row">
21
    <div class="row">
20
        <div class="col-sm-10 col-sm-push-2">
22
        <div class="col-sm-10 col-sm-push-2">
21
            <main>
23
            <main>
22
24
23
<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>
24
26
25
[% IF ( count ) %]
27
[% IF ( count ) %]
26
    <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 30-44 Link Here
30
32
31
    <fieldset class="rows">
33
    <fieldset class="rows">
32
    <legend>Catalog details</legend>
34
    <legend>Catalog details</legend>
33
    <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>
34
    <li> <span class="label">Author: </span>
36
    <li> <span class="label">Author: </span>
35
        [% author | html %]</li>
37
        [% order.biblio.author | html %]</li>
36
    <li><span class="label">Copyright: </span>
38
    <li><span class="label">Copyright: </span>
37
        [% copyrightdate | html %]</li>
39
        [% order.biblio.copyrightdate | html %]</li>
38
    <li> <span class="label">ISBN: </span>
40
    <li> <span class="label">ISBN: </span>
39
        [% isbn | html %]</li>
41
        [% order.biblio.biblioitem.isbn | html %]</li>
40
    <li> <span class="label">Series: </span>
42
    <li> <span class="label">Series: </span>
41
        [% seriestitle | html %]</li>
43
        [% order.biblio.seriestitle | html %]</li>
42
    </ol>
44
    </ol>
43
	</fieldset>
45
	</fieldset>
44
46
Lines 54-60 Link Here
54
        </fieldset>
56
        </fieldset>
55
    [% END %]
57
    [% END %]
56
58
57
    [% IF subscriptionid and orders.count %]
59
    [% IF order.subscriptionid and orders.count %]
58
        <fieldset class="rows">
60
        <fieldset class="rows">
59
            <legend>Receipt history for this subscription</legend>
61
            <legend>Receipt history for this subscription</legend>
60
            <table id="orders">
62
            <table id="orders">
Lines 138-144 Link Here
138
            </div>
140
            </div>
139
        </div>
141
        </div>
140
142
141
        [% UNLESS subscriptionid %]
143
        [% UNLESS order.subscriptionid %]
142
          <fieldset class="rows" id="itemfieldset">
144
          <fieldset class="rows" id="itemfieldset">
143
              <legend>Item</legend>
145
              <legend>Item</legend>
144
              [% IF ( NoACQframework ) %]
146
              [% IF ( NoACQframework ) %]
Lines 152-158 Link Here
152
          </fieldset>
154
          </fieldset>
153
        [% END %]
155
        [% END %]
154
    [% ELSIF (AcqCreateItem == 'ordering') %]
156
    [% ELSIF (AcqCreateItem == 'ordering') %]
155
        [% IF (items.size) %]
157
        [% IF (items.count) %]
156
            <h5>Items</h5>
158
            <h5>Items</h5>
157
            <div style="width:100%;overflow:auto">
159
            <div style="width:100%;overflow:auto">
158
                <table>
160
                <table>
Lines 183-197 Link Here
183
                                <td>[% item.barcode | html %]</td>
185
                                <td>[% item.barcode | html %]</td>
184
                                <td>[% Branches.GetName( item.homebranch ) | html %]</td>
186
                                <td>[% Branches.GetName( item.homebranch ) | html %]</td>
185
                                <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
187
                                <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
186
                                <td>[% item.notforloan | html %]</td>
188
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]</td>
187
                                <td>[% item.restricted | html %]</td>
189
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %]</td>
188
                                <td><span class="shelvingloc">[% item.location | html %]</span></td>
190
                                <td><span class="shelvingloc">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]</span></td>
189
                                <td>[% item.itemcallnumber | html %]</td>
191
                                <td>[% item.itemcallnumber | html %]</td>
190
                                <td>[% item.copynumber | html %]</td>
192
                                <td>[% item.copynumber | html %]</td>
191
                                <td>[% item.stocknumber | html %]</td>
193
                                <td>[% item.stocknumber | html %]</td>
192
                                <td>[% item.collection | html %]</td>
194
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>
193
                                <td>[% item.itemtype | html %]</td>
195
                                <td>[% ItemTypes.GetDescription( item.itype ) | html %]</td>
194
                                <td>[% item.materials | html %]</td>
196
                                <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.materials', authorised_value => item.materials ) | html %]</td>
195
                                <td>[% item.itemnotes | html %]</td>
197
                                <td>[% item.itemnotes | html %]</td>
196
                            </tr>
198
                            </tr>
197
                        [% END %]
199
                        [% END %]
Lines 200-209 Link Here
200
            </div>
202
            </div>
201
        [% END %]
203
        [% END %]
202
    [% END %]
204
    [% END %]
203
    <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
205
    <input type="hidden" name="biblionumber" value="[% order.biblionumber | html %]" />
204
    <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
206
    <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
205
    <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
207
    <input type="hidden" name="ordernumber" value="[% order.ordernumber | html %]" />
206
    <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
208
    <input type="hidden" name="booksellerid" value="[% order.basket.booksellerid | html %]" />
207
	</div>
209
	</div>
208
    <div class="col-sm-6">
210
    <div class="col-sm-6">
209
    <fieldset class="rows">
211
    <fieldset class="rows">
Lines 214-220 Link Here
214
                <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
216
                <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
215
            </li>
217
            </li>
216
       <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
218
       <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
217
            <option value="">Keep current ([% budget_period_description | html %] - [% bookfund | html %])</option>
219
            <option value="">Keep current ([% budget_period_description | html %] - [% order.fund.budget_name | html %])</option>
218
            [% FOREACH period IN budget_loop %]
220
            [% FOREACH period IN budget_loop %]
219
                <optgroup label="[% period.description | html %]">
221
                <optgroup label="[% period.description | html %]">
220
                [% FOREACH fund IN period.funds %]
222
                [% FOREACH fund IN period.funds %]
Lines 235-264 Link Here
235
        </span>
237
        </span>
236
       </li>
238
       </li>
237
       <li><label for="quantity_to_receive">Quantity ordered: </label><span class="label">
239
       <li><label for="quantity_to_receive">Quantity ordered: </label><span class="label">
238
           [% IF edit or subscriptionid %]
240
           [% IF edit or order.subscriptionid %]
239
               <input type="text" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
241
               <input type="text" id="quantity_to_receive" name="quantity" value="[% order.quantity | html %]" />
240
           [% ELSE%]
242
           [% ELSE%]
241
               <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
243
               <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% order.quantity | html %]" />
242
           [% END %]
244
           [% END %]
243
           </span></li>
245
           </span></li>
244
        <li><label for="quantity">Quantity received: </label>
246
        <li><label for="quantity">Quantity received: </label>
245
          [% IF subscriptionid %]
247
          [% IF order.subscriptionid %]
246
              <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantity | html %]" />
248
              <input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantity | html %]" />
247
              <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
249
              <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" />
248
          [% ELSIF AcqCreateItemReceiving %]
250
          [% ELSIF AcqCreateItemReceiving %]
249
              <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
251
              <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
250
          [% ELSE %]
252
          [% ELSE %]
251
            [% IF ( quantityreceived ) %]
253
            [% IF ( order.quantityreceived ) %]
252
                [% IF ( edit ) %]
254
                [% IF ( edit ) %]
253
                    <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived | html %]" />
255
                    <input type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived | html %]" />
254
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
256
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" />
255
                [% ELSE %]
257
                [% ELSE %]
256
                    [% IF ( items ) %]
258
                    [% IF ( items ) %]
257
                        <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
259
                        <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% order.quantityreceived + 1 | html %]" />
258
                    [% ELSE %]
260
                    [% ELSE %]
259
                        <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
261
                        <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived + 1 | html %]" />
260
                    [% END %]
262
                    [% END %]
261
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
263
                    <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% order.quantityreceived | html %]" />
262
                [% END %]
264
                [% END %]
263
            [% ELSE %]
265
            [% ELSE %]
264
                <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
266
                <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
Lines 268-280 Link Here
268
                <p class="error">Warning, you have entered more items than expected.
270
                <p class="error">Warning, you have entered more items than expected.
269
                Items will not be created.</p>
271
                Items will not be created.</p>
270
            </div>
272
            </div>
271
          [% END %][%# IF (subscriptionid) ELSIF (AcqCreateItemReceiving) %]
273
          [% END %][%# IF (order.subscriptionid) ELSIF (AcqCreateItemReceiving) %]
272
		</li>
274
		</li>
273
275
274
        [% IF ( gst_values ) %]
276
        [% IF ( gst_values ) %]
275
            <li>
277
            <li>
276
                <label for="tax_rate">Tax rate: </label>
278
                <label for="tax_rate">Tax rate: </label>
277
                <select name="tax_rate" id="tax_rate">
279
                <select name="tax_rate" id="tax_rate">
280
                [% tax_rate = order.tax_rate_on_receiving || order.tax_rate_on_ordering %]
278
                [% FOREACH gst IN gst_values %]
281
                [% FOREACH gst IN gst_values %]
279
                    [% IF gst.option == tax_rate %]
282
                    [% IF gst.option == tax_rate %]
280
                        <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
283
                        <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
Lines 288-302 Link Here
288
            <input type="hidden" name="tax_rate" value="0" />
291
            <input type="hidden" name="tax_rate" value="0" />
289
        [% END %]
292
        [% END %]
290
293
291
        <li><label for="rrp">Retail price: </label>[% rrp | $Price %] <span class="hint">(adjusted for [% cur_active | html %], [% IF (invoiceincgst == 1) %]tax inclusive[% ELSE %]tax exclusive[% END %])</span></li>
294
        <li><label for="rrp">Retail price: </label>
295
            [% IF (invoiceincgst == 1) %]
296
                [% order.rrp_tax_included | $Price %]<span class="hint">(adjusted for [% cur_active | html %],tax inclusive)</span></li>
297
            [% ELSE %]
298
                [% order.rrp_tax_excluded | $Price %]<span class="hint">(adjusted for [% cur_active | html %],tax exclusive)</span></li>
299
            [% END %]
292
        <li>
300
        <li>
293
            <label for="replacementprice">Replacement price:</label>
301
            <label for="replacementprice">Replacement price:</label>
294
            <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price on_editing => 1 %]" />
302
            <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% order.replacementprice | $Price on_editing => 1 %]" />
295
        </li>
303
        </li>
296
        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %] <span class="hint">[% IF (invoiceincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]</span></li>
304
        <li>
305
            [% IF (invoiceincgst) %]
306
                <label for="ecost">Budgeted cost: </label>[% order.ecost_tax_included | $Price %] <span class="hint">(tax inclusive)</span>
307
            [% ELSE %]
308
                <label for="ecost">Budgeted cost: </label>[% order.ecost_tax_excluded | $Price %] <span class="hint">(tax exclusive)</span>
309
            [% END %]
310
            </li>
297
        <li>
311
        <li>
298
            <label for="unitprice">Actual cost:</label>
312
            <label for="unitprice">Actual cost:</label>
299
            <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 %]" /> <span class="hint">[% IF (invoiceincgst == 1) %](tax inclusive)[% ELSE %](tax exclusive)[% END %]</span>
313
            [% IF (invoiceincgst) %]
314
                <input type="text" size="20" name="unitprice" id="unitprice" value="[% order.unitprice_tax_included | $Price on_editing => 1 %]" /> <span class="hint">(tax inclusive)</span>
315
            [% ELSE %]
316
                <input type="text" size="20" name="unitprice" id="unitprice" value="[% order.unitprice_tax_excluded | $Price on_editing => 1 %]" /> <span class="hint">(tax inclusive)</span>
317
            [% END %]
300
        </li>
318
        </li>
301
        <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote | html %]</textarea></li>
319
        <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote | html %]</textarea></li>
302
        [% IF order_vendornote %]
320
        [% IF order_vendornote %]
Lines 420-426 Link Here
420
        $(document).ready(function() {
438
        $(document).ready(function() {
421
            [% IF (AcqCreateItemReceiving) %]
439
            [% IF (AcqCreateItemReceiving) %]
422
                cloneItemBlock(0, '[% UniqueItemFields | html %]');
440
                cloneItemBlock(0, '[% UniqueItemFields | html %]');
423
            [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
441
            [% ELSIF (AcqCreateItem == 'ordering') && not order.subscriptionid %]
424
                $("input[name='items_to_receive']").change(function() {
442
                $("input[name='items_to_receive']").change(function() {
425
                    CalcQtyToReceive();
443
                    CalcQtyToReceive();
426
                });
444
                });
427
- 

Return to bug 23376