if (($form->{previous_customer_id} || $form->{customer_id}) != $form->{customer_id}) {
IS->get_customer(\%myconfig, $form);
+ if (($form->{rowcount} == 1) && ($form->{amount_1} == 0)) {
+ my $last_used_ar_chart = SL::DB::Customer->load_cached($form->{customer_id})->last_used_ar_chart;
+ $form->{"AR_amount_chart_id_1"} = $last_used_ar_chart->id if $last_used_ar_chart;
+ }
}
$form->{invtotal} =
my $locale = $main::locale;
my $cgi = $::request->{cgi};
- $form->{title} = $locale->text('AR Transactions');
+ $form->{title} = $locale->text('Invoices, Credit Notes & AR Transactions');
$form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
$form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
AR->ar_transactions(\%myconfig, \%$form);
- $form->{title} = $locale->text('AR Transactions');
+ $form->{title} = $locale->text('Invoices, Credit Notes & AR Transactions');
my $report = SL::ReportGenerator->new(\%myconfig, $form);
$::request->layout->add_javascripts('kivi.MassInvoiceCreatePrint.js');
setup_ar_transactions_action_bar(num_rows => scalar(@{ $form->{AR} }));
- $report->generate_with_headers(action_bar => 1);
+ $report->generate_with_headers();
$main::lxdebug->leave_sub();
}