Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'ptfs-master' of git@github.com:pjones9/ptfs-master into…

… ptfs-master
  • Loading branch information...
commit 04103beefac670e92cd041743e7c74be4675b5f3 2 parents a8e32a2 + 2961722
@ctfliblime ctfliblime authored
Showing with 8 additions and 10 deletions.
  1. +8 −10 C4/Circulation.pm
View
18 C4/Circulation.pm
@@ -1854,13 +1854,13 @@ sub _chargeToAccount
$charge ||= 0;
return ($charge,$itemtype) unless $charge > 0;
my $text = $isrenewal? 'renewed' : 'issued';
- my $issuedate_us = C4::Dates->new($issuedate,'iso')->output;
+ my $issuedate_local = C4::Dates->new($issuedate,'iso')->output;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare("SELECT 1 FROM accountlines
WHERE accounttype = 'Rent'
AND itemnumber = ?
AND borrowernumber = ?
- AND description LIKE 'Rental fee, % $issuedate_us%'");
+ AND description LIKE 'Rental fee, % $issuedate_local%'");
$sth->execute($itemnumber,$borrowernumber);
return ($charge, $itemtype) if $sth->fetchrow_array;
$dbh->do("INSERT INTO accountlines (
@@ -1873,7 +1873,7 @@ sub _chargeToAccount
amountoutstanding,
accounttype) VALUES (?,?,?,?,NOW(),?,?,'Rent')",undef,
$borrowernumber,_getnextaccountno($borrowernumber),$itemnumber,
- "Rental fee, $text $issuedate_us",$charge,$charge);
+ "Rental fee, $text $issuedate_local",$charge,$charge);
return $charge,$itemtype;
}
@@ -1908,13 +1908,13 @@ sub _FixAccountOverdues {
($$issue{title}) = $sth->fetchrow_array() // '';
}
my $checkindate = $$flags{returndateObj}->output; # us
- my $duedate_us = $$flags{datedueObj}->output('us');
+ my $duedate_local = $$flags{datedueObj}->output;
my $row = $dbh->selectrow_hashref(qq|
SELECT *
FROM accountlines
WHERE borrowernumber = ?
AND itemnumber = ?
- AND description LIKE '%due on $duedate_us%'
+ AND description LIKE '%due on $duedate_local%'
AND accounttype IN ('FU','F','O')
ORDER BY accountno DESC
|, undef, $$issue{borrowernumber}, $$issue{itemnumber});
@@ -1937,7 +1937,7 @@ sub _FixAccountOverdues {
$$issue{borrowernumber},
$amount,
undef,
- $start_date->output('us'),
+ $start_date->output,
$ismax
);
##.. then exempt fine
@@ -2021,7 +2021,7 @@ sub _FixAccountOverdues {
}
else { # new amount is greater than previous
C4::Overdues::UpdateFine(
- $issue->{itemnumber}, $issue->{borrowernumber}, $amount, undef, $start_date->output('us'),$ismax
+ $issue->{itemnumber}, $issue->{borrowernumber}, $amount, undef, $start_date->output,$ismax
);
_checkinDescFine($$issue{borrowernumber},$$row{accountno},$checkindate,$$flags{tolost});
}
@@ -2165,7 +2165,6 @@ sub _FixAccountNowFound
my $rcr = $sth->fetchrow_hashref();
return if $rcr;
- $sth->execute($$lostitem{borrowernumber});
my($nextno) = _getnextaccountno($$lostitem{borrowernumber});
my $rcramount = -1 *($paid);
$dbh->do("INSERT INTO accountlines (
@@ -2756,8 +2755,7 @@ sub AddRenewal {
$borrowernumber ||= $$issue{borrowernumber};
my $lostitem = $g{lostitem} || GetLostItem($itemnumber);
if ($datedue && (ref($datedue) !~ /C4\:\:Dates/)) { # not an object
- if ($datedue =~ /^\d\d\/\d\d\/\d{4}$/) { $datedue = C4::Dates->new($datedue,'us' ) }
- elsif ($datedue =~ /^\d{4}\-\d\d\-\d\d$/) { $datedue = C4::Dates->new($datedue,'iso') }
+ $datedue = C4::Dates->new($datedue);
}
unless ($datedue && $datedue->output('iso')) {
Please sign in to comment.
Something went wrong with that request. Please try again.