From: Peter Schulgin Date: Thu, 24 Nov 2016 13:26:34 +0000 (+0100) Subject: Revert "Artikel-Klassifizierung: Neue Option "Preis separat ausweisen"" X-Git-Tag: release-3.5.4~1854 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b36f0864f0304deb66f4215c52b68351f90b2309;p=kivitendo-erp.git Revert "Artikel-Klassifizierung: Neue Option "Preis separat ausweisen"" This reverts commit 815c3639a21ed53b288fd8bbb231e741c8e67ce5. --- diff --git a/SL/DB/Manager/PartsClassification.pm b/SL/DB/Manager/PartsClassification.pm index de11aa878..23558dc07 100644 --- a/SL/DB/Manager/PartsClassification.pm +++ b/SL/DB/Manager/PartsClassification.pm @@ -19,10 +19,4 @@ sub get_abbreviation { return $obj->abbreviation?$obj->abbreviation:undef; } -sub get_separate_abbreviation { - my ($class,$id) = @_; - my $obj = $class->get_first(query => [ id => $id ]); - return $obj->report_separate?$obj->abbreviation:''; -} - 1; diff --git a/SL/DB/MetaSetup/PartsClassification.pm b/SL/DB/MetaSetup/PartsClassification.pm index 108e2914b..18e1dff81 100644 --- a/SL/DB/MetaSetup/PartsClassification.pm +++ b/SL/DB/MetaSetup/PartsClassification.pm @@ -12,7 +12,6 @@ __PACKAGE__->meta->columns( abbreviation => { type => 'text' }, description => { type => 'text' }, id => { type => 'serial', not_null => 1 }, - report_separate => { type => 'boolean', default => 'false' }, used_for_purchase => { type => 'boolean', default => 'true' }, used_for_sale => { type => 'boolean', default => 'true' }, ); diff --git a/SL/IC.pm b/SL/IC.pm index e455d38e1..f202e8ef3 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -1758,7 +1758,6 @@ sub prepare_parts_for_printing { my $type_abbr = $::request->presenter->type_abbreviation($prt->part_type); push @{ $template_arrays{part_type} }, $type_abbr; push @{ $template_arrays{type_and_classific}}, $type_abbr.$::request->presenter->classification_abbreviation($prt->classification_id); - push @{ $template_arrays{separate} }, $::request->presenter->separate_abbreviation($prt->classification_id); } $main::lxdebug->leave_sub(); diff --git a/SL/IS.pm b/SL/IS.pm index 818698603..b55cd7f28 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -149,7 +149,6 @@ sub invoice_details { # so that they can be sorted in later my %prepared_template_arrays = IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form); my @prepared_arrays = keys %prepared_template_arrays; - my @separate_totals = qw(non_separate_subtotal); my $ic_cvar_configs = CVar->get_configs(module => 'IC'); my $project_cvar_configs = CVar->get_configs(module => 'Projects'); @@ -333,17 +332,6 @@ sub invoice_details { push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} }, ($discount != 0) ? $discount * -1 : ''; push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"}; - if ( $prepared_template_arrays{separate}[$i - 1] ) { - my $pabbr = $prepared_template_arrays{separate}[$i - 1]; - if ( ! $form->{"separate_${pabbr}_subtotal"} ) { - push @separate_totals , "separate_${pabbr}_subtotal"; - $form->{"separate_${pabbr}_subtotal"} = 0; - } - $form->{"separate_${pabbr}_subtotal"} += $linetotal; - } else { - $form->{non_separate_subtotal} += $linetotal; - } - $form->{total} += $linetotal; $form->{nodiscount_total} += $nodiscount_linetotal; $form->{discount_total} += $discount; @@ -551,7 +539,6 @@ sub invoice_details { $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; $form->{username} = $myconfig->{name}; - $form->{$_} = $form->format_amount($myconfig, $form->{$_}, 2) for @separate_totals; $main::lxdebug->leave_sub(); } diff --git a/SL/OE.pm b/SL/OE.pm index b4b7d7d82..24e88f004 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1331,7 +1331,6 @@ sub order_details { # so that they can be sorted in later my %prepared_template_arrays = IC->prepare_parts_for_printing(myconfig => $myconfig, form => $form); my @prepared_arrays = keys %prepared_template_arrays; - my @separate_totals = qw(non_separate_subtotal); $form->{TEMPLATE_ARRAYS} = { }; @@ -1438,17 +1437,6 @@ sub order_details { push @{ $form->{TEMPLATE_ARRAYS}->{discount_nofmt} }, ($discount != 0) ? $discount * -1 : ''; push @{ $form->{TEMPLATE_ARRAYS}->{p_discount} }, $form->{"discount_$i"}; - if ( $prepared_template_arrays{separate}[$i - 1] ) { - my $pabbr = $prepared_template_arrays{separate}[$i - 1]; - if ( ! $form->{"separate_${pabbr}_subtotal"} ) { - push @separate_totals , "separate_${pabbr}_subtotal"; - $form->{"separate_${pabbr}_subtotal"} = 0; - } - $form->{"separate_${pabbr}_subtotal"} += $linetotal; - } else { - $form->{non_separate_subtotal} += $linetotal; - } - $form->{ordtotal} += $linetotal; $form->{nodiscount_total} += $nodiscount_linetotal; $form->{discount_total} += $discount; @@ -1622,7 +1610,6 @@ sub order_details { $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; $form->{order} = SL::DB::Manager::Order->find_by(id => $form->{id}) if $form->{id}; - $form->{$_} = $form->format_amount($myconfig, $form->{$_}, 2) for @separate_totals; $main::lxdebug->leave_sub(); } diff --git a/SL/Presenter/Part.pm b/SL/Presenter/Part.pm index 08c425ba6..c3bbea2bc 100644 --- a/SL/Presenter/Part.pm +++ b/SL/Presenter/Part.pm @@ -6,7 +6,7 @@ use SL::DB::Part; use SL::DB::Manager::PartsClassification; use Exporter qw(import); -our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation separate_abbreviation); +our @EXPORT = qw(part_picker part select_classification classification_abbreviation type_abbreviation type_and_classification); use Carp; @@ -80,11 +80,6 @@ sub classification_abbreviation { return $::locale->text(SL::DB::Manager::PartsClassification->get_abbreviation($id)); } -sub separate_abbreviation { - my ($self, $id) = @_; - return $::locale->text(SL::DB::Manager::PartsClassification->get_separate_abbreviation($id)); -} - sub select_classification { my ($self, $name, %attributes) = @_; $attributes{value_key} = 'id'; diff --git a/doc/changelog b/doc/changelog index fc1d9d022..12327db49 100644 --- a/doc/changelog +++ b/doc/changelog @@ -37,18 +37,6 @@ große Features: nun wird alternativ zur 'type'-Spalte die 'pclass'-Spalte mit zwei Buchstaben geparsed und entsprechend classification_id,assembly sowie inventory_accno_id gesetzt (oder type_id falls neue Implementierung eingebaut). -- Option "Preis separat ausweisen" als neue Artikel-Klassifizierung - - - neuer boolcher Wert in parts_classification "report_separate" - - editierbar unter Artikelklassifikation - - In Aufträgen und Rechnungen werden die Zwischensummen LaTeX zur Verfügung gestellt. - - <%partsclass_XXX_subtotal%> wobei XXX die Abkürzung der Klassifikation ist. - - <%merchandise_value_subtotal%> der Rest der Positionen. - - Hintergrund: - Preise von Artikeln wie "Verpackung" oder "Transport" müssen - oftmals separat ausgewiesen werden, genau so wie der reine Warenwert. - kleinere neue Features und Detailverbesserungen: - SEPA Überweisungen zusätzlich Kunden- oder Lieferantennummer im Verwendungszweck vorbelegen diff --git a/locale/de/all b/locale/de/all index 619b801af..95d5d5acc 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2357,7 +2357,6 @@ $self->{texts} = { 'Report and misc. Preferences' => 'Sonstige Einstellungen', 'Report date' => 'Berichtsdatum', 'Report for' => 'Bericht für', - 'Report seperately' => 'Preis separat ausweisen', 'Reports' => 'Berichte', 'Representative' => 'Vertreter', 'Representative for Customer' => 'Vertreter für Kunden', diff --git a/sql/Pg-upgrade2/partsclassification_report_separate.sql b/sql/Pg-upgrade2/partsclassification_report_separate.sql deleted file mode 100644 index 3e98b5135..000000000 --- a/sql/Pg-upgrade2/partsclassification_report_separate.sql +++ /dev/null @@ -1,4 +0,0 @@ --- @tag: partsclassification_report_seperate --- @description: "Artikelklassifikation mit weiterer boolschen Variable für seperat ausweisen" --- @depends: parts_classifications -ALTER TABLE parts_classifications ADD COLUMN report_separate BOOLEAN DEFAULT 'f'; diff --git a/templates/webpages/parts_classification/form.html b/templates/webpages/parts_classification/form.html index f6181eed3..26760b43e 100755 --- a/templates/webpages/parts_classification/form.html +++ b/templates/webpages/parts_classification/form.html @@ -22,10 +22,6 @@ [% LxERP.t8('Used for Sale') %] [% L.checkbox_tag("parts_classification.used_for_sale", checked=(SELF.parts_classification.used_for_sale ? 1:'')) %] - - [% LxERP.t8('Report seperately') %] - [% L.checkbox_tag("parts_classification.report_separate", checked=(SELF.parts_classification.report_separate ? 1:'')) %] -

diff --git a/templates/webpages/parts_classification/list.html b/templates/webpages/parts_classification/list.html index e18b43bfe..9226dc2f6 100644 --- a/templates/webpages/parts_classification/list.html +++ b/templates/webpages/parts_classification/list.html @@ -18,7 +18,6 @@ [%- LxERP.t8('TypeAbbreviation') %] [%- LxERP.t8('Used for Purchase') %] [%- LxERP.t8('Used for Sale') %] - [%- LxERP.t8('Report seperately') %] @@ -34,7 +33,6 @@ [%- HTML.escape(LxERP.t8(parts_classification.abbreviation)) %] [% IF parts_classification.used_for_purchase %][% LxERP.t8('Yes') %][% ELSE %][% LxERP.t8('No') %][% END %] [% IF parts_classification.used_for_sale %][% LxERP.t8('Yes') %][% ELSE %][% LxERP.t8('No') %][% END %] - [% IF parts_classification.report_separate %][% LxERP.t8('Yes') %][% ELSE %][% LxERP.t8('No') %][% END %] [%- END %]