Bug 21387: Receive items from - form should include tax hints
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 21 Sep 2018 10:42:28 +0000 (11:42 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 16 Nov 2018 12:42:58 +0000 (12:42 +0000)
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 702ca8e9a341ea8350bb69596be5ce8c29596b45)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

acqui/orderreceive.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt

index c88a533..1394d55 100755 (executable)
@@ -73,6 +73,7 @@ use C4::Suggestions;
 use C4::Koha;
 
 use Koha::Acquisition::Booksellers;
+use Koha::Acquisition::Currencies;
 use Koha::Acquisition::Orders;
 use Koha::DateUtils qw( dt_from_string );
 use Koha::ItemTypes;
@@ -112,6 +113,7 @@ unless ( $results and @$results) {
 # prepare the form for receiving
 my $order = $results->[0];
 my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket;
+my $active_currency = Koha::Acquisition::Currencies->get_active;
 
 # Check if ACQ framework exists
 my $acq_fw = GetMarcStructure( 1, 'ACQ', { unsafe => 1 } );
@@ -210,6 +212,10 @@ $template->param(
     booksellerid          => $order->{'booksellerid'},
     freight               => $freight,
     name                  => $bookseller->name,
+    cur_active_sym        => $active_currency->symbol,
+    cur_active            => $active_currency->currency,
+    listincgst            => $bookseller->listincgst,
+    invoiceincgst         => $bookseller->invoiceincgst,
     title                 => $order->{'title'},
     author                => $order->{'author'},
     copyrightdate         => $order->{'copyrightdate'},
index 562d8cd..e6636a1 100644 (file)
             <input type="hidden" name="tax_rate" value="0" />
         [% END %]
 
-        <li><label for="rrp">Replacement cost: </label>[% rrp | $Price %]</li>
-        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li>
+        <li><label for="rrp">Retail price: </label>[% rrp | $Price %] <span class="hint">(adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])</span></li>
+        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %] <span class="hint">[% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]</span></li>
         <li>
             <label for="unitprice">Actual cost:</label>
-            <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 %]" />
+            <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 | html %]" /> <span lass="hint">[% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]</span>
         </li>
         <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote %]</textarea></li>
         [% IF order_vendornote %]