my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
$main::auth->assert('general_ledger');
my $notes =
qq|<textarea name=notes rows=$rows cols=50 wrap=soft $readonly>$form->{notes}</textarea>|;
- my $department = qq|
+ my $department;
+ $department = qq|
<tr>
<th align="right" nowrap>| . $locale->text('Department') . qq|</th>
<td colspan=3><select name=department>$form->{selectdepartment}</select>
$exchangerate =
qq|<input name="exchangerate_$i" size=10 value=$form->{"exchangerate_$i"}>|;
} else {
- $exchangerate = qq|$form->{"exchangerate_$i"}|.
+ $exchangerate =
qq|<input type=hidden name="exchangerate_$i" value=$form->{"exchangerate_$i"}>$form->{"exchangerate_$i"}|;
}
}
qq|<input type=hidden name="paid_project_id_$i" value=$form->{"paid_project_id_$i"}>|;
}
- $column_data{"paid_$i"} = $paid;
- $column_data{"AP_paid_$i"} = $AP_paid;
- $column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|;
- $column_data{"datepaid_$i"} = $datepaid;
- $column_data{"source_$i"} = $source;
- $column_data{"memo_$i"} = $memo;
+ $column_data{"paid_$i"} = $paid;
+ $column_data{"AP_paid_$i"} = $AP_paid;
+ $column_data{"exchangerate_$i"} = qq|<td align=center>$exchangerate</td>|;
+ $column_data{"datepaid_$i"} = $datepaid;
+ $column_data{"source_$i"} = $source;
+ $column_data{"memo_$i"} = $memo;
$column_data{"paid_project_id_$i"} = $paid_project_id;
map { print qq|$column_data{"${_}_$i"}\n| } @column_index;
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
$main::auth->assert('general_ledger');
$main::auth->assert('general_ledger');
+ my ($inline) = @_;
+
# check if there is a vendor, invoice and due date
$form->isblank("transdate", $locale->text("Invoice Date missing!"));
$form->isblank("duedate", $locale->text("Due Date missing!"));
# /saving the history
remove_draft() if $form->{remove_draft};
# Dieser Text wird niemals ausgegeben: Probleme beim redirect?
- $form->redirect($locale->text('Transaction posted!'));
+ $form->redirect($locale->text('Transaction posted!')) unless $inline;
} else {
$form->error($locale->text('Cannot post transaction!'));
}