my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
$form->{title} = $locale->text('Journal');
} (@{ $form->{all_departments} || [] });
}
- 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></td>
my @columns = qw(
gldate transdate id reference description
- notes source debit debit_accno
+ notes source debit debit_accno
credit credit_accno debit_tax debit_tax_accno
credit_tax credit_tax_accno projectnumbers balance employee
);
my $form = $main::form;
my %myconfig = %main::myconfig;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
$form->{debit_1} = 0 if !$form->{"debit_1"};
$form->{totaldebit} = 0;
my $projectnumber_hidden = qq|
<input type="hidden" name="project_id_$i" value="$form->{"project_id_$i"}">|;
- my $copy2credit = 'onkeyup="copy_debit_to_credit()"' if $i == 1;
+ my $copy2credit = $i == 1 ? 'onkeyup="copy_debit_to_credit()"' : '';
print qq|<tr valign=top>
$accno
$form->{title} = $locale->text("$title General Ledger Transaction");
my $readonly = ($form->{id}) ? "readonly" : "";
- my $show_details_checked = "checked" if $form->{show_details};
-
- my $ob_transaction_checked = "checked" if $form->{ob_transaction};
- my $cb_transaction_checked = "checked" if $form->{cb_transaction};
+ my $show_details_checked = $form->{show_details} ? "checked" : '';
+ my $ob_transaction_checked = $form->{ob_transaction} ? "checked" : '';
+ my $cb_transaction_checked = $form->{cb_transaction} ? "checked" : '';
# $locale->text('Add General Ledger Transaction')
# $locale->text('Edit General Ledger Transaction')
my $form = $main::form;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- my $cgi = $main::cgi;
+ my $cgi = $::request->{cgi};
my $follow_ups_block;
if ($form->{id}) {
} else {
if ($form->{draft_id}) {
- my $remove_draft_checked = 'checked' if ($form->{remove_draft});
+ my $remove_draft_checked = $form->{remove_draft} ? 'checked' : '';
print qq|<p>\n|
. qq| <input name="remove_draft" id="remove_draft" type="checkbox" class="checkbox" ${remove_draft_checked}>|
. qq| <label for="remove_draft">| . $locale->text('Remove Draft') . qq|</label>\n|