use SL::DB::Invoice;
use SL::DB::RecordTemplate;
use SL::DB::Tax;
-use SL::Helper::Flash qw(flash);
+use SL::Helper::Flash qw(flash flash_later);
use SL::Locale::String qw(t8);
use SL::Presenter::Tag;
use SL::Presenter::Chart;
}
# /saving the history
- if ($::instance_conf->get_ar_add_doc && $::instance_conf->get_doc_storage) {
- my $add_doc_url = build_std_url("script=ar.pl", 'action=edit', 'id=' . E($form->{id}));
- print $form->redirect_header($add_doc_url);
+ if (!$inline) {
+ my $msg = $locale->text("AR transaction '#1' posted (ID: #2)", $form->{invnumber}, $form->{id});
+ if ($::instance_conf->get_ar_add_doc && $::instance_conf->get_doc_storage) {
+ my $add_doc_url = build_std_url("script=ar.pl", 'action=edit', 'id=' . E($form->{id}));
+ SL::Helper::Flash::flash_later('info', $msg);
+ print $form->redirect_header($add_doc_url);
+ $::dispatcher->end_request;
+
+ } else {
+ $form->redirect($msg);
+ }
}
- $form->redirect($locale->text('AR transaction posted.') . ' ' . $locale->text('ID') . ': ' . $form->{id}) unless $inline;
$main::lxdebug->leave_sub();
}
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto duedatefrom duedateto
- employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed);
+ employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed
+ shippingpoint shipvia);
push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
$href = $params{want_binary_pdf} ? '' : build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
if ($form->{closed}) {
push @options, $locale->text('Closed');
}
+ if ($form->{shipvia}) {
+ push @options, $locale->text('Ship via') . " : $form->{shipvia}";
+ }
+ if ($form->{shippingpoint}) {
+ push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}";
+ }
+
$form->{ALL_PRINTERS} = SL::DB::Manager::Printer->get_all_sorted;