@@ -, +, @@ C4::Accounts git grep ModNote git grep getcredits git grep getrefunds should return green --- C4/Accounts.pm | 51 ----------------------------------------------- t/db_dependent/Accounts.t | 3 --- 2 files changed, 54 deletions(-) --- a/C4/Accounts.pm +++ a/C4/Accounts.pm @@ -41,9 +41,6 @@ BEGIN { &manualinvoice &getnextacctno &getcharges - &ModNote - &getcredits - &getrefunds &chargelostitem &ReversePayment &purge_zero_balance_fees @@ -332,54 +329,6 @@ sub getcharges { return (@results); } -sub ModNote { - my ( $accountlines_id, $note ) = @_; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare('UPDATE accountlines SET note = ? WHERE accountlines_id = ?'); - $sth->execute( $note, $accountlines_id ); -} - -sub getcredits { - my ( $date, $date2 ) = @_; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare( - "SELECT * FROM accountlines,borrowers - WHERE amount < 0 AND accounttype not like 'Pay%' AND accountlines.borrowernumber = borrowers.borrowernumber - AND timestamp >=TIMESTAMP(?) AND timestamp < TIMESTAMP(?)" - ); - - $sth->execute( $date, $date2 ); - my @results; - while ( my $data = $sth->fetchrow_hashref ) { - $data->{'date'} = $data->{'timestamp'}; - push @results,$data; - } - return (@results); -} - - -sub getrefunds { - my ( $date, $date2 ) = @_; - my $dbh = C4::Context->dbh; - - my $sth = $dbh->prepare( - "SELECT *,timestamp AS datetime - FROM accountlines,borrowers - WHERE (accounttype = 'REF' - AND accountlines.borrowernumber = borrowers.borrowernumber - AND date >=? AND date execute( $date, $date2 ); - - my @results; - while ( my $data = $sth->fetchrow_hashref ) { - push @results,$data; - - } - return (@results); -} - #FIXME: ReversePayment should be replaced with a Void Payment feature sub ReversePayment { my ($accountlines_id) = @_; --- a/t/db_dependent/Accounts.t +++ a/t/db_dependent/Accounts.t @@ -43,9 +43,6 @@ can_ok( 'C4::Accounts', chargelostitem manualinvoice getcharges - ModNote - getcredits - getrefunds ReversePayment purge_zero_balance_fees ) ); --