Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision aec0eaec

Von Kivitendo Admin vor etwa 1 Jahr hinzugefügt

  • ID aec0eaecec6cd32ded2e348358b8ea59c01aae4b
  • Vorgänger 850c0865
  • Nachfolger 800910c5

t/model/records.t - erster multi-Test

mehrere Verkaufsaufträge zu einem Auftrag

Unterschiede anzeigen:

t/model/records.t
254 254
  test_record_links($new_record, "converted $target_record_type");
255 255
};
256 256

  
257
# TODO: {
258
#   local $TODO = "currently this test fails";
259
#   my $invoice_history = SL::DB::Manager::History->find_by(trans_id => $sales_invoice1->id, what_done => 'invoice', addition => 'DELETED');
260
#   # is($invoice_history->snumbers , 'foo', "history snumbers of invoice ok");
261
# }
257
note ('testing multi');
258
clear_up();
259
reset_state();
260
reset_basic_sales_records();
261
reset_basic_purchase_records();
262

  
263
note('combining several sales orders to one combined order');
264
my @sales_orders;
265
push(@sales_orders, SL::Model::Record->new_from_workflow($sales_quotation1, 'sales_order')->save->load) for 1 .. 3;
266
my $combined_order = SL::Model::Record->new_from_workflow_multi(\@sales_orders, 'sales_order', sort_sources_by => 'transdate');
267
SL::Model::Record->save($combined_order);
268
cmp_ok($combined_order->netamount, '==', 3*710, "netamount of combined order ok");
269

  
262 270

  
263
####
264 271
clear_up();
265 272
done_testing;
266 273

  

Auch abrufbar als: Unified diff