[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ledgersmb 1.3 bin/aa.pl , I would revert part of commit r5799



In r5799 statement &create_links was added to bin/aa.pl  'sub update'
But this makes that AA->get_name is called again from create_links
and already user-filled in fields like
$form->{AP_amount_1}     $form->{amount_1}     $form->{AP}
are overridden again in get_name

So i would for the moment comment out statement &create_links in 'sub
update' of bin/aa.pl.

Maybe statements needed for r5799 from create_links could be put in
new separate subroutine and called both from 'sub update' and
create_links


branches/1.3/bin/aa.pl [r5799] .. [r5800]
 sub update {
     my $display = shift;
     $is_update = 1;
+    &create_links;
    ....
}#end sub update

sub create_links {
..
 AA->get_name( \%myconfig, \%$form );
...
$form->{ $form->{ARAP} } = $form->{"$form->{ARAP}_1"};#set in AA get_name
...
}#end create_links


AA.pm

sub get_name
...
 # setup last accounts used for this customer/vendor
my $i = 0;
...
                $form->{"$form->{ARAP}_amount_$i"} =
                  "$ref->{accno}--$ref->{description}"
                  if $ref->{accno};
...
                $form->{ $form->{ARAP} } = $form->{"$form->{ARAP}_1"} =
                  "$ref->{accno}--" . "$ref->{description}"
                  if $ref->{accno};
....
#end AA.pm

Thanks
Herman