From: Bernd Bleßmann Date: Fri, 26 Jul 2013 12:02:54 +0000 (+0200) Subject: Preisgruppe bei Stammdaten->Berichte->Kunden anzeigen lassen können. X-Git-Tag: release-3.3.0beta~119 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=32e816b5faa06c33f4927271b04d29a92bb943d3;p=kivitendo-erp.git Preisgruppe bei Stammdaten->Berichte->Kunden anzeigen lassen können. Conflicts: SL/CT.pm bin/mozilla/ct.pl --- diff --git a/SL/CT.pm b/SL/CT.pm index 8f8aa4132..1b0add541 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -78,7 +78,8 @@ sub search { "discount" => "ct.discount", "insertdate" => "ct.itime", "salesman" => "e.name", - "payment" => "pt.description" + "payment" => "pt.description", + "pricegroup" => "pg.pricegroup", ); $form->{sort} ||= "name"; @@ -213,14 +214,18 @@ sub search { push @values, $form->{addr_zipcode} . '%'; } + my $pg_select = $form->{l_pricegroup} ? qq|, pg.pricegroup as pricegroup | : ''; + my $pg_join = $form->{l_pricegroup} ? qq|LEFT JOIN pricegroup pg ON (ct.klass = pg.id) | : ''; my $query = qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | . qq| pt.description as payment | . + $pg_select . (qq|, NULL AS invnumber, NULL AS ordnumber, NULL AS quonumber, NULL AS invid, NULL AS module, NULL AS formtype, NULL AS closed | x!! $join_records) . qq|FROM $cv ct | . qq|LEFT JOIN business b ON (ct.business_id = b.id) | . qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | . qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | . + $pg_join . qq|WHERE $where|; my @saved_values = @values; diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index f7cb99bf0..ec1ccbfba 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -170,7 +170,7 @@ sub list_names { 'id', 'name', "$form->{db}number", 'contact', 'phone', 'discount', 'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', 'business', 'payment', 'invnumber', 'ordnumber', 'quonumber', 'salesman', - 'country', 'insertdate' + 'country', 'insertdate', 'pricegroup' ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -201,6 +201,7 @@ sub list_names { 'discount' => { 'text' => $locale->text('Discount'), }, 'payment' => { 'text' => $locale->text('Payment Terms'), }, 'insertdate' => { 'text' => $locale->text('Insert Date'), }, + 'pricegroup' => { 'text' => $locale->text('Pricegroup'), }, %column_defs_cvars, ); diff --git a/templates/webpages/ct/search.html b/templates/webpages/ct/search.html index 21c86c006..aa517079f 100644 --- a/templates/webpages/ct/search.html +++ b/templates/webpages/ct/search.html @@ -192,6 +192,12 @@ + + + + + + [% END %]