Lines 2907-2922
sub AddIssuingCharge {
Link Here
|
2907 |
my $dbh = C4::Context->dbh; |
2907 |
my $dbh = C4::Context->dbh; |
2908 |
my $nextaccntno = getnextacctno( $borrowernumber ); |
2908 |
my $nextaccntno = getnextacctno( $borrowernumber ); |
2909 |
my $manager_id = 0; |
2909 |
my $manager_id = 0; |
|
|
2910 |
my $item = GetBiblioFromItemNumber($itemnumber); |
2910 |
$manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; |
2911 |
$manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; |
2911 |
my $query =" |
2912 |
my $query =" |
2912 |
INSERT INTO accountlines |
2913 |
INSERT INTO accountlines |
2913 |
(borrowernumber, itemnumber, accountno, |
2914 |
(borrowernumber, itemnumber, accountno, |
2914 |
date, amount, description, accounttype, |
2915 |
date, amount, description, accounttype, |
2915 |
amountoutstanding, manager_id) |
2916 |
amountoutstanding, manager_id) |
2916 |
VALUES (?, ?, ?,now(), ?, 'Rental', 'Rent',?,?) |
2917 |
VALUES (?, ?, ?,now(), ?, ?, 'Rent',?,?) |
2917 |
"; |
2918 |
"; |
2918 |
my $sth = $dbh->prepare($query); |
2919 |
my $sth = $dbh->prepare($query); |
2919 |
$sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, $charge, $manager_id ); |
2920 |
$sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, "$item->{'title'} $item->{'barcode'}", $charge, $manager_id ); |
2920 |
} |
2921 |
} |
2921 |
|
2922 |
|
2922 |
=head2 GetTransfers |
2923 |
=head2 GetTransfers |
2923 |
- |
|
|