From bc0e2edad8e8f94f85f2a59ceb784b8eb0cda97c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 20 Dec 2017 14:14:45 +0100 Subject: [PATCH] Presenter: Neue Struktur in weiteren Belegen --- bin/mozilla/ar.pl | 10 ++++++---- bin/mozilla/gl.pl | 6 ++++-- bin/mozilla/rp.pl | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 2c74018c3..562f8aac2 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -51,6 +51,8 @@ use SL::DB::RecordTemplate; use SL::DB::Tax; use SL::Helper::Flash qw(flash); use SL::Locale::String qw(t8); +use SL::Presenter::Tag; +use SL::Presenter::Chart; use SL::ReportGenerator; require "bin/mozilla/common.pl"; @@ -423,8 +425,8 @@ sub form_header { my $selected_taxchart = $taxchart_to_use->id . '--' . $taxchart_to_use->rate; $transaction->{selectAR_amount} = - $::request->presenter->chart_picker("AR_amount_chart_id_$i", $amount_chart_id, style => "width: 400px", type => "AR_amount", class => ($form->{initial_focus} eq "row_$i" ? "initial_focus" : "")) - . $::request->presenter->hidden_tag("previous_AR_amount_chart_id_$i", $amount_chart_id); + SL::Presenter::Chart::picker("AR_amount_chart_id_$i", $amount_chart_id, style => "width: 400px", type => "AR_amount", class => ($form->{initial_focus} eq "row_$i" ? "initial_focus" : "")) + . SL::Presenter::Tag::hidden_tag("previous_AR_amount_chart_id_$i", $amount_chart_id); $transaction->{taxchart} = NTI($cgi->popup_menu('-name' => "taxchart_$i", @@ -1004,7 +1006,7 @@ sub ar_transactions { $href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); my %column_defs = ( - 'ids' => { raw_header_data => $::request->presenter->checkbox_tag("", id => "check_all", checkall => "[data-checkall=1]"), align => 'center' }, + 'ids' => { raw_header_data => SL::Presenter::Tag::checkbox_tag("", id => "check_all", checkall => "[data-checkall=1]"), align => 'center' }, 'transdate' => { 'text' => $locale->text('Date'), }, 'id' => { 'text' => $locale->text('ID'), }, 'type' => { 'text' => $locale->text('Type'), }, @@ -1182,7 +1184,7 @@ sub ar_transactions { . "&id=" . E($ar->{id}) . "&callback=${callback}"; $row->{ids} = { - raw_data => $::request->presenter->checkbox_tag("id[]", value => $ar->{id}, "data-checkall" => 1), + raw_data => SL::Presenter::Tag::checkbox_tag("id[]", value => $ar->{id}, "data-checkall" => 1), valign => 'center', align => 'center', }; diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 519351a5f..8529e3d52 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -49,6 +49,8 @@ use SL::DBUtils qw(selectrow_query selectall_hashref_query); use SL::Webdav; use SL::Locale::String qw(t8); use SL::Helper::GlAttachments qw(count_gl_attachments); +use SL::Presenter::Tag; +use SL::Presenter::Chart; require "bin/mozilla/common.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -836,8 +838,8 @@ sub display_rows { my $selected_taxchart = $taxchart_to_use->id . '--' . $taxchart_to_use->rate; my $accno = qq|| . - $::request->presenter->chart_picker("accno_id_$i", $accno_id, style => "width: 300px") . - $::request->presenter->hidden_tag("previous_accno_id_$i", $accno_id) + SL::Presenter::Chart::picker("accno_id_$i", $accno_id, style => "width: 300px") . + SL::Presenter::Tag::hidden_tag("previous_accno_id_$i", $accno_id) . qq||; my $tax_ddbox = qq|| . NTI($cgi->popup_menu('-name' => "taxchart_$i", diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index b612a0c8d..c1b3c63de 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -44,6 +44,7 @@ use SL::DB::Customer; use SL::RP; use SL::Iconv; use SL::Locale::String qw(t8); +use SL::Presenter::Tag; use SL::ReportGenerator; use Data::Dumper; use List::MoreUtils qw(any); @@ -1008,7 +1009,7 @@ sub aging { my @columns = qw(statement ct invnumber transdate duedate amount open); my %column_defs = ( - 'statement' => { raw_header_data => $::request->presenter->checkbox_tag("checkall", checkall => '[name^=statement_]'), 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, align => "center" }, + 'statement' => { raw_header_data => SL::Presenter::Tag::checkbox_tag("checkall", checkall => '[name^=statement_]'), 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, align => "center" }, 'ct' => { 'text' => $form->{ct} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), }, 'invnumber' => { 'text' => $locale->text('Invoice'), }, 'transdate' => { 'text' => $locale->text('Date'), }, -- 2.20.1