Add source to invoice criteria. Modify invoice rules to get service fees from... #1701

Merged
arcticzero merged 217 commits from 746-resq-2-0-final into master 2023-11-22 08:54:48 +00:00
2 changed files with 26 additions and 2 deletions
Showing only changes of commit 1261fc1d20 - Show all commits

View file

@ -152,7 +152,7 @@ class PartnerController extends ApiController
$rev->setRating($rating)
->setMessage($msg)
->setPartner($partner)
->setMobileSession($this->session); // TODO: add support new customer user entity
->setCustomerSession($this->session); // NOTE: using new customer session entity
// save to db
$this->em->persist($rev);

View file

@ -48,10 +48,24 @@ class Review
// mobile session that sent review
/**
* @ORM\ManyToOne(targetEntity="MobileSession", inversedBy="reviews")
* @ORM\JoinColumn(name="mobile_session_id", referencedColumnName="id")
* @ORM\JoinColumn(name="mobile_session_id", referencedColumnName="id", nullable=true)
*/
protected $mobile_session;
// customer session (new) that sent review
/**
* @ORM\ManyToOne(targetEntity="CustomerSession", inversedBy="reviews")
* @ORM\JoinColumn(name="customer_session_id", referencedColumnName="id", nullable=true)
*/
protected $customer_session;
// customer user sent review
/**
* @ORM\ManyToOne(targetEntity="MobileSession", inversedBy="reviews")
* @ORM\JoinColumn(name="mobile_session_id", referencedColumnName="id")
*/
protected $customer;
public function __construct()
{
$this->date_create = new DateTime();
@ -113,5 +127,15 @@ class Review
{
return $this->mobile_session;
}
public function setCustomerSession(CustomerSession $customer_session)
{
$this->customer_session = $customer_session;
return $this;
}
public function getCustomerSession()
{
return $this->customer_session;
}
}