Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8790e337

Von Bernd Blessmann vor etwa 12 Jahren hinzugefügt

  • ID 8790e3375225f08771789888a590159f92a28232
  • Vorgänger 72858259
  • Nachfolger cf6c2739

fxsellprice and allocated nur für Rechnungen setzen

Unterschiede anzeigen:

SL/DB/Helper/PriceTaxCalculator.pm
70 70
  croak("Undefined unit " . $item->unit)       if !$item_unit;
71 71

  
72 72
  $item->base_qty($item_unit->convert_to($item->qty, $part_unit));
73
  $item->fxsellprice($item->sellprice);
73
  $item->fxsellprice($item->sellprice) if $data->{is_invoice};
74 74

  
75 75
  my $num_dec   = _num_decimal_places($item->sellprice);
76 76
  my $discount  = _round($item->sellprice * ($item->discount || 0), $num_dec);
......
126 126
  if ($item->part->is_assembly) {
127 127
    _calculate_assembly_item($self, $data, $item->part, $item->base_qty, $item->unit_obj->convert_to(1, $item->part->unit_obj));
128 128
  } elsif ($item->part->is_part) {
129
    $item->allocated(_calculate_part_item($self, $data, $item->part, $item->base_qty, $item->unit_obj->convert_to(1, $item->part->unit_obj)));
129
    if ($data->{is_invoice}) {
130
      $item->allocated(_calculate_part_item($self, $data, $item->part, $item->base_qty, $item->unit_obj->convert_to(1, $item->part->unit_obj)));
131
    }
130 132
  }
131 133

  
132 134
  $data->{last_incex_chart_id} = $chart->id if $data->{is_sales};

Auch abrufbar als: Unified diff