]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/wh.pl
Form->show_generic_error: Parameter action, back_button entfernt
[mfinanz.git] / bin / mozilla / wh.pl
index 66594ff685325196f2f959c3e3db04e2c9ffdd6d..8b69306bb5e8690867779fed15b1038a03da8ff0 100644 (file)
@@ -23,7 +23,8 @@
 # GNU General Public License for more details.
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
 #
 #######################################################################
 #
@@ -435,12 +436,12 @@ sub create_assembly {
 
   $form->{qty} = $form->parse_amount(\%myconfig, $form->{qty});
   if ($form->{qty} <= 0) {
-    $form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
+    $form->show_generic_error($locale->text('Invalid quantity.'));
   }
   # TODO Es wäre schön, hier schon die maximale Anzahl der zu fertigenden Erzeugnisse zu haben
   #else { if ($form->{qty} > $maxcreate) { #s.o.
-  #     $form->show_generic_error($locale->text('Can not create that quantity with current stock'), 'back_button' => 1);
-  #     $form->show_generic_error('Maximale Stückzahl' . $maxcreate , 'back_button' => 1);
+  #     $form->show_generic_error($locale->text('Can not create that quantity with current stock'));
+  #     $form->show_generic_error('Maximale Stückzahl' . $maxcreate);
   #   }
   #  }
 
@@ -472,7 +473,7 @@ sub create_assembly {
   # Ideen? jb 18.3.09
   if ($ret ne "1"){
     # Die locale-Funktion kann keine Double-Quotes escapen, deswegen hier erstmal so (ein wahrscheinlich immerwährender Hotfix) s.a. Frage davor jb 25.4.09
-    $form->show_generic_error($ret, 'back_button' => 1);
+    $form->show_generic_error($ret);
   }
 
   delete @{$form}{qw(parts_id partnumber description qty unit chargenumber bestbefore comment)};
@@ -495,7 +496,7 @@ sub transfer_stock {
   $form->{qty} = $form->parse_amount(\%myconfig, $form->{qty});
 
   if ($form->{qty} <= 0) {
-    $form->show_generic_error($locale->text('Invalid quantity.'), 'back_button' => 1);
+    $form->show_generic_error($locale->text('Invalid quantity.'));
   }
 
   if (!$form->{warehouse_id} || !$form->{bin_id}) {
@@ -757,19 +758,18 @@ sub generate_journal {
                     'purchase_invoice'        => { script => 'ir', title => $locale->text('Purchase Invoice') },
                   );
 
-   my $allrows = 0;
-   $allrows = 1 if $form->{report_generator_output_format} ne 'HTML' ;
+  my $allrows = 0;
+  $allrows = 1 if $form->{report_generator_output_format} ne 'HTML' ;
 
-   # manual paginating
-   my $pages = {};
-   $pages->{per_page}        = $::form->{per_page} || 15;
-   my $first_nr = ($page - 1) * $pages->{per_page};
-   my $last_nr  = $first_nr + $pages->{per_page};
-   my $idx       = 0;
+  # manual paginating
+  my $pages = {};
+  $pages->{per_page}        = $::form->{per_page} || 15;
+  my $first_nr = ($page - 1) * $pages->{per_page};
+  my $last_nr  = $first_nr + $pages->{per_page};
+  my $idx       = 0;
 
   foreach my $entry (@contents) {
-    # type impl $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{type}).
-    $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{assembly},$entry->{inventory_accno_id}).
+    $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
                                    $::request->presenter->classification_abbreviation($entry->{classification_id});
     $entry->{qty}        = $form->format_amount_units('amount'     => $entry->{qty},
                                                       'part_unit'  => $entry->{partunit},
@@ -878,7 +878,7 @@ sub generate_report {
                                             SL::DB::Manager::Bin->find_by(id => $form->{bin_id})->description},
    partnumber     => sub { push @options, $locale->text('Partnumber')     . " : $form->{partnumber}"},
    classification_id => sub { push @options, $locale->text('Parts Classification'). " : ".
-     SL::DB::Manager::PartsClassification->get_first(where => [ id => $form->{classification_id} ] )->description; },
+                                               SL::DB::Manager::PartClassification->get_first(where => [ id => $form->{classification_id} ] )->description; },
    description    => sub { push @options, $locale->text('Description')    . " : $form->{description}"},
    chargenumber   => sub { push @options, $locale->text('Charge Number')  . " : $form->{chargenumber}"},
    bestbefore     => sub { push @options, $locale->text('Best Before')    . " : $form->{bestbefore}"},
@@ -970,8 +970,7 @@ sub generate_report {
 
   foreach my $entry (@contents) {
 
-    # type impl $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{type}).
-    $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{assembly},$entry->{inventory_accno_id}).
+    $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
                                    $::request->presenter->classification_abbreviation($entry->{classification_id});
     map { $subtotals{$_} += $entry->{$_} } @subtotals_columns;
     $total_stock_value   += $entry->{stock_value} * 1;