From 7ac8941d2b0610a403df0f4650e77df31176716c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 15 Aug 2007 12:24:53 +0000 Subject: [PATCH] Einheitliche Benennung der Margen-Formular-Variablen analog zu den Namen der Spalten in der Datenbank. --- SL/IS.pm | 4 ++-- SL/OE.pm | 4 ++-- bin/mozilla/io.pl | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SL/IS.pm b/SL/IS.pm index 37861e5be..866f3f58e 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -546,7 +546,7 @@ sub post_invoice { my $basqty; $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1; - $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1; + $form->{"marge_total_$i"} = $form->parse_amount($myconfig, $form->{"marge_total_$i"}) * 1; $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1; if ($form->{storno}) { @@ -691,7 +691,7 @@ sub post_invoice { $form->{"serialnumber_$i"}, conv_i($pricegroup_id), $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}), $form->{"cusordnumber_$i"}, $baseqty, $form->{"subtotal_$i"} ? 't' : 'f', - $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, + $form->{"marge_percent_$i"}, $form->{"marge_total_$i"}, $form->{"lastcost_$i"}, conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"})); diff --git a/SL/OE.pm b/SL/OE.pm index 4f84b50a7..7fc5853b0 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -254,7 +254,7 @@ sub save { my $baseqty = $form->{"qty_$i"} * $basefactor; $form->{"marge_percent_$i"} = $form->parse_amount($myconfig, $form->{"marge_percent_$i"}) * 1; - $form->{"marge_absolut_$i"} = $form->parse_amount($myconfig, $form->{"marge_absolut_$i"}) * 1; + $form->{"marge_total_$i"} = $form->parse_amount($myconfig, $form->{"marge_total_$i"}) * 1; $form->{"lastcost_$i"} = $form->{"lastcost_$i"} * 1; # set values to 0 if nothing entered @@ -363,7 +363,7 @@ sub save { $form->{"serialnumber_$i"}, $form->{"ship_$i"}, conv_i($pricegroup_id), $form->{"ordnumber_$i"}, conv_date($form->{"transdate_$i"}), $form->{"cusordnumber_$i"}, $form->{"subtotal_$i"} ? 't' : 'f', - $form->{"marge_percent_$i"}, $form->{"marge_absolut_$i"}, + $form->{"marge_percent_$i"}, $form->{"marge_total_$i"}, $form->{"lastcost_$i"}, conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"price_factor_id_$i"}), conv_i($form->{"marge_price_factor_$i"})); diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index cf552026d..426c5aa14 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -334,12 +334,12 @@ sub display_row { } my $marge_adjust_credit_note = $form->{type} eq 'credit_note' ? -1 : 1; - $form->{"marge_absolut_$i"} = ($real_sellprice - $form->{"lastcost_$i"} / $marge_price_factor) * $form->{"qty_$i"} * $marge_adjust_credit_note; - $form->{"marge_total"} += $form->{"marge_absolut_$i"}; + $form->{"marge_total_$i"} = ($real_sellprice - $form->{"lastcost_$i"} / $marge_price_factor) * $form->{"qty_$i"} * $marge_adjust_credit_note; + $form->{"marge_total"} += $form->{"marge_total_$i"}; $form->{"lastcost_total"} += $form->{"lastcost_$i"} * $form->{"qty_$i"} / $marge_price_factor; $form->{"sellprice_total"} += $real_sellprice * $form->{"qty_$i"}; - map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2) } qw(marge_absolut marge_percent); + map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2) } qw(marge_total marge_percent); # convert " to " map { $form->{"${_}_$i"} =~ s/\"/"/g } @@ -495,7 +495,7 @@ sub display_row { "id_$i", "inventory_accno_$i", "bin_$i", "partsgroup_$i", "partnotes_$i", "income_accno_$i", "expense_accno_$i", "listprice_$i", "assembly_$i", "taxaccounts_$i", "ordnumber_$i", "transdate_$i", "cusordnumber_$i", - "longdescription_$i", "basefactor_$i", "marge_absolut_$i", "marge_percent_$i", "lastcost_$i", + "longdescription_$i", "basefactor_$i", "marge_total_$i", "marge_percent_$i", "lastcost_$i", "marge_price_factor_$i")); ######################################## @@ -561,7 +561,7 @@ sub display_row { } print qq| - ${marge_font_start}| . $locale->text('Ertrag') . qq| $form->{"marge_absolut_$i"} $form->{"marge_percent_$i"} % ${marge_font_end} + ${marge_font_start}| . $locale->text('Ertrag') . qq| $form->{"marge_total_$i"} $form->{"marge_percent_$i"} % ${marge_font_end}  | . $locale->text('LP') . qq| | . $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2) . qq|  | . $locale->text('EK') . qq| | . $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, 2) . $marge_price_factor; } @@ -1028,7 +1028,7 @@ sub check_form { $lxdebug->enter_sub(); my @a = (); my $count = 0; - 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)); + 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)); # remove any makes or model rows if ($form->{item} eq 'part') { -- 2.20.1