From: Moritz Bunkus Date: Mon, 6 Jan 2014 13:08:17 +0000 (+0100) Subject: Merge branch 'parse-filter-date-le-fix-ticket-2404' X-Git-Tag: release-3.1.0beta1~22^2~51^2~4^2 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/4fdbfa7df4c1f89cdb0d3d3266b5908ac67c3f15?hp=140a7c83cde5952fac56e5e7d794f691dcff175e Merge branch 'parse-filter-date-le-fix-ticket-2404' --- diff --git a/SL/Controller/Inventory.pm b/SL/Controller/Inventory.pm index 3f406ee48..ca6190c90 100644 --- a/SL/Controller/Inventory.pm +++ b/SL/Controller/Inventory.pm @@ -44,27 +44,33 @@ sub action_stock_in { sub action_stock { my ($self) = @_; - # do stock - WH->transfer({ - parts => $self->part, - dst_bin => $self->bin, - dst_wh => $self->warehouse, - qty => $::form->parse_amount(\%::myconfig, $::form->{qty}), - unit => $self->unit, - transfer_type => 'stock', - chargenumber => $::form->{chargenumber}, - ean => $::form->{ean}, - comment => $::form->{comment}, - }); - - if ($::form->{write_default_bin}) { - $self->part->load; # onhand is calculated in between. don't mess that up - $self->part->bin($self->bin); - $self->part->warehouse($self->warehouse); - $self->part->save; - } + my $qty = $::form->parse_amount(\%::myconfig, $::form->{qty}); - flash_later('info', t8('Transfer successful')); + if ($qty < 0) { + flash_later('error', t8('Cannot stock negative amounts')); + } else { + # do stock + WH->transfer({ + parts => $self->part, + dst_bin => $self->bin, + dst_wh => $self->warehouse, + qty => $qty, + unit => $self->unit, + transfer_type => 'stock', + chargenumber => $::form->{chargenumber}, + ean => $::form->{ean}, + comment => $::form->{comment}, + }); + + if ($::form->{write_default_bin}) { + $self->part->load; # onhand is calculated in between. don't mess that up + $self->part->bin($self->bin); + $self->part->warehouse($self->warehouse); + $self->part->save; + } + + flash_later('info', t8('Transfer successful')); + } # redirect $self->redirect_to( diff --git a/SL/DO.pm b/SL/DO.pm index d83c49b3e..bc651c8ed 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -725,6 +725,8 @@ sub order_details { my @partsgroup = (); my $partsgroup; my $position = 0; + my $subtotal_header = 0; + my $subposition = 0; my (@project_ids, %projectnumbers, %projectdescriptions); @@ -797,8 +799,6 @@ sub order_details { next if (!$form->{"id_$i"}); - $position++; - if ($item->[1] ne $sameitem) { push(@{ $form->{description} }, qq|$item->[1]|); $sameitem = $item->[1]; @@ -809,6 +809,19 @@ sub order_details { $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"}); # add number, description and qty to $form->{number}, .... + if ($form->{"subtotal_$i"} && !$subtotal_header) { + $subtotal_header = $i; + $position = int($position); + $subposition = 0; + $position++; + } elsif ($subtotal_header) { + $subposition += 1; + $position = int($position); + $position = $position.".".$subposition; + } else { + $position = int($position); + $position++; + } my $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || { 'factor' => 1 }; @@ -826,6 +839,10 @@ sub order_details { push @{ $form->{TEMPLATE_ARRAYS}{projectdescription} }, $projectdescriptions{$form->{"project_id_$i"}}; + if ($form->{"subtotal_$i"} && $subtotal_header && ($subtotal_header != $i)) { + $subtotal_header = 0; + } + my $lineweight = $form->{"qty_$i"} * $form->{"weight_$i"}; $totalweight += $lineweight; push @{ $form->{TEMPLATE_ARRAYS}->{weight} }, $form->format_amount($myconfig, $form->{"weight_$i"}, 3); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index d67aac59d..cf3ac5768 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -378,6 +378,7 @@ sub form_header { shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus convert_from_do_ids convert_from_oe_ids + show_details ), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6001c87bc..f08a5249a 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -441,7 +441,8 @@ sub form_header { max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptodepartment_1 shiptodepartment_2 shiptoemail shiptocp_gender - message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus), + message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus + show_details), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts} ]; # deleted: discount diff --git a/locale/de/all b/locale/de/all index 05673c95f..2ef84b96c 100755 --- a/locale/de/all +++ b/locale/de/all @@ -18,10 +18,8 @@ $self->{texts} = { '#1 h' => '#1 h', '#1 of #2 importable objects were imported.' => '#1 von #2 importierbaren Objekten wurden importiert.', '#1 prices were updated.' => '#1 Preise wurden aktualisiert.', - '(recommended) Insert the used currencies in the system. You can simply change the name of the currencies by editing the textfields above. Do not use a name of a currency that is already in use.' => '(empfohlen) Fügen Sie die verwaisten Währungen in Ihr System ein. Sie können den Namen der Währung einfach ändern, indem Sie die Felder oben bearbeiten. Benutzen Sie keine Namen von Währungen, die Sie bereits benutzen.', '%' => '%', - '* there are restrictions for the perpetual method, look at chapter "Bemerkungen zu Bestandsmethode" in' => ' für die Bestandsmethode gibt es Einschränkungen, siehe Kapitel "Bemerkungen zu Bestandsmethode" in', - '*) Since version 2.7 these parameters ares set in the client database and not in the configuration file, details in chapter:' => '*) Seit 2.7 werden Gewinnermittlungsart, Versteuerungsart und Warenbuchungsmethode in der Mandanten-DB gesteuert und nicht mehr in der Konfigurationsdatei, Umstellungs-Details:', + '(recommended) Insert the used currencies in the system. You can simply change the name of the currencies by editing the textfields above. Do not use a name of a currency that is already in use.' => '(empfohlen) Fügen Sie die verwaisten Währungen in Ihr System ein. Sie können den Namen der Währung einfach ändern, indem Sie die Felder oben bearbeiten. Benutzen Sie keine Namen von Währungen, die Sie bereits benutzen.', '*/' => '*/', ', if set' => ', falls gesetzt', '---please select---' => '---bitte auswählen---', @@ -408,6 +406,7 @@ $self->{texts} = { 'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!', 'Cannot save preferences!' => 'Einstellungen können nicht gespeichert werden!', 'Cannot save quotation!' => 'Angebot kann nicht gespeichert werden!', + 'Cannot stock negative amounts' => 'Negative Mengen können nicht eingelagert werden!', 'Cannot storno invoice for a closed period!' => 'Das Rechnungsdatum der zu stornierenden Rechnung fällt in einen abgeschlossenen Zeitraum!', 'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren', 'Cannot transfer.
Reason:
#1' => 'Kann nicht auslagern.
Grund:
#1', @@ -420,7 +419,6 @@ $self->{texts} = { 'Cc E-mail' => 'CC (E-Mail)', 'Change default bin for this parts' => 'Standardlagerplatz für diese Waren ändern', 'Change kivitendo installation settings (most entries in the \'System\' menu)' => 'Verändern der kivitendo-Installationseinstellungen (die meisten Menüpunkte unterhalb von \'System\')', - 'Change representative to' => 'Vertreter ändern in', 'Changes in this block are only sensible if the account is NOT a summary account AND there exists one valid taxkey. To select both Receivables and Payables only make sense for Payment / Receipt (i.e. account cash).' => 'Es ist nur sinnvoll Änderungen vorzunehmen, wenn das Konto KEIN Sammelkonto ist und wenn ein gültiger Steuerschlüssel für das Konto existiert. Gleichzeitig Haken bei Forderungen und Verbindlichkeiten zu setzen, macht auch NUR für den Zahlungsein- und Ausgang (bspw. Bank oder Kasse) Sinn.', 'Changes to Receivables and Payables are only possible if no transactions to this account are posted yet.' => 'Änderungen bei Forderungen oder Verbindlichkeiten sind nur möglich, wenn dieses Konto noch nicht bebucht wurde.', 'Charge Number' => 'Chargennummer', @@ -519,7 +517,6 @@ $self->{texts} = { 'Create a new project type' => 'Einen neuen Projekttypen anlegen', 'Create a new user' => 'Einen neuen Benutzer anlegen', 'Create a new user group' => 'Eine neue Benutzergruppe erfassen', - 'Create a standard group' => 'Eine Standard-Benutzergruppe anlegen', 'Create and edit RFQs' => 'Lieferantenanfragen erfassen und bearbeiten', 'Create and edit dunnings' => 'Mahnungen erfassen und bearbeiten', 'Create and edit invoices and credit notes' => 'Rechnungen und Gutschriften erfassen und bearbeiten', @@ -545,8 +542,8 @@ $self->{texts} = { 'Create new delivery term' => 'Neue Lieferbedingungen anlegen', 'Create new department' => 'Neue Abteilung erfassen', 'Create new payment term' => 'Neue Zahlungsbedingung anlegen', - 'Create new templates from master templates' => 'Neue Druckvorlagen aus Vorlagensatz erstellen', 'Create new project type' => 'Neuen Projekttypen anlegen', + 'Create new templates from master templates' => 'Neue Druckvorlagen aus Vorlagensatz erstellen', 'Create tables' => 'Tabellen anlegen', 'Created by' => 'Erstellt von', 'Created for' => 'Erstellt für', @@ -1345,7 +1342,6 @@ $self->{texts} = { 'MwSt. inkl.' => 'MwSt. inkl.', 'Name' => 'Name', 'Name and Street' => 'Name und Straße', - 'Name missing!' => 'Name fehlt!', 'National Expenses' => 'Aufwand Inland', 'National Revenues' => 'Erlöse Inland', 'Net amount' => 'Nettobetrag', diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index baf7b3fee..5af79bedc 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -99,6 +99,7 @@ + diff --git a/templates/webpages/oe/sales_order.html b/templates/webpages/oe/sales_order.html index c16dc1118..1c301080f 100644 --- a/templates/webpages/oe/sales_order.html +++ b/templates/webpages/oe/sales_order.html @@ -3,9 +3,14 @@ [%- PROCESS 'amcvar/render_inputs_block.html' %] - +