my ($new_name, $new_id) = split /--/, $form->{$name};
my $i = 0;
-
# if we use a selection
if ($form->{"select$name"}) {
if ($form->{"old$name"} ne $form->{$name}) {
# this is needed for is, ir and oe
-
+ $form->{update} = 0;
# for credit calculations
$form->{oldinvtotal} = 0;
$form->{oldtotalpaid} = 0;
if ($form->{"old$name"} ne qq|$form->{$name}--$form->{"${name}_id"}|) {
# this is needed for is, ir and oe
+ $form->{update} = 0;
# for credit calculations
$form->{oldinvtotal} = 0;
}
}
}
+ $form->language_payment(\%myconfig);
$lxdebug->leave_sub();
# 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') }