#
# any custom scripts for this one
-if (-f "$form->{path}/custom_arap.pl") {
- eval { require "$form->{path}/custom_arap.pl"; };
+if (-f "bin/mozilla/custom_arap.pl") {
+ eval { require "bin/mozilla/custom_arap.pl"; };
}
-if (-f "$form->{path}/$form->{login}_arap.pl") {
- eval { require "$form->{path}/$form->{login}_arap.pl"; };
+if (-f "bin/mozilla/$form->{login}_arap.pl") {
+ eval { require "bin/mozilla/$form->{login}_arap.pl"; };
}
1;
+require "bin/mozilla/common.pl";
+
# end of main
sub check_name {
my ($name) = @_;
+ $name = $name eq "customer" ? "customer" : "vendor";
+
my ($new_name, $new_id) = split /--/, $form->{$name};
my $i = 0;
# if we use a selection
} else {
# name is not on file
+ # $locale->text('Customer not on file or locked!')
+ # $locale->text('Vendor not on file or locked!')
$msg = ucfirst $name . " not on file or locked!";
$form->error($locale->text($msg));
}
map { delete $form->{$_} } qw(ndx lastndx nextsub is_global);
if ($form->{update}) {
- &{ $form->{update} };
+ call_sub($form->{"update"});
} else {
&update;
}
$lxdebug->leave_sub();
}
-sub continue { &{ $form->{nextsub} } }
+sub continue { call_sub($form->{"nextsub"}); }
sub gl_transaction { &add }
sub ar_transaction { &add_transaction('ar') }
sub ap_transaction { &add_transaction('ap') }