#
sub manualinvoice {
my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note ) = @_;
my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note, $barcode, $skip_notify ) = @_;
my $manager_id = 0;
$manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
my $dbh = C4::Context->dbh;
date => \'NOW()',
amount => $amount,
description => $desc,
barcode => $barcode,
accounttype => $type,
amountoutstanding => $amountleft,
itemnumber => $itemnum || undef,
accountno => $accountno,
note => $note,
ALTER TABLE accountlines add barcode varchar(20) DEFAULT NULL;
<th> </th>
<th>Fines & charges</th>
<th>Description</th>
<th>Barcode</th>
<th>Payment note</th>
<th>Account type</th>
<th>Amount</th>
[%- IF line.description %], [% line.description %][% END %]
[% IF line.title %]([% line.title %])[% END %]
</td>
<td>[%- IF line.barcode %] [% line.barcode %][% END %]</td>
<td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
<td>[% line.accounttype %]</td>
<td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
my $amount=$input->param('amount');
my $type=$input->param('type');
my $note = $input->param('note');
my $error = manualinvoice( $borrowernumber, $itemnum, $desc, $type, $amount, $note );
my $error = manualinvoice( $borrowernumber, $itemnum, $desc, $type, $amount, $note, $barcode );
if ($error) {
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ template_name => "members/maninvoice.tt",
$redirect .=
get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 );
$redirect .= get_for_redirect( 'description', "description$line_no", 0 );
$redirect .= get_for_redirect( 'barcode', "description$line_no", 0 );
$redirect .= get_for_redirect( 'title', "title$line_no", 0 );
$redirect .= get_for_redirect( 'itemnumber', "itemnumber$line_no", 0 );
$redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
-