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

(-)a/acqui/neworderempty.pl (-1 / +4 lines)
Lines 349-355 foreach my $r (@{$budgets}) { Link Here
349
$template->param( sort1 => $data->{'sort1'} );
349
$template->param( sort1 => $data->{'sort1'} );
350
$template->param( sort2 => $data->{'sort2'} );
350
$template->param( sort2 => $data->{'sort2'} );
351
351
352
if ($basketobj->effective_create_items eq 'ordering' && !$ordernumber) {
352
if ($basketobj->effective_create_items eq 'ordering') {
353
    # Check if ACQ framework exists
353
    # Check if ACQ framework exists
354
    my $marc = GetMarcStructure(1, 'ACQ', { unsafe => 1 } );
354
    my $marc = GetMarcStructure(1, 'ACQ', { unsafe => 1 } );
355
    unless($marc) {
355
    unless($marc) {
Lines 420-430 $quantity //= 0; Link Here
420
my $record;
420
my $record;
421
my @additional_fields = Koha::AdditionalFields->search({ tablename => 'aqorders' })->as_list;
421
my @additional_fields = Koha::AdditionalFields->search({ tablename => 'aqorders' })->as_list;
422
my %additional_field_values;
422
my %additional_field_values;
423
my $items;
423
if ($ordernumber) {
424
if ($ordernumber) {
424
    my $order = Koha::Acquisition::Orders->find($ordernumber);
425
    my $order = Koha::Acquisition::Orders->find($ordernumber);
425
    foreach my $value ($order->additional_field_values->as_list) {
426
    foreach my $value ($order->additional_field_values->as_list) {
426
        $additional_field_values{$value->field_id} = $value->value;
427
        $additional_field_values{$value->field_id} = $value->value;
427
    }
428
    }
429
    $items = $order->items;
428
} elsif ( $biblionumber ) {
430
} elsif ( $biblionumber ) {
429
    foreach my $af (@additional_fields) {
431
    foreach my $af (@additional_fields) {
430
        if ($af->marcfield) {
432
        if ($af->marcfield) {
Lines 437-442 if ($ordernumber) { Link Here
437
$template->param(
439
$template->param(
438
    additional_fields => \@additional_fields,
440
    additional_fields => \@additional_fields,
439
    additional_field_values => \%additional_field_values,
441
    additional_field_values => \%additional_field_values,
442
    items => $items,
440
);
443
);
441
444
442
# fill template
445
# fill template
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-3 / +25 lines)
Lines 5-10 Link Here
5
[% USE Price %]
5
[% USE Price %]
6
[% USE ItemTypes %]
6
[% USE ItemTypes %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
8
[% USE Branches %]
8
[% PROCESS 'i18n.inc' %]
9
[% PROCESS 'i18n.inc' %]
9
[% INCLUDE 'doc-head-open.inc' %]
10
[% INCLUDE 'doc-head-open.inc' %]
10
<title>[% FILTER collapse %]
11
<title>[% FILTER collapse %]
Lines 132-137 Link Here
132
        }
133
        }
133
134
134
        $(document).ready(function(){
135
        $(document).ready(function(){
136
            [% UNLESS ordernumber %]
137
                $("#items_list").hide();
138
            [% END %]
139
135
            [% IF AcqCreateItemOrdering and not basket.is_standing %]
140
            [% IF AcqCreateItemOrdering and not basket.is_standing %]
136
                cloneItemBlock(0, '[% UniqueItemFields | html %]');
141
                cloneItemBlock(0, '[% UniqueItemFields | html %]');
137
            [% END %]
142
            [% END %]
Lines 490-496 Link Here
490
    [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
495
    [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %]
491
      [% IF (AcqCreateItemOrdering) %]
496
      [% IF (AcqCreateItemOrdering) %]
492
497
493
      <div id="items_list" class="page-section" style="display:none">
498
      <div id="items_list" class="page-section">
494
          <p><strong>Items list</strong></p>
499
          <p><strong>Items list</strong></p>
495
          <div style="width:100%;overflow:auto;">
500
          <div style="width:100%;overflow:auto;">
496
              <table>
501
              <table>
Lines 513-518 Link Here
513
                      </tr>
518
                      </tr>
514
                  </thead>
519
                  </thead>
515
                  <tbody>
520
                  <tbody>
521
                    [% FOREACH item IN items %]
522
                        <tr idblock="itemblock[% item.id | html %]">
523
                            <td>&nbsp;</td>
524
                            <td>[% item.barcode | html %]</td>
525
                            <td>[% Branches.GetName(item.homebranch) | html %]</td>
526
                            <td>[% Branches.GetName(item.holdingbranch) | html %]</td>
527
                            <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]</td>
528
                            <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %]</td>
529
                            <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]</td>
530
                            <td>[% item.itemcallnumber | html %]</td>
531
                            <td>[% item.copynumber | html %]</td>
532
                            <td>[% item.stocknumber | html %]</td>
533
                            <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>
534
                            <td>[% ItemTypes.GetDescription( item.itype ) | html %]</td>
535
                            <td>[% item.materials | html %]</td>
536
                            <td>[% item.itemnotes | html %]</td>
537
                        </tr>
538
                    [% END %]
516
                  </tbody>
539
                  </tbody>
517
              </table>
540
              </table>
518
          </div>
541
          </div>
Lines 544-550 Link Here
544
                    [% IF basket.is_standing %]
567
                    [% IF basket.is_standing %]
545
                        <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
568
                        <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
546
                    [% ELSE %]
569
                    [% ELSE %]
547
                        <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
570
                        <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" />
548
                    [% END %]
571
                    [% END %]
549
                [% ELSE %]
572
                [% ELSE %]
550
                    [% IF basket.is_standing %]
573
                    [% IF basket.is_standing %]
551
- 

Return to bug 34708