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 126-133
elsif ($op eq 'add') {
Link Here
|
126 |
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; |
126 |
$maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/; |
127 |
my $issuelength = $input->param('issuelength'); |
127 |
my $issuelength = $input->param('issuelength'); |
128 |
my $lengthunit = $input->param('lengthunit'); |
128 |
my $lengthunit = $input->param('lengthunit'); |
129 |
my $hardduedate = $input->param('hardduedate'); |
129 |
my $hardduedate = eval { dt_from_string( $input->param('hardduedate') ) }; |
130 |
$hardduedate = format_date_in_iso($hardduedate); |
130 |
$hardduedate = output_pref( { dt => $hardduedate, dateonly => 1, dateformat => 'iso' } ) if ( $hardduedate ); |
131 |
my $hardduedatecompare = $input->param('hardduedatecompare'); |
131 |
my $hardduedatecompare = $input->param('hardduedatecompare'); |
132 |
my $rentaldiscount = $input->param('rentaldiscount'); |
132 |
my $rentaldiscount = $input->param('rentaldiscount'); |
133 |
my $opacitemholds = $input->param('opacitemholds') || 0; |
133 |
my $opacitemholds = $input->param('opacitemholds') || 0; |
Lines 446-452
while (my $row = $sth2->fetchrow_hashref) {
Link Here
|
446 |
$row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*'; |
446 |
$row->{'default_humancategorycode'} = 1 if $row->{'humancategorycode'} eq '*'; |
447 |
$row->{'fine'} = sprintf('%.2f', $row->{'fine'}); |
447 |
$row->{'fine'} = sprintf('%.2f', $row->{'fine'}); |
448 |
if ($row->{'hardduedate'} && $row->{'hardduedate'} ne '0000-00-00') { |
448 |
if ($row->{'hardduedate'} && $row->{'hardduedate'} ne '0000-00-00') { |
449 |
$row->{'hardduedate'} = format_date( $row->{'hardduedate'}); |
449 |
my $harddue_dt = eval { dt_from_string( $row->{'hardduedate'} ) }; |
|
|
450 |
$row->{'hardduedate'} = eval { output_pref( { dt => $harddue_dt, dateonly => 1 } ) } if ( $harddue_dt ); |
450 |
$row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1); |
451 |
$row->{'hardduedatebefore'} = 1 if ($row->{'hardduedatecompare'} == -1); |
451 |
$row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} == 0); |
452 |
$row->{'hardduedateexact'} = 1 if ($row->{'hardduedatecompare'} == 0); |
452 |
$row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} == 1); |
453 |
$row->{'hardduedateafter'} = 1 if ($row->{'hardduedatecompare'} == 1); |
453 |
- |
|
|