Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c0318621

Von Niclas Zimmermann vor etwa 12 Jahren hinzugefügt

  • ID c0318621a7eb2c05cfec74d2fbbd37025a03dc3d
  • Vorgänger c6cd7142
  • Nachfolger 469ca9fc

Gewicht im Verkaufsbericht

Im Verkaufsbericht kann man sich jetzt auch das Gewicht von
verkauften Teilen anzeigen lassen.

Unterschiede anzeigen:

bin/mozilla/vk.pl
150 150
  $form->{title} = $locale->text('Sales Report');
151 151

  
152 152
  @columns =
153
    qw(description invnumber transdate customernumber customername partnumber partsgroup country business transdate qty parts_unit sellprice sellprice_total discount lastcost lastcost_total marge_total marge_percent employee salesman);
153
    qw(description invnumber transdate customernumber customername partnumber partsgroup country business transdate qty parts_unit weight sellprice sellprice_total discount lastcost lastcost_total marge_total marge_percent employee salesman);
154 154

  
155 155
  my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs_ic }, @{ $cvar_configs_ct };
156 156
  my @searchable_custom_variables  = grep { $_->{searchable} }  @{ $cvar_configs_ic }, @{ $cvar_configs_ct };
......
186 186
    'transdate'               => { 'text' => $locale->text('Invoice Date'), },
187 187
    'qty'                     => { 'text' => $locale->text('Quantity'), },
188 188
    'parts_unit'              => { 'text' => $locale->text('Base unit'), },
189
    'weight'                  => { 'text' => $locale->text('Weight'), },
189 190
    'sellprice'               => { 'text' => $locale->text('Sales price'), },
190 191
    'sellprice_total'         => { 'text' => $locale->text('Sales net amount'), },
191 192
    'lastcost_total'          => { 'text' => $locale->text('Purchase net amount'), },
......
204 205

  
205 206
  map { $column_defs{$_}->{visible} = $form->{"l_$_"} eq 'Y' } @columns;
206 207

  
207
  my %column_alignment = map { $_ => 'right' } qw(lastcost sellprice sellprice_total lastcost_total parts_unit discount marge_total marge_percent qty);
208
  my %column_alignment = map { $_ => 'right' } qw(lastcost sellprice sellprice_total lastcost_total parts_unit discount marge_total marge_percent qty weight);
208 209

  
209 210
  
210 211
  # so now the check-box "Description" is only used as switch for part description in invoice-mode
......
311 312
  # escape callback for href
312 313
  $callback = $form->escape($href);
313 314

  
314
  my @subtotal_columns = qw(qty sellprice sellprice_total lastcost lastcost_total marge_total marge_percent discount);
315
  my @subtotal_columns = qw(qty weight sellprice sellprice_total lastcost lastcost_total marge_total marge_percent discount);
315 316
  # Gesamtsumme:
316 317
  # Summe von sellprice_total, lastcost_total und marge_total
317 318
  # Durchschnitt von marge_percent
......
425 426
    #qty wurde bisher noch für andere Berechnungen benötigt und daher erst am Schluss überschrieben
426 427
    $ar->{qty} *= $basefactor;
427 428

  
429
    #weight is the still the weight per part, but here we want the total weight
430
    $ar->{weight} *= $ar->{qty};
431

  
428 432
    map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(marge_total marge_percent);
429 433
    map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, $form->{"decimalplaces"} )} qw(lastcost sellprice sellprice_total lastcost_total);
430 434

  
......
517 521
    $row->{description}->{data} = $locale->text('Total') . ' ' . $name;
518 522
  };
519 523

  
520
  map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } qw(marge_total marge_percent);
524
  map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } qw(marge_total marge_percent weight);
521 525
  map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 0) } qw(qty);
522 526
  map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, $form->{decimalplaces}) } qw(lastcost sellprice sellprice_total lastcost_total);
523 527

  

Auch abrufbar als: Unified diff