Einheitliche Benennung der Margen-Formular-Variablen analog zu den Namen der Spalten...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 15 Aug 2007 12:24:53 +0000 (12:24 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 15 Aug 2007 12:24:53 +0000 (12:24 +0000)
SL/IS.pm
SL/OE.pm
bin/mozilla/io.pl

index 37861e5..866f3f5 100644 (file)
--- 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"}));
index 4f84b50..7fc5853 100644 (file)
--- 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"}));
index cf55202..426c5aa 100644 (file)
@@ -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 &quot;
     map { $form->{"${_}_$i"} =~ s/\"/&quot;/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}<b>| . $locale->text('Ertrag') . qq|</b>&nbsp;$form->{"marge_absolut_$i"}&nbsp;$form->{"marge_percent_$i"} % ${marge_font_end}
+          ${marge_font_start}<b>| . $locale->text('Ertrag') . qq|</b>&nbsp;$form->{"marge_total_$i"}&nbsp;$form->{"marge_percent_$i"} % ${marge_font_end}
           &nbsp;<b>| . $locale->text('LP') . qq|</b>&nbsp;| . $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2) . qq|
           &nbsp;<b>| . $locale->text('EK') . qq|</b>&nbsp;| . $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') {