+ my (%AR_amount_labels, @AR_amount_values);
+ my (%AR_labels, @AR_values);
+ my (%AR_paid_labels, @AR_paid_values);
+ my $taxchart_init;
+
+ foreach my $item (@{ $form->{ALL_CHARTS} }) {
+ if (grep({ $_ eq "AR_amount" } @{ $item->{link_split} })) {
+ $taxchart_init = $item->{tax_id} if ($taxchart_init eq "");
+ my $key = "$item->{accno}--$item->{tax_id}";
+ push(@AR_amount_values, $key);
+ $AR_amount_labels{$key} =
+ "$item->{accno}--$item->{description}";
+
+ } elsif (grep({ $_ eq "AR" } @{ $item->{link_split} })) {
+ push(@AR_values, $item->{accno});
+ $AR_labels{$item->{accno}} = "$item->{accno}--$item->{description}";
+
+ } elsif (grep({ $_ eq "AR_paid" } @{ $item->{link_split} })) {
+ push(@AR_paid_values, $item->{accno});
+ $AR_paid_labels{$item->{accno}} =
+ "$item->{accno}--$item->{description}";
+ }
+ }
+
+ my %taxchart_labels = ();
+ my @taxchart_values = ();
+ foreach my $item (@{ $form->{ALL_TAXCHARTS} }) {
+ my $key = "$item->{id}--$item->{rate}";
+ $taxchart_init = $key if ($taxchart_init eq $item->{id});
+ push(@taxchart_values, $key);
+ $taxchart_labels{$key} =
+ "$item->{taxdescription} " . ($item->{rate} * 100) . ' %';
+ }
+