Lines 26-32
use C4::Auth;
Link Here
|
26 |
use C4::Koha; |
26 |
use C4::Koha; |
27 |
use C4::Debug; |
27 |
use C4::Debug; |
28 |
use C4::Branch; # GetBranches |
28 |
use C4::Branch; # GetBranches |
29 |
use C4::Dates qw/format_date format_date_in_iso/; |
29 |
use Koha::DateUtils; |
30 |
use Koha::Database; |
30 |
use Koha::Database; |
31 |
|
31 |
|
32 |
my $input = CGI->new; |
32 |
my $input = CGI->new; |
Lines 122-129
elsif ($op eq 'add') {
Link Here
|
122 |
$maxissueqty = undef if $maxissueqty !~ /^\d+/; |
122 |
$maxissueqty = undef if $maxissueqty !~ /^\d+/; |
123 |
my $issuelength = $input->param('issuelength'); |
123 |
my $issuelength = $input->param('issuelength'); |
124 |
my $lengthunit = $input->param('lengthunit'); |
124 |
my $lengthunit = $input->param('lengthunit'); |
125 |
my $hardduedate = $input->param('hardduedate'); |
125 |
my $hardduedate = eval { dt_from_string( $input->param('hardduedate') ) }; |
126 |
$hardduedate = format_date_in_iso($hardduedate); |
126 |
$hardduedate = output_pref( { dt => $hardduedate, dateonly => 1, dateformat => 'iso' } ) if ( $hardduedate ); |
127 |
my $hardduedatecompare = $input->param('hardduedatecompare'); |
127 |
my $hardduedatecompare = $input->param('hardduedatecompare'); |
128 |
my $rentaldiscount = $input->param('rentaldiscount'); |
128 |
my $rentaldiscount = $input->param('rentaldiscount'); |
129 |
my $opacitemholds = $input->param('opacitemholds') || 0; |
129 |
my $opacitemholds = $input->param('opacitemholds') || 0; |
Lines 414-420
while (my $row = $sth2->fetchrow_hashref) {
Link Here
|
414 |
$row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*'; |
414 |
$row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*'; |
415 |
$row->{'fine'} = sprintf('%.2f', $row->{'fine'}); |
415 |
$row->{'fine'} = sprintf('%.2f', $row->{'fine'}); |
416 |
if ($row->{'hardduedate'} && $row->{'hardduedate'} ne '0000-00-00') { |
416 |
if ($row->{'hardduedate'} && $row->{'hardduedate'} ne '0000-00-00') { |
417 |
$row->{'hardduedate'} = format_date( $row->{'hardduedate'}); |
417 |
my $harddue_dt = eval { dt_from_string( $row->{'hardduedate'} ) }; |
|
|
418 |
$row->{'hardduedate'} = eval { output_pref( { dt => $harddue_dt, dateonly => 1 } ) } if ( $harddue_dt ); |
418 |
$row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1); |
419 |
$row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1); |
419 |
$row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} == 0); |
420 |
$row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} == 0); |
420 |
$row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} == 1); |
421 |
$row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} == 1); |
421 |
- |
|
|