Follow-up Bug 9438 - Biblio notes displayed when ordering
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tue, 5 Feb 2013 19:23:40 +0000 (16:23 -0300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 21 Mar 2013 13:42:06 +0000 (09:42 -0400)
This patch re-enables displying Notes when select
Modify order from basket view.

To Test:
1) After applying first patch, Notes are empty when select Modify order
2) Apply patch
3) Now Notes are visible again, unless the order is new.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
acqui/neworderempty.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt

index 807a82b..0a279c0 100755 (executable)
@@ -389,13 +389,14 @@ $template->param(
     total            => sprintf( "%.2f", ($data->{ecost} || 0) * ($data->{'quantity'} || 0) ),
     ecost            => sprintf( "%.2f", $data->{ecost} || 0),
     unitprice        => sprintf( "%.2f", $data->{unitprice} || 0),
-    notes            => $data->{'notes'},
     publishercode    => $data->{'publishercode'},
     barcode_subfield => $barcode_subfield,
     import_batch_id  => $import_batch_id,
     (uc(C4::Context->preference("marcflavour"))) => 1
 );
 
+$template->param ( notes => $data->{'notes'} ) if ( $ordernumber );
+
 output_html_with_http_headers $input, $cookie, $template->output;
 
 
index 7b2d07b..8a1534a 100644 (file)
@@ -548,7 +548,7 @@ $(document).ready(function()
             </li>
             <li>
                 <label for="notes">Notes: </label>
-                <textarea id="notes" cols="30" rows="3" name="notes" ></textarea>
+                <textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea>
             </li>
             <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
                 <label for="sort1">Statistic 1: </label>