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:

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