setPointSale($pointSale); } if($producerWithSharing) { $sharedPointSale->setProducerWithSharing($producerWithSharing); } if($createdBy) { $sharedPointSale->setCreatedBy($createdBy); } $sharedPointSale->setCreatedAt(new \DateTime()); $sharedPointSale->setStatus(StatusInterface::STATUS_ONLINE); return $sharedPointSale; } public function initConfirmSharedPointSale(SharedPointSale $sharedPointSale, PointSale $pointSaleWithSharing, User $confirmedBy) { $sharedPointSale->setPointSaleWithSharing($pointSaleWithSharing); $sharedPointSale->setConfirmedBy($confirmedBy); $sharedPointSale->setConfirmedAt(new \DateTime()); } public function initDeclineSharedPointSale(SharedPointSale $sharedPointSale, User $declinedBy) { $sharedPointSale->setStatus(StatusInterface::STATUS_OFFLINE); $sharedPointSale->setDeclinedBy($declinedBy); $sharedPointSale->setDeclinedAt(new \DateTime()); } }