Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e5d45c41

Von Stephan Köhler vor fast 19 Jahren hinzugefügt

  • ID e5d45c414dc83d1c9b25c9fc3824e02bd69b9630
  • Vorgänger 43550a3d
  • Nachfolger eb6cbb3a

Merge von 620,621 aus unstable: Bugfix
-Fehler beim Speichern von Auftraegen behoben, wenn Angebot in Auftrag umgewandelt wird
-Fehler bei der Umwandlung von Angeboten in Auftraege, Preise mit nur einer Nachkommastelle wurden falsch formatiert

Unterschiede anzeigen:

bin/mozilla/io.pl
82 82
sub display_row {
83 83
  $lxdebug->enter_sub();
84 84
  my $numrows = shift;
85
print STDERR "io.pl-display_row\n";
86 85
  if ($lizenzen && $form->{vc} eq "customer") {
87 86
    if ($form->{type} =~ /sales_order/) {
88 87
      @column_index = (runningnumber, partnumber, description, ship, qty);
......
263 262

  
264 263

  
265 264

  
266
 #print (STDERR "io.pl---111-i-$i", Dumper($form->{PRICES}));
267 265
    # build in dragdrop for pricesgroups
268 266
    if ($form->{"prices_$i"}) {
269
 print STDERR " YES  prices\n";
270 267
      $price_tmp = $form->format_amount(\%myconfig, $form->{"price_new_$i"}, 2);
271 268

  
272 269
      $column_data{sellprice_drag} =
......
274 271
      $column_data{sellprice} =
275 272
        qq|<td><input name="sellprice_$i" size=5 value=$price_tmp></td>|;
276 273
    } else {
277
      print STDERR " NO prices\n";
278 274
      # for last row and report
279 275
      # set pricegroup dragdrop from report menu
280 276
      if ($form->{"sellprice_$i"} != 0) {
281
print STDERR "   HIER NOCH F?R RECHNUNGSAUFRUFE\n";
282
print (STDERR "sellprice_$i   ", Dumper($form->{"sellprice_$i"}), " pricegroup_id_$i ", Dumper($form->{"pricegroup_id_$i"}));
283 277
        $prices =
284 278
             qq|<option value="$form->{"sellprice_$i"}--$form->{"pricegroup_id_$i"}" selected>$form->{"pricegroup_$i"}</option>\n|;
285 279

  
......
303 297
                               $decimalplaces)
304 298
        . qq|></td>|;
305 299
    }
306
#print (STDERR "io.pl---555-i-$i", Dumper($form->{"price_old_$i"}));
307 300
    $column_data{discount} =
308 301
        qq|<td align=right><input name="discount_$i" size=3 value=|
309 302
      . $form->format_amount(\%myconfig, $form->{"discount_$i"})
......
426 419
      $prices = '';
427 420
      $price = 0;
428 421
      foreach $item (@{ $form->{PRICES}{ $j } }) {
429
# print STDERR "-VOR   PREIS--$item->{price}--PREISGRUOP-$item->{pricegroup_id}\n";
430 422
        $price         = $form->round_amount($myconfig, $item->{price},5);
431 423
        $price         = $form->format_amount($myconfig, $item->{price},2);
432 424
        $price         = $item->{price};
433
# print STDERR "-NACH PREIS--$price--PREISGRUOP-$item->{pricegroup_id}\n";
434 425
        $pricegroup_id = $item->{pricegroup_id};
435 426
        $pricegroup    = $item->{pricegroup};
436 427
        # build dragdrop for pricegroups
......
438 429
             qq|<option value="$price--$pricegroup_id"$item->{selected}>$pricegroup</option>\n|;
439 430

  
440 431
        $len += 1;
441
# print STDERR "prices---$prices\n";
442 432
        # set new selectedpricegroup_id and prices for "Preis"
443 433
        if ($item->{selected}) {
444 434
          $form->{"pricegroup_old_$j"} = $pricegroup_id;
......
456 446

  
457 447
sub select_item {
458 448
  $lxdebug->enter_sub();
459
print STDERR "io.pl-select_item\n";
460 449
  @column_index = qw(ndx partnumber description onhand sellprice);
461 450

  
462 451
  $column_data{ndx}        = qq|<th>&nbsp;</th>|;
......
509 498

  
510 499
    map { $ref->{$_} =~ s/\"/&quot;/g } qw(partnumber description unit);
511 500
#sk tradediscount
512
print STDERR "TRADEDISCOUNT $ref->{sellprice}\n";
513 501
    $ref->{sellprice} =
514 502
      $form->round_amount($ref->{sellprice} * (1 - $form->{tradediscount}), 2);
515
print STDERR "TRADEDISCOUNT $ref->{sellprice}\n";
516 503
    $column_data{ndx} =
517 504
      qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
518 505
    $column_data{partnumber} =
......
594 581

  
595 582
sub item_selected {
596 583
  $lxdebug->enter_sub();
597
print STDERR "io.pl-item_selected\n";
598 584
  # replace the last row with the checked row
599 585
  $i = $form->{rowcount};
600 586
  $i = $form->{assembly_rows} if ($form->{item} eq 'assembly');
......
833 819

  
834 820
sub check_form {
835 821
  $lxdebug->enter_sub();
836
print STDERR "io.pl-check_form\n";
837 822
  my @a     = ();
838 823
  my $count = 0;
839 824
  my @flds  = (
......
994 979

  
995 980
sub validate_items {
996 981
  $lxdebug->enter_sub();
997
print STDERR "io.pl-validate_items\n";
998 982
  # check if items are valid
999 983
  if ($form->{rowcount} == 1) {
1000 984
    &update;
......
1017 1001
  $form->{ordnumber} = $form->{invnumber};
1018 1002

  
1019 1003
  map { delete $form->{$_} } qw(id printed emailed queued);
1020

  
1021 1004
  if ($form->{script} eq 'ir.pl' || $form->{type} eq 'request_quotation') {
1022 1005
    $form->{title} = $locale->text('Add Purchase Order');
1023 1006
    $form->{vc}    = 'vendor';
......
1235 1218

  
1236 1219
sub print_options {
1237 1220
  $lxdebug->enter_sub();
1238
print STDERR "io.pl-print_options\n";
1239 1221
  $form->{sendmode} = "attachment";
1240 1222
  $form->{copies}   = 3 unless $form->{copies};
1241 1223

  
......
1711 1693

  
1712 1694
sub customer_details {
1713 1695
  $lxdebug->enter_sub();
1714
print STDERR "io.pl-customer_details\n";
1715 1696
  IS->customer_details(\%myconfig, \%$form);
1716 1697
  $lxdebug->leave_sub();
1717 1698
}
bin/mozilla/oe.pl
115 115
  # retrieve order/quotation
116 116
  $form->{webdav} = $webdav;
117 117

  
118

  
118 119
  # set jscalendar
119 120
  $form->{jscalendar} = $jscalendar;
120 121

  
......
220 221
        qw(partnumber description unit);
221 222
      $form->{rowcount} = $i;
222 223
    }
224
  } elsif ($form->{rowcount}) {
225
    for my $i (1 .. $form->{rowcount}) {
226
       $form->{"discount_$i"} =
227
        $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
228

  
229
      ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
230
      $dec           = length $dec;
231
      $decimalplaces = ($dec > 2) ? $dec : 2;
232

  
233
      $form->{"sellprice_$i"} =
234
        $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
235
                             $decimalplaces);
236
      $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"});
237

  
238
      map { $form->{"${_}_$i"} =~ s/\"/&quot;/g }
239
        qw(partnumber description unit);
240
    }
223 241
  }
224 242

  
225 243
  $lxdebug->leave_sub();
......
987 1005
      }
988 1006
    }
989 1007
  }
1008

  
1009

  
990 1010
  $lxdebug->leave_sub();
991 1011
}
992 1012

  

Auch abrufbar als: Unified diff