Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3cbc223a

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID 3cbc223a454e07b780f986ec92e6038cddc848b9
  • Vorgänger c09536f4
  • Nachfolger b65a230d

Die alte invoice_io.pl::display_row kann langsam mal weg.

Zur Information: Die invoice_io stellt alternative Routinen zur io.pl
bereit. Alles was nicht explizit spezifiziert wird, wird aus io.pl
geladen, unter anderem auch display_row. Die beiden Funktionen waren
einmal identisch, mittlerweile ist die invoice_io version nur noch Müll.

Weg damit.

Unterschiede anzeigen:

bin/mozilla/invoice_io.pl
88 88
use SL::PE;
89 89
use SL::AM;
90 90
use Data::Dumper;
91
########################################
92
# Eintrag fuer Version 2.2.0 geaendert #
93
# neue Optik im Rechnungsformular      #
94
########################################
95
#sub display_row {
96
#  $main::lxdebug->enter_sub();
97
#  my $numrows = shift;
98
#
99
#  my $is_sales =
100
#    (substr($form->{type}, 0, 6) eq "sales_")
101
#    || (($form->{type} eq "invoice") && ($form->{script} eq "is.pl"))
102
#    || ($form->{type} eq 'credit_note');
103
#
104
#  if ($lizenzen && $form->{vc} eq "customer") {
105
#    if ($form->{type} =~ /sales_order/) {
106
#      @column_index = (runningnumber, partnumber, description, ship, qty);
107
#    } elsif ($form->{type} =~ /sales_quotation/) {
108
#      @column_index = (runningnumber, partnumber, description, qty);
109
#    } else {
110
#      @column_index = (runningnumber, partnumber, description, qty);
111
#    }
112
#  } else {
113
#    if (   ($form->{type} =~ /purchase_order/)
114
#        || ($form->{type} =~ /sales_order/)) {
115
#      @column_index = (runningnumber, partnumber, description, ship, qty);
116
#        } else {
117
#      @column_index = (runningnumber, partnumber, description, qty);
118
#    }
119
#  }
120
############### ENDE Neueintrag ##################
121
#
122
#  my $all_units = AM->retrieve_units(\%myconfig, $form);
123
#  my $dimension_units = $all_units;
124
#  my $service_units = $all_units;
125
#
126
#  my %price_factors = map { $_->{id} => $_->{factor} } @{ $form->{ALL_PRICE_FACTORS} };
127
#
128
#  push @column_index, qw(unit);
129
#
130
#  #for pricegroups column
131
#  if (   $form->{type} =~ (/sales_quotation/)
132
#      or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/))
133
#      or (($form->{level} eq undef) and ($form->{type} =~ /invoice/))
134
#      or ($form->{type} =~ /sales_order/)) {
135
#    push @column_index, qw(sellprice_pg);
136
#  }
137
#
138
#  push @column_index, qw(sellprice);
139
#
140
#  if ($form->{vc} eq 'customer') {
141
#    push @column_index, qw(discount);
142
#  }
143
#
144
#  push @column_index, "linetotal";
145
#
146
#  my $colspan = $#column_index + 1;
147
#
148
#  $form->{invsubtotal} = 0;
149
#  map { $form->{"${_}_base"} = 0 } (split(/ /, $form->{taxaccounts}));
150
#
151
#########################################
152
#  # Eintrag fuer Version 2.2.0 geaendert #
153
#  # neue Optik im Rechnungsformular      #
154
#########################################
155
#  $column_data{runningnumber} = qq|<th align="left" nowrap width="5%"  class="listheading">| . $locale->text('No.') .         qq|</th>|;
156
#  $column_data{partnumber}    = qq|<th align="left" nowrap width="12%" class="listheading">| . $locale->text('Number') .      qq|</th>|;
157
#  $column_data{description}   = qq|<th align="left" nowrap width="30%" class="listheading">| . $locale->text('Part Description') . qq|</th>|;
158
#  if ($form->{"type"} eq "purchase_order") {
159
#    $column_data{ship}        = qq|<th align="left" nowrap width="5%"  class="listheading">| . $locale->text('Ship rcvd') .   qq|</th>|;
160
#  } else {
161
#    $column_data{ship}        = qq|<th align="left" nowrap width="5%"  class="listheading">| . $locale->text('Ship') .        qq|</th>|;
162
#  }
163
#  $column_data{qty}           = qq|<th align="left" nowrap width="5%"  class="listheading">| . $locale->text('Qty') .         qq|</th>|;
164
#  $column_data{unit}          = qq|<th align="left" nowrap width="20%" class="listheading">| . $locale->text('Unit') .        qq|</th>|;
165
#  $column_data{license}       = qq|<th align="left" nowrap width="10%" class="listheading">| . $locale->text('License') .     qq|</th>|;
166
#  $column_data{serialnr}      = qq|<th align="left" nowrap width="10%" class="listheading">| . $locale->text('Serial No.') .  qq|</th>|;
167
#  $column_data{projectnr}     = qq|<th align="left" nowrap width="10%" class="listheading">| . $locale->text('Project') .     qq|</th>|;
168
#  $column_data{sellprice}     = qq|<th align="left" nowrap width="15%" class="listheading">| . $locale->text('Price') .       qq|</th>|;
169
#  $column_data{sellprice_pg}  = qq|<th align="left" nowrap width="15%" class="listheading">| . $locale->text('Pricegroup') .  qq|</th>|;
170
#  $column_data{discount}      = qq|<th align="left" nowrap width="5%"  class="listheading">| . $locale->text('Discount') .    qq|</th>|;
171
#  $column_data{linetotal}     = qq|<th align="left" nowrap width="10%" class="listheading">| . $locale->text('Extended') .    qq|</th>|;
172
#  $column_data{bin}           = qq|<th align="left" nowrap width="10%" class="listheading">| . $locale->text('Bin') .         qq|</th>|;
173
############### ENDE Neueintrag ##################
174
#
175
#  $myconfig{"show_form_details"} = 1
176
#    unless (defined($myconfig{"show_form_details"}));
177
#  $form->{"show_details"} = $myconfig{"show_form_details"}
178
#    unless (defined($form->{"show_details"}));
179
#  $form->{"show_details"} = $form->{"show_details"} ? 1 : 0;
180
#  my $show_details_new = 1 - $form->{"show_details"};
181
#  my $show_details_checked = $form->{"show_details"} ? "checked" : "";
182
#
183
#  print qq|
184
#  <tr>
185
#    <td>| . $cgi->hidden("-name" => "show_details", "-value" => $form->{show_details}) . qq|
186
#      <input type="checkbox" id="cb_show_details" onclick="show_form_details($show_details_new);" $show_details_checked>
187
#      <label for="cb_show_details">| . $locale->text("Show details") . qq|</label><br>
188
#      <table width="100%">
189
#	<tr class="listheading">|;
190
#
191
#  map { print "\n$column_data{$_}" } @column_index;
192
#
193
#  print qq|
194
#        </tr>
195
#|;
196
#
197
#  $runningnumber = $locale->text('No.');
198
#  $deliverydate  = $locale->text('Delivery Date');
199
#  $serialnumber  = $locale->text('Serial No.');
200
#  $projectnumber = $locale->text('Project');
201
#  $partsgroup    = $locale->text('Group');
202
#  $reqdate       = $locale->text('Reqdate');
203
#
204
#  $delvar = 'deliverydate';
205
#
206
#  if ($form->{type} =~ /_order$/ || $form->{type} =~ /_quotation$/) {
207
#    $deliverydate = $locale->text('Required by');
208
#    $delvar       = 'reqdate';
209
#  }
210
#
211
#  $form->{marge_total} = 0;
212
#  $form->{sellprice_total} = 0;
213
#  $form->{lastcost_total} = 0;
214
#  my %projectnumber_labels = ();
215
#  my @projectnumber_values = ("");
216
#  foreach my $item (@{ $form->{"ALL_PROJECTS"} }) {
217
#    push(@projectnumber_values, $item->{"id"});
218
#    $projectnumber_labels{$item->{"id"}} = $item->{"projectnumber"};
219
#  }
220
#
221
#  for $i (1 .. $numrows) {
222
#
223
#    # undo formatting
224
#    map {
225
#      $form->{"${_}_$i"} =
226
#        $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
227
#    } qw(qty ship discount sellprice price_new price_old) unless ($form->{simple_save});
228
#
229
#    if (!$form->{"unit_old_$i"}) {
230
#      # Neue Ware aus der Datenbank. In diesem Fall ist unit_$i die
231
#      # Einheit, wie sie in den Stammdaten hinterlegt wurde.
232
#      # Es sollte also angenommen werden, dass diese ausgewaehlt war.
233
#      $form->{"unit_old_$i"} = $form->{"unit_$i"};
234
#    }
235
#
236
#    # Die zuletzt ausgewaehlte mit der aktuell ausgewaehlten Einheit
237
#    # vergleichen und bei Unterschied den Preis entsprechend umrechnen.
238
#    $form->{"selected_unit_$i"} = $form->{"unit_$i"} unless ($form->{"selected_unit_$i"});
239
#
240
#    my $check_units = $form->{"inventory_accno_$i"} ? $dimension_units : $service_units;
241
#    if (!$check_units->{$form->{"selected_unit_$i"}} ||
242
#        ($check_units->{$form->{"selected_unit_$i"}}->{"base_unit"} ne
243
#         $all_units->{$form->{"unit_old_$i"}}->{"base_unit"})) {
244
#      # Die ausgewaehlte Einheit ist fuer diesen Artikel nicht gueltig
245
#      # (z.B. Dimensionseinheit war ausgewaehlt, es handelt sich aber
246
#      # um eine Dienstleistung). Dann keinerlei Umrechnung vornehmen.
247
#      $form->{"unit_old_$i"} = $form->{"selected_unit_$i"} = $form->{"unit_$i"};
248
#    }
249
#    if ((!$form->{"prices_$i"}) || ($form->{"new_pricegroup_$i"} == $form->{"old_pricegroup_$i"})) {
250
#      if ($form->{"unit_old_$i"} ne $form->{"selected_unit_$i"}) {
251
#        my $basefactor = 1;
252
#        if (defined($all_units->{$form->{"unit_old_$i"}}->{"factor"}) &&
253
#            $all_units->{$form->{"unit_old_$i"}}->{"factor"}) {
254
#          $basefactor = $all_units->{$form->{"selected_unit_$i"}}->{"factor"} /
255
#            $all_units->{$form->{"unit_old_$i"}}->{"factor"};
256
#        }
257
#        $form->{"sellprice_$i"} *= $basefactor;
258
#        $form->{"unit_old_$i"} = $form->{"selected_unit_$i"};
259
#      }
260
#    }
261
#
262
#    ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
263
#    $decimalplaces = max length($dec), 2;
264
#
265
#    $price_factor = $price_factors{$form->{"price_factor_id_$i"}} || 1;
266
#    $discount     = (100 - $form->{"discount_$i"} * 1) / 100;
267
#
268
#    $linetotal    = $form->round_amount($form->{"sellprice_$i"} * $form->{"qty_$i"} * $discount / $price_factor, $decimalplaces);
269
#
270
#    my $real_sellprice = $form->{"sellprice_$i"} * $discount / $price_factor;
271
#
272
#    # marge calculations
273
#    my ($marge_font_start, $marge_font_end);
274
#
275
#    $form->{"lastcost_$i"} *= 1;
276
#
277
#    $marge_price_factor = $form->{"marge_price_factor_$i"} * 1 || 1;
278
#
279
#    if ($real_sellprice && ($form->{"qty_$i"} * 1)) {
280
#      $form->{"marge_percent_$i"}     = ($real_sellprice - $form->{"lastcost_$i"} / $marge_price_factor) * 100 / $real_sellprice;
281
#      $myconfig{"marge_percent_warn"} = 15 unless (defined($myconfig{"marge_percent_warn"}));
282
#
283
#      if ($form->{"id_$i"} &&
284
#          ($form->{"marge_percent_$i"} < (1 * $myconfig{"marge_percent_warn"}))) {
285
#        $marge_font_start = "<font color=\"#ff0000\">";
286
#        $marge_font_end   = "</font>";
287
#      }
288
#
289
#    } else {
290
#      $form->{"marge_percent_$i"} = 0;
291
#    }
292
#
293
#    my $marge_adjust_credit_note = $form->{type} eq 'credit_note' ? -1 : 1;
294
#    $form->{"marge_total_$i"}  = ($real_sellprice - $form->{"lastcost_$i"} / $marge_price_factor) * $form->{"qty_$i"} * $marge_adjust_credit_note;
295
#    $form->{"marge_total"}      += $form->{"marge_total_$i"};
296
#    $form->{"lastcost_total"}   += $form->{"lastcost_$i"} * $form->{"qty_$i"} / $marge_price_factor;
297
#    $form->{"sellprice_total"}  += $real_sellprice * $form->{"qty_$i"};
298
#
299
#    map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2) } qw(marge_total marge_percent);
300
#
301
#    # convert " to &quot;
302
#    map { $form->{"${_}_$i"} =~ s/\"/&quot;/g }
303
#      qw(partnumber description unit unit_old);
304
#
305
#########################################
306
#    # Eintrag fuer Version 2.2.0 geaendert #
307
#    # neue Optik im Rechnungsformular      #
308
#########################################
309
#    $column_data{runningnumber} =
310
#      qq|<td><input name="runningnumber_$i" size="5" value="$i"></td>|;    # HuT
311
############### ENDE Neueintrag ##################
312
#
313
#    $column_data{partnumber} =
314
#      qq|<td><input name="partnumber_$i" size=12 value="$form->{"partnumber_$i"}"></td>|;
315
#
316
#    if (($rows = $form->numtextrows($form->{"description_$i"}, 30, 6)) > 1) {
317
#      $column_data{description} =
318
#        qq|<td><textarea name="description_$i" rows="$rows" cols="30" wrap="soft">| . H($form->{"description_$i"}) . qq|</textarea><button type="button" onclick="set_longdescription_window('longdescription_$i')">| . $locale->text('L') . qq|</button></td>|;
319
#    } else {
320
#      $column_data{description} =
321
#        qq|<td><input name="description_$i" size="30" value="| . $form->quote($form->{"description_$i"}) . qq|"><button type="button" onclick="set_longdescription_window('longdescription_$i')">| . $locale->text('L') . qq|</button></td>|;
322
#    }
323
#
324
#    (my $qty_dec) = ($form->{"qty_$i"} =~ /\.(\d+)/);
325
#    $qty_dec = length $qty_dec;
326
#
327
#    $column_data{qty} =
328
#        qq|<td align="right" nowrap><input name="qty_$i" size="5" value="|
329
#      . $form->format_amount(\%myconfig, $form->{"qty_$i"}, $qty_dec) .qq|">|;
330
#    if ($form->{"formel_$i"}) {
331
#      $column_data{qty} .= qq|<button type="button" onclick="calculate_qty_selection_window('qty_$i','alu_$i', 'formel_$i', $i)">| . $locale->text('*/') . qq|</button>|
332
#        . $cgi->hidden("-name" => "formel_$i", "-value" => $form->{"formel_$i"}) . $cgi->hidden("-name" => "alu_$i", "-value" => $form->{"alu_$i"});
333
#    }
334
#    $column_data{qty} .= qq|</td>|;
335
#    $column_data{ship} =
336
#        qq|<td align="right"><input name="ship_$i" size=5 value="|
337
#      . $form->format_amount(\%myconfig, $form->{"ship_$i"})
338
#      . qq|"></td>|;
339
#
340
#    my $is_part     = $form->{"inventory_accno_$i"};
341
#    my $is_assembly = $form->{"assembly_$i"};
342
#    my $is_assigned = $form->{"id_$i"};
343
#    my $this_unit = $form->{"unit_$i"};
344
#    if ($form->{"selected_unit_$i"} && $this_unit &&
345
#        $all_units->{$form->{"selected_unit_$i"}} && $all_units->{$this_unit} &&
346
#        ($all_units->{$form->{"selected_unit_$i"}}->{"base_unit"} eq $all_units->{$this_unit}->{"base_unit"})) {
347
#      $this_unit = $form->{"selected_unit_$i"};
348
#    } elsif (!$is_assigned ||
349
#             ($is_part && !$this_unit && ($all_units->{$this_unit} && ($all_units->{$this_unit}->{"base_unit"} eq $all_units->{"kg"}->{"base_unit"})))) {
350
#      $this_unit = "kg";
351
#    }
352
#
353
#    my $price_factor_select;
354
#    if (0 < scalar @{ $form->{ALL_PRICE_FACTORS} }) {
355
#      my @values = ('', map { $_->{id}                      } @{ $form->{ALL_PRICE_FACTORS} });
356
#      my %labels =      map { $_->{id} => $_->{description} } @{ $form->{ALL_PRICE_FACTORS} };
357
#
358
#      $price_factor_select =
359
#        NTI($cgi->popup_menu('-name'    => "price_factor_id_$i",
360
#                             '-default' => $form->{"price_factor_id_$i"},
361
#                             '-values'  => \@values,
362
#                             '-labels'  => \%labels,
363
#                             '-style'   => 'width:90px'))
364
#        . ' ';
365
#    }
366
#
367
#    $column_data{"unit"} = "<td>" .
368
#      $price_factor_select .
369
#       AM->unit_select_html($is_part || $is_assembly ? $dimension_units :
370
#                            $is_assigned ? $service_units : $all_units,
371
#                            "unit_$i", $this_unit,
372
#                            $is_assigned ? $form->{"unit_$i"} : undef)
373
#      . "</td>";
374
#
375
#    # build in drop down list for pricesgroups
376
#    if ($form->{"prices_$i"}) {
377
#      if  ($form->{"new_pricegroup_$i"} != $form->{"old_pricegroup_$i"}) {
378
#        $price_tmp = $form->format_amount(\%myconfig, $form->{"price_new_$i"}, $decimalplaces);
379
#      } else {
380
#        $price_tmp = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
381
#      }
382
#
383
#      $column_data{sellprice_pg} =
384
#      qq|<td align="right"><select name="sellprice_pg_$i">$form->{"prices_$i"}</select></td>|;
385
#      $column_data{sellprice} =
386
#      qq|<td><input name="sellprice_$i" size="10" value="$price_tmp" onBlur=\"check_right_number_format(this)\"></td>|;
387
#    } else {
388
#
389
#      # for last row and report
390
#      # set pricegroup drop down list from report menu
391
#      if ($form->{"sellprice_$i"} != 0) {
392
#        $prices =
393
#          qq|<option value="$form->{"sellprice_$i"}--$form->{"pricegroup_id_$i"}" selected>$form->{"pricegroup_$i"}</option>\n|;
394
#
395
#        $form->{"pricegroup_old_$i"} = $form->{"pricegroup_id_$i"};
396
#
397
#        $column_data{sellprice_pg} =
398
#          qq|<td align="right"><select name="sellprice_pg_$i">$prices</select></td>|;
399
#
400
#      } else {
401
#
402
#        # for last row
403
#        $column_data{sellprice_pg} = qq|<td align="right">&nbsp;</td>|;
404
#        }
405
#
406
#      $column_data{sellprice} =
407
#      qq|<td><input name="sellprice_$i" size="10" onBlur=\"check_right_number_format(this)\" value="|
408
#        . $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
409
#                               $decimalplaces)
410
#        . qq|"></td>|;
411
#    }
412
#    $column_data{discount} =
413
#        qq|<td align="right"><input name="discount_$i" size=3 value="|
414
#      . $form->format_amount(\%myconfig, $form->{"discount_$i"})
415
#      . qq|"></td>|;
416
#    $column_data{linetotal} =
417
#        qq|<td align="right">|
418
#      . $form->format_amount(\%myconfig, $linetotal, 2)
419
#      . qq|</td>|;
420
#    $column_data{bin} = qq|<td>$form->{"bin_$i"}</td>|;
421
#
422
#########################################
423
#    # Eintrag fuer Version 2.2.0 geaendert #
424
#    # neue Optik im Rechnungsformular      #
425
#########################################
426
#    #     if ($lizenzen &&  $form->{type} eq "invoice" &&  $form->{vc} eq "customer") {
427
#    #     $column_data{license} = qq|<td><select name="licensenumber_$i">$form->{"lizenzen_$i"}></select></td>|;
428
#    #     }
429
#    #
430
#    #     if ($form->{type} !~ /_quotation/) {
431
#    #     $column_data{serialnr} = qq|<td><input name="serialnumber_$i" size=10 value="$form->{"serialnumber_$i"}"></td>|;
432
#    #     }
433
#    #
434
#    #     $column_data{projectnr} = qq|<td><input name="projectnumber_$i" size=10 value="$form->{"projectnumber_$i"}"></td>|;
435
############### ENDE Neueintrag ##################
436
#    my $j = $i % 2;
437
#    print qq|
438
#
439
#        <tr valign="top" class="listrow$j">|;
440
#
441
#    map { print "\n$column_data{$_}" } @column_index;
442
#
443
#    print("</tr>\n" .
444
#          $cgi->hidden("-name" => "unit_old_$i",
445
#                       "-value" => $form->{"selected_unit_$i"})
446
#          . "\n" .
447
#          $cgi->hidden("-name" => "price_new_$i",
448
#                       "-value" => $form->format_amount(\%myconfig, $form->{"price_new_$i"}))
449
#          . "\n");
450
#    map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_}) . "\n"); }
451
#        ("orderitems_id_$i", "bo_$i", "pricegroup_old_$i", "price_old_$i",
452
#         "id_$i", "inventory_accno_$i", "bin_$i", "partsgroup_$i", "partnotes_$i",
453
#         "income_accno_$i", "expense_accno_$i", "listprice_$i", "assembly_$i",
454
#         "taxaccounts_$i", "ordnumber_$i", "transdate_$i", "cusordnumber_$i",
455
#         "longdescription_$i", "basefactor_$i", "marge_total_$i", "marge_percent_$i", "lastcost_$i",
456
#         "marge_price_factor_$i"));
457
#
458
#########################################
459
#    # Eintrag fuer Version 2.2.0 geaendert #
460
#    # neue Optik im Rechnungsformular      #
461
#########################################
462
#
463
#    my $row_style_attr =
464
#      'style="display:none;"' if (!$form->{"show_details"});
465
#
466
#    # print second row
467
#    print qq|
468
#        <tr  class="listrow$j" $row_style_attr>
469
#	  <td colspan="$colspan">
470
#|;
471
#    if ($lizenzen && $form->{type} eq "invoice" && $form->{vc} eq "customer") {
472
#      my $selected = $form->{"licensenumber_$i"};
473
#      my $lizenzen_quoted;
474
#      $form->{"lizenzen_$i"} =~ s/ selected//g;
475
#      $form->{"lizenzen_$i"} =~
476
#        s/value="${selected}"\>/value="${selected}" selected\>/;
477
#      $lizenzen_quoted = $form->{"lizenzen_$i"};
478
#      $lizenzen_quoted =~ s/\"/&quot;/g;
479
#      print qq|
480
#	<b>Lizenz\#</b>&nbsp;<select name="licensenumber_$i" size="1">
481
#	$form->{"lizenzen_$i"}
482
#        </select>
483
#	<input type="hidden" name="lizenzen_$i" value="${lizenzen_quoted}">
484
#|;
485
#    }
486
#    if ($form->{type} !~ /_quotation/) {
487
#      print qq|
488
#          <b>$serialnumber</b>&nbsp;<input name="serialnumber_$i" size="15" value="$form->{"serialnumber_$i"}">|;
489
#    }
490
#
491
#    print qq|<b>$projectnumber</b>&nbsp;| .
492
#      NTI($cgi->popup_menu('-name' => "project_id_$i",
493
#                           '-values' => \@projectnumber_values,
494
#                           '-labels' => \%projectnumber_labels,
495
#                           '-default' => $form->{"project_id_$i"}));
496
#
497
#    if ($form->{type} eq 'invoice' or $form->{type} =~ /order/) {
498
#      my $reqdate_term =
499
#        ($form->{type} eq 'invoice')
500
#        ? 'deliverydate'
501
#        : 'reqdate';    # invoice uses a different term for the same thing.
502
#      print qq|
503
#        <b>${$reqdate_term}</b>&nbsp;<input name="${reqdate_term}_$i" size="11" onBlur="check_right_date_format(this)" value="$form->{"${reqdate_term}_$i"}">
504
#|;
505
#    }
506
#    my $subtotalchecked = ($form->{"subtotal_$i"}) ? "checked" : "";
507
#    print qq|
508
#          <b>|.$locale->text('Subtotal').qq|</b>&nbsp;<input type="checkbox" name="subtotal_$i" value="1" $subtotalchecked>
509
#|;
510
#
511
#    if ($form->{"id_$i"} && $is_sales) {
512
#      my $marge_price_factor;
513
#
514
#      $form->{"marge_price_factor_$i"} *= 1;
515
#
516
#      if ($form->{"marge_price_factor_$i"} && (1 != $form->{"marge_price_factor_$i"})) {
517
#        $marge_price_factor = '/' . $form->format_amount(\%myconfig, $form->{"marge_price_factor_$i"});
518
#      }
519
#
520
#      print qq|
521
#          ${marge_font_start}<b>| . $locale->text('Ertrag') . qq|</b>&nbsp;$form->{"marge_total_$i"}&nbsp;$form->{"marge_percent_$i"} % ${marge_font_end}|;
522
#   }
523
#   print qq|
524
#          &nbsp;<b>| . $locale->text('LP') . qq|</b>&nbsp;| . $form->format_amount(\%myconfig, $form->{"listprice_$i"}, 2) . qq|
525
#          &nbsp;<b>| . $locale->text('EK') . qq|</b>&nbsp;| . $form->format_amount(\%myconfig, $form->{"lastcost_$i"}, 2) . $marge_price_factor;
526
#
527
#
528
#    print qq|
529
#	  </td>
530
#	</tr>
531
#|;
532
#
533
############### ENDE Neueintrag ##################
534
#
535
#    map { $form->{"${_}_base"} += $linetotal }
536
#      (split(/ /, $form->{"taxaccounts_$i"}));
537
#
538
#    $form->{invsubtotal} += $linetotal;
539
#  }
540
#
541
#  print qq|
542
#      </table>
543
#    </td>
544
#  </tr>
545
#|;
546
#
547
#  if (0 != ($form->{sellprice_total} * 1)) {
548
#    $form->{marge_percent} = ($form->{sellprice_total} - $form->{lastcost_total}) / $form->{sellprice_total} * 100;
549
#  }
550
#
551
#  $main::lxdebug->leave_sub();
552
#}
553 91

  
554 92
sub set_pricegroup {
555 93
  $main::lxdebug->enter_sub();

Auch abrufbar als: Unified diff