Bug 23294: Show actual price when ordering

To test:
1 - Have a basket
2 - Add an order
3 - Modify the order, note you cannot see the unitprice/Actual cost
4 - Apply patch
5 - Note it is there
6 - Add to IntranetUserCSS:
    .ordering_unitprice{ display:none; }
7 - Reload
8 - Note it is hidden

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2019-07-15 18:29:45 +00:00 committed by Martin Renvoize
parent d4468c5f33
commit d2e85ac994
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 7 additions and 0 deletions

View file

@ -375,6 +375,7 @@ if ( defined $from_subscriptionid ) {
$data->{replacementprice} = $lastOrderReceived->{replacementprice};
$data->{ecost} = $lastOrderReceived->{ecost};
$data->{quantity} = $lastOrderReceived->{quantity};
$data->{unitprice} = $lastOrderReceived->{unitprice};
$data->{order_internalnote} = $lastOrderReceived->{order_internalnote};
$data->{order_vendornote} = $lastOrderReceived->{order_vendornote};
$data->{sort1} = $lastOrderReceived->{sort1};
@ -465,6 +466,7 @@ $template->param(
listprice => sprintf( "%.2f", $data->{listprice} || $data->{price} || $listprice),
total => sprintf( "%.2f", ($data->{ecost} || 0) * ($data->{'quantity'} || 0) ),
ecost => sprintf( "%.2f", $data->{ecost} || 0),
unitprice => sprintf( "%.2f", $data->{unitprice} || 0),
publishercode => $data->{'publishercode'},
barcode_subfield => $barcode_subfield,
import_batch_id => $import_batch_id,

View file

@ -467,6 +467,11 @@
<label for="total">Total: </label>
<input type="text" id="total" size="20" name="total" value="[% total | html %]" readonly="readonly" /> (budgeted cost * quantity)
</li>
<li class="ordering_unitprice">
<label for="unitprice">Actual cost: </label>
<input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice | html %]" />
[% IF (invoiceincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
</li>
<li>
<label for="order_internalnote">Internal note: </label>
<textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote" >[% IF ( order_internalnote ) %][% order_internalnote | html %][% END %]</textarea>