# connect to database
my $dbh = $form->dbconnect($myconfig);
- map { $form->{$_} =~ s/\'/\'\'/g } (projectnumber, description);
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(projectnumber description);
if ($form->{id}) {
$query = qq|UPDATE project SET
# connect to database
my $dbh = $form->dbconnect($myconfig);
- map { $form->{$_} =~ s/\'/\'\'/g } (partsgroup);
-
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(partsgroup);
$form->{discount} /= 100;
if ($form->{id}) {
# connect to database
my $dbh = $form->dbconnect($myconfig);
- map { $form->{$_} =~ s/\'/\'\'/g } (pricegroup);
+ map { $form->{$_} =~ s/\'/\'\'/g } qw(pricegroup);
$form->{discount} /= 100;
# delete all the new_ variables
for $i (1 .. $form->{lastndx}) {
- map { delete $form->{"new_${_}_$i"} } (id, name);
+ map { delete $form->{"new_${_}_$i"} } qw(id name);
}
map { delete $form->{$_} } qw(ndx lastndx nextsub);
sub continue { &{ $form->{nextsub} } }
sub gl_transaction { &add }
-sub ar_transaction { &add_transaction(ar) }
-sub ap_transaction { &add_transaction(ap) }
-sub sales_invoice { &add_transaction(is) }
-sub vendor_invoice { &add_transaction(ir) }
+sub ar_transaction { &add_transaction('ar') }
+sub ap_transaction { &add_transaction('ap') }
+sub sales_invoice { &add_transaction('is') }
+sub vendor_invoice { &add_transaction('ir') }
# with JavaScript Calendar
$button1 = qq|
- <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} tabindex="2" $readonly>
+ <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" tabindex="2" $readonly>
<input type=button name=transdate id="trigger1" value=|
. $locale->text('button') . qq|></td>
|;
# without JavaScript Calendar
$button1 =
- qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} tabindex="2" $readonly></td>|;
+ qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" tabindex="2" $readonly></td>|;
}
$form->header;