Lines 685-691
will be credited to the next one.
Link Here
|
685 |
=cut |
685 |
=cut |
686 |
|
686 |
|
687 |
sub recordpayment_selectaccts { |
687 |
sub recordpayment_selectaccts { |
688 |
my ( $borrowernumber, $amount, $accts ) = @_; |
688 |
my ( $borrowernumber, $amount, $accts, $notes ) = @_; |
689 |
|
689 |
|
690 |
my $dbh = C4::Context->dbh; |
690 |
my $dbh = C4::Context->dbh; |
691 |
my $newamtos = 0; |
691 |
my $newamtos = 0; |
Lines 726-736
sub recordpayment_selectaccts {
Link Here
|
726 |
$sth->execute( $newamtos, $thisacct ); |
726 |
$sth->execute( $newamtos, $thisacct ); |
727 |
} |
727 |
} |
728 |
|
728 |
|
|
|
729 |
my $note = join( "\n", @$notes ); |
729 |
# create new line |
730 |
# create new line |
730 |
$sql = 'INSERT INTO accountlines ' . |
731 |
$sql = 'INSERT INTO accountlines ' . |
731 |
'(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id) ' . |
732 |
'(borrowernumber, accountno,date,amount,description,accounttype,amountoutstanding,manager_id,note) ' . |
732 |
q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?)|; |
733 |
q|VALUES (?,?,now(),?,'Payment,thanks','Pay',?,?,?)|; |
733 |
$dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id ); |
734 |
$dbh->do($sql,{},$borrowernumber, $nextaccntno, 0 - $amount, 0 - $amountleft, $manager_id, $note ); |
734 |
UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno ); |
735 |
UpdateStats( $branch, 'payment', $amount, '', '', '', $borrowernumber, $nextaccntno ); |
735 |
return; |
736 |
return; |
736 |
} |
737 |
} |