src/Diplix/KMGBundle/Entity/Order.php line 15

Open in your IDE?
  1. <?php
  2. namespace Diplix\KMGBundle\Entity;
  3. use Diplix\KMGBundle\Entity\Accounting\CoopMember;
  4. use Diplix\KMGBundle\Entity\Accounting\Job;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\PropertyAccess\PropertyAccess;
  9. /**
  10.  * @ORM\Table(name="orders", indexes={@ORM\Index(name="be_deleted",columns={"be_deleted"})})
  11.  * @ORM\Entity(repositoryClass="Diplix\KMGBundle\Repository\OrderRepository")
  12.  */
  13. class Order extends BasicEntity
  14. {
  15.     const CM_SIGNATURE 10;
  16.     const CM_PIN 11;
  17.     const DIRECTION_DEFAULT 0;
  18.     const DIRECTION_FORTH 1;
  19.     const DIRECTION_BACK 2;
  20.     const DIRECTION_TWOWAY 3;
  21.     const DIRECTION_TWOWAY_REVERSE 4;
  22.     const TIME_LAG_HOURS 4;
  23.     const REMOTE_PENDING 0;
  24.     const REMOTE_ERROR 1;
  25.     const REMOTE_SUCCESS 10;
  26.     const INSTANT_ORDER_REQUEST_PENDING 100;
  27.     const INSTANT_ORDER_ACCEPTED 101;
  28.     const INSTANT_ORDER_DECLINED 102;
  29.     const INSTANT_ORDER_TIMEOUT 103;
  30.     public static $remoteStatusMap = [
  31.         self::REMOTE_PENDING => 'Wartet',
  32.         self::REMOTE_ERROR => 'Fehler',
  33.         self::REMOTE_SUCCESS => 'Erfolgreich'
  34.     ];
  35.     const CARTYPE_PKW "PKW";
  36.     const CARTYPE_MINIVAN "Minivan";
  37.     const CARTYPE_BUS "Reisebus";
  38.     const CARTYPE_KOMBI ="Kombi";
  39.     public static $carTypes = array(self::CARTYPE_PKW=>self::CARTYPE_PKW,
  40.                                     self::CARTYPE_MINIVAN=>self::CARTYPE_MINIVAN,
  41.                                     self::CARTYPE_BUS => self::CARTYPE_BUS,
  42.                                     self::CARTYPE_KOMBI => self::CARTYPE_KOMBI);
  43.     public static $carPersonsMax = array(   self::CARTYPE_PKW => 4,
  44.                                             self::CARTYPE_KOMBI => 4,
  45.                                             self::CARTYPE_MINIVAN =>7,
  46.                                             self::CARTYPE_BUS=>54);
  47.     const AS_NONE 0;
  48.     const AS_LAST_ASSIGNMENT_DENIED 1;
  49.     /**
  50.      * @ORM\Column(type="integer",name="id")
  51.      * @ORM\Id()
  52.      * @ORM\GeneratedValue(strategy="AUTO")
  53.      */
  54.     protected $id;
  55.      /**
  56.      * @ORM\Column(type="string")
  57.      */
  58.     protected $orderId "";
  59.     /**
  60.      * @ORM\Column(type="string",nullable=true, unique=false)
  61.      */
  62.     protected $viewSecret;
  63.     /**
  64.      * @ORM\Column(type="string",nullable=true, unique=false)
  65.      */
  66.     protected $paymentSecret;
  67.     /**
  68.      * @ORM\Column(type="string")
  69.      */
  70.     protected $originOrderId "";
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity="Customer")
  73.      * @ORM\JoinColumn(name="customer_id",nullable=false)
  74.      */
  75.     protected $customer;
  76.     /**
  77.      * @ORM\Column(type="datetime",nullable=false)
  78.      */
  79.     protected $orderTime;
  80.     /**
  81.      * @ORM\ManyToOne(targetEntity="OrderStatus")
  82.      * @ORM\JoinColumn(name="order_status_id",nullable=false)
  83.      */
  84.     protected $orderStatus;
  85.     /**
  86.      * @ORM\Column(type="integer")
  87.      */
  88.     protected $personCount;
  89.     /**
  90.      * @ORM\Column(type="integer")
  91.      */
  92.     protected $personAsChildrenCount 0;
  93.     /**
  94.      * @ORM\Column(type="string")
  95.      */
  96.     protected $ccEmail "";
  97.     /**
  98.      * @ORM\ManyToOne(targetEntity="PaymentType")
  99.      * @ORM\JoinColumn(name="payment_type_id",nullable=false)
  100.      */
  101.     protected $paymentType;
  102.     /**
  103.      * @ORM\Column(type="string")
  104.      */
  105.     protected $costCenter "";
  106.     /**
  107.      * @ORM\Column(type="text")
  108.      */
  109.     protected $comment "";
  110.     /**
  111.      * @ORM\Column(type="string")
  112.      */
  113.     protected $internalComment "";
  114.     /**
  115.      * @ORM\Column(type="string")
  116.      */
  117.     protected $ordererName "";
  118.     /**
  119.      * @ORM\Column(type="string")
  120.      */
  121.     protected $ordererForename "";
  122.     /**
  123.      * @ORM\Column(type="string")
  124.      */
  125.     protected $ordererPhone "";
  126.     /**
  127.      * @ORM\Column(type="string")
  128.      */
  129.     protected $ordererMail "";
  130.     /**
  131.      * @ORM\OneToMany(targetEntity="Address", mappedBy="owningOrder", cascade={"persist"})
  132.      * @ORM\JoinColumn(referencedColumnName="id",nullable=true)
  133.      * @ORM\OrderBy({"sortOrder" = "ASC"})
  134.      */
  135.     protected $addressList null;
  136.     /**
  137.      * @ORM\Column(type="string")
  138.      */
  139.     protected $remoteOrderId "";
  140.     /**
  141.      * @ORM\Column(type="integer")
  142.      */
  143.     protected $remoteStatus self::REMOTE_PENDING;
  144.     /**
  145.      * @ORM\Column(type="datetime",nullable=true)
  146.      */
  147.     protected $remoteOrderSubmittedTime null;
  148.     /**
  149.      * @ORM\Column(type="integer")
  150.      */
  151.     protected $remoteResult 0;
  152.     /**
  153.      * @ORM\Column(type="string")
  154.      */
  155.     protected $remoteResultText "";
  156.     /**
  157.      * @ORM\Column(type="integer")
  158.      */
  159.     protected $childSeatCount 0;
  160.     /**
  161.      * @ORM\Column(type="string")
  162.      */
  163.     protected $flightNo "";
  164.     /**
  165.      * @ORM\Column(type="time", nullable=true)
  166.      *
  167.      */
  168.     protected $flightTime null;
  169.     /**
  170.      * @ORM\Column(type="string")
  171.      */
  172.     protected $childSeatInfo "";
  173.     /**
  174.      * @ORM\Column(type="string")
  175.      */
  176.     protected $carType "";
  177.     /**
  178.      * @ORM\Column(type="integer")
  179.      */
  180.     protected $carTypeSize 0;
  181.     /**
  182.      * @ORM\Column(type="string")
  183.      */
  184.     protected $creditCardNo "";
  185.     /**
  186.      * @ORM\Column(type="string")
  187.      */
  188.     protected $creditCardMonth "";
  189.         /**
  190.      * @ORM\Column(type="string")
  191.      */
  192.     protected $creditCardYear "";
  193.     /**
  194.      * @ORM\Column(type="integer")
  195.      */
  196.     protected $lastEstimatedDistance 0;
  197.     /**
  198.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":false})
  199.      */
  200.     protected $lastEstimatedPrice 0.0;
  201.     /**
  202.      * @ORM\Column(type="integer")
  203.      */
  204.     protected $lastPriceListId 0;
  205.     /**
  206.      * @ORM\ManyToOne (targetEntity="Diplix\KMGBundle\Entity\PriceList")
  207.      * @ORM\JoinColumn (nullable=true)
  208.      */
  209.     protected $priceList;
  210.     /**
  211.      * @ORM\Column(type="decimal", nullable=true, precision=12, scale=2,options={"unsigned":false})
  212.      */
  213.     protected $fixedPrice null;
  214.     /**
  215.      * @ORM\Column(type="boolean")
  216.      */
  217.     protected $isVip false;
  218.     /**
  219.      * @ORM\Column(type="string", nullable=true)
  220.      */
  221.     protected $region null;
  222.     /**
  223.      * @ORM\Column(type="string",nullable=true)
  224.      */
  225.     protected $destination null;
  226.     /**
  227.      * @ORM\Column(type="boolean")
  228.      */
  229.     protected $isFamily false;
  230.     /**
  231.      * @ORM\Column(type="integer")
  232.      */
  233.     protected $familyKidAddOn 0;
  234.     /**
  235.      * @ORM\Column(type="integer")
  236.      */
  237.     protected $familyAdultAddOn 0;
  238.     /**
  239.      * @ORM\Column(type="integer")
  240.      */
  241.     protected $direction self::DIRECTION_DEFAULT;
  242.     /**
  243.      * @ORM\Column(type="integer")
  244.      */
  245.     protected $extraApproaches 0;
  246.     /**
  247.      * @ORM\Column(type="integer")
  248.      */
  249.     protected $extraLuggage 0;
  250.     /**
  251.      * @ORM\Column(type="integer")
  252.      */
  253.     protected $extraBicycles 0;
  254.     /**
  255.      * @ORM\OneToMany(targetEntity="Diplix\KMGBundle\Entity\Order", mappedBy="referencedParentOrder")
  256.      */
  257.     private $childOrders;
  258.     /**
  259.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Order", fetch="EAGER", inversedBy="childOrders")
  260.      * @ORM\OrderBy({"id" = "DESC"})
  261.      */
  262.     protected $referencedParentOrder null;
  263.     /**
  264.      * @ORM\Column(type="datetime",nullable=true)
  265.      */
  266.     protected $returnOrderTime;
  267.     /**
  268.      * @ORM\Column(type="string")
  269.      */
  270.     protected $returnFlightNo "";
  271.     /**
  272.      * @ORM\Column(type="boolean")
  273.      */
  274.     protected $alreadyPaid false;
  275.     /**
  276.      * @ORM\OneToMany(targetEntity="Diplix\KMGBundle\Entity\Payment", fetch="EAGER", mappedBy="order")
  277.      * @var Collection<Payment>
  278.      */
  279.     protected Collection $paymentReference;
  280.     /**
  281.      * @ORM\Column(type="string")
  282.      */
  283.     protected $confirmationPin '';
  284.     /**
  285.      * @ORM\Column(type="integer")
  286.      */
  287.     protected $preferredConfirmationMethod self::CM_SIGNATURE;
  288.     /**
  289.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Accounting\CoopMember")
  290.      * @ORM\JoinColumn(name="assigned_to_id",nullable=true)
  291.      */
  292.     protected $assignedTo null;
  293.     /**
  294.      * @ORM\Column(type="boolean")
  295.      */
  296.     protected $assignmentConfirmed false;
  297.     /**
  298.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\User")
  299.      * @ORM\JoinColumn(nullable=true)
  300.      */
  301.     protected ?User $assignmentUser null;
  302.     /**
  303.      * @ORM\Column(type="integer")
  304.      */
  305.     protected $assignmentStatus self::AS_NONE;
  306.     /**
  307.      * @ORM\Column(type="datetime")
  308.      * @ORM\Version
  309.      */
  310.     protected $version;
  311.     /**
  312.      * @ORM\OneToOne(targetEntity="Diplix\KMGBundle\Entity\Accounting\Job", mappedBy="knownOrder", cascade={"persist"} )
  313.      * @ORM\JoinColumn(nullable=true)
  314.      */
  315.     protected $job;
  316.     /**
  317.      * @ORM\Column(type="datetime",nullable=true)
  318.      */
  319.     protected $instantOrderInitiated;
  320.     /**
  321.      * @ORM\Column(type="datetime",nullable=true)
  322.      */
  323.     protected $instantOrderResponded;
  324.     /**
  325.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\User")
  326.      * @ORM\JoinColumn(nullable=true)
  327.      */
  328.     protected $instantOrderRespondedBy;
  329.     /**
  330.      * @ORM\Column(type="text",nullable=true)
  331.      */
  332.     protected $instantOrderComment;
  333.     /**
  334.      * @ORM\Column(type="integer")
  335.      */
  336.     protected $instantOrderStatus 0;
  337.     /**
  338.      * @ORM\Column(type="datetime",nullable=true)
  339.      */
  340.     protected $orderInitiatedOn;
  341.     /**
  342.      * @ORM\Column(type="datetime",nullable=true)
  343.      */
  344.     protected $jobPdfRequestedOn;
  345.     /**
  346.      * @ORM\Column(type="boolean")
  347.      */
  348.     protected $blumTransferOnly false;
  349.     /**
  350.      * @ORM\Column(type="boolean",options={"default" = 0});
  351.      */
  352.     protected bool $applicantTimeRide false;
  353.     public static $generatorMap = array(
  354.         "1","2","3","4","5","6","7","8","9"
  355.     );
  356.     const XCHG_NONE 0;
  357.     const XCHG_SENT_TO_OTHER 10;
  358.     const XCHG_RECEIVED_FROM_OTHER 20;
  359.     /**
  360.      * @ORM\Column(type="integer")
  361.      */
  362.     protected $xchgStatus self::XCHG_NONE;
  363.     /**
  364.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Accounting\CoopMember")
  365.      * @ORM\JoinColumn(name="xchg_to_id",nullable=true)
  366.      */
  367.     protected $xchgTo;
  368.     /**
  369.      * @ORM\Column(type="string")
  370.      */
  371.     protected $xchgOrderId '';
  372.     /**
  373.      * @ORM\Column(type="integer")
  374.      */
  375.     protected $xchgOrderStatus 0// vgl. orderStatus
  376.     /**
  377.      * @ORM\Column(type="integer")
  378.      */
  379.     protected $xchgConfirmed false;
  380.     /**
  381.      * @ORM\Column(type="integer", options={"default":0})
  382.      */
  383.     protected $customerNotificationState 0;
  384.     const CNS_INITIAL_SMS 0x01;
  385.     /**
  386.      * @ORM\Column(type="decimal", nullable=true, precision=5, scale=2,options={"unsigned":false})
  387.      */
  388.     protected $discount 0.0;
  389.     /**
  390.      * @ORM\Column(type="string", nullable=true, length=64 , options={"default":null})
  391.      */
  392.     protected ?string $dispatchCategory null;
  393.     public static function generatePin($len=6)
  394.     {
  395.         $pin '';
  396.         $max count(self::$generatorMap)-1;
  397.         for ($i=0$i $len$i++)
  398.         {
  399.             $r random_int(0,$max);
  400.             $pin .= self::$generatorMap[$r];
  401.         }
  402.         return $pin;
  403.     }
  404.     public function __toString()
  405.     {
  406.         return sprintf("Order#%d %s",$this->getId(),$this->getOrderId());
  407.     }
  408.     public function __construct()
  409.     {
  410.         $this->addressList = new ArrayCollection();
  411.         $this->paymentReference = new ArrayCollection();
  412.         $this->childOrders = new ArrayCollection();
  413.         $this->confirmationPin self::generatePin();
  414.         $this->viewSecret self::generatePin(8);
  415.         $this->paymentSecret uniqid('p',true);
  416.     }
  417.     public function __clone()
  418.     {
  419.         $this->id null;
  420.         $this->orderId '';
  421.         $this->remoteOrderId '';
  422.         $this->confirmationPin self::generatePin();
  423.         $this->viewSecret self::generatePin(8);
  424.         $this->paymentSecret uniqid('p',true);
  425.         $this->remoteOrderSubmittedTime null;
  426.         $this->remoteStatus self::REMOTE_PENDING;
  427.         $this->orderStatus null;
  428.         $oldList $this->addressList;
  429.         $this->addressList = new ArrayCollection();
  430.         foreach ($oldList->toArray() as $elem)
  431.         {
  432.             $this->addAddress(clone $elem);
  433.         }
  434.         $this->returnFlightNo'';
  435.         $this->returnOrderTime=null;
  436.         $this->referencedParentOrder null;
  437.         $this->alreadyPaid false;
  438.         $this->lastEstimatedDistance 0;
  439.         $this->lastEstimatedPrice 0;
  440.         $this->assignedTo null;
  441.         $this->assignmentConfirmed false;
  442.         $this->assignmentUser null;
  443.         $this->customerNotificationState 0;
  444.         $this->job null;
  445.         $this->instantOrderStatus 0;
  446.         $this->instantOrderComment null;
  447.         $this->instantOrderInitiated null;
  448.         $this->instantOrderRespondedBy null;
  449.         $this->instantOrderResponded null;
  450.         $this->jobPdfRequestedOn null;
  451.         $this->xchgStatus self::XCHG_NONE;
  452.         $this->xchgOrderStatus 0;
  453.         $this->xchgTo null;
  454.         $this->xchgOrderId '';
  455.         $this->xchgConfirmed false;
  456.         // remove relations
  457.         $this->paymentReference = new ArrayCollection();
  458.         $this->childOrders = new ArrayCollection();
  459.     }
  460.     public function isDraft(): bool
  461.     {
  462.         // new 2020 behavior
  463.         if ($this->getOrderStatus()->getId()===OrderStatus::STATUS_DRAFT)
  464.         {
  465.             return true;
  466.         }
  467.         // backward compatibility
  468.         /** @noinspection TypeUnsafeComparisonInspection */
  469.         return ($this->remoteStatus == self::REMOTE_PENDING);
  470.     }
  471.     /**
  472.      * @param Order $parent
  473.      * @param Order|mixed $child
  474.      * @return Order
  475.      */
  476.     public static function createOrUpdateChildOrder(Order $parent$child)
  477.     {
  478.         if (!is_object($child))
  479.         {
  480.             $child = clone($parent);
  481.             $child->setReferencedParentOrder($parent);
  482.         }
  483.         else
  484.         {
  485.             // copy all addresses from parent order (to reflect changes)
  486.             foreach ($child->getAddressList() as $a$a->setBeDeleted(true);
  487.             foreach ($parent->getAddressList() as $a)
  488.             {
  489.                 $child->addAddress(clone $a);
  490.             }
  491.         }
  492.         // setup addresses in reverse order
  493.         $addresses $child->getAddressList()->toArray();
  494.         /** @var Address $a */
  495.         $sort  count($addresses);
  496.         foreach ($addresses as $a)
  497.         {
  498.             $a->setSortOrder($sort--);
  499.         }
  500.         // copy other fields
  501.         $pa PropertyAccess::createPropertyAccessor();
  502.         foreach([   'personCount',
  503.                     'personAsChildrenCount',
  504.                     'ccEmail',
  505.                     'carType',
  506.                     'paymentType',
  507.                     'costCenter',
  508.                     'comment',
  509.                     'internalComment',
  510.                     'ordererName',
  511.                     'ordererForename',
  512.                     'ordererPhone',
  513.                     'ordererMail',
  514.                     'childSeatCount',
  515.                     'childSeatInfo',
  516.                     'creditCardNo',
  517.                     'creditCardMonth',
  518.                     'creditCardYear',
  519.                     'isVip',
  520.                     'extraApproaches',
  521.                     'extraLuggage',
  522.                     'extraBicycles'] as $k)
  523.         {
  524.             $pa->setValue($child,$k$pa->getValue($parent,$k) );
  525.         }
  526.         // set fields from return fields
  527.         $child->setOrderTime($parent->getReturnOrderTime());
  528.         $child->setFlightNo($parent->getReturnFlightNo());
  529.         $child->setLastEstimatedPrice(0);
  530.         $child->setLastEstimatedDistance($parent->getLastEstimatedDistance());
  531.         // all done
  532.         return $child;
  533.     }
  534.     public function getFinalPrice()
  535.     {
  536.         if ($this->getFixedPrice()!==null)
  537.             return $this->getFixedPrice();
  538.         else
  539.             return $this->getLastEstimatedPrice();
  540.     }
  541.     /**
  542.      * @return mixed
  543.      */
  544.     public function getId()
  545.     {
  546.         return $this->id;
  547.     }
  548.     /**
  549.      * @return Customer
  550.      */
  551.     public function getCustomer()
  552.     {
  553.         return $this->customer;
  554.     }
  555.     /**
  556.      * @param mixed $customer
  557.      */
  558.     public function setCustomer($customer)
  559.     {
  560.         $this->customer $customer;
  561.     }
  562.     /**
  563.      * @return \DateTime
  564.      */
  565.     public function getOrderTime()
  566.     {
  567.         return $this->orderTime;
  568.     }
  569.     /**
  570.      * @param mixed $orderTime
  571.      */
  572.     public function setOrderTime($orderTime)
  573.     {
  574.         $this->orderTime $orderTime;
  575.     }
  576.     /**
  577.      * @return OrderStatus
  578.      */
  579.     public function getOrderStatus()
  580.     {
  581.         return $this->orderStatus;
  582.     }
  583.     /**
  584.      * @param mixed $orderStatus
  585.      */
  586.     public function setOrderStatus($orderStatus)
  587.     {
  588.         $this->orderStatus $orderStatus;
  589.     }
  590.     /**
  591.      * @return mixed
  592.      */
  593.     public function getPersonCount()
  594.     {
  595.         return $this->personCount;
  596.     }
  597.     /**
  598.      * @param mixed $personCount
  599.      */
  600.     public function setPersonCount($personCount)
  601.     {
  602.         $this->personCount $personCount;
  603.     }
  604.     /**
  605.      * @return PaymentType
  606.      */
  607.     public function getPaymentType()
  608.     {
  609.         return $this->paymentType;
  610.     }
  611.     /**
  612.      * @param mixed $paymentType
  613.      */
  614.     public function setPaymentType($paymentType)
  615.     {
  616.         $this->paymentType $paymentType;
  617.     }
  618.     /**
  619.      * @return mixed
  620.      */
  621.     public function getCostCenter()
  622.     {
  623.         return $this->costCenter;
  624.     }
  625.     /**
  626.      * @param mixed $costCenter
  627.      */
  628.     public function setCostCenter($costCenter)
  629.     {
  630.         $this->costCenter $costCenter;
  631.     }
  632.     /**
  633.      * @return mixed
  634.      */
  635.     public function getComment()
  636.     {
  637.         return $this->comment;
  638.     }
  639.     /**
  640.      * @param mixed $comment
  641.      */
  642.     public function setComment($comment)
  643.     {
  644.         $this->comment $comment;
  645.     }
  646.     /**
  647.      * @return mixed
  648.      */
  649.     public function getOrdererName()
  650.     {
  651.         return $this->ordererName;
  652.     }
  653.     /**
  654.      * @param mixed $ordererName
  655.      */
  656.     public function setOrdererName($ordererName)
  657.     {
  658.         $this->ordererName $ordererName;
  659.     }
  660.     /**
  661.      * @return mixed
  662.      */
  663.     public function getOrdererForename()
  664.     {
  665.         return $this->ordererForename;
  666.     }
  667.     /**
  668.      * @param mixed $ordererForename
  669.      */
  670.     public function setOrdererForename($ordererForename)
  671.     {
  672.         $this->ordererForename $ordererForename;
  673.     }
  674.     /**
  675.      * @return mixed
  676.      */
  677.     public function getOrdererPhone()
  678.     {
  679.         return $this->ordererPhone;
  680.     }
  681.     /**
  682.      * @param mixed $ordererPhone
  683.      */
  684.     public function setOrdererPhone($ordererPhone)
  685.     {
  686.         $this->ordererPhone $ordererPhone;
  687.     }
  688.     /**
  689.      * @return mixed
  690.      */
  691.     public function getOrdererMail()
  692.     {
  693.         return $this->ordererMail;
  694.     }
  695.     /**
  696.      * @param mixed $ordererMail
  697.      */
  698.     public function setOrdererMail($ordererMail)
  699.     {
  700.         $this->ordererMail $ordererMail;
  701.     }
  702.     public function addAddressList(Address $a) { return $this->addAddress($a); } // for reflection usage
  703.     public function addAddress(Address $a)
  704.     {
  705.         $a->setOwningOrder($this);
  706.         $this->addressList->add($a);
  707.     }
  708.     public function removeAddressList(Address $a) { return $this->removeAddress($a); } // for reflection usage
  709.     public function removeAddress(Address $a)
  710.     {
  711.         $this->addressList->removeElement($a);
  712.     }
  713.     public function clearAddressList()
  714.     {
  715.         $this->addressList->clear();
  716.     }
  717.     public function getAddressList()
  718.     {
  719.         $al $this->addressList;
  720.         // if the list is not loaded from the database, the order may be incorrect -> sort it
  721.         $iterator $al->getIterator();
  722.         $iterator->uasort(function ($a$b) {
  723.             return ($a->getSortOrder() < $b->getSortOrder()) ? -1;
  724.         });
  725.         $res = new ArrayCollection(iterator_to_array($iterator));
  726.         /*// cls: debug
  727.         $i=0;
  728.         foreach ($res as $a)
  729.         {
  730.             echo ($i++)." : ".$a->getId()." : ".$a->getSortOrder()." || ";
  731.         }*/
  732.         return $res;
  733.     }
  734.     public function removeDeletedAddressesFromList()
  735.     {
  736.         $adr $this->addressList->toArray();
  737.         $this->addressList = new ArrayCollection(array_filter($adr, function(Address $a) {
  738.             return !$a->getBeDeleted();
  739.         }));
  740.     }
  741.     public function reorganizeSortOrder()
  742.     {
  743.         // an sortOrder of < 0 may cause strange behaviour for which it is not that easy to find the problem source
  744.         // just assign new sortorders > 0. getAddressList() already returns the list in the right order
  745.         $al $this->getAddressList();
  746.         $sort 0;
  747.         foreach ($al as $a$a->setSortOrder($sort++);
  748.     }
  749.     /**
  750.      * @return mixed
  751.      */
  752.     public function getRemoteStatus()
  753.     {
  754.         return $this->remoteStatus;
  755.     }
  756.     /**
  757.      * @param mixed $remoteStatus
  758.      */
  759.     public function setRemoteStatus($remoteStatus)
  760.     {
  761.         $this->remoteStatus $remoteStatus;
  762.     }
  763.     /**
  764.      * @return mixed
  765.      */
  766.     public function getRemoteResult()
  767.     {
  768.         return $this->remoteResult;
  769.     }
  770.     /**
  771.      * @param mixed $remoteResult
  772.      */
  773.     public function setRemoteResult($remoteResult)
  774.     {
  775.         $this->remoteResult $remoteResult;
  776.     }
  777.     /**
  778.      * @return string
  779.      */
  780.     public function getRemoteOrderId(): string
  781.     {
  782.         return $this->remoteOrderId;
  783.     }
  784.     /**
  785.      * @param string $remoteOrderId
  786.      */
  787.     public function setRemoteOrderId(string $remoteOrderId): void
  788.     {
  789.         $this->remoteOrderId $remoteOrderId;
  790.     }
  791.     /**
  792.      * @return mixed
  793.      */
  794.     public function getOrderId()
  795.     {
  796.         return $this->orderId;
  797.     }
  798.     /**
  799.      * @param mixed $orderId
  800.      */
  801.     public function setOrderId($orderId)
  802.     {
  803.         $this->orderId $orderId;
  804.     }
  805.     /**
  806.      * @return mixed
  807.      */
  808.     public function getRemoteResultText()
  809.     {
  810.         return $this->remoteResultText;
  811.     }
  812.     /**
  813.      * @param mixed $remoteResultText
  814.      */
  815.     public function setRemoteResultText($remoteResultText)
  816.     {
  817.         $this->remoteResultText $remoteResultText;
  818.     }
  819.     /**
  820.      * @return mixed
  821.      */
  822.     public function getCcEmail()
  823.     {
  824.         return $this->ccEmail;
  825.     }
  826.     /**
  827.      * @param mixed $ccEmail
  828.      */
  829.     public function setCcEmail($ccEmail)
  830.     {
  831.         $this->ccEmail $ccEmail;
  832.     }
  833.     /**
  834.      * @return mixed
  835.      */
  836.     public function getChildSeatCount()
  837.     {
  838.         return $this->childSeatCount;
  839.     }
  840.     /**
  841.      * @param mixed $childSeatCount
  842.      */
  843.     public function setChildSeatCount($childSeatCount)
  844.     {
  845.         $this->childSeatCount $childSeatCount;
  846.     }
  847.     /**
  848.      * @return mixed
  849.      */
  850.     public function getFlightNo()
  851.     {
  852.         return $this->flightNo;
  853.     }
  854.     /**
  855.      * @param mixed $flightNo
  856.      */
  857.     public function setFlightNo($flightNo)
  858.     {
  859.         $this->flightNo $flightNo;
  860.     }
  861.     /**
  862.      * @return mixed
  863.      */
  864.     public function getChildSeatInfo()
  865.     {
  866.         return $this->childSeatInfo;
  867.     }
  868.     /**
  869.      * @param mixed $childSeatInfo
  870.      */
  871.     public function setChildSeatInfo($childSeatInfo)
  872.     {
  873.         $this->childSeatInfo $childSeatInfo;
  874.     }
  875.     /**
  876.      * @return mixed
  877.      */
  878.     public function getCarType()
  879.     {
  880.         return $this->carType;
  881.     }
  882.     /**
  883.      * @param mixed $carType
  884.      */
  885.     public function setCarType($carType)
  886.     {
  887.         $this->carType $carType;
  888.     }
  889.     /**
  890.      * @return mixed
  891.      */
  892.     public function getCarTypeSize()
  893.     {
  894.         return $this->carTypeSize;
  895.     }
  896.     /**
  897.      * @param mixed $carTypeSize
  898.      */
  899.     public function setCarTypeSize($carTypeSize)
  900.     {
  901.         $this->carTypeSize $carTypeSize;
  902.     }
  903.     /**
  904.      * @return mixed
  905.      */
  906.     public function getCreditCardNo()
  907.     {
  908.         return $this->creditCardNo;
  909.     }
  910.     /**
  911.      * @param mixed $creditCardNo
  912.      */
  913.     public function setCreditCardNo($creditCardNo)
  914.     {
  915.         $this->creditCardNo $creditCardNo;
  916.     }
  917.     /**
  918.      * @return mixed
  919.      */
  920.     public function getCreditCardMonth()
  921.     {
  922.         return $this->creditCardMonth;
  923.     }
  924.     /**
  925.      * @param mixed $creditCardMonth
  926.      */
  927.     public function setCreditCardMonth($creditCardMonth)
  928.     {
  929.         $this->creditCardMonth $creditCardMonth;
  930.     }
  931.     /**
  932.      * @return mixed
  933.      */
  934.     public function getCreditCardYear()
  935.     {
  936.         return $this->creditCardYear;
  937.     }
  938.     /**
  939.      * @param mixed $creditCardYear
  940.      */
  941.     public function setCreditCardYear($creditCardYear)
  942.     {
  943.         $this->creditCardYear $creditCardYear;
  944.     }
  945.     /**
  946.      * @return mixed
  947.      */
  948.     public function getLastEstimatedDistance()
  949.     {
  950.         return $this->lastEstimatedDistance;
  951.     }
  952.     /**
  953.      * @param mixed $lastEstimatedDistance
  954.      */
  955.     public function setLastEstimatedDistance($lastEstimatedDistance)
  956.     {
  957.         $this->lastEstimatedDistance = (int)$lastEstimatedDistance;
  958.     }
  959.     /**
  960.      * @return mixed
  961.      */
  962.     public function getLastEstimatedPrice()
  963.     {
  964.         return $this->lastEstimatedPrice;
  965.     }
  966.     /**
  967.      * @param mixed $lastEstimatedPrice
  968.      */
  969.     public function setLastEstimatedPrice($lastEstimatedPrice)
  970.     {
  971.         $this->lastEstimatedPrice $lastEstimatedPrice;
  972.     }
  973.     /**
  974.      * @return \DateTime|null
  975.      */
  976.     public function getRemoteOrderSubmittedTime()
  977.     {
  978.         return $this->remoteOrderSubmittedTime;
  979.     }
  980.     /**
  981.      * @param mixed $remoteOrderSubmittedTime
  982.      */
  983.     public function setRemoteOrderSubmittedTime($remoteOrderSubmittedTime)
  984.     {
  985.         $this->remoteOrderSubmittedTime $remoteOrderSubmittedTime;
  986.     }
  987. //    /**
  988. //     * @return mixed
  989. //     * @deprecated
  990. //     */
  991. //    public function getLastPriceListId()
  992. //    {
  993. //        return $this->lastPriceListId;
  994. //    }
  995. //
  996. //    /**
  997. //     * @param mixed $lastPriceListId
  998. //     * @deprecated
  999. //     */
  1000. //    public function setLastPriceListId($lastPriceListId)
  1001. //    {
  1002. //        $this->lastPriceListId = $lastPriceListId;
  1003. //    }
  1004.     /**
  1005.      * @return null|PriceList
  1006.      */
  1007.     public function getPriceList()
  1008.     {
  1009.         return $this->priceList;
  1010.     }
  1011.     /**
  1012.      * @param mixed $priceList
  1013.      */
  1014.     public function setPriceList($priceList): void
  1015.     {
  1016.         $this->priceList $priceList;
  1017.         $this->lastPriceListId = ($priceList!==null?$priceList->getId():0);
  1018.     }
  1019.     /**
  1020.      * @return mixed
  1021.      */
  1022.     public function getIsVip()
  1023.     {
  1024.         return $this->isVip;
  1025.     }
  1026.     /**
  1027.      * @param mixed $isVip
  1028.      */
  1029.     public function setIsVip($isVip)
  1030.     {
  1031.         $this->isVip $isVip;
  1032.     }
  1033.     /**
  1034.      * @return mixed
  1035.      */
  1036.     public function getFixedPrice()
  1037.     {
  1038.         return $this->fixedPrice;
  1039.     }
  1040.     /**
  1041.      * @param mixed $fixedPrice
  1042.      */
  1043.     public function setFixedPrice($fixedPrice)
  1044.     {
  1045.         $this->fixedPrice $fixedPrice;
  1046.     }
  1047.     /**
  1048.      * @return mixed
  1049.      */
  1050.     public function getRegion()
  1051.     {
  1052.         return $this->region;
  1053.     }
  1054.     /**
  1055.      * @param mixed $region
  1056.      */
  1057.     public function setRegion($region)
  1058.     {
  1059.         $this->region $region;
  1060.     }
  1061.     /**
  1062.      * @return mixed
  1063.      */
  1064.     public function getisFamily()
  1065.     {
  1066.         return $this->isFamily;
  1067.     }
  1068.     /**
  1069.      * @param mixed $isFamily
  1070.      */
  1071.     public function setIsFamily($isFamily)
  1072.     {
  1073.         $this->isFamily $isFamily;
  1074.     }
  1075.     /**
  1076.      * @return mixed
  1077.      */
  1078.     public function getFamilyKidAddOn()
  1079.     {
  1080.         return $this->familyKidAddOn;
  1081.     }
  1082.     /**
  1083.      * @param mixed $familyKidAddOn
  1084.      */
  1085.     public function setFamilyKidAddOn($familyKidAddOn)
  1086.     {
  1087.         $this->familyKidAddOn $familyKidAddOn;
  1088.     }
  1089.     /**
  1090.      * @return mixed
  1091.      */
  1092.     public function getDestination()
  1093.     {
  1094.         return $this->destination;
  1095.     }
  1096.     /**
  1097.      * @param mixed $destination
  1098.      */
  1099.     public function setDestination($destination)
  1100.     {
  1101.         $this->destination $destination;
  1102.     }
  1103.     /**
  1104.      * @return mixed
  1105.      */
  1106.     public function getDirection()
  1107.     {
  1108.         return $this->direction;
  1109.     }
  1110.     /**
  1111.      * @param mixed $direction
  1112.      */
  1113.     public function setDirection($direction)
  1114.     {
  1115.         $this->direction $direction;
  1116.     }
  1117.     /**
  1118.      * @return Order|null
  1119.      */
  1120.     public function getReferencedParentOrder()
  1121.     {
  1122.         return $this->referencedParentOrder;
  1123.     }
  1124.     /**
  1125.      * @param Order|null $referencedParentOrder
  1126.      */
  1127.     public function setReferencedParentOrder($referencedParentOrder,$includeInverseSide=true)
  1128.     {
  1129.         $this->referencedParentOrder $referencedParentOrder;
  1130.         if ($includeInverseSide)
  1131.         {
  1132.             if ($referencedParentOrder!==null$referencedParentOrder->setChildOrder($this);
  1133.         }
  1134.     }
  1135.     /**
  1136.      * @return mixed
  1137.      */
  1138.     public function getExtraApproaches()
  1139.     {
  1140.         return $this->extraApproaches;
  1141.     }
  1142.     /**
  1143.      * @param mixed $extraApproaches
  1144.      */
  1145.     public function setExtraApproaches($extraApproaches)
  1146.     {
  1147.         $this->extraApproaches $extraApproaches;
  1148.     }
  1149.     /**
  1150.      * @return mixed
  1151.      */
  1152.     public function getExtraLuggage()
  1153.     {
  1154.         return $this->extraLuggage;
  1155.     }
  1156.     /**
  1157.      * @param mixed $extraLuggage
  1158.      */
  1159.     public function setExtraLuggage($extraLuggage)
  1160.     {
  1161.         $this->extraLuggage $extraLuggage;
  1162.     }
  1163.     /**
  1164.      * @return mixed
  1165.      */
  1166.     public function getExtraBicycles()
  1167.     {
  1168.         return $this->extraBicycles;
  1169.     }
  1170.     /**
  1171.      * @param mixed $extraBicycles
  1172.      */
  1173.     public function setExtraBicycles($extraBicycles)
  1174.     {
  1175.         $this->extraBicycles $extraBicycles;
  1176.     }
  1177.     /**
  1178.      * @return mixed
  1179.      */
  1180.     public function getReturnOrderTime()
  1181.     {
  1182.         return $this->returnOrderTime;
  1183.     }
  1184.     /**
  1185.      * @param mixed $returnOrderTime
  1186.      */
  1187.     public function setReturnOrderTime($returnOrderTime)
  1188.     {
  1189.         $this->returnOrderTime $returnOrderTime;
  1190.     }
  1191.     /**
  1192.      * @return mixed
  1193.      */
  1194.     public function getReturnFlightNo()
  1195.     {
  1196.         return $this->returnFlightNo;
  1197.     }
  1198.     /**
  1199.      * @param mixed $returnFlightNo
  1200.      */
  1201.     public function setReturnFlightNo($returnFlightNo)
  1202.     {
  1203.         $this->returnFlightNo $returnFlightNo;
  1204.     }
  1205.     /**
  1206.      * @return mixed
  1207.      */
  1208.     public function getFlightTime()
  1209.     {
  1210.         return $this->flightTime;
  1211.     }
  1212.     /**
  1213.      * @param mixed $flightTime
  1214.      */
  1215.     public function setFlightTime($flightTime)
  1216.     {
  1217.         $this->flightTime $flightTime;
  1218.     }
  1219.     /**
  1220.      * @return mixed
  1221.      */
  1222.     public function getFamilyAdultAddOn()
  1223.     {
  1224.         return $this->familyAdultAddOn;
  1225.     }
  1226.     /**
  1227.      * @param mixed $familyAdultAddOn
  1228.      */
  1229.     public function setFamilyAdultAddOn($familyAdultAddOn)
  1230.     {
  1231.         $this->familyAdultAddOn $familyAdultAddOn;
  1232.     }
  1233.     /**
  1234.      * @return mixed
  1235.      */
  1236.     public function getPersonAsChildrenCount()
  1237.     {
  1238.         return $this->personAsChildrenCount;
  1239.     }
  1240.     /**
  1241.      * @param mixed $personAsChildrenCount
  1242.      */
  1243.     public function setPersonAsChildrenCount($personAsChildrenCount)
  1244.     {
  1245.         $this->personAsChildrenCount $personAsChildrenCount;
  1246.     }
  1247.     /**
  1248.      * @return mixed
  1249.      */
  1250.     public function getAlreadyPaid()
  1251.     {
  1252.         return $this->alreadyPaid;
  1253.     }
  1254.     /**
  1255.      * @param mixed $alreadyPaid
  1256.      */
  1257.     public function setAlreadyPaid($alreadyPaid)
  1258.     {
  1259.         $this->alreadyPaid $alreadyPaid;
  1260.     }
  1261.     /**
  1262.      * @return Payment[]|ArrayCollection
  1263.      */
  1264.     public function getPaymentReference()
  1265.     {
  1266.         return $this->paymentReference;
  1267.     }
  1268.     /**
  1269.      * @param mixed $paymentReference
  1270.      */
  1271.     public function setPaymentReference($paymentReference)
  1272.     {
  1273.         $this->paymentReference $paymentReference;
  1274.     }
  1275.     /**
  1276.      * @return string
  1277.      */
  1278.     public function getConfirmationPin(): string
  1279.     {
  1280.         return $this->confirmationPin;
  1281.     }
  1282.     /**
  1283.      * @param string $confirmationPin
  1284.      */
  1285.     public function setConfirmationPin(string $confirmationPin): void
  1286.     {
  1287.         $this->confirmationPin $confirmationPin;
  1288.     }
  1289.     /**
  1290.      * @return null|CoopMember
  1291.      */
  1292.     public function getAssignedTo()
  1293.     {
  1294.         return $this->assignedTo;
  1295.     }
  1296.     /**
  1297.      * @param null|CoopMember $assignedTo
  1298.      */
  1299.     public function setAssignedTo($assignedTo): void
  1300.     {
  1301.         if ($assignedTo===null)
  1302.         {
  1303.             $this->setJobPdfRequestedOn(null);
  1304.         }
  1305.         else
  1306.         if ( ($this->assignedTo!==null) && ($assignedTo->getId() !== $this->assignedTo->getId()) )
  1307.         {
  1308.             $this->setJobPdfRequestedOn(null);
  1309.         }
  1310.         $this->assignedTo $assignedTo;
  1311.     }
  1312.     /**
  1313.      * @return mixed
  1314.      */
  1315.     public function getVersion()
  1316.     {
  1317.         return $this->version;
  1318.     }
  1319.     /**
  1320.      * @param mixed $version
  1321.      */
  1322.     public function setVersion($version): void
  1323.     {
  1324.         $this->version $version;
  1325.     }
  1326.     /**
  1327.      * @return bool
  1328.      */
  1329.     public function isAssignmentConfirmed(): bool
  1330.     {
  1331.         return $this->assignmentConfirmed;
  1332.     }
  1333.     /**
  1334.      * @param bool $assignmentConfirmed
  1335.      */
  1336.     public function setAssignmentConfirmed(bool $assignmentConfirmed, ?User $assignedUser null): void
  1337.     {
  1338.         $this->assignmentConfirmed $assignmentConfirmed;
  1339.         if ($assignmentConfirmed)
  1340.         {
  1341.             $this->assignmentUser $assignedUser;
  1342.         }
  1343.         else
  1344.         {
  1345.             $this->assignmentUser null;
  1346.         }
  1347.     }
  1348.     /**
  1349.      * @return int
  1350.      */
  1351.     public function getPreferredConfirmationMethod(): int
  1352.     {
  1353.         return $this->preferredConfirmationMethod;
  1354.     }
  1355.     /**
  1356.      * @param int $preferredConfirmationMethod
  1357.      */
  1358.     public function setPreferredConfirmationMethod(int $preferredConfirmationMethod): void
  1359.     {
  1360.         $this->preferredConfirmationMethod $preferredConfirmationMethod;
  1361.     }
  1362.     /**
  1363.      * @return null|Job
  1364.      */
  1365.     public function getJob()
  1366.     {
  1367.         return $this->job;
  1368.     }
  1369.     /**
  1370.      * @param mixed $job
  1371.      */
  1372.     public function setJob($job): void
  1373.     {
  1374.         $this->job $job;
  1375.     }
  1376.     /**
  1377.      * @return mixed
  1378.      */
  1379.     public function getInstantOrderInitiated()
  1380.     {
  1381.         return $this->instantOrderInitiated;
  1382.     }
  1383.     /**
  1384.      * @param mixed $instantOrderInitiated
  1385.      */
  1386.     public function setInstantOrderInitiated($instantOrderInitiated): void
  1387.     {
  1388.         $this->instantOrderInitiated $instantOrderInitiated;
  1389.     }
  1390.     /**
  1391.      * @return mixed
  1392.      */
  1393.     public function getInstantOrderComment()
  1394.     {
  1395.         return $this->instantOrderComment;
  1396.     }
  1397.     /**
  1398.      * @param mixed $instantOrderComment
  1399.      */
  1400.     public function setInstantOrderComment($instantOrderComment): void
  1401.     {
  1402.         $this->instantOrderComment $instantOrderComment;
  1403.     }
  1404.     /**
  1405.      * @return mixed
  1406.      */
  1407.     public function getInstantOrderResponded()
  1408.     {
  1409.         return $this->instantOrderResponded;
  1410.     }
  1411.     /**
  1412.      * @param mixed $instantOrderResponded
  1413.      */
  1414.     public function setInstantOrderResponded($instantOrderResponded): void
  1415.     {
  1416.         $this->instantOrderResponded $instantOrderResponded;
  1417.     }
  1418.     /**
  1419.      * @return mixed
  1420.      */
  1421.     public function getInstantOrderRespondedBy()
  1422.     {
  1423.         return $this->instantOrderRespondedBy;
  1424.     }
  1425.     /**
  1426.      * @param mixed $instantOrderRespondedBy
  1427.      */
  1428.     public function setInstantOrderRespondedBy($instantOrderRespondedBy): void
  1429.     {
  1430.         $this->instantOrderRespondedBy $instantOrderRespondedBy;
  1431.     }
  1432.     /**
  1433.      * @return int
  1434.      */
  1435.     public function getInstantOrderStatus(): int
  1436.     {
  1437.         return $this->instantOrderStatus;
  1438.     }
  1439.     /**
  1440.      * @param int $instantOrderStatus
  1441.      */
  1442.     public function setInstantOrderStatus(int $instantOrderStatus): void
  1443.     {
  1444.         $this->instantOrderStatus $instantOrderStatus;
  1445.     }
  1446.     /**
  1447.      * @return mixed
  1448.      */
  1449.     public function getOrderInitiatedOn()
  1450.     {
  1451.         return $this->orderInitiatedOn;
  1452.     }
  1453.     /**
  1454.      * @param mixed $orderInitiatedOn
  1455.      */
  1456.     public function setOrderInitiatedOn($orderInitiatedOn): void
  1457.     {
  1458.         $this->orderInitiatedOn $orderInitiatedOn;
  1459.     }
  1460.     public function setChildOrder(Order $child)
  1461.     {
  1462.         $exist $this->getChildOrder();
  1463.         if ($exist !== null)
  1464.         {
  1465.             if (($child!==null)&&($exist->getId() === $child->getId()))
  1466.             {
  1467.                 return; // already set
  1468.             }
  1469.             $exist->setReferencedParentOrder(null,false);
  1470.             $this->childOrders->clear();
  1471.         }
  1472.         if ($child !== null)
  1473.         {
  1474.             $this->childOrders->add($child);
  1475.             $child->setReferencedParentOrder($this,false);
  1476.         }
  1477.     }
  1478.     /**
  1479.      * @return Order|null
  1480.      */
  1481.     public function getChildOrder()
  1482.     {
  1483.         if ($this->childOrders->count()>1)
  1484.             throw new \LogicException("Multiple child orders are not supported !");
  1485.         if ($this->childOrders->count()===1)
  1486.             return $this->childOrders->first();
  1487.         return null;
  1488.     }
  1489.     /**
  1490.      * @return string
  1491.      */
  1492.     public function getInternalComment()
  1493.     {
  1494.         return $this->internalComment;
  1495.     }
  1496.     /**
  1497.      * @param string $internalComment
  1498.      */
  1499.     public function setInternalComment(string $internalComment)
  1500.     {
  1501.         $this->internalComment $internalComment;
  1502.     }
  1503.     /**
  1504.      * @return mixed
  1505.      */
  1506.     public function getJobPdfRequestedOn()
  1507.     {
  1508.         return $this->jobPdfRequestedOn;
  1509.     }
  1510.     /**
  1511.      * @param mixed $jobPdfRequestedOn
  1512.      */
  1513.     public function setJobPdfRequestedOn($jobPdfRequestedOn): void
  1514.     {
  1515.         $this->jobPdfRequestedOn $jobPdfRequestedOn;
  1516.     }
  1517.     /**
  1518.      * @return int
  1519.      */
  1520.     public function getAssignmentStatus(): int
  1521.     {
  1522.         return $this->assignmentStatus;
  1523.     }
  1524.     /**
  1525.      * @param int $assignmentStatus
  1526.      */
  1527.     public function setAssignmentStatus(int $assignmentStatus): void
  1528.     {
  1529.         $this->assignmentStatus $assignmentStatus;
  1530.     }
  1531.     /**
  1532.      * @return bool
  1533.      */
  1534.     public function isBlumTransferOnly(): bool
  1535.     {
  1536.         return $this->blumTransferOnly;
  1537.     }
  1538.     /**
  1539.      * @param bool $blumTransferOnly
  1540.      */
  1541.     public function setBlumTransferOnly(bool $blumTransferOnly): void
  1542.     {
  1543.         $this->blumTransferOnly $blumTransferOnly;
  1544.     }
  1545.     /**
  1546.      * @return mixed
  1547.      */
  1548.     public function getXchgStatus()
  1549.     {
  1550.         return $this->xchgStatus;
  1551.     }
  1552.     /**
  1553.      * @param mixed $xchgStatus
  1554.      */
  1555.     public function setXchgStatus($xchgStatus): void
  1556.     {
  1557.         $this->xchgStatus $xchgStatus;
  1558.     }
  1559.     /**
  1560.      * @return mixed
  1561.      */
  1562.     public function getXchgOrderStatus()
  1563.     {
  1564.         return $this->xchgOrderStatus;
  1565.     }
  1566.     /**
  1567.      * @param mixed $xchgOrderStatus
  1568.      */
  1569.     public function setXchgOrderStatus($xchgOrderStatus): void
  1570.     {
  1571.         $this->xchgOrderStatus $xchgOrderStatus;
  1572.     }
  1573.     /**
  1574.      * @return CoopMember|null
  1575.      */
  1576.     public function getXchgTo()
  1577.     {
  1578.         return $this->xchgTo;
  1579.     }
  1580.     /**
  1581.      * @param mixed $xchgTo
  1582.      */
  1583.     public function setXchgTo($xchgTo): void
  1584.     {
  1585.         $this->xchgTo $xchgTo;
  1586.     }
  1587.     /**
  1588.      * @return string
  1589.      */
  1590.     public function getXchgOrderId(): string
  1591.     {
  1592.         return $this->xchgOrderId;
  1593.     }
  1594.     /**
  1595.      * @param string $xchgOrderId
  1596.      */
  1597.     public function setXchgOrderId(string $xchgOrderId): void
  1598.     {
  1599.         $this->xchgOrderId $xchgOrderId;
  1600.     }
  1601.     /**
  1602.      * @return bool
  1603.      */
  1604.     public function isXchgConfirmed(): bool
  1605.     {
  1606.         return $this->xchgConfirmed;
  1607.     }
  1608.     /**
  1609.      * @param bool $xchgConfirmed
  1610.      */
  1611.     public function setXchgConfirmed(bool $xchgConfirmed): void
  1612.     {
  1613.         $this->xchgConfirmed $xchgConfirmed;
  1614.     }
  1615.     /**
  1616.      * @return string
  1617.      */
  1618.     public function getOriginOrderId(): string
  1619.     {
  1620.         return $this->originOrderId;
  1621.     }
  1622.     /**
  1623.      * @param string $originOrderId
  1624.      */
  1625.     public function setOriginOrderId(string $originOrderId): void
  1626.     {
  1627.         $this->originOrderId $originOrderId;
  1628.     }
  1629.     /**
  1630.      * @return User|null
  1631.      */
  1632.     public function getAssignmentUser(): ?User
  1633.     {
  1634.         return $this->assignmentUser;
  1635.     }
  1636.     /**
  1637.      * @return int
  1638.      */
  1639.     public function getCustomerNotificationState(): int
  1640.     {
  1641.         return $this->customerNotificationState;
  1642.     }
  1643.     /**
  1644.      * @param int $customerNotificationState
  1645.      */
  1646.     public function setCustomerNotificationState(int $customerNotificationState): void
  1647.     {
  1648.         $this->customerNotificationState $customerNotificationState;
  1649.     }
  1650.     /**
  1651.      * @return string
  1652.      */
  1653.     public function getViewSecret(): string
  1654.     {
  1655.         return $this->viewSecret;
  1656.     }
  1657.     /**
  1658.      * @param string $viewSecret
  1659.      */
  1660.     public function setViewSecret(string $viewSecret): void
  1661.     {
  1662.         $this->viewSecret $viewSecret;
  1663.     }
  1664.     /**
  1665.      * @return ?float
  1666.      */
  1667.     public function getDiscount(): ?float
  1668.     {
  1669.         return $this->discount;
  1670.     }
  1671.     /**
  1672.      * @param float $discount
  1673.      */
  1674.     public function setDiscount(?float $discount): void
  1675.     {
  1676.         $this->discount $discount;
  1677.     }
  1678.     public function getDispatchCategory(): ?string
  1679.     {
  1680.         return $this->dispatchCategory;
  1681.     }
  1682.     public function setDispatchCategory(?string $dispatchCategory): void
  1683.     {
  1684.         $this->dispatchCategory $dispatchCategory;
  1685.     }
  1686.     public function isApplicantTimeRide(): bool
  1687.     {
  1688.         return $this->applicantTimeRide;
  1689.     }
  1690.     public function setApplicantTimeRide(bool $applicantTimeRide): void
  1691.     {
  1692.         $this->applicantTimeRide $applicantTimeRide;
  1693.     }
  1694.     public function getPaymentSecret(): string
  1695.     {
  1696.         return $this->paymentSecret ?? "null";
  1697.     }
  1698.     public function setPaymentSecret(string $paymentSecret): void
  1699.     {
  1700.         $this->paymentSecret $paymentSecret;
  1701.     }
  1702. }