Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c0e75156

Von Kivitendo Admin vor etwa 8 Jahren hinzugefügt

  • ID c0e7515660f13c2dffbc112dff8e343188cffb1b
  • Vorgänger 7f6435de
  • Nachfolger 8012662c

assortment Test mit sellprice und lastcost sum

Unterschiede anzeigen:

t/part/assortment.t
18 18

  
19 19
my $assortment = SL::DB::Manager::Part->find_by( partnumber => 'as1' );
20 20

  
21
is( $assortment->part_type, 'assortment', 'assortment has correct part_type');
22
is( scalar @{$assortment->assortment_items}, 2, 'assortment has two parts' );
21
is($assortment->part_type,                  'assortment', 'assortment has correct part_type');
22
is(scalar @{$assortment->assortment_items}, 2,            'assortment has two parts');
23
is($assortment->assortment_sellprice_sum,   19.98,        'assortment sellprice sum ok');
24
is($assortment->assortment_lastcost_sum,    13.32,        'assortment lastcost sum ok');
23 25

  
24 26
my $assortment_item = $assortment->assortment_items->[0];
25 27
is( $assortment_item->assortment->partnumber, 'as1', "assortment_item links back to correct assortment");
......
41 43
                                   description        => "assortment part 1",
42 44
                                   unit               => $unit->name,
43 45
                                   sellprice          => '3.33',
46
                                   lastcost           => '2.22',
44 47
                                 )->save;
45 48
  $part2 = $part1->clone_and_reset($part1);
46 49
  $part2->partnumber( $part1->partnumber + 1 );

Auch abrufbar als: Unified diff