src/Diplix/KMGBundle/Entity/Accounting/Job.php line 16

Open in your IDE?
  1. <?php
  2. namespace Diplix\KMGBundle\Entity\Accounting;
  3. use Diplix\KMGBundle\Entity\Address;
  4. use Diplix\KMGBundle\Entity\BasicEntity;
  5. use Diplix\KMGBundle\Entity\Customer;
  6. use Diplix\KMGBundle\Entity\Order;
  7. use Diplix\KMGBundle\Repository\JobRepository;
  8. use Diplix\KMGBundle\Service\Accounting\PaymentCalculator;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Table(name="acc_jobs", indexes={@ORM\Index(name="be_deleted",columns={"be_deleted"})})
  12.  * @ORM\Entity(repositoryClass="Diplix\KMGBundle\Repository\JobRepository")
  13.  */
  14. class Job extends BasicEntity
  15. {
  16.     const GENERATED 'generated';
  17.     const IMPORTED 'imported';
  18.     const UNKNOWN 'unknown';
  19.     public static $sourceMap = [
  20.         self::GENERATED => 'automatisch angelegt',
  21.         self::IMPORTED => 'importiert',
  22.         self::UNKNOWN => 'unbekannt'
  23.     ];
  24.     public const RS_MIETWAGEN 'm';
  25.     public const RS_TAXI 't';
  26.     public static $rsMap = [
  27.         self::RS_MIETWAGEN => "Mietwagen",
  28.         self::RS_TAXI => "Taxi"
  29.     ];
  30.     /**
  31.      * @ORM\Column(type="integer",name="id")
  32.      * @ORM\Id()
  33.      * @ORM\GeneratedValue(strategy="AUTO")
  34.      */
  35.     protected $id;
  36.     /**
  37.      * the tami order number
  38.      * @ORM\Column(type="string")
  39.      */
  40.     protected $orderNumber;
  41.     /**
  42.      * @ORM\Column(type="datetime")
  43.      */
  44.     protected $orderTime;
  45.     /**
  46.      * @ORM\Column(type="string")
  47.      */
  48.     protected $customerName;
  49.     /**
  50.      * @ORM\Column(type="string")
  51.      */
  52.     protected $originQuick;
  53.     /**
  54.      * @ORM\Column(type="string")
  55.      */
  56.     protected $originStreet;
  57.     /**
  58.      * @ORM\Column(type="string")
  59.      */
  60.     protected $originNumber;
  61.     /**
  62.      * @ORM\Column(type="string")
  63.      */
  64.     protected $originZip;
  65.     /**
  66.      * @ORM\Column(type="string")
  67.      */
  68.     protected $originCity;
  69.     /**
  70.      * @ORM\Column(type="string")
  71.      */
  72.     protected $destinationQuick;
  73.     /**
  74.      * @ORM\Column(type="string")
  75.      */
  76.     protected $destinationStreet;
  77.     /**
  78.      * @ORM\Column(type="string")
  79.      */
  80.     protected $destinationNumber;
  81.     /**
  82.      * @ORM\Column(type="string")
  83.      */
  84.     protected $destinationZip;
  85.     /**
  86.      * @ORM\Column(type="string")
  87.      */
  88.     protected $destinationCity;
  89.     /**
  90.      * @ORM\Column(type="integer")
  91.      */
  92.     protected $personCount;
  93.     /**
  94.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":true})
  95.      */
  96.     protected $distanceKm;
  97.     /**
  98.      * @ORM\Column(type="decimal", precision=12, scale=2,options={"unsigned":true})
  99.      */
  100.     protected $waitTime;
  101.     /**
  102.      * @ORM\Column(type="string")
  103.      */
  104.     protected $paymentType;
  105.     /**
  106.      * @ORM\Column(type="decimal", nullable=false, precision=12, scale=2,options={"unsigned":false})
  107.      */
  108.     protected $price;
  109.     /**
  110.      * @ORM\Column(type="integer")
  111.      */
  112.     protected $carId;
  113.     /**
  114.      * @ORM\Column(type="integer")
  115.      */
  116.     protected $driverId;
  117.     /**
  118.      * @ORM\Column(type="text")
  119.      */
  120.     protected $info;
  121.     /**
  122.      * @ORM\Column(type="string")
  123.      */
  124.     protected $costCenter;
  125.     /**
  126.      * @ORM\Column(type="datetime",nullable=true)
  127.      */
  128.     protected $jobReceivedTime;
  129.     /**
  130.      * @ORM\Column(type="datetime",nullable=true)
  131.      */
  132.     protected $jobStartTime;
  133.     /**
  134.      * @ORM\Column(type="datetime",nullable=true)
  135.      */
  136.     protected $jobDoneTime;
  137.     /**
  138.      * @ORM\Column(type="integer")
  139.      */
  140.     protected $jobDuration;
  141.     /**
  142.      * @ORM\Column(type="integer")
  143.      */
  144.     protected $relType;
  145.     /**
  146.      * @ORM\Column(type="string")
  147.      */
  148.     protected $relId='';
  149.     /**
  150.      * @ORM\Column(type="string")
  151.      */
  152.     protected $options '';
  153.     /**
  154.      * @ORM\Column(type="json")
  155.      */
  156.     protected $waypoints = [];
  157.     /**
  158.      * @ORM\Column(type="string")
  159.      */
  160.     protected $source self::UNKNOWN;
  161.     /////////////////////////////////////////////////////////////////////////////////////////////
  162.     /**
  163.      * @ORM\Column(type="boolean")
  164.      */
  165.     protected $approvedByDriver false;
  166.     /**
  167.      * @ORM\Column(type="boolean")
  168.      */
  169.     protected $approvedByPassenger false;
  170.     /**
  171.      * @ORM\Column(type="boolean")
  172.      */
  173.     protected $approvedByAccounting false;
  174.     /**
  175.      * @ORM\Column(type="string")
  176.      */
  177.     protected $confirmationPin '';
  178.     /**
  179.      * @ORM\Column(type="boolean")
  180.      */
  181.     protected $readyForBilling false;
  182.     /**
  183.      * @ORM\Column(type="json")
  184.      */
  185.     protected $lastReadyForBillingCheckResult = [];
  186.     /**
  187.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Accounting\BillingForMember", inversedBy="jobList", fetch="EAGER")
  188.      * @ORM\JoinColumn(nullable=true)
  189.      */
  190.     protected $billingForMember;
  191.     /**
  192.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Accounting\BillingForCustomer", inversedBy="jobList", fetch="EAGER")
  193.      * @ORM\JoinColumn(nullable=true)
  194.      */
  195.     protected $billingForCustomer;
  196.     /**
  197.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Accounting\CoopMember")
  198.      * @ORM\JoinColumn(nullable=true)
  199.      */
  200.     protected $member;
  201.     /**
  202.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\Customer")
  203.      * @ORM\JoinColumn(nullable=true)
  204.      */
  205.     protected $customer;
  206.     /**
  207.      * @ORM\Column(type="time",nullable=true)
  208.      */
  209.     protected $flightOnPositionTime;
  210.     /**
  211.      * @ORM\Column(type="time", nullable=true)
  212.      */
  213.     protected $departureAtOriginTime;
  214.     /**
  215.      * @ORM\Column(type="time", nullable=true)
  216.      */
  217.     protected $arrivalAtDestinationTime;
  218.     /**
  219.      * @ORM\Column(type="text")
  220.      */
  221.     protected $extraCostName '';
  222.     /**
  223.      * @ORM\Column(type="decimal",precision=6, scale=2)
  224.      */
  225.     protected $extraCostPrice 0.0;
  226.     /**
  227.      * @ORM\Column(type="json")
  228.      */
  229.     protected $accMemberRates = [];
  230.     /**
  231.      * @ORM\Column(type="decimal",precision=6, scale=2)
  232.      */
  233.     protected $accMemberManualRate 0.0;
  234.     /**
  235.      * @ORM\Column(type="json")
  236.      */
  237.     protected $accCustomerRates = [];
  238.     /**
  239.      * @ORM\Column(type="decimal",precision=6, scale=2)
  240.      */
  241.     protected $accCustomerManualRate 0.0;
  242.     /**
  243.      * @ORM\OneToOne(targetEntity="Diplix\KMGBundle\Entity\Order", inversedBy="job")
  244.      * @ORM\JoinColumn(nullable=true)
  245.      * @var Order
  246.      */
  247.     protected $knownOrder;
  248.     /**
  249.      * @ORM\Column(type="string")
  250.      */
  251.     protected $detectedFFL PaymentCalculator::NONE;
  252.     /**
  253.      * @ORM\Column(type="integer")
  254.      */
  255.     protected $actualKm 0;
  256.     /**
  257.      * @ORM\Column(type="decimal", nullable=false, precision=7, scale=2,options={"unsigned":false})
  258.      */
  259.     protected $totalCustomerNet 0.0;
  260.     /**
  261.      * @ORM\Column(type="decimal", nullable=false, precision=7, scale=2,options={"unsigned":false})
  262.      */
  263.     protected $totalMemberNet 0.0;
  264.     /**
  265.      * @ORM\Column(type="json")
  266.      */
  267.     protected $customerCalculationItems = [];
  268.     /**
  269.      * @ORM\Column(type="json")
  270.      */
  271.     protected $memberCalculationItems = [];
  272.     /**
  273.      * @ORM\Column(type="decimal", nullable=true, precision=3, scale=2,options={"unsigned":false})
  274.      */
  275.     protected $memberCalcForceTaxRate null;
  276.     /**
  277.      * @ORM\Column(type="decimal", nullable=false, precision=7, scale=2,options={"unsigned":false})
  278.      */
  279.     protected $taxameter 0.0;
  280.     /**
  281.      * @ORM\Column(type="decimal", nullable=false, precision=3, scale=2,options={"unsigned":false})
  282.      */
  283.     protected $taxameterVat 0.07;  // 1 = 100%
  284.     /**
  285.      * @ORM\Column(type="boolean")
  286.      */
  287.     protected $passengerNotMet false;
  288.     /**
  289.      * @ORM\Column(type="boolean")
  290.      */
  291.     protected $fflCombinationRide false;
  292.     /**
  293.      * @ORM\Column(type="boolean")
  294.      */
  295.     protected $werksRundfahrt false;
  296.     /**
  297.      * @ORM\Column(type="boolean")
  298.      */
  299.     protected $discarded false;
  300.     /**
  301.      * @ORM\Column(type="boolean")
  302.      */
  303.     protected $extraWaitingTimeRide false;
  304.     /**
  305.      * @ORM\Column(type="integer")
  306.      * in minutes
  307.      */
  308.     protected $extraWaitingTime 0;
  309.     /**
  310.      * @ORM\Column(type="boolean")
  311.      */
  312.     protected $applicantTimeRide false;
  313.     /**
  314.      * @ORM\Column(type="integer")
  315.      * in minutes
  316.      */
  317.     protected $applicantTime 0;
  318.     /**
  319.      * @ORM\Column(type="boolean", options={"default":"0"})
  320.      */
  321.     protected $disablePricelistCalculation false;
  322.     /**
  323.      * @ORM\Column(type="boolean", options={"default":"0"})
  324.      */
  325.     protected $disableTaxameterForCustomer false;
  326.     /**
  327.      * @ORM\Column(type="boolean", options={"default":"0"})
  328.      */
  329.     protected $hasMemberExtraKm false;
  330.     /**
  331.      * @ORM\Column(type="integer")
  332.      */
  333.     protected $memberExtraKm 0;
  334.     /**
  335.      * @ORM\Column(type="datetime", nullable=true)
  336.      */
  337.     protected $lastChangeByMember null;
  338.     /**
  339.      * @ORM\Column(type="boolean", options={"default":"0"})
  340.      */
  341.     protected $instantRide false;
  342.     /**
  343.      * @ORM\Column(type="integer", options={"default":"0"})
  344.      */
  345.     protected $instantRideAdditionalWaitingTime 0;
  346.     /**
  347.      * @ORM\ManyToOne(targetEntity="Diplix\KMGBundle\Entity\File", fetch="EAGER")
  348.      * @ORM\JoinColumn(referencedColumnName="id",nullable=true)
  349.      */
  350.     protected $customerSignature;
  351.     /**
  352.      * @ORM\Column(type="integer",options={"default":"0"})
  353.      * @see Order::CM_xxxxxxx
  354.      */
  355.     protected $confirmedByCustomerThrough 0;
  356.     /**
  357.      * @ORM\Column(type="boolean", options={"default":"0"})
  358.      */
  359.     protected $ignoreForCustomer false;
  360.     /**
  361.      * @ORM\Column(type="boolean", options={"default":"0"})
  362.      */
  363.     protected $ignoreForMember false;
  364.     /**
  365.      * @ORM\Column(type="boolean", options={"default":"0"})
  366.      */
  367.     protected $recalculateCustomerPrice false;
  368.     /**
  369.      * @ORM\Column(type="string", options={"length":"1","default":"m"})
  370.      */
  371.     protected $rideStyle self::RS_MIETWAGEN;
  372.     /**
  373.      * @ORM\Column(type="json")
  374.      * @var array|string[]
  375.      */
  376.     protected $controlling = [];
  377.     /**
  378.      * @ORM\Column(type="boolean", options={"default":"0"})
  379.      */
  380.     protected $customerStorno false;
  381.     /**
  382.      * @ORM\Column(type="integer", options={"default":"0"})
  383.      */
  384.     protected $SLC 0// SoLei Chauffeur Serv
  385.     /**
  386.      * @ORM\Column(type="integer", options={"default":"0"})
  387.      */
  388.     protected $VVC 0// Vertrg Vorst Chauff
  389.     /**
  390.      * @ORM\OneToOne(targetEntity="Job", inversedBy="combiRideChild")
  391.      */
  392.     protected $combiRideParent// parent = ride which took place before self
  393.     /**
  394.      * @ORM\OneToOne(targetEntity="Job", mappedBy="combiRideParent")
  395.      */
  396.     protected $combiRideChild// child = ride which took place after self
  397.     public const CAS_NEW 0;
  398.     public const CAS_AUTO 1;
  399.     public const CAS_MANUAL 2;
  400.     /**
  401.      * @ORM\Column(type="integer", options={"default":"0"})
  402.      */
  403.     protected $combiAssignmentState self::CAS_NEW;
  404.     /**
  405.      * @ORM\Column(type="boolean", options={"default":"0"})
  406.      */
  407.     protected $optSubCustomerNet false;
  408.     /**
  409.      * @ORM\Column(type="boolean", options={"default":"0"})
  410.      */
  411.     protected $optNoExtrasForCustomer false;
  412.     /**
  413.      * @ORM\Column(type="boolean", options={"default":"0"})
  414.      */
  415.     protected $optAddChargeForCustomer false;
  416.     //////////////////////////////////////////////////////////////////////////////////////
  417.     /*
  418.      *  convert from array[] to JobCalcItem[]
  419.      */
  420.     public static function toJciArray(array $list)
  421.     {
  422.         $ro = [];
  423.         foreach ( $list as $row)
  424.         {
  425.             $ro[]= JobCalcItem::fromArray($row);
  426.         }
  427.         return $ro;
  428.     }
  429.     /**
  430.      * convert from JobCalcItem[] / Waypoint[] to array[]
  431.      * Note: fails with non-utf8 data
  432.      */
  433.     public static function fromObjectArray(array $list)
  434.     {
  435.         return json_decode(json_encode($list), true); // ugly way to convert array of object to array of assoc-array
  436.     }
  437.     /*
  438.      *  convert from array[] to Waypoint[]
  439.      */
  440.     public static function toWaypointArray(array $list)
  441.     {
  442.         $ro = [];
  443.         foreach ( $list as $row)
  444.         {
  445.             $ro[]= Waypoint::fromArray($row);
  446.         }
  447.         return $ro;
  448.     }
  449.     /**
  450.      * @param $date \DateTime|null
  451.      * @param $master \DateTime|null
  452.      * @return \DateTime|null
  453.      * @throws \Exception
  454.      * @deprecated
  455.      */
  456.     public static function ensureTimeWindow($date,$master)
  457.     {
  458.         if (($date===null)||($master===null)) return $date;
  459.         // a very plain way to ensure the right time window (time-only is initialized with 1.1.1970), we can safely ignore offsets/timezone
  460.         $diff abs($date->getTimestamp() - $master->getTimestamp());
  461.         if ($diff 86400// if date differs more then one day, fix it to same day
  462.         {
  463.             $date = new \DateTime($master->format('Y-m-d ')  .' '$date->format('H:i:s') );
  464.         }
  465.         return $date;
  466.     }
  467.     public function updateFromOrder(Order $order)
  468.     {
  469.         if ( ($this->knownOrder!==null)&& ($order->getId() !== $this->knownOrder->getId()) )
  470.             throw new \RuntimeException('Logic error');
  471.         // copy data
  472.         $job $this;
  473.         $job->setConfirmationPin($order->getConfirmationPin());
  474.         $job->setOrderNumber($order->getRemoteOrderId()); // the Job::orderNumber is the one from tami which is the same as Order::remoteOrderId
  475.         $job->setOrderTime($order->getOrderTime());
  476.         $job->setCustomer($order->getCustomer());
  477.         $job->setCustomerName($order->getCustomer() !== null $order->getCustomer()->getName() : '???' );
  478.         $adr $order->getAddressList()->toArray();
  479.         $adr array_filter($adr, function(Address $a) {
  480.            return !$a->getBeDeleted();
  481.         });
  482.         /** @var Address $origin */
  483.         $origin reset($adr);
  484.         /** @var Address $destination */
  485.         if (count($adr)<2)
  486.             throw new \Exception('Destination missing');
  487.         $destination end($adr);
  488.         $job->setWaypointsarray_valuesarray_map( function( Address $a) { return Waypoint::fromAddress($a); } , $adr) ) ); // need array_values for force re-indexing in correct order
  489.         $job->setOriginQuick($origin->getName());
  490.         $job->setOriginStreet($origin->getStreet());
  491.         $job->setOriginNumber($origin->getNumber());
  492.         $job->setOriginZip($origin->getZipCode());
  493.         $job->setOriginCity($origin->getCity());
  494.         $job->setDestinationQuick($destination->getName());
  495.         $job->setDestinationStreet($destination->getStreet());
  496.         $job->setDestinationNumber($destination->getNumber());
  497.         $job->setDestinationZip($destination->getZipCode());
  498.         $job->setDestinationCity($destination->getCity());
  499.         $job->setPersonCount($order->getPersonCount());
  500.         $job->setDistanceKm($order->getLastEstimatedDistance());
  501.         $job->setPrice($order->getLastEstimatedPrice());
  502.         $job->setPaymentType(  $order->getPaymentType()!==null $order->getPaymentType()->getName() : '');
  503.         $job->setInfo($order->getComment());
  504.         $job->setCostCenter($order->getCostCenter());
  505.         // ->setMember() is handled via OrderHandler::syncMemberFromOrderToJobIfRequired
  506.         // post-process
  507.         $job->setDetectedFFLPaymentCalculator::detectFFL($job) );
  508.         $job->setActualKm$job->getDistanceKm() );
  509.         $wrapper = [ $job ];
  510.         JobRepository::setupAssumptions$wrapper );
  511.     }
  512.     public static function createForOrder(Order $order)
  513.     {
  514.         $job = new Job(self::GENERATED);
  515.         $job->setCarId(0);
  516.         $job->setDriverId(0);
  517.         $job->setRelType(0);
  518.         $job->setJobDuration(0);
  519.         $job->setWaitTime(0);
  520.         $job->setKnownOrder($order);
  521.         $job->updateFromOrder($order);
  522.         return $job;
  523.     }
  524.     public function getTotalFor($audience)
  525.     {
  526.         if ($audience===Billing::TYPE_MEMBER)
  527.             return $this->getTotalMemberNet();
  528.         if ($audience===Billing::TYPE_CUSTOMER)
  529.             return $this->getTotalCustomerNet();
  530.         throw new \RuntimeException('Unknown audience');
  531.     }
  532.     /**
  533.      * Return net/vat parts as array [ vat*100 => [ 'net' => x, 'vat' => y ] ]
  534.      * @param $audience
  535.      * @return array
  536.      */
  537.     public function getVatPartsFor($audience)
  538.     {
  539.         $items $this->getCalcItemsFor($audience);
  540.         $parts = [];
  541.         $empty = ['net' => 0'vat' => 0];
  542.         /** @var JobCalcItem $it */
  543.         foreach ($items as $it)
  544.         {
  545.             $v = (int)($it->vat 100); // float array keys get truncated to int
  546.             if (!array_key_exists($v,$parts)) $parts[$v] = $empty;
  547.             $parts[$v] ['vat'] += $it->vat $it->totalNet;
  548.             $parts[$v] ['net'] += $it->totalNet;
  549.         }
  550.         return $parts;
  551.     }
  552.     /**
  553.      * @param $audience
  554.      * @return array|JobCalcItem[]
  555.      */
  556.     public function getCalcItemsFor($audience)
  557.     {
  558.         if ($audience===Billing::TYPE_MEMBER)
  559.             return $this->getMemberCalculationItems();
  560.         if ($audience===Billing::TYPE_CUSTOMER)
  561.             return $this->getCustomerCalculationItems();
  562.         throw new \RuntimeException('Unknown audience');
  563.     }
  564.     public function __construct($source self::UNKNOWN)
  565.     {
  566.         $this->confirmationPin Order::generatePin();
  567.         $this->source $source;
  568.     }
  569.     /*
  570.      * @return mixed
  571.      */
  572.     public function getId()
  573.     {
  574.         return $this->id;
  575.     }
  576.     /**
  577.      * @return mixed
  578.      */
  579.     public function getOrderNumber()
  580.     {
  581.         return $this->orderNumber;
  582.     }
  583.     /**
  584.      * @param mixed $orderNumber
  585.      */
  586.     public function setOrderNumber($orderNumber)
  587.     {
  588.         $this->orderNumber $orderNumber;
  589.     }
  590.     /**
  591.      * @return \DateTime
  592.      */
  593.     public function getOrderTime()
  594.     {
  595.         return $this->orderTime;
  596.     }
  597.     /**
  598.      * @param mixed $orderTime
  599.      */
  600.     public function setOrderTime($orderTime)
  601.     {
  602.         /** @noinspection TypeUnsafeComparisonInspection */
  603.         if ($orderTime != $this->orderTime)
  604.             $this->orderTime $orderTime;
  605.     }
  606.     /**
  607.      * @return mixed
  608.      */
  609.     public function getOriginQuick()
  610.     {
  611.         return $this->originQuick;
  612.     }
  613.     /**
  614.      * @param mixed $originQuick
  615.      */
  616.     public function setOriginQuick($originQuick)
  617.     {
  618.         $this->originQuick $originQuick;
  619.     }
  620.     /**
  621.      * @return mixed
  622.      */
  623.     public function getOriginStreet()
  624.     {
  625.         return $this->originStreet;
  626.     }
  627.     /**
  628.      * @param mixed $originStreet
  629.      */
  630.     public function setOriginStreet($originStreet)
  631.     {
  632.         $this->originStreet $originStreet;
  633.     }
  634.     /**
  635.      * @return mixed
  636.      */
  637.     public function getOriginNumber()
  638.     {
  639.         return $this->originNumber;
  640.     }
  641.     /**
  642.      * @param mixed $originNumber
  643.      */
  644.     public function setOriginNumber($originNumber)
  645.     {
  646.         $this->originNumber $originNumber;
  647.     }
  648.     /**
  649.      * @return mixed
  650.      */
  651.     public function getOriginZip()
  652.     {
  653.         return $this->originZip;
  654.     }
  655.     /**
  656.      * @param mixed $originZip
  657.      */
  658.     public function setOriginZip($originZip)
  659.     {
  660.         $this->originZip $originZip;
  661.     }
  662.     /**
  663.      * @return mixed
  664.      */
  665.     public function getOriginCity()
  666.     {
  667.         return $this->originCity;
  668.     }
  669.     /**
  670.      * @param mixed $originCity
  671.      */
  672.     public function setOriginCity($originCity)
  673.     {
  674.         $this->originCity $originCity;
  675.     }
  676.     /**
  677.      * @return mixed
  678.      */
  679.     public function getDestinationQuick()
  680.     {
  681.         return $this->destinationQuick;
  682.     }
  683.     /**
  684.      * @param mixed $destinationQuick
  685.      */
  686.     public function setDestinationQuick($destinationQuick)
  687.     {
  688.         $this->destinationQuick $destinationQuick;
  689.     }
  690.     /**
  691.      * @return mixed
  692.      */
  693.     public function getDestinationStreet()
  694.     {
  695.         return $this->destinationStreet;
  696.     }
  697.     /**
  698.      * @param mixed $destinationStreet
  699.      */
  700.     public function setDestinationStreet($destinationStreet)
  701.     {
  702.         $this->destinationStreet $destinationStreet;
  703.     }
  704.     /**
  705.      * @return mixed
  706.      */
  707.     public function getDestinationNumber()
  708.     {
  709.         return $this->destinationNumber;
  710.     }
  711.     /**
  712.      * @param mixed $destinationNumber
  713.      */
  714.     public function setDestinationNumber($destinationNumber)
  715.     {
  716.         $this->destinationNumber $destinationNumber;
  717.     }
  718.     /**
  719.      * @return mixed
  720.      */
  721.     public function getDestinationZip()
  722.     {
  723.         return $this->destinationZip;
  724.     }
  725.     /**
  726.      * @param mixed $destinationZip
  727.      */
  728.     public function setDestinationZip($destinationZip)
  729.     {
  730.         $this->destinationZip $destinationZip;
  731.     }
  732.     /**
  733.      * @return mixed
  734.      */
  735.     public function getDestinationCity()
  736.     {
  737.         return $this->destinationCity;
  738.     }
  739.     /**
  740.      * @param mixed $destinationCity
  741.      */
  742.     public function setDestinationCity($destinationCity)
  743.     {
  744.         $this->destinationCity $destinationCity;
  745.     }
  746.     /**
  747.      * @return mixed
  748.      */
  749.     public function getPersonCount()
  750.     {
  751.         return $this->personCount;
  752.     }
  753.     /**
  754.      * @param mixed $personCount
  755.      */
  756.     public function setPersonCount($personCount)
  757.     {
  758.         $this->personCount $personCount;
  759.     }
  760.     /**
  761.      * @return mixed
  762.      */
  763.     public function getDistanceKm()
  764.     {
  765.         return $this->distanceKm;
  766.     }
  767.     /**
  768.      * @param mixed $distanceKm
  769.      */
  770.     public function setDistanceKm($distanceKm)
  771.     {
  772.         $this->distanceKm $distanceKm;
  773.     }
  774.     /**
  775.      * @return mixed
  776.      */
  777.     public function getWaitTime()
  778.     {
  779.         return $this->waitTime;
  780.     }
  781.     /**
  782.      * @param mixed $waitTime
  783.      */
  784.     public function setWaitTime($waitTime)
  785.     {
  786.         $this->waitTime $waitTime;
  787.     }
  788.     /**
  789.      * @return mixed
  790.      */
  791.     public function getPaymentType()
  792.     {
  793.         return $this->paymentType;
  794.     }
  795.     /**
  796.      * @param mixed $paymentType
  797.      */
  798.     public function setPaymentType($paymentType)
  799.     {
  800.         $this->paymentType $paymentType;
  801.     }
  802.     /**
  803.      * @return mixed
  804.      */
  805.     public function getPrice()
  806.     {
  807.         return $this->price;
  808.     }
  809.     /**
  810.      * @param mixed $price
  811.      */
  812.     public function setPrice($price)
  813.     {
  814.         $this->price $price;
  815.     }
  816.     /**
  817.      * @return mixed
  818.      */
  819.     public function getCarId()
  820.     {
  821.         return $this->carId;
  822.     }
  823.     /**
  824.      * @param mixed $carId
  825.      */
  826.     public function setCarId($carId)
  827.     {
  828.         $this->carId $carId;
  829.     }
  830.     /**
  831.      * @return mixed
  832.      */
  833.     public function getDriverId()
  834.     {
  835.         return $this->driverId;
  836.     }
  837.     /**
  838.      * @param mixed $driverId
  839.      */
  840.     public function setDriverId($driverId)
  841.     {
  842.         $this->driverId $driverId;
  843.     }
  844.     /**
  845.      * @return mixed
  846.      */
  847.     public function getInfo()
  848.     {
  849.         return $this->info;
  850.     }
  851.     /**
  852.      * @param mixed $info
  853.      */
  854.     public function setInfo($info)
  855.     {
  856.         $this->info $info;
  857.     }
  858.     /**
  859.      * @return mixed
  860.      */
  861.     public function getCostCenter()
  862.     {
  863.         return $this->costCenter;
  864.     }
  865.     /**
  866.      * @param mixed $costCenter
  867.      */
  868.     public function setCostCenter($costCenter)
  869.     {
  870.         $this->costCenter $costCenter;
  871.     }
  872.     /**
  873.      * @return mixed
  874.      */
  875.     public function getJobReceivedTime()
  876.     {
  877.         return $this->jobReceivedTime;
  878.     }
  879.     /**
  880.      * @param mixed $jobReceivedTime
  881.      */
  882.     public function setJobReceivedTime($jobReceivedTime)
  883.     {
  884.         /** @noinspection TypeUnsafeComparisonInspection */
  885.         if ($jobReceivedTime != $this->jobReceivedTime// to prevent doctrine from updating when the date is the same but in a new instance
  886.             $this->jobReceivedTime $jobReceivedTime;
  887.     }
  888.     /**
  889.      * @return mixed
  890.      */
  891.     public function getJobStartTime()
  892.     {
  893.         return $this->jobStartTime;
  894.     }
  895.     /**
  896.      * @param mixed $jobStartTime
  897.      */
  898.     public function setJobStartTime($jobStartTime)
  899.     {
  900.         /** @noinspection TypeUnsafeComparisonInspection */
  901.         if ($jobStartTime != $this->jobStartTime)
  902.             $this->jobStartTime $jobStartTime;
  903.     }
  904.     /**
  905.      * @return mixed
  906.      */
  907.     public function getJobDoneTime()
  908.     {
  909.         return $this->jobDoneTime;
  910.     }
  911.     /**
  912.      * @param mixed $jobDoneTime
  913.      */
  914.     public function setJobDoneTime($jobDoneTime)
  915.     {
  916.         /** @noinspection TypeUnsafeComparisonInspection */
  917.         if ($jobDoneTime != $this->jobDoneTime)
  918.             $this->jobDoneTime $jobDoneTime;
  919.     }
  920.     /**
  921.      * @return mixed
  922.      */
  923.     public function getJobDuration()
  924.     {
  925.         return $this->jobDuration;
  926.     }
  927.     /**
  928.      * @param mixed $jobDuration
  929.      */
  930.     public function setJobDuration($jobDuration)
  931.     {
  932.         $this->jobDuration $jobDuration;
  933.     }
  934.     /**
  935.      * @return mixed
  936.      */
  937.     public function getRelType()
  938.     {
  939.         return $this->relType;
  940.     }
  941.     /**
  942.      * @param mixed $relType
  943.      */
  944.     public function setRelType($relType)
  945.     {
  946.         $this->relType $relType;
  947.     }
  948.     /**
  949.      * @return mixed
  950.      */
  951.     public function getRelId()
  952.     {
  953.         return $this->relId;
  954.     }
  955.     /**
  956.      * @param mixed $relId
  957.      */
  958.     public function setRelId($relId)
  959.     {
  960.         $this->relId $relId;
  961.     }
  962.     /**
  963.      * @return mixed
  964.      */
  965.     public function getCustomerName()
  966.     {
  967.         return $this->customerName;
  968.     }
  969.     /**
  970.      * @param mixed $customerName
  971.      */
  972.     public function setCustomerName($customerName)
  973.     {
  974.         $this->customerName $customerName;
  975.     }
  976.     /**
  977.      * @return mixed
  978.      */
  979.     public function getFlightOnPositionTime()
  980.     {
  981.         return $this->flightOnPositionTime;
  982.     }
  983.     /**
  984.      * @param mixed $flightOnPositionTime
  985.      */
  986.     public function setFlightOnPositionTime($flightOnPositionTime)
  987.     {
  988.         $this->flightOnPositionTime $flightOnPositionTime;
  989.     }
  990.     /**
  991.      * @return \DateTime|null
  992.      */
  993.     public function getDepartureAtOriginTime()
  994.     {
  995.         return $this->departureAtOriginTime;
  996.     }
  997.     /**
  998.      * @param mixed $departureAtOriginTime
  999.      */
  1000.     public function setDepartureAtOriginTime($departureAtOriginTime)
  1001.     {
  1002.         $this->departureAtOriginTime $departureAtOriginTime;
  1003.     }
  1004.     /**
  1005.      * @return mixed
  1006.      */
  1007.     public function getExtraCostName()
  1008.     {
  1009.         return $this->extraCostName;
  1010.     }
  1011.     /**
  1012.      * @param mixed $extraCostName
  1013.      */
  1014.     public function setExtraCostName($extraCostName)
  1015.     {
  1016.         $this->extraCostName $extraCostName;
  1017.     }
  1018.     /**
  1019.      * @return mixed
  1020.      */
  1021.     public function getExtraCostPrice()
  1022.     {
  1023.         return $this->extraCostPrice;
  1024.     }
  1025.     /**
  1026.      * @param mixed $extraCostPrice
  1027.      */
  1028.     public function setExtraCostPrice($extraCostPrice)
  1029.     {
  1030.         $this->extraCostPrice $extraCostPrice;
  1031.     }
  1032.     /**
  1033.      * @param $audience string Billing::TYPE_CUSTOMER or Billing::TYPE_MEMBER
  1034.      * @return mixed
  1035.      */
  1036.     public function isBilled($audience)
  1037.     {
  1038.         if ($audience===Billing::TYPE_MEMBER)
  1039.             return ($this->billingForMember !== null);
  1040.         else
  1041.         if ($audience===Billing::TYPE_CUSTOMER)
  1042.             return ($this->billingForCustomer !== null);
  1043.         else
  1044.             throw new \RuntimeException('Unknown audience. has to be TYPE_MEMBER or TYPE_CUSTOMER');
  1045.     }
  1046.     /**
  1047.      * @return CoopMember|null
  1048.      */
  1049.     public function getMember()
  1050.     {
  1051.         return $this->member;
  1052.     }
  1053.     /**
  1054.      * @param mixed $member
  1055.      */
  1056.     public function setMember($member)
  1057.     {
  1058.         $this->member $member;
  1059.     }
  1060.     /**
  1061.      * @return \DateTime|null
  1062.      */
  1063.     public function getArrivalAtDestinationTime()
  1064.     {
  1065.         return $this->arrivalAtDestinationTime;
  1066.     }
  1067.     /**
  1068.      * @param mixed $arrivalAtDestinationTime
  1069.      */
  1070.     public function setArrivalAtDestinationTime($arrivalAtDestinationTime)
  1071.     {
  1072.         $this->arrivalAtDestinationTime $arrivalAtDestinationTime;
  1073.     }
  1074.     /**
  1075.      * @return Customer|null
  1076.      */
  1077.     public function getCustomer()
  1078.     {
  1079.         return $this->customer;
  1080.     }
  1081.     /**
  1082.      * @param mixed $customer
  1083.      */
  1084.     public function setCustomer($customer)
  1085.     {
  1086.         $this->customer $customer;
  1087.     }
  1088.     /**
  1089.      * @return array
  1090.      */
  1091.     public function getAccMemberRates()
  1092.     {
  1093.         if ($this->accMemberRates===null) return [];
  1094.         return $this->accMemberRates;
  1095.     }
  1096.     /**
  1097.      * @param array $accMemberRates
  1098.      */
  1099.     public function setAccMemberRates($accMemberRates)
  1100.     {
  1101.         $this->accMemberRates $accMemberRates;
  1102.     }
  1103.     /**
  1104.      * @return array
  1105.      */
  1106.     public function getAccCustomerRates()
  1107.     {
  1108.         if ($this->accCustomerRates===null) return [];
  1109.         return $this->accCustomerRates;
  1110.     }
  1111.     /**
  1112.      * @param array $accCustomerRates
  1113.      */
  1114.     public function setAccCustomerRates($accCustomerRates)
  1115.     {
  1116.         $this->accCustomerRates $accCustomerRates;
  1117.     }
  1118.     /**
  1119.      * @return string
  1120.      */
  1121.     public function getOptions()
  1122.     {
  1123.         return $this->options;
  1124.     }
  1125.     /**
  1126.      * @param string $options
  1127.      */
  1128.     public function setOptions($options)
  1129.     {
  1130.         $this->options $options;
  1131.     }
  1132.     /**
  1133.      * @return float
  1134.      */
  1135.     public function getAccMemberManualRate()
  1136.     {
  1137.         return $this->accMemberManualRate;
  1138.     }
  1139.     /**
  1140.      * @param float $accMemberManualRate
  1141.      */
  1142.     public function setAccMemberManualRate($accMemberManualRate)
  1143.     {
  1144.         $this->accMemberManualRate $accMemberManualRate;
  1145.     }
  1146.     /**
  1147.      * @return float
  1148.      */
  1149.     public function getAccCustomerManualRate()
  1150.     {
  1151.         return $this->accCustomerManualRate;
  1152.     }
  1153.     /**
  1154.      * @param float $accCustomerManualRate
  1155.      */
  1156.     public function setAccCustomerManualRate($accCustomerManualRate)
  1157.     {
  1158.         $this->accCustomerManualRate $accCustomerManualRate;
  1159.     }
  1160.     /**
  1161.      * @return null|Order
  1162.      */
  1163.     public function getKnownOrder()
  1164.     {
  1165.         return $this->knownOrder;
  1166.     }
  1167.     public function getKnownOrderId()
  1168.     {
  1169.         if ($this->knownOrder !== null)
  1170.             return $this->knownOrder->getOrderId();
  1171.         return null;
  1172.     }
  1173.     /**
  1174.      * @param Order|null $knownOrder
  1175.      */
  1176.     public function setKnownOrder($knownOrder)
  1177.     {
  1178.         $this->knownOrder $knownOrder;
  1179.         if ($knownOrder!==null$knownOrder->setJob($this);
  1180.     }
  1181.     /**
  1182.      * @return bool
  1183.      */
  1184.     public function isReadyForBilling()
  1185.     {
  1186.         return $this->readyForBilling;
  1187.     }
  1188.     /**
  1189.      * @param bool $readyForBilling
  1190.      */
  1191.     public function setReadyForBilling($readyForBilling)
  1192.     {
  1193.         $this->readyForBilling $readyForBilling;
  1194.     }
  1195.     /**
  1196.      * @return array
  1197.      */
  1198.     public function getLastReadyForBillingCheckResult(): array
  1199.     {
  1200.         if ($this->lastReadyForBillingCheckResult === null) return [];
  1201.         return $this->lastReadyForBillingCheckResult;
  1202.     }
  1203.     /**
  1204.      * @param array $lastReadyForBillingCheckResult
  1205.      */
  1206.     public function setLastReadyForBillingCheckResult(array $lastReadyForBillingCheckResult): void
  1207.     {
  1208.         $this->lastReadyForBillingCheckResult $lastReadyForBillingCheckResult;
  1209.     }
  1210.     /**
  1211.      * @return string
  1212.      */
  1213.     public function getDetectedFFL()
  1214.     {
  1215.         return $this->detectedFFL;
  1216.     }
  1217.     /**
  1218.      * @param string $detectedFFL
  1219.      */
  1220.     public function setDetectedFFL($detectedFFL)
  1221.     {
  1222.         $this->detectedFFL $detectedFFL;
  1223.     }
  1224.     /**
  1225.      * @return int
  1226.      */
  1227.     public function getActualKm()
  1228.     {
  1229.         return $this->actualKm;
  1230.     }
  1231.     /**
  1232.      * @param int $actualKm
  1233.      */
  1234.     public function setActualKm($actualKm)
  1235.     {
  1236.         $this->actualKm $actualKm;
  1237.     }
  1238.     /**
  1239.      * @param $audience
  1240.      * @return Billing
  1241.      */
  1242.     public function getBillingFor($audience)
  1243.     {
  1244.         if ($audience===Billing::TYPE_MEMBER)
  1245.             return $this->getBillingForMember();
  1246.         if ($audience===Billing::TYPE_CUSTOMER)
  1247.             return $this->getBillingForCustomer();
  1248.         throw new \RuntimeException('Unknown audience');
  1249.     }
  1250.     /**
  1251.      * @return BillingForMember
  1252.      */
  1253.     public function getBillingForMember()
  1254.     {
  1255.         return $this->billingForMember;
  1256.     }
  1257.     /**
  1258.      * @param mixed $billingForMember
  1259.      */
  1260.     public function setBillingForMember($billingForMember)
  1261.     {
  1262.         $this->billingForMember $billingForMember;
  1263.     }
  1264.     /**
  1265.      * @return BillingForCustomer
  1266.      */
  1267.     public function getBillingForCustomer()
  1268.     {
  1269.         return $this->billingForCustomer;
  1270.     }
  1271.     /**
  1272.      * @param mixed $billingForCustomer
  1273.      */
  1274.     public function setBillingForCustomer($billingForCustomer)
  1275.     {
  1276.         $this->billingForCustomer $billingForCustomer;
  1277.     }
  1278.     /**
  1279.      * @return float
  1280.      */
  1281.     public function getTotalCustomerNet()
  1282.     {
  1283.         return $this->totalCustomerNet;
  1284.     }
  1285.     /**
  1286.      * // called from setCustomerCalculationItems()
  1287.      * @param float $totalCustomerNet
  1288.      */
  1289.     private function setTotalCustomerNet($totalCustomerNet)
  1290.     {
  1291.         $this->totalCustomerNet $totalCustomerNet;
  1292.     }
  1293.     /**
  1294.      * @return float
  1295.      */
  1296.     public function getTotalMemberNet()
  1297.     {
  1298.         return $this->totalMemberNet;
  1299.     }
  1300.     /**
  1301.      * // called from setMemberCalculationItems()
  1302.      * @param float $totalMemberNet
  1303.      */
  1304.     private function setTotalMemberNet($totalMemberNet)
  1305.     {
  1306.         $this->totalMemberNet $totalMemberNet;
  1307.     }
  1308.     /**
  1309.      * @return array|JobCalcItem[]
  1310.      */
  1311.     public function getCustomerCalculationItems()
  1312.     {
  1313.         return self::toJciArray($this->customerCalculationItems);
  1314.     }
  1315.     /**
  1316.      * @param array $customerCalculationItems
  1317.      */
  1318.     public function setCustomerCalculationItems($customerCalculationItems)
  1319.     {
  1320.         $this->setTotalCustomerNetarray_sum(array_map(static function($e) { return $e->totalNet; }, $customerCalculationItems)) );
  1321.         $this->customerCalculationItems self::fromObjectArray($customerCalculationItems);
  1322.     }
  1323.     /**
  1324.      * @return array|JobCalcItem[]
  1325.      */
  1326.     public function getMemberCalculationItems()
  1327.     {
  1328.         return self::toJciArray($this->memberCalculationItems);
  1329.     }
  1330.     /**
  1331.      * @param array $memberCalculationItems
  1332.      */
  1333.     public function setMemberCalculationItems($memberCalculationItems)
  1334.     {
  1335.         $this->setTotalMemberNetarray_sum(array_map(static function($e) { return $e->totalNet; }, $memberCalculationItems)) );
  1336.         $this->memberCalculationItems self::fromObjectArray($memberCalculationItems);
  1337.     }
  1338.     /**
  1339.      * @return float
  1340.      */
  1341.     public function getTaxameter()
  1342.     {
  1343.         return $this->taxameter;
  1344.     }
  1345.     /**
  1346.      * @param float $taxameter
  1347.      */
  1348.     public function setTaxameter($taxameter)
  1349.     {
  1350.         $this->taxameter $taxameter;
  1351.     }
  1352.     /**
  1353.      * @return float
  1354.      */
  1355.     public function getTaxameterVat()
  1356.     {
  1357.         return $this->taxameterVat;
  1358.     }
  1359.     /**
  1360.      * @param float $taxameterVat
  1361.      */
  1362.     public function setTaxameterVat($taxameterVat)
  1363.     {
  1364.         $this->taxameterVat $taxameterVat;
  1365.     }
  1366.     /**
  1367.      * @return bool
  1368.      */
  1369.     public function getPassengerNotMet()
  1370.     {
  1371.         return $this->passengerNotMet;
  1372.     }
  1373.     /**
  1374.      * @param bool $passengerNotMet
  1375.      */
  1376.     public function setPassengerNotMet($passengerNotMet)
  1377.     {
  1378.         $this->passengerNotMet $passengerNotMet;
  1379.     }
  1380.     /**
  1381.      * @return bool
  1382.      */
  1383.     public function isFflCombinationRide()
  1384.     {
  1385.         return $this->fflCombinationRide;
  1386.     }
  1387.     /**
  1388.      * @param bool $fflCombinationRide
  1389.      */
  1390.     public function setFflCombinationRide($fflCombinationRide)
  1391.     {
  1392.         $this->fflCombinationRide $fflCombinationRide;
  1393.     }
  1394.     /**
  1395.      * @return bool
  1396.      */
  1397.     public function isDiscarded()
  1398.     {
  1399.         return $this->discarded;
  1400.     }
  1401.     /**
  1402.      * @param bool $discarded
  1403.      */
  1404.     public function setDiscarded($discarded)
  1405.     {
  1406.         $this->discarded $discarded;
  1407.     }
  1408.     /**
  1409.      * @return array|Waypoint[]
  1410.      */
  1411.     public function getWaypoints()
  1412.     {
  1413.         if ($this->waypoints === null) return [];
  1414.         return self::toWaypointArray($this->waypoints);
  1415.     }
  1416.     /**
  1417.      * @param array|Waypoint[] $waypoints
  1418.      */
  1419.     public function setWaypoints($waypoints)
  1420.     {
  1421.         $new self::fromObjectArray($waypoints);
  1422.         if ($new!=$this->waypoints// basic change detection
  1423.             $this->waypoints $new;
  1424.     }
  1425.     /**
  1426.      * @return bool
  1427.      */
  1428.     public function isExtraWaitingTimeRide()
  1429.     {
  1430.         return $this->extraWaitingTimeRide;
  1431.     }
  1432.     /**
  1433.      * @param bool $extraWaitingTimeRide
  1434.      */
  1435.     public function setExtraWaitingTimeRide($extraWaitingTimeRide)
  1436.     {
  1437.         $this->extraWaitingTimeRide $extraWaitingTimeRide;
  1438.     }
  1439.     /**
  1440.      * @return int
  1441.      */
  1442.     public function getExtraWaitingTime()
  1443.     {
  1444.         return $this->extraWaitingTime;
  1445.     }
  1446.     /**
  1447.      * @param int $extraWaitingTime
  1448.      */
  1449.     public function setExtraWaitingTime($extraWaitingTime)
  1450.     {
  1451.         $this->extraWaitingTime $extraWaitingTime;
  1452.     }
  1453.     /**
  1454.      * @return bool
  1455.      */
  1456.     public function isDisablePricelistCalculation()
  1457.     {
  1458.         return $this->disablePricelistCalculation;
  1459.     }
  1460.     /**
  1461.      * @param bool $disablePricelistCalculation
  1462.      */
  1463.     public function setDisablePricelistCalculation($disablePricelistCalculation)
  1464.     {
  1465.         $this->disablePricelistCalculation $disablePricelistCalculation;
  1466.     }
  1467.     /**
  1468.      * @return bool
  1469.      */
  1470.     public function isDisableTaxameterForCustomer(): bool
  1471.     {
  1472.         return $this->disableTaxameterForCustomer;
  1473.     }
  1474.     /**
  1475.      * @param bool $disableTaxameterForCustomer
  1476.      */
  1477.     public function setDisableTaxameterForCustomer(bool $disableTaxameterForCustomer): void
  1478.     {
  1479.         $this->disableTaxameterForCustomer $disableTaxameterForCustomer;
  1480.     }
  1481.     /**
  1482.      * @return bool
  1483.      */
  1484.     public function getHasMemberExtraKm(): bool
  1485.     {
  1486.         return $this->hasMemberExtraKm;
  1487.     }
  1488.     /**
  1489.      * @param bool $hasMemberExtraKm
  1490.      */
  1491.     public function setHasMemberExtraKm(bool $hasMemberExtraKm): void
  1492.     {
  1493.         $this->hasMemberExtraKm $hasMemberExtraKm;
  1494.     }
  1495.     /**
  1496.      * @return int
  1497.      */
  1498.     public function getMemberExtraKm(): int
  1499.     {
  1500.         return $this->memberExtraKm;
  1501.     }
  1502.     /**
  1503.      * @param int $memberExtraKm
  1504.      */
  1505.     public function setMemberExtraKm(int $memberExtraKm): void
  1506.     {
  1507.         $this->memberExtraKm $memberExtraKm;
  1508.     }
  1509.     /**
  1510.      * @return null|\DateTime
  1511.      */
  1512.     public function getLastChangeByMember()
  1513.     {
  1514.         return $this->lastChangeByMember;
  1515.     }
  1516.     /**
  1517.      * @param null|\DateTime $lastChangeByMember
  1518.      */
  1519.     public function setLastChangeByMember($lastChangeByMember): void
  1520.     {
  1521.         $this->lastChangeByMember $lastChangeByMember;
  1522.     }
  1523.     /**
  1524.      * @return bool
  1525.      */
  1526.     public function isInstantRide(): bool
  1527.     {
  1528.         return $this->instantRide;
  1529.     }
  1530.     /**
  1531.      * @param bool $instantRide
  1532.      */
  1533.     public function setInstantRide(bool $instantRide): void
  1534.     {
  1535.         $this->instantRide $instantRide;
  1536.     }
  1537.     /**
  1538.      * @return bool
  1539.      */
  1540.     public function isApprovedByDriver(): bool
  1541.     {
  1542.         return $this->approvedByDriver;
  1543.     }
  1544.     /**
  1545.      * @param bool $approvedByDriver
  1546.      */
  1547.     public function setApprovedByDriver(bool $approvedByDriver): void
  1548.     {
  1549.         $this->approvedByDriver $approvedByDriver;
  1550.     }
  1551.     /**
  1552.      * @return bool
  1553.      */
  1554.     public function isApprovedByPassenger(): bool
  1555.     {
  1556.         return $this->approvedByPassenger;
  1557.     }
  1558.     /**
  1559.      * @param bool $approvedByPassenger
  1560.      */
  1561.     public function setApprovedByPassenger(bool $approvedByPassenger): void
  1562.     {
  1563.         $this->approvedByPassenger $approvedByPassenger;
  1564.     }
  1565.     /**
  1566.      * @return bool
  1567.      */
  1568.     public function isApprovedByAccounting(): bool
  1569.     {
  1570.         return $this->approvedByAccounting;
  1571.     }
  1572.     /**
  1573.      * @param bool $approvedByAccounting
  1574.      */
  1575.     public function setApprovedByAccounting(bool $approvedByAccounting): void
  1576.     {
  1577.         $this->approvedByAccounting $approvedByAccounting;
  1578.     }
  1579.     public function getApprovalStatus()
  1580.     {
  1581.         $ret 0;
  1582.         if  ($this->isReadyForBilling()) $ret += 0x1;
  1583.         if  ($this->isApprovedByDriver()) $ret += 0x2;
  1584.         if  ($this->isApprovedByPassenger()) $ret += 0x4;
  1585.         if  ($this->isApprovedByAccounting()) $ret += 0x8;
  1586.         return $ret;
  1587.     }
  1588.     /**
  1589.      * @return string
  1590.      */
  1591.     public function getConfirmationPin(): string
  1592.     {
  1593.         return $this->confirmationPin;
  1594.     }
  1595.     /**
  1596.      * @param string $confirmationPin
  1597.      */
  1598.     public function setConfirmationPin(string $confirmationPin): void
  1599.     {
  1600.         $this->confirmationPin $confirmationPin;
  1601.     }
  1602.     /**
  1603.      * @return mixed
  1604.      */
  1605.     public function getCustomerSignature()
  1606.     {
  1607.         return $this->customerSignature;
  1608.     }
  1609.     /**
  1610.      * @param mixed $customerSignature
  1611.      */
  1612.     public function setCustomerSignature($customerSignature): void
  1613.     {
  1614.         $this->customerSignature $customerSignature;
  1615.     }
  1616.     /**
  1617.      * @return string
  1618.      */
  1619.     public function getSource(): string
  1620.     {
  1621.         return $this->source;
  1622.     }
  1623.     /**
  1624.      * @param string $source
  1625.      */
  1626.     public function setSource(string $source): void
  1627.     {
  1628.         $this->source $source;
  1629.     }
  1630.     /**
  1631.      * @return int
  1632.      */
  1633.     public function getInstantRideAdditionalWaitingTime(): int
  1634.     {
  1635.         return $this->instantRideAdditionalWaitingTime;
  1636.     }
  1637.     /**
  1638.      * @param int $instantRideAdditionalWaitingTime
  1639.      */
  1640.     public function setInstantRideAdditionalWaitingTime(int $instantRideAdditionalWaitingTime): void
  1641.     {
  1642.         $this->instantRideAdditionalWaitingTime $instantRideAdditionalWaitingTime;
  1643.     }
  1644.     /**
  1645.      * @return mixed
  1646.      */
  1647.     public function getConfirmedByCustomerThrough()
  1648.     {
  1649.         return $this->confirmedByCustomerThrough;
  1650.     }
  1651.     /**
  1652.      * @param mixed $confirmedByCustomerThrough
  1653.      */
  1654.     public function setConfirmedByCustomerThrough($confirmedByCustomerThrough): void
  1655.     {
  1656.         $this->confirmedByCustomerThrough $confirmedByCustomerThrough;
  1657.     }
  1658.     /**
  1659.      * @return bool
  1660.      */
  1661.     public function isIgnoreForCustomer(): bool
  1662.     {
  1663.         return $this->ignoreForCustomer;
  1664.     }
  1665.     /**
  1666.      * @param bool $ignoreForCustomer
  1667.      */
  1668.     public function setIgnoreForCustomer(bool $ignoreForCustomer): void
  1669.     {
  1670.         $this->ignoreForCustomer $ignoreForCustomer;
  1671.     }
  1672.     /**
  1673.      * @return mixed
  1674.      */
  1675.     public function getRecalculateCustomerPrice()
  1676.     {
  1677.         return $this->recalculateCustomerPrice;
  1678.     }
  1679.     /**
  1680.      * @param mixed $recalculateCustomerPrice
  1681.      */
  1682.     public function setRecalculateCustomerPrice($recalculateCustomerPrice): void
  1683.     {
  1684.         $this->recalculateCustomerPrice $recalculateCustomerPrice;
  1685.     }
  1686.     /**
  1687.      * @return bool
  1688.      */
  1689.     public function isIgnoreForMember(): bool
  1690.     {
  1691.         return $this->ignoreForMember;
  1692.     }
  1693.     /**
  1694.      * @param bool $ignoreForMember
  1695.      */
  1696.     public function setIgnoreForMember(bool $ignoreForMember): void
  1697.     {
  1698.         $this->ignoreForMember $ignoreForMember;
  1699.     }
  1700.     /**
  1701.      * @return string
  1702.      */
  1703.     public function getRideStyle(): string
  1704.     {
  1705.         return $this->rideStyle;
  1706.     }
  1707.     /**
  1708.      * @param string $rideStyle
  1709.      */
  1710.     public function setRideStyle(string $rideStyle): void
  1711.     {
  1712.         $this->rideStyle $rideStyle;
  1713.     }
  1714.     /**
  1715.      * @return bool
  1716.      */
  1717.     public function isWerksRundfahrt(): bool
  1718.     {
  1719.         return $this->werksRundfahrt;
  1720.     }
  1721.     /**
  1722.      * @param bool $werksRundfahrt
  1723.      */
  1724.     public function setWerksRundfahrt(bool $werksRundfahrt): void
  1725.     {
  1726.         $this->werksRundfahrt $werksRundfahrt;
  1727.     }
  1728.     /**
  1729.      * @return array|string[]
  1730.      */
  1731.     public function getControlling(): array
  1732.     {
  1733.         if ($this->controlling===null)
  1734.             return [];
  1735.         return $this->controlling;
  1736.     }
  1737.     /**
  1738.      * @param array|string[] $controlling
  1739.      */
  1740.     public function setControlling(array $controlling): void
  1741.     {
  1742.         $this->controlling array_values($controlling);
  1743.     }
  1744.     /**
  1745.      * @return bool
  1746.      */
  1747.     public function isCustomerStorno(): bool
  1748.     {
  1749.         return $this->customerStorno;
  1750.     }
  1751.     /**
  1752.      * @param bool $customerStorno
  1753.      */
  1754.     public function setCustomerStorno(bool $customerStorno): void
  1755.     {
  1756.         $this->customerStorno $customerStorno;
  1757.     }
  1758.     /**
  1759.      * @return int
  1760.      */
  1761.     public function getSLC(): int
  1762.     {
  1763.         return $this->SLC;
  1764.     }
  1765.     /**
  1766.      * @param int $SLC
  1767.      */
  1768.     public function setSLC(int $SLC): void
  1769.     {
  1770.         $this->SLC $SLC;
  1771.     }
  1772.     /**
  1773.      * @return int
  1774.      */
  1775.     public function getVVC(): int
  1776.     {
  1777.         return $this->VVC;
  1778.     }
  1779.     /**
  1780.      * @param int $VVC
  1781.      */
  1782.     public function setVVC(int $VVC): void
  1783.     {
  1784.         $this->VVC $VVC;
  1785.     }
  1786.     /**
  1787.      * @return ?float
  1788.      */
  1789.     public function getMemberCalcForceTaxRate(): ?float
  1790.     {
  1791.         return $this->memberCalcForceTaxRate;
  1792.     }
  1793.     /**
  1794.      * @param ?float $memberCalcForceTaxRate
  1795.      */
  1796.     public function setMemberCalcForceTaxRate(?float $memberCalcForceTaxRate): void
  1797.     {
  1798.         $this->memberCalcForceTaxRate $memberCalcForceTaxRate;
  1799.     }
  1800.     /**
  1801.      * @return Job|null
  1802.      */
  1803.     public function getCombiRideParent()
  1804.     {
  1805.         return $this->combiRideParent;
  1806.     }
  1807.     /**
  1808.      * @param Job|null $combiRideParent
  1809.      */
  1810.     public function setCombiRideParent($combiRideParent): void
  1811.     {
  1812.         $this->combiRideParent $combiRideParent;
  1813.     }
  1814.     /**
  1815.      * @return Job|null
  1816.      */
  1817.     public function getCombiRideChild()
  1818.     {
  1819.         return $this->combiRideChild;
  1820.     }
  1821.     /**
  1822.      * @param Job|null $combiRideChild
  1823.      */
  1824.     public function setCombiRideChild($combiRideChild): void
  1825.     {
  1826.         $this->combiRideChild $combiRideChild;
  1827.     }
  1828.     /**
  1829.      * @return int
  1830.      */
  1831.     public function getCombiAssignmentState(): int
  1832.     {
  1833.         return $this->combiAssignmentState;
  1834.     }
  1835.     /**
  1836.      * @param int $combiAssignmentState
  1837.      */
  1838.     public function setCombiAssignmentState(int $combiAssignmentState): void
  1839.     {
  1840.         $this->combiAssignmentState $combiAssignmentState;
  1841.     }
  1842.     /**
  1843.      * @return bool
  1844.      */
  1845.     public function isOptSubCustomerNet(): bool
  1846.     {
  1847.         return $this->optSubCustomerNet;
  1848.     }
  1849.     /**
  1850.      * @param bool $optSubCustomerNet
  1851.      */
  1852.     public function setOptSubCustomerNet(bool $optSubCustomerNet): void
  1853.     {
  1854.         $this->optSubCustomerNet $optSubCustomerNet;
  1855.     }
  1856.     /**
  1857.      * @return bool
  1858.      */
  1859.     public function isOptNoExtrasForCustomer(): bool
  1860.     {
  1861.         return $this->optNoExtrasForCustomer;
  1862.     }
  1863.     /**
  1864.      * @param bool $optNoExtrasForCustomer
  1865.      */
  1866.     public function setOptNoExtrasForCustomer(bool $optNoExtrasForCustomer): void
  1867.     {
  1868.         $this->optNoExtrasForCustomer $optNoExtrasForCustomer;
  1869.     }
  1870.     /**
  1871.      * @return bool
  1872.      */
  1873.     public function isOptAddChargeForCustomer(): bool
  1874.     {
  1875.         return $this->optAddChargeForCustomer;
  1876.     }
  1877.     /**
  1878.      * @param bool $optAddChargeForCustomer
  1879.      */
  1880.     public function setOptAddChargeForCustomer(bool $optAddChargeForCustomer): void
  1881.     {
  1882.         $this->optAddChargeForCustomer $optAddChargeForCustomer;
  1883.     }
  1884.     /**
  1885.      * @return bool
  1886.      */
  1887.     public function isApplicantTimeRide(): bool
  1888.     {
  1889.         return $this->applicantTimeRide;
  1890.     }
  1891.     /**
  1892.      * @param bool $applicantTimeRide
  1893.      */
  1894.     public function setApplicantTimeRide(bool $applicantTimeRide): void
  1895.     {
  1896.         $this->applicantTimeRide $applicantTimeRide;
  1897.     }
  1898.     /**
  1899.      * @return int
  1900.      */
  1901.     public function getApplicantTime(): int
  1902.     {
  1903.         return $this->applicantTime;
  1904.     }
  1905.     /**
  1906.      * @param int $applicantTime
  1907.      */
  1908.     public function setApplicantTime(int $applicantTime): void
  1909.     {
  1910.         $this->applicantTime $applicantTime;
  1911.     }
  1912. }