]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp
authorJan Büren <jan@lx-office-hosting.de>
Fri, 5 Mar 2010 14:26:35 +0000 (15:26 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Fri, 5 Mar 2010 14:26:35 +0000 (15:26 +0100)
1  2 
bin/mozilla/do.pl

diff --combined bin/mozilla/do.pl
index 9fa2b9096d7083831c70697070269a0f34332bed,4ae7f455113ffb8794472bbac0865e1960475704..a57022b76cbd2a34628e571814edc70e8c5b680d
@@@ -183,8 -183,6 +183,8 @@@ sub order_links 
      IR->get_vendor(\%myconfig, \%$form);
    } else {
      IS->get_customer(\%myconfig, \%$form);
 +    # OFFEN tritt bug 1284 auch bei vendor auf?
 +    $form->{discount} = $form->{customer_discount};
    }
  
    $form->restore_vars(qw(payment_id language_id taxzone_id intnotes cp_id));
@@@ -630,9 -628,14 +630,9 @@@ sub save 
    # wird die Maske mit dem falschen Rabatt wieder aufgebaut.
    # Wie immer: backup_vars verwenden um nichts anderes kaputt zu
    # machen. jan 03.03.2010
 -  for my $i (1 .. $form->{rowcount}) {
 -    $form->{"backup_discount_$i"} = $form->{"discount_$i"};
 -  };
 +  # nicht mehr notwendig da für bug 1284 der backend aufruf entsprechend
 +  # geändert wurde
    DO->save();
 -  for my $i (1 .. $form->{rowcount}) {
 -    $form->{"discount_$i"} = $form->{"backup_discount_$i"};
 -    delete $form->{"backup_discount_$i"};
 -  };
    # saving the history
    if(!exists $form->{addition}) {
      $form->{snumbers} = qq|donumber_| . $form->{donumber};
@@@ -731,11 -734,6 +731,11 @@@ sub invoice 
    }
  
    for my $i (1 .. $form->{rowcount}) {
 +    # für bug 1284
 +    if ($form->{discount}){ # Falls wir einen Kundenrabatt haben 
 +      # und keinen anderen discount wert an $i ...
 +      $form->{"discount_$i"} ||= $form->{discount}*100; # ... nehmen wir den kundenrabatt
 +    }
      map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"} } qw(ship qty sellprice listprice basefactor);
    }
  
@@@ -1209,10 -1207,10 +1209,10 @@@ sub transfer_in 
  
        my $do_base_qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
  
-       if ($do_base_qty != $row_sum_base_qty) {
-         push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.',
-                                                  $i, $form->{"qty_$i"}, $form->{"unit_$i"});
-       }
#      if ($do_base_qty != $row_sum_base_qty) {
#        push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.',
#                                                 $i, $form->{"qty_$i"}, $form->{"unit_$i"});
#      }
      }
  
      if (@{ $form->{ERRORS} }) {
@@@ -1280,10 -1278,10 +1280,10 @@@ sub transfer_out 
  
        my $do_base_qty = $form->parse_amount(\%myconfig, $form->{"qty_$i"}) * $units->{$form->{"unit_$i"}}->{factor} / $base_unit_factor;
  
-       if ($do_base_qty != $row_sum_base_qty) {
-         push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.',
-                                                  $i, $form->{"qty_$i"}, $form->{"unit_$i"});
-       }
#      if ($do_base_qty != $row_sum_base_qty) {
#        push @{ $form->{ERRORS} }, $locale->text('Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.',
#                                                 $i, $form->{"qty_$i"}, $form->{"unit_$i"});
#      }
      }
  
      if (%request_map) {