Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7ac8941d

Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt

  • ID 7ac8941d2b0610a403df0f4650e77df31176716c
  • Vorgänger 8bfb21c7
  • Nachfolger 3634aa28

Einheitliche Benennung der Margen-Formular-Variablen analog zu den Namen der Spalten in der Datenbank.

Unterschiede anzeigen:

SL/IS.pm
546 546
    my $basqty;
547 547

  
548 548
    $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1;
549
    $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1;
549
    $form->{"marge_total_$i"} = $form->parse_amount($myconfig, $form->{"marge_total_$i"}) * 1;
550 550
    $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1;
551 551

  
552 552
    if ($form->{storno}) {
......
691 691
                 $form->{"serialnumber_$i"}, conv_i($pricegroup_id),
692 692
                 $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}),
693 693
                 $form->{"cusordnumber_$i"}, $baseqty, $form->{"subtotal_$i"} ? 't' : 'f',
694
                 $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"},
694
                 $form->{"marge_percent_$i"}, $form->{"marge_total_$i"},
695 695
                 $form->{"lastcost_$i"},
696 696
                 conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}),
697 697
                 conv_i($form->{"marge_price_factor_$i"}));
SL/OE.pm
254 254
      my $baseqty = $form->{"qty_$i"} * $basefactor;
255 255

  
256 256
      $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1;
257
      $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1;
257
      $form->{"marge_total_$i"} = $form->parse_amount($myconfig, $form->{"marge_total_$i"}) * 1;
258 258
      $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1;
259 259

  
260 260
      # set values to 0 if nothing entered
......
363 363
           $form->{"serialnumber_$i"}, $form->{"ship_$i"}, conv_i($pricegroup_id),
364 364
           $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}),
365 365
           $form->{"cusordnumber_$i"}, $form->{"subtotal_$i"} ? 't' : 'f',
366
           $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"},
366
           $form->{"marge_percent_$i"}, $form->{"marge_total_$i"},
367 367
           $form->{"lastcost_$i"},
368 368
           conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}),
369 369
           conv_i($form->{"marge_price_factor_$i"}));
bin/mozilla/io.pl
334 334
    }
335 335

  
336 336
    my $marge_adjust_credit_note = $form->{type} eq 'credit_note' ? -1 : 1;
337
    $form->{"marge_absolut_$i"}  = ($real_sellprice - $form->{"lastcost_$i"} / $marge_price_factor) * $form->{"qty_$i"} * $marge_adjust_credit_note;
338
    $form->{"marge_total"}      += $form->{"marge_absolut_$i"};
337
    $form->{"marge_total_$i"}  = ($real_sellprice - $form->{"lastcost_$i"} / $marge_price_factor) * $form->{"qty_$i"} * $marge_adjust_credit_note;
338
    $form->{"marge_total"}      += $form->{"marge_total_$i"};
339 339
    $form->{"lastcost_total"}   += $form->{"lastcost_$i"} * $form->{"qty_$i"} / $marge_price_factor;
340 340
    $form->{"sellprice_total"}  += $real_sellprice * $form->{"qty_$i"};
341 341

  
342
    map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2) } qw(marge_absolut marge_percent);
342
    map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2) } qw(marge_total marge_percent);
343 343

  
344 344
    # convert " to "
345 345
    map { $form->{"${_}_$i"} =~ s/\"/"/g }
......
495 495
         "id_$i", "inventory_accno_$i", "bin_$i", "partsgroup_$i", "partnotes_$i",
496 496
         "income_accno_$i", "expense_accno_$i", "listprice_$i", "assembly_$i",
497 497
         "taxaccounts_$i", "ordnumber_$i", "transdate_$i", "cusordnumber_$i",
498
         "longdescription_$i", "basefactor_$i", "marge_absolut_$i", "marge_percent_$i", "lastcost_$i",
498
         "longdescription_$i", "basefactor_$i", "marge_total_$i", "marge_percent_$i", "lastcost_$i",
499 499
         "marge_price_factor_$i"));
500 500

  
501 501
########################################
......
561 561
      }
562 562

  
563 563
      print qq|
564
          ${marge_font_start}<b>| . $locale->text('Ertrag') . qq|</b>&nbsp;$form->{"marge_absolut_$i"}&nbsp;$form->{"marge_percent_$i"} % ${marge_font_end}
564
          ${marge_font_start}<b>| . $locale->text('Ertrag') . qq|</b>&nbsp;$form->{"marge_total_$i"}&nbsp;$form->{"marge_percent_$i"} % ${marge_font_end}
565 565
          &nbsp;<b>| . $locale->text('LP') . qq|</b>&nbsp;| . $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2) . qq|
566 566
          &nbsp;<b>| . $locale->text('EK') . qq|</b>&nbsp;| . $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, 2) . $marge_price_factor;
567 567
    }
......
1028 1028
  $lxdebug->enter_sub();
1029 1029
  my @a     = ();
1030 1030
  my $count = 0;
1031
  my @flds  = (qw(id partnumber description qty ship sellprice unit discount inventory_accno income_accno expense_accno listprice taxaccounts bin assembly weight projectnumber project_id oldprojectnumber runningnumber serialnumber partsgroup payment_id not_discountable shop ve gv buchungsgruppen_id language_values sellprice_pg pricegroup_old price_old price_new unit_old ordnumber transdate longdescription basefactor marge_absolut marge_percent marge_price_factor lastcost price_factor_id));
1031
  my @flds  = (qw(id partnumber description qty ship sellprice unit discount inventory_accno income_accno expense_accno listprice taxaccounts bin assembly weight projectnumber project_id oldprojectnumber runningnumber serialnumber partsgroup payment_id not_discountable shop ve gv buchungsgruppen_id language_values sellprice_pg pricegroup_old price_old price_new unit_old ordnumber transdate longdescription basefactor marge_total marge_percent marge_price_factor lastcost price_factor_id));
1032 1032

  
1033 1033
  # remove any makes or model rows
1034 1034
  if ($form->{item} eq 'part') {

Auch abrufbar als: Unified diff