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

(-)a/acqui/addorder.pl (-1 / +4 lines)
Lines 126-134 use C4::Biblio; # AddBiblio TransformKohaToMarc Link Here
126
use C4::Budgets;
126
use C4::Budgets;
127
use C4::Items;
127
use C4::Items;
128
use C4::Output;
128
use C4::Output;
129
use C4::Barcodes;
130
use Koha::DateUtils;
129
use Koha::Acquisition::Currencies;
131
use Koha::Acquisition::Currencies;
130
use Koha::Acquisition::Orders;
132
use Koha::Acquisition::Orders;
131
use C4::Barcodes;
132
133
133
### "-------------------- addorder.pl ----------"
134
### "-------------------- addorder.pl ----------"
134
135
Lines 290-295 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
290
        }
291
        }
291
    );
292
    );
292
293
294
    $orderinfo->{estimated_delivery_date} = dt_from_string($orderinfo->{estimated_delivery_date});
295
293
    # if we already have $ordernumber, then it's an ordermodif
296
    # if we already have $ordernumber, then it's an ordermodif
294
    my $order = Koha::Acquisition::Order->new($orderinfo);
297
    my $order = Koha::Acquisition::Order->new($orderinfo);
295
    if ( $orderinfo->{ordernumber} ) {
298
    if ( $orderinfo->{ordernumber} ) {
(-)a/acqui/basket.pl (-1 / +2 lines)
Lines 501-512 sub get_order_infos { Link Here
501
        $line{order_object}         = $order;
501
        $line{order_object}         = $order;
502
    }
502
    }
503
503
504
505
    my $suggestion   = GetSuggestionInfoFromBiblionumber($line{biblionumber});
504
    my $suggestion   = GetSuggestionInfoFromBiblionumber($line{biblionumber});
506
    $line{suggestionid}         = $$suggestion{suggestionid};
505
    $line{suggestionid}         = $$suggestion{suggestionid};
507
    $line{surnamesuggestedby}   = $$suggestion{surnamesuggestedby};
506
    $line{surnamesuggestedby}   = $$suggestion{surnamesuggestedby};
508
    $line{firstnamesuggestedby} = $$suggestion{firstnamesuggestedby};
507
    $line{firstnamesuggestedby} = $$suggestion{firstnamesuggestedby};
509
508
509
    $line{estimated_delivery_date} = $order->{estimated_delivery_date};
510
510
    foreach my $key (qw(transferred_from transferred_to)) {
511
    foreach my $key (qw(transferred_from transferred_to)) {
511
        if ($line{$key}) {
512
        if ($line{$key}) {
512
            my $order = GetOrder($line{$key});
513
            my $order = GetOrder($line{$key});
(-)a/acqui/neworderempty.pl (-1 / +2 lines)
Lines 474-480 $template->param( Link Here
474
    acqcreate        => $basketobj->effective_create_items eq "ordering" ? 1 : "",
474
    acqcreate        => $basketobj->effective_create_items eq "ordering" ? 1 : "",
475
    users_ids        => join(':', @order_user_ids),
475
    users_ids        => join(':', @order_user_ids),
476
    users            => \@order_users,
476
    users            => \@order_users,
477
    (uc(C4::Context->preference("marcflavour"))) => 1
477
    (uc(C4::Context->preference("marcflavour"))) => 1,
478
    estimated_delivery_date => $data->{estimated_delivery_date},
478
);
479
);
479
480
480
output_html_with_http_headers $input, $cookie, $template->output;
481
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/installer/data/mysql/atomicupdate/bug_15348-add_aqorders.estimated_delivery_date.perl (+9 lines)
Line 0 Link Here
1
use Date::Calc qw( Add_Delta_Days );
2
$DBversion = 'XXX';
3
if( CheckVersion( $DBversion ) ) {
4
    unless( column_exists( 'aqorders', 'estimated_delivery_date' ) ) {
5
        $dbh->do(q{ ALTER TABLE aqorders ADD estimated_delivery_date date default null AFTER suppliers_report });
6
7
        NewVersion( $DBversion, 15348, "Add new column aqorders.estimated_delivery_date and pre-fill with calculated dates" );
8
    }
9
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 3319-3324 CREATE TABLE `aqorders` ( -- information related to the basket line items Link Here
3319
  suppliers_reference_number varchar(35) default NULL, -- Suppliers unique edifact quote ref
3319
  suppliers_reference_number varchar(35) default NULL, -- Suppliers unique edifact quote ref
3320
  suppliers_reference_qualifier varchar(3) default NULL, -- Type of number above usually 'QLI'
3320
  suppliers_reference_qualifier varchar(3) default NULL, -- Type of number above usually 'QLI'
3321
  `suppliers_report` MEDIUMTEXT COLLATE utf8mb4_unicode_ci, -- reports received from suppliers
3321
  `suppliers_report` MEDIUMTEXT COLLATE utf8mb4_unicode_ci, -- reports received from suppliers
3322
  `estimated_delivery_date` date default null,
3322
  PRIMARY KEY  (`ordernumber`),
3323
  PRIMARY KEY  (`ordernumber`),
3323
  KEY `basketno` (`basketno`),
3324
  KEY `basketno` (`basketno`),
3324
  KEY `biblionumber` (`biblionumber`),
3325
  KEY `biblionumber` (`biblionumber`),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (+4 lines)
Lines 412-417 Link Here
412
                        <th>GST</th>
412
                        <th>GST</th>
413
                        <th>Fund</th>
413
                        <th>Fund</th>
414
                        <th>Supplier report</th>
414
                        <th>Supplier report</th>
415
                        <th>Estimated delivery date</th>
415
                        [% IF ( active ) %]
416
                        [% IF ( active ) %]
416
                            [% UNLESS ( closedate ) %]
417
                            [% UNLESS ( closedate ) %]
417
                                <th class="NoSort">Modify</th>
418
                                <th class="NoSort">Modify</th>
Lines 439-444 Link Here
439
                        <th>[% foot_loo.tax_value | $Price %]</th>
440
                        <th>[% foot_loo.tax_value | $Price %]</th>
440
                        <th>&nbsp;</th>
441
                        <th>&nbsp;</th>
441
                        <th>&nbsp;</th>
442
                        <th>&nbsp;</th>
443
                        <th>[% foot_loo.estimated_delivery_date | $KohaDates | html %]</th>
442
                        [% IF ( active ) %]
444
                        [% IF ( active ) %]
443
                            [% UNLESS ( closedate ) %]
445
                            [% UNLESS ( closedate ) %]
444
                                <th>&nbsp;</th>
446
                                <th>&nbsp;</th>
Lines 464-469 Link Here
464
                    <th>[% total_tax_value | $Price %]</th>
466
                    <th>[% total_tax_value | $Price %]</th>
465
                    <th>&nbsp;</th>
467
                    <th>&nbsp;</th>
466
                    <th>&nbsp;</th>
468
                    <th>&nbsp;</th>
469
                    <th>[% estimated_delivery_date | $KohaDates | html %]</th>
467
                    [% IF ( active ) %]
470
                    [% IF ( active ) %]
468
                        [% UNLESS ( closedate ) %]
471
                        [% UNLESS ( closedate ) %]
469
                            <th>&nbsp;</th>
472
                            <th>&nbsp;</th>
Lines 548-553 Link Here
548
                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
551
                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
549
                        <td>[% books_loo.budget_name | html %]</td>
552
                        <td>[% books_loo.budget_name | html %]</td>
550
                        <td>[% books_loo.suppliers_report | html %]</td>
553
                        <td>[% books_loo.suppliers_report | html %]</td>
554
                        <td>[% books_loo.estimated_delivery_date | $KohaDates | html %]</td>
551
                        [% IF ( active ) %]
555
                        [% IF ( active ) %]
552
                            [% UNLESS ( closedate ) %]
556
                            [% UNLESS ( closedate ) %]
553
                            <td>
557
                            <td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-1 / +7 lines)
Lines 448-453 Link Here
448
                <label for="order_vendornote">Vendor note: </label>
448
                <label for="order_vendornote">Vendor note: </label>
449
                <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
449
                <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote" >[% IF ( order_vendornote ) %][% order_vendornote | html %][% END %]</textarea>
450
            </li>
450
            </li>
451
            <li>
452
                <label for="estimated_delivery_date">Estimated delivery date: </label>
453
                <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="datepicker" value="[% estimated_delivery_date | html %]"/>
454
                <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
455
            </li>
451
            <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
456
            <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
452
                <label for="sort1">Statistic 1: </label>
457
                <label for="sort1">Statistic 1: </label>
453
                <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
458
                <input id="sort1" type="text" id="sort1" size="20" name="sort1" value="[% sort1 | html %]" />
Lines 647-652 Link Here
647
                getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
652
                getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
648
            });
653
            });
649
            $("#budget_id").change();
654
            $("#budget_id").change();
655
656
            $("#estimated_delivery_date").datepicker();
650
        });
657
        });
651
658
652
        function UserSearchPopup(f) {
659
        function UserSearchPopup(f) {
653
- 

Return to bug 15348