Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d91dbc1f

Von Kivitendo Admin vor fast 8 Jahren hinzugefügt

  • ID d91dbc1f9799e5ebfb2a5746a99ba5cc842d6617
  • Vorgänger 7bbdbf2b
  • Nachfolger f2779405

Part Controller - Helper Funktionen für linetotals

Unterschiede anzeigen:

SL/DB/Part.pm
296 296
  my ($self) = @_;
297 297

  
298 298
  return unless $self->is_assembly;
299
  sum map { $_->linetotal } @{$self->part->assemblies};
299
  sum map { $_->linetotal_sellprice } @{$self->assemblies};
300 300
};
301 301

  
302 302
sub assembly_lastcost_sum {
303 303
  my ($self) = @_;
304 304

  
305 305
  return unless $self->is_assembly;
306
  sum map { $_->linetotal } @{$self->part->assemblies};
306
  sum map { $_->linetotal_lastcost } @{$self->assemblies};
307 307
};
308 308

  
309 309
sub assortment_sellprice_sum {
310 310
  my ($self) = @_;
311 311

  
312 312
  return unless $self->is_assortment;
313
  sum map { $_->linetotal } @{$self->part->assortment_items};
313
  sum map { $_->linetotal_sellprice } @{$self->assortment_items};
314 314
};
315 315

  
316 316
sub assortment_lastcost_sum {
317 317
  my ($self) = @_;
318 318

  
319 319
  return unless $self->is_assortment;
320
  sum map { $_->linetotal } @{$self->part->assortment_items};
320
  sum map { $_->linetotal_lastcost } @{$self->assortment_items};
321 321
};
322 322

  
323 323
1;

Auch abrufbar als: Unified diff