From: Moritz Bunkus Date: Thu, 19 Feb 2015 16:16:57 +0000 (+0100) Subject: Spalte »nicht gelieferte Menge« in Aufträgen optional anzeigen X-Git-Tag: release-3.2.1~51^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=317450cb2e2514d838616562fc478dad2009d103;p=kivitendo-erp.git Spalte »nicht gelieferte Menge« in Aufträgen optional anzeigen --- diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index bf9e89c27..accab2995 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -84,6 +84,7 @@ __PACKAGE__->meta->columns( rmanumber => { type => 'text' }, sales_delivery_order_show_delete => { type => 'boolean', default => 'true' }, sales_order_show_delete => { type => 'boolean', default => 'true' }, + sales_purchase_order_ship_missing_column => { type => 'boolean', default => 'false' }, sdonumber => { type => 'text' }, sepa_creditor_id => { type => 'text' }, servicenumber => { type => 'text' }, diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 1acd6a0d3..b2b6979d4 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -139,6 +139,7 @@ sub display_row { my $is_quotation = $form->{type} =~ /_quotation$/; my $is_invoice = $form->{type} =~ /invoice/; my $is_s_p_order = (first { $_ eq $form->{type} } qw(sales_order purchase_order)); + my $show_ship_missing = $is_s_p_order && $::instance_conf->get_sales_purchase_order_ship_missing_column; if ($is_delivery_order) { if ($form->{type} eq 'sales_delivery_order') { @@ -159,6 +160,7 @@ sub display_row { { id => 'partnumber', width => 8, value => $locale->text('Number'), display => 1, }, { id => 'description', width => 30, value => $locale->text('Part Description'), display => 1, }, { id => 'ship', width => 5, value => $locale->text('Delivered'), display => $is_s_p_order, }, + { id => 'ship_missing', width => 5, value => $locale->text('Not delivered'), display => $show_ship_missing, }, { id => 'qty', width => 5, value => $locale->text('Qty'), display => 1, }, { id => 'price_factor', width => 5, value => $locale->text('Price Factor'), display => !$is_delivery_order, }, { id => 'unit', width => 5, value => $locale->text('Unit'), display => 1, }, @@ -200,7 +202,7 @@ sub display_row { my $deliverydate = $locale->text('Required by'); # special alignings - my %align = map { $_ => 'right' } qw(qty ship right discount linetotal stock_in_out weight); + my %align = map { $_ => 'right' } qw(qty ship right discount linetotal stock_in_out weight ship_missing); my %nowrap = map { $_ => 1 } qw(description unit); $form->{marge_total} = 0; @@ -309,6 +311,11 @@ sub display_row { $ship_qty /= ( $all_units->{$form->{"unit_$i"}}->{factor} || 1 ); $column_data{ship} = $form->format_amount(\%myconfig, $form->round_amount($ship_qty, 2) * 1) . ' ' . $form->{"unit_$i"}; + + my $ship_missing_qty = $form->{"qty_$i"} - $ship_qty; + my $ship_missing_amount = $form->round_amount($ship_missing_qty * $form->{"sellprice_$i"} * (100 - $form->{"discount_$i"}) / 100 / $price_factor, 2); + + $column_data{ship_missing} = $form->format_amount(\%myconfig, $ship_missing_qty) . ' ' . $form->{"unit_$i"} . '; ' . $form->format_amount(\%myconfig, $ship_missing_amount, $decimalplaces); } my $sellprice_value = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces); @@ -2065,4 +2072,3 @@ sub _make_record { return $obj; } - diff --git a/locale/de/all b/locale/de/all index ffd4375a4..7128dd08e 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1278,6 +1278,7 @@ $self->{texts} = { 'If disabled purchase invoices can only be created by conversion from existing requests for quotations, purchase orders and purchase delivery orders.' => 'Falls deaktiviert, so können Einkaufsrechnungen nur durch Umwandlung aus bestehenden Preisanfragen, Lieferantenaufträgen und Einkaufslieferscheinen angelegt werden.', 'If disabled sales orders cannot be converted into sales invoices directly.' => 'Falls deaktiviert, so können Verkaufsaufträge nicht direkt in Verkaufsrechnungen umgewandelt werden.', 'If disabled sales quotations cannot be converted into sales invoices directly.' => 'Falls deaktiviert, so können Verkaufsangebote nicht direkt in Verkaufsrechnungen umgewandelt werden.', + 'If enabled a column will be shown in sales and purchase orders that lists both the amount and the value not shipped yet for each item.' => 'Falls eingeschaltet, wird für jede Position in Auftragsbestätigungen und Lieferantenaufträgen eine Spalte mit noch nicht gelieferter Menge und Wert angezeigt.', 'If enabled only those projects that are assigned to the currently selected customer are offered for selection in sales records.' => 'Wenn eingeschaltet, so werden in Verkaufsbelegen nur diejenigen Projekte zur Auswahl angeboten, die dem aktuell ausgewählten Kunden zugewiesen wurden.', 'If enabled purchase and sales records cannot be saved if no transaction description has been entered.' => 'Wenn angeschaltet, so können Einkaufs- und Verkaufsbelege nicht gespeichert werden, solange keine Vorgangsbezeichnung eingegeben wurde.', 'If missing then the start date will be used.' => 'Falls es fehlt, so wird die erste Rechnung für das Startdatum erzeugt.', @@ -2310,6 +2311,7 @@ $self->{texts} = { 'Show the weights of articles and the total weight in orders, invoices and delivery notes?' => 'Sollen Warengewichte und Gesamtgewicht in Aufträgen, Rechnungen und Lieferscheinen angezeigt werden?', 'Show weights' => 'Gewichte anzeigen', 'Show your TODO list after logging in' => 'Aufgabenliste nach dem Anmelden anzeigen', + 'Show »not delivered qty/value« column in sales and purchase orders' => 'Spalte »Nicht gelieferte Menge/Wert« in Aufträgen anzeigen', 'Signature' => 'Unterschrift', 'Since bin is not enforced in the parts data, please specify a bin where goods without a specified bin will be put.' => 'Da Lagerplätze kein Pflichtfeld sind, geben Sie bitte einen Lagerplatz an, in dem Waren ohne spezifizierten Lagerplatz eingelagert werden sollen.', 'Single quotes' => 'Einfache Anführungszeichen', diff --git a/sql/Pg-upgrade2/defaults_sales_purchase_order_show_ship_missing_column.sql b/sql/Pg-upgrade2/defaults_sales_purchase_order_show_ship_missing_column.sql new file mode 100644 index 000000000..afbac8172 --- /dev/null +++ b/sql/Pg-upgrade2/defaults_sales_purchase_order_show_ship_missing_column.sql @@ -0,0 +1,7 @@ +-- @tag: defaults_sales_purchase_order_show_ship_missing_column +-- @description: Mandantenkonfiguration: Optionale Spalte »Nicht gelieferte Menge« in Auftragsbestätigungen und Lieferantenaufträgen +-- @depends: release_3_1_0 + +ALTER TABLE defaults ADD COLUMN sales_purchase_order_ship_missing_column BOOLEAN; +UPDATE defaults SET sales_purchase_order_ship_missing_column = FALSE; +ALTER TABLE defaults ALTER COLUMN sales_purchase_order_ship_missing_column SET DEFAULT FALSE; diff --git a/templates/webpages/client_config/_features.html b/templates/webpages/client_config/_features.html index f081ca261..14f6d10b1 100644 --- a/templates/webpages/client_config/_features.html +++ b/templates/webpages/client_config/_features.html @@ -95,6 +95,12 @@ [% LxERP.t8('If disabled purchase invoices can only be created by conversion from existing requests for quotations, purchase orders and purchase delivery orders.') %] + + [% LxERP.t8("Show »not delivered qty/value« column in sales and purchase orders") %] + [% L.yes_no_tag("defaults.sales_purchase_order_ship_missing_column", SELF.defaults.sales_purchase_order_ship_missing_column) %] + [% LxERP.t8("If enabled a column will be shown in sales and purchase orders that lists both the amount and the value not shipped yet for each item.") %] + + [% LxERP.t8("E-mail") %]