Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b59ec969

Von Stephan Köhler vor mehr als 18 Jahren hinzugefügt

  • ID b59ec96925334124e8e126e467181b766b7c701f
  • Vorgänger 921adf5b
  • Nachfolger 2794f75f

Merge von 829,831 aus unstable: Bugfix 270
Rabatt wurde fehlerhaft uebernommen beim Umwandeln von Angebot in Auftrag. Fixes Bug#270
Bei der Umwandlung von Angeboten/Anfragen in Auftraege wurden verschiedene Felder beschnitten/flasch formatiert

Unterschiede anzeigen:

bin/mozilla/oe.pl
229 229

  
230 230
      map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
231 231
    }
232
    
233 232
    for my $i (1 .. $form->{rowcount}) {
234
       $form->{"discount_$i"} =
235
        $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
236

  
233
      if ($form->{id}) {
234
        $form->{"discount_$i"} =
235
          $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
236
      } else {
237
        $form->{"discount_$i"} =
238
          $form->format_amount(\%myconfig, $form->{"discount_$i"});
239
      }
237 240
      ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);    
238 241
      $dec           = length $dec;
239 242
      $decimalplaces = ($dec > 2) ? $dec : 2;
......
243 246

  
244 247
      $form->{"sellprice_$i"} =
245 248
        $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
246
                             $decimalplaces);
249
                            $decimalplaces);
247 250
      
248 251
      (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
249 252
      $dec_qty      = length $dec_qty;
......
831 834
      . $locale->text('Save as new') . qq|">
832 835
<input class=submit type=submit name=action value="|
833 836
      . $locale->text('Delete') . qq|">|;
834
    if ($form->{type} =~ /quotation$/) {
837
    if ($form->{type} =~ /sales_quotation$/) {
835 838
      print qq|
836 839
<input class=submit type=submit name=action value="|
837
        . $locale->text('Order') . qq|">|;
840
        . $locale->text('Sales Order') . qq|">|;
841
    }
842
    if ($form->{type} =~ /request_quotation$/) {
843
      print qq|
844
<input class=submit type=submit name=action value="|
845
        . $locale->text('Purchase Order') . qq|">|;
838 846
    }
839 847
    print qq|
840 848
<input class=submit type=submit name=action value="|
......
2100 2108
sub purchase_order {
2101 2109
  $lxdebug->enter_sub();
2102 2110

  
2111
  if (   $form->{type} eq 'sales_quotation'
2112
      || $form->{type} eq 'request_quotation') {
2113
    $form->{closed} = 1;
2114
    OE->save(\%myconfig, \%$form);
2115
  }
2116

  
2117
  ($null, $form->{cp_id}) = split /--/, $form->{contact};
2118
  $form->{cp_id} *= 1;
2119

  
2103 2120
  $form->{title} = $locale->text('Add Purchase Order');
2104 2121
  $form->{vc}    = "vendor";
2105 2122
  $form->{type}  = "purchase_order";

Auch abrufbar als: Unified diff