Skip to content

Commit

Permalink
Trouwen to product
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Jan 4, 2020
1 parent 8a7d02a commit 2a6ca18
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions api/src/DataFixtures/AppFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,25 +207,25 @@ public function load(ObjectManager $manager)
$burgerzakenUtrecht = $manager->getRepository('App:Group')->findOneBy(array('id'=> 'd1a8b316-5966-4a29-8cf7-be15b8302301'));

$id = Uuid::fromString('d1a8b316-5966-4a29-8cf7-be15b8302301');
$trouwen = new Product();
$trouwen->setName('Trouwen / Partnerschap');
$trouwen->setSourceOrganization('002220647');
$trouwen->setDescription('Trouwen');
$trouwen->setType('set');
$trouwen->setCatalogue($utrecht);
$trouwen->setPrice('627.00');
$trouwen->setPriceCurrency('EUR');
$product= new Product();
$product->setName('Trouwen / Partnerschap');
$product->setSourceOrganization('002220647');
$product->setDescription('Trouwen');
$product->setType('set');
$product->setCatalogue($utrecht);
$product->setPrice('627.00');
$product->setPriceCurrency('EUR');
$trouwen->setTaxPercentage(0);
$trouwen->setRequiresAppointment(false);
$manager->persist($trouwen);
$trouwen->setId($id);
$manager->persist($trouwen);
$product->setRequiresAppointment(false);
$manager->persist($product);
$product->setId($id);
$manager->persist($product);
foreach ([$trouwenUtrecht, $trouwenCeremoniersUtrecht] as $group) {
$trouwen->addGroup($group);
$product->addGroup($group);
}
$manager->persist($trouwen);
$manager->persist($product);
$manager->flush();
$manager->refresh($trouwen);
$manager->refresh($product);

$id = Uuid::fromString('16353702-4614-42ff-92af-7dd11c8eef9f');
$product = new Product();
Expand Down

0 comments on commit 2a6ca18

Please sign in to comment.