Lines 3189-3204
sub AddIssuingCharge {
Link Here
|
3189 |
my $dbh = C4::Context->dbh; |
3189 |
my $dbh = C4::Context->dbh; |
3190 |
my $nextaccntno = getnextacctno( $borrowernumber ); |
3190 |
my $nextaccntno = getnextacctno( $borrowernumber ); |
3191 |
my $manager_id = 0; |
3191 |
my $manager_id = 0; |
|
|
3192 |
my $item = GetBiblioFromItemNumber($itemnumber); |
3192 |
$manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; |
3193 |
$manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; |
3193 |
my $query =" |
3194 |
my $query =" |
3194 |
INSERT INTO accountlines |
3195 |
INSERT INTO accountlines |
3195 |
(borrowernumber, itemnumber, accountno, |
3196 |
(borrowernumber, itemnumber, accountno, |
3196 |
date, amount, description, accounttype, |
3197 |
date, amount, description, accounttype, |
3197 |
amountoutstanding, manager_id) |
3198 |
amountoutstanding, manager_id) |
3198 |
VALUES (?, ?, ?,now(), ?, 'Rental', 'Rent',?,?) |
3199 |
VALUES (?, ?, ?,now(), ?, ?, 'Rent',?,?) |
3199 |
"; |
3200 |
"; |
3200 |
my $sth = $dbh->prepare($query); |
3201 |
my $sth = $dbh->prepare($query); |
3201 |
$sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, $charge, $manager_id ); |
3202 |
$sth->execute( $borrowernumber, $itemnumber, $nextaccntno, $charge, "$item->{'title'} $item->{'barcode'}", $charge, $manager_id ); |
3202 |
} |
3203 |
} |
3203 |
|
3204 |
|
3204 |
=head2 GetTransfers |
3205 |
=head2 GetTransfers |
3205 |
- |
|
|