src/Entity/Shipment.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ShipmentRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassShipmentRepository::class)]
  9. class Shipment
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $fromName null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $fromCompany null;
  19.     #[ORM\ManyToOne(inversedBy'shipments')]
  20.     private ?Country $fromCountry null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $fromAddress null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $fromAddressTwo null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $fromAddressThree null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $fromPostalCode null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $fromCity null;
  31.     #[ORM\Column(length255nullabletrue)]
  32.     private ?string $fromState null;
  33.     #[ORM\Column(length255nullabletrue)]
  34.     private ?string $fromEmail null;
  35.     #[ORM\ManyToOne(inversedBy'shipments')]
  36.     private ?PhoneType $fromPhoneType null;
  37.     #[ORM\Column(length255nullabletrue)]
  38.     private ?string $fromPhoneCode null;
  39.  
  40.     #[ORM\Column(length255nullabletrue)]
  41.     private ?string $fromPhone null;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     private ?string $fromVatTax null;
  44.     #[ORM\Column(length255nullabletrue)]
  45.     private ?string $toName null;
  46.     #[ORM\Column(length255nullabletrue)]
  47.     private ?string $toCompany null;
  48.     #[ORM\ManyToOne(inversedBy'toShipments')]
  49.     private ?Country $toCountry null;
  50.     #[ORM\Column(length255nullabletrue)]
  51.     private ?string $toAddress null;
  52.     #[ORM\Column(length255nullabletrue)]
  53.     private ?string $toAddressTwo null;
  54.     #[ORM\Column(length255nullabletrue)]
  55.     private ?string $toAddressThree null;
  56.     #[ORM\Column(length255nullabletrue)]
  57.     private ?string $toPostalCode null;
  58.     #[ORM\Column(length255nullabletrue)]
  59.     private ?string $toCity null;
  60.     #[ORM\Column(length255nullabletrue)]
  61.     private ?string $toState null;
  62.     #[ORM\Column(length255nullabletrue)]
  63.     private ?string $toEmail null;
  64.     #[ORM\ManyToOne(inversedBy'toShipments')]
  65.     private ?PhoneType $toPhoneType null;
  66.     #[ORM\Column(length255nullabletrue)]
  67.     private ?string $toPhoneCode null;
  68.     #[ORM\Column(length255nullabletrue)]
  69.     private ?string $toPhone null;
  70.     #[ORM\Column(length255nullabletrue)]
  71.     private ?string $toVatTax null;
  72.     #[ORM\ManyToOne(inversedBy'shipments')]
  73.     private ?ProductType $productType null;
  74.     #[ORM\ManyToOne(inversedBy'shipments')]
  75.     private ?DescribeShipment $describeShipment null;
  76.   
  77.     #[ORM\Column(nullabletrue)]
  78.     private ?int $customsInvoice null;
  79.     #[ORM\Column(length255nullabletrue)]
  80.     private ?string $invoiceNo null;
  81.    
  82.     #[ORM\Column(nullabletrue)]
  83.     private ?int $schedulePickup null;
  84.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  85.     private ?\DateTimeInterface $pickupDate null;
  86.     #[ORM\ManyToOne(inversedBy'shipments')]
  87.     private ?PickupShipment $pickupShipment null;
  88.     #[ORM\Column(nullabletrue)]
  89.     private ?float $pickupWeight null;
  90.   
  91.     #[ORM\OneToMany(mappedBy'shipment'targetEntityShipmentReference::class, cascade: ['persist''remove''detach'])]
  92.     private Collection $shipmentReferences;
  93.     #[ORM\OneToMany(mappedBy'shipment'targetEntityShipmentPackaging::class, cascade: ['persist''remove''detach'])]
  94.     private Collection $shipmentPackagings;
  95.     #[ORM\OneToMany(mappedBy'shipment'targetEntityShipmentItems::class, cascade: ['persist''remove''detach'])]
  96.     private Collection $shipmentItems;
  97.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  98.     private ?\DateTimeInterface $shipmentDate null;
  99.     #[ORM\ManyToOne(inversedBy'fromShipments')]
  100.     private ?AddressBook $fromAddressBook null;
  101.     #[ORM\ManyToOne(inversedBy'toShipments')]
  102.     private ?AddressBook $toAddressBook null;
  103.     #[ORM\Column(length255nullabletrue)]
  104.     private ?string $mawbNo null;
  105.     #[ORM\Column(length255nullabletrue)]
  106.     private ?string $hawbNo null;
  107.     #[ORM\OneToMany(mappedBy'shipment'targetEntityTrackingUpdate::class)]
  108.     private Collection $trackingUpdates;
  109.     #[ORM\OneToMany(mappedBy'shipment'targetEntitySalesInvoiceDetails::class)]
  110.     private Collection $salesInvoiceDetails;
  111.     #[ORM\ManyToOne(inversedBy'shipments')]
  112.     private ?Customer $customer null;
  113.     #[ORM\ManyToOne(inversedBy'shipments')]
  114.     private ?Courier $courier null;
  115.     #[ORM\Column(length255nullabletrue)]
  116.     private ?string $courierHawbno null;
  117.     #[ORM\Column(nullabletrue)]
  118.     private ?int $shipmentType null;
  119.     #[ORM\Column(length255nullabletrue)]
  120.     private ?string $pickupName null;
  121.     #[ORM\Column(length255nullabletrue)]
  122.     private ?string $pickupCompany null;
  123.     #[ORM\ManyToOne(inversedBy'pickupShipments')]
  124.     private ?Country $pickupCountry null;
  125.     #[ORM\Column(length255nullabletrue)]
  126.     private ?string $pickupAddress null;
  127.     #[ORM\Column(length255nullabletrue)]
  128.     private ?string $pickupAddressTwo null;
  129.     #[ORM\Column(length255nullabletrue)]
  130.     private ?string $pickupAddressThree null;
  131.     #[ORM\Column(length255nullabletrue)]
  132.     private ?string $pickupPostalCode null;
  133.     #[ORM\Column(length255nullabletrue)]
  134.     private ?string $pickupCity null;
  135.     #[ORM\Column(length255nullabletrue)]
  136.     private ?string $pickupState null;
  137.     #[ORM\Column(length255nullabletrue)]
  138.     private ?string $pickupEmail null;
  139.     #[ORM\ManyToOne(inversedBy'pickupShipments')]
  140.     private ?PhoneType $pickupPhoneType null;
  141.     #[ORM\Column(length255nullabletrue)]
  142.     private ?string $pickupPhoneCode null;
  143.     #[ORM\Column(length255nullabletrue)]
  144.     private ?string $pickupPhone null;
  145.     #[ORM\Column(nullabletrue)]
  146.     private ?\DateTimeImmutable $createdAt null;
  147.     #[ORM\ManyToOne(inversedBy'createdShipments')]
  148.     private ?User $createdBy null;
  149.     #[ORM\Column(nullabletrue)]
  150.     private ?\DateTimeImmutable $modifiedAt null;
  151.     #[ORM\ManyToOne(inversedBy'modifiedShipments')]
  152.     private ?User $modifiedBy null;
  153.     #[ORM\ManyToOne(inversedBy'shipments')]
  154.     private ?UserCompany $userCompany null;
  155.     #[ORM\ManyToOne(inversedBy'shipments')]
  156.     private ?DutyPayer $dutyPayer null;
  157.     #[ORM\ManyToOne(inversedBy'shipments')]
  158.     private ?PaymentOptions $paymentOptions null;
  159.  
  160.     #[ORM\ManyToOne(inversedBy'shipments')]
  161.     private ?Services $servicese null;
  162.     #[ORM\Column(length255nullabletrue)]
  163.     private ?string $dutyAccountno null;
  164.     #[ORM\Column(nullabletrue)]
  165.     private ?bool $saveFromAb null;
  166.     #[ORM\Column(nullabletrue)]
  167.     private ?bool $saveToAb null;
  168.     #[ORM\Column(nullabletrue)]
  169.     private ?int $accepted null;
  170.     #[ORM\Column(nullabletrue)]
  171.     private ?bool $trackingStatus null;
  172.    
  173.     #[ORM\Column(length255nullabletrue)]
  174.     private ?string $imagePath null;
  175.     #[ORM\ManyToOne(inversedBy'pickupShipments')]
  176.     private ?User $pickup null;
  177.     #[ORM\Column(length255nullabletrue)]
  178.     private ?string $bookingNO null;
  179.     #[ORM\Column(length255nullabletrue)]
  180.     private ?string $serviceType null;
  181.     #[ORM\Column(nullabletrue)]
  182.     private ?float $masterWeight null;
  183.     #[ORM\Column(nullabletrue)]
  184.     private ?bool $expedite null;
  185.     #[ORM\Column(length255nullabletrue)]
  186.     private ?string $customerName null;
  187.     #[ORM\Column(length255nullabletrue)]
  188.     private ?string $pickupmanName null;
  189.     #[ORM\Column(nullabletrue)]
  190.     private ?bool $textCustomer null;
  191.     #[ORM\Column(nullabletrue)]
  192.     private ?bool $textPickup null;
  193.     #[ORM\Column(length255nullabletrue)]
  194.     private ?string $fromEori null;
  195.     #[ORM\Column(length255nullabletrue)]
  196.     private ?string $fromEroino null;
  197.     #[ORM\Column(length255nullabletrue)]
  198.     private ?string $toEori null;
  199.     #[ORM\Column(length255nullabletrue)]
  200.     private ?string $toEorino null;
  201.     #[ORM\OneToMany(mappedBy'shipment'targetEntityFromPhoneDetails::class, cascade: ['persist''remove''detach'])]
  202.     private Collection $fromPhoneDetails;
  203.     #[ORM\OneToMany(mappedBy'shipment'targetEntityToPhoneDetails::class, cascade: ['persist''remove''detach'])]
  204.     private Collection $toPhoneDetails;
  205.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  206.     private ?string $itemSummary null;
  207.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  208.     private ?string $additionalInvoiceInfo null;
  209.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  210.     private ?string $instructions null;
  211.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  212.     private ?string $remarks null;
  213.     #[ORM\Column(nullabletrue)]
  214.     private ?int $check_status null;
  215.     #[ORM\Column(nullabletrue)]
  216.     private ?float $cashAmount null;
  217.     #[ORM\Column(length255nullabletrue)]
  218.     private ?string $moneyReceipt null;
  219.     #[ORM\Column(nullabletrue)]
  220.     private ?bool $manualHawb null;
  221.    
  222.     public function __construct()
  223.     {
  224.         $this->shipmentReferences = new ArrayCollection();
  225.         $this->shipmentPackagings = new ArrayCollection();
  226.         $this->shipmentItems = new ArrayCollection();
  227.         $this->trackingUpdates = new ArrayCollection();
  228.         $this->salesInvoiceDetails = new ArrayCollection();
  229.         $this->fromPhoneDetails = new ArrayCollection();
  230.         $this->toPhoneDetails = new ArrayCollection();
  231.     }
  232.     public function getId(): ?int
  233.     {
  234.         return $this->id;
  235.     }
  236.     public function getFromName(): ?string
  237.     {
  238.         return $this->fromName;
  239.     }
  240.     public function setFromName(string $fromName): self
  241.     {
  242.         $this->fromName $fromName;
  243.         return $this;
  244.     }
  245.     public function getFromCompany(): ?string
  246.     {
  247.         return $this->fromCompany;
  248.     }
  249.     public function setFromCompany(string $fromCompany): self
  250.     {
  251.         $this->fromCompany $fromCompany;
  252.         return $this;
  253.     }
  254.     public function getFromCountry(): ?Country
  255.     {
  256.         return $this->fromCountry;
  257.     }
  258.     public function setFromCountry(?Country $fromCountry): self
  259.     {
  260.         $this->fromCountry $fromCountry;
  261.         return $this;
  262.     }
  263.     public function getFromAddress(): ?string
  264.     {
  265.         return $this->fromAddress;
  266.     }
  267.     public function setFromAddress(?string $fromAddress): self
  268.     {
  269.         $this->fromAddress $fromAddress;
  270.         return $this;
  271.     }
  272.     public function getFromAddressTwo(): ?string
  273.     {
  274.         return $this->fromAddressTwo;
  275.     }
  276.     public function setFromAddressTwo(?string $fromAddressTwo): self
  277.     {
  278.         $this->fromAddressTwo $fromAddressTwo;
  279.         return $this;
  280.     }
  281.     public function getFromAddressThree(): ?string
  282.     {
  283.         return $this->fromAddressThree;
  284.     }
  285.     public function setFromAddressThree(?string $fromAddressThree): self
  286.     {
  287.         $this->fromAddressThree $fromAddressThree;
  288.         return $this;
  289.     }
  290.     public function getFromPostalCode(): ?string
  291.     {
  292.         return $this->fromPostalCode;
  293.     }
  294.     public function setFromPostalCode(?string $fromPostalCode): self
  295.     {
  296.         $this->fromPostalCode $fromPostalCode;
  297.         return $this;
  298.     }
  299.     public function getFromCity(): ?string
  300.     {
  301.         return $this->fromCity;
  302.     }
  303.     public function setFromCity(?string $fromCity): self
  304.     {
  305.         $this->fromCity $fromCity;
  306.         return $this;
  307.     }
  308.     public function getFromState(): ?string
  309.     {
  310.         return $this->fromState;
  311.     }
  312.     public function setFromState(?string $fromState): self
  313.     {
  314.         $this->fromState $fromState;
  315.         return $this;
  316.     }
  317.     public function getFromEmail(): ?string
  318.     {
  319.         return $this->fromEmail;
  320.     }
  321.     public function setFromEmail(?string $fromEmail): self
  322.     {
  323.         $this->fromEmail $fromEmail;
  324.         return $this;
  325.     }
  326.     public function getFromPhoneType(): ?PhoneType
  327.     {
  328.         return $this->fromPhoneType;
  329.     }
  330.     public function setFromPhoneType(?PhoneType $fromPhoneType): self
  331.     {
  332.         $this->fromPhoneType $fromPhoneType;
  333.         return $this;
  334.     }
  335.     public function getFromPhoneCode(): ?string
  336.     {
  337.         return $this->fromPhoneCode;
  338.     }
  339.     public function setFromPhoneCode(?string $fromPhoneCode): self
  340.     {
  341.         $this->fromPhoneCode $fromPhoneCode;
  342.         return $this;
  343.     }
  344.     public function getFromPhone(): ?string
  345.     {
  346.         return $this->fromPhone;
  347.     }
  348.     public function setFromPhone(?string $fromPhone): self
  349.     {
  350.         $this->fromPhone $fromPhone;
  351.         return $this;
  352.     }
  353.     public function getFromVatTax(): ?string
  354.     {
  355.         return $this->fromVatTax;
  356.     }
  357.     public function setFromVatTax(?string $fromVatTax): self
  358.     {
  359.         $this->fromVatTax $fromVatTax;
  360.         return $this;
  361.     }
  362.     public function getToName(): ?string
  363.     {
  364.         return $this->toName;
  365.     }
  366.     public function setToName(?string $toName): self
  367.     {
  368.         $this->toName $toName;
  369.         return $this;
  370.     }
  371.     public function getToCompany(): ?string
  372.     {
  373.         return $this->toCompany;
  374.     }
  375.     public function setToCompany(?string $toCompany): self
  376.     {
  377.         $this->toCompany $toCompany;
  378.         return $this;
  379.     }
  380.     public function getToCountry(): ?Country
  381.     {
  382.         return $this->toCountry;
  383.     }
  384.     public function setToCountry(?Country $toCountry): self
  385.     {
  386.         $this->toCountry $toCountry;
  387.         return $this;
  388.     }
  389.     public function getToAddress(): ?string
  390.     {
  391.         return $this->toAddress;
  392.     }
  393.     public function setToAddress(?string $toAddress): self
  394.     {
  395.         $this->toAddress $toAddress;
  396.         return $this;
  397.     }
  398.     public function getToAddressTwo(): ?string
  399.     {
  400.         return $this->toAddressTwo;
  401.     }
  402.     public function setToAddressTwo(?string $toAddressTwo): self
  403.     {
  404.         $this->toAddressTwo $toAddressTwo;
  405.         return $this;
  406.     }
  407.     public function getToAddressThree(): ?string
  408.     {
  409.         return $this->toAddressThree;
  410.     }
  411.     public function setToAddressThree(?string $toAddressThree): self
  412.     {
  413.         $this->toAddressThree $toAddressThree;
  414.         return $this;
  415.     }
  416.     public function getToPostalCode(): ?string
  417.     {
  418.         return $this->toPostalCode;
  419.     }
  420.     public function setToPostalCode(?string $toPostalCode): self
  421.     {
  422.         $this->toPostalCode $toPostalCode;
  423.         return $this;
  424.     }
  425.     public function getToCity(): ?string
  426.     {
  427.         return $this->toCity;
  428.     }
  429.     public function setToCity(?string $toCity): self
  430.     {
  431.         $this->toCity $toCity;
  432.         return $this;
  433.     }
  434.     public function getToState(): ?string
  435.     {
  436.         return $this->toState;
  437.     }
  438.     public function setToState(?string $toState): self
  439.     {
  440.         $this->toState $toState;
  441.         return $this;
  442.     }
  443.     public function getToEmail(): ?string
  444.     {
  445.         return $this->toEmail;
  446.     }
  447.     public function setToEmail(?string $toEmail): self
  448.     {
  449.         $this->toEmail $toEmail;
  450.         return $this;
  451.     }
  452.     public function getToPhoneType(): ?PhoneType
  453.     {
  454.         return $this->toPhoneType;
  455.     }
  456.     public function setToPhoneType(?PhoneType $toPhoneType): self
  457.     {
  458.         $this->toPhoneType $toPhoneType;
  459.         return $this;
  460.     }
  461.     public function getToPhoneCode(): ?string
  462.     {
  463.         return $this->toPhoneCode;
  464.     }
  465.     public function setToPhoneCode(?string $toPhoneCode): self
  466.     {
  467.         $this->toPhoneCode $toPhoneCode;
  468.         return $this;
  469.     }
  470.     public function getToPhone(): ?string
  471.     {
  472.         return $this->toPhone;
  473.     }
  474.     public function setToPhone(?string $toPhone): self
  475.     {
  476.         $this->toPhone $toPhone;
  477.         return $this;
  478.     }
  479.     public function getToVatTax(): ?string
  480.     {
  481.         return $this->toVatTax;
  482.     }
  483.     public function setToVatTax(?string $toVatTax): self
  484.     {
  485.         $this->toVatTax $toVatTax;
  486.         return $this;
  487.     }
  488.     public function getProductType(): ?ProductType
  489.     {
  490.         return $this->productType;
  491.     }
  492.     public function setProductType(?ProductType $productType): self
  493.     {
  494.         $this->productType $productType;
  495.         return $this;
  496.     }
  497.     public function getDescribeShipment(): ?DescribeShipment
  498.     {
  499.         return $this->describeShipment;
  500.     }
  501.     public function setDescribeShipment(?DescribeShipment $describeShipment): self
  502.     {
  503.         $this->describeShipment $describeShipment;
  504.         return $this;
  505.     }
  506.    
  507.     public function getCustomsInvoice(): ?int
  508.     {
  509.         return $this->customsInvoice;
  510.     }
  511.     public function setCustomsInvoice(?int $customsInvoice): self
  512.     {
  513.         $this->customsInvoice $customsInvoice;
  514.         return $this;
  515.     }
  516.     public function getInvoiceNo(): ?string
  517.     {
  518.         return $this->invoiceNo;
  519.     }
  520.     public function setInvoiceNo(?string $invoiceNo): self
  521.     {
  522.         $this->invoiceNo $invoiceNo;
  523.         return $this;
  524.     }
  525.   
  526.     public function getSchedulePickup(): ?int
  527.     {
  528.         return $this->schedulePickup;
  529.     }
  530.     public function setSchedulePickup(?int $schedulePickup): self
  531.     {
  532.         $this->schedulePickup $schedulePickup;
  533.         return $this;
  534.     }
  535.     public function getPickupDate(): ?\DateTimeInterface
  536.     {
  537.         return $this->pickupDate;
  538.     }
  539.     public function setPickupDate(?\DateTimeInterface $pickupDate): self
  540.     {
  541.         $this->pickupDate $pickupDate;
  542.         return $this;
  543.     }
  544.     public function getPickupShipment(): ?PickupShipment
  545.     {
  546.         return $this->pickupShipment;
  547.     }
  548.     public function setPickupShipment(?PickupShipment $pickupShipment): self
  549.     {
  550.         $this->pickupShipment $pickupShipment;
  551.         return $this;
  552.     }
  553.     public function getPickupWeight(): ?float
  554.     {
  555.         return $this->pickupWeight;
  556.     }
  557.     public function setPickupWeight(?float $pickupWeight): self
  558.     {
  559.         $this->pickupWeight $pickupWeight;
  560.         return $this;
  561.     }
  562.  
  563.     /**
  564.      * @return Collection<int, ShipmentReference>
  565.      */
  566.     public function getShipmentReferences(): Collection
  567.     {
  568.         return $this->shipmentReferences;
  569.     }
  570.     public function addShipmentReference(ShipmentReference $shipmentReference): self
  571.     {
  572.         if (!$this->shipmentReferences->contains($shipmentReference)) {
  573.             $this->shipmentReferences->add($shipmentReference);
  574.             $shipmentReference->setShipment($this);
  575.         }
  576.         return $this;
  577.     }
  578.     public function removeShipmentReference(ShipmentReference $shipmentReference): self
  579.     {
  580.         if ($this->shipmentReferences->removeElement($shipmentReference)) {
  581.             // set the owning side to null (unless already changed)
  582.             if ($shipmentReference->getShipment() === $this) {
  583.                 $shipmentReference->setShipment(null);
  584.             }
  585.         }
  586.         return $this;
  587.     }
  588.     /**
  589.      * @return Collection<int, ShipmentPackaging>
  590.      */
  591.     public function getShipmentPackagings(): Collection
  592.     {
  593.         return $this->shipmentPackagings;
  594.     }
  595.     public function addShipmentPackaging(ShipmentPackaging $shipmentPackaging): self
  596.     {
  597.         if (!$this->shipmentPackagings->contains($shipmentPackaging)) {
  598.             $this->shipmentPackagings->add($shipmentPackaging);
  599.             $shipmentPackaging->setShipment($this);
  600.         }
  601.         return $this;
  602.     }
  603.     public function removeShipmentPackaging(ShipmentPackaging $shipmentPackaging): self
  604.     {
  605.         if ($this->shipmentPackagings->removeElement($shipmentPackaging)) {
  606.             // set the owning side to null (unless already changed)
  607.             if ($shipmentPackaging->getShipment() === $this) {
  608.                 $shipmentPackaging->setShipment(null);
  609.             }
  610.         }
  611.         return $this;
  612.     }
  613.     /**
  614.      * @return Collection<int, ShipmentItems>
  615.      */
  616.     public function getShipmentItems(): Collection
  617.     {
  618.         return $this->shipmentItems;
  619.     }
  620.     public function addShipmentItem(ShipmentItems $shipmentItem): self
  621.     {
  622.         if (!$this->shipmentItems->contains($shipmentItem)) {
  623.             $this->shipmentItems->add($shipmentItem);
  624.             $shipmentItem->setShipment($this);
  625.         }
  626.         return $this;
  627.     }
  628.     public function removeShipmentItem(ShipmentItems $shipmentItem): self
  629.     {
  630.         if ($this->shipmentItems->removeElement($shipmentItem)) {
  631.             // set the owning side to null (unless already changed)
  632.             if ($shipmentItem->getShipment() === $this) {
  633.                 $shipmentItem->setShipment(null);
  634.             }
  635.         }
  636.         return $this;
  637.     }
  638.     public function getShipmentDate(): ?\DateTimeInterface
  639.     {
  640.         return $this->shipmentDate;
  641.     }
  642.     public function setShipmentDate(?\DateTimeInterface $shipmentDate): self
  643.     {
  644.         $this->shipmentDate $shipmentDate;
  645.         return $this;
  646.     }
  647.     public function getFromAddressBook(): ?AddressBook
  648.     {
  649.         return $this->fromAddressBook;
  650.     }
  651.     public function setFromAddressBook(?AddressBook $fromAddressBook): self
  652.     {
  653.         $this->fromAddressBook $fromAddressBook;
  654.         return $this;
  655.     }
  656.     public function getToAddressBook(): ?AddressBook
  657.     {
  658.         return $this->toAddressBook;
  659.     }
  660.     public function setToAddressBook(?AddressBook $toAddressBook): self
  661.     {
  662.         $this->toAddressBook $toAddressBook;
  663.         return $this;
  664.     }
  665.     public function getMawbNo(): ?string
  666.     {
  667.         return $this->mawbNo;
  668.     }
  669.     public function setMawbNo(?string $mawbNo): self
  670.     {
  671.         $this->mawbNo $mawbNo;
  672.         return $this;
  673.     }
  674.     public function getHawbNo(): ?string
  675.     {
  676.         return $this->hawbNo;
  677.     }
  678.     public function setHawbNo(?string $hawbNo): self
  679.     {
  680.         $this->hawbNo $hawbNo;
  681.         return $this;
  682.     }
  683.     /**
  684.      * @return Collection<int, TrackingUpdate>
  685.      */
  686.     public function getTrackingUpdates(): Collection
  687.     {
  688.         return $this->trackingUpdates;
  689.     }
  690.     public function addTrackingUpdate(TrackingUpdate $trackingUpdate): self
  691.     {
  692.         if (!$this->trackingUpdates->contains($trackingUpdate)) {
  693.             $this->trackingUpdates->add($trackingUpdate);
  694.             $trackingUpdate->setShipment($this);
  695.         }
  696.         return $this;
  697.     }
  698.     public function removeTrackingUpdate(TrackingUpdate $trackingUpdate): self
  699.     {
  700.         if ($this->trackingUpdates->removeElement($trackingUpdate)) {
  701.             // set the owning side to null (unless already changed)
  702.             if ($trackingUpdate->getShipment() === $this) {
  703.                 $trackingUpdate->setShipment(null);
  704.             }
  705.         }
  706.         return $this;
  707.     }
  708.     /**
  709.      * @return Collection<int, SalesInvoiceDetails>
  710.      */
  711.     public function getSalesInvoiceDetails(): Collection
  712.     {
  713.         return $this->salesInvoiceDetails;
  714.     }
  715.     public function addSalesInvoiceDetail(SalesInvoiceDetails $salesInvoiceDetail): self
  716.     {
  717.         if (!$this->salesInvoiceDetails->contains($salesInvoiceDetail)) {
  718.             $this->salesInvoiceDetails->add($salesInvoiceDetail);
  719.             $salesInvoiceDetail->setShipment($this);
  720.         }
  721.         return $this;
  722.     }
  723.     public function removeSalesInvoiceDetail(SalesInvoiceDetails $salesInvoiceDetail): self
  724.     {
  725.         if ($this->salesInvoiceDetails->removeElement($salesInvoiceDetail)) {
  726.             // set the owning side to null (unless already changed)
  727.             if ($salesInvoiceDetail->getShipment() === $this) {
  728.                 $salesInvoiceDetail->setShipment(null);
  729.             }
  730.         }
  731.         return $this;
  732.     }
  733.     public function getCustomer(): ?Customer
  734.     {
  735.         return $this->customer;
  736.     }
  737.     public function setCustomer(?Customer $customer): self
  738.     {
  739.         $this->customer $customer;
  740.         return $this;
  741.     }
  742.     public function getShipmentPackagingTotalGrossWeight() 
  743.     {    
  744.         $weight 0;
  745.         foreach ($this->shipmentPackagings as $shipmentPackaging) {
  746.             $weight += $shipmentPackaging->getQuantity() * $shipmentPackaging->getWeight();
  747.         }
  748.         return round($weight,2);
  749.     }
  750.     public function getShipmentPackagingTotalVolumetricWeight() 
  751.     {    
  752.         $weight 0;
  753.         foreach ($this->shipmentPackagings as $shipmentPackaging) {
  754.             $weight += $shipmentPackaging->getQuantity() * (($shipmentPackaging->getLength() * $shipmentPackaging->getWidth() * $shipmentPackaging->getHeight())/5000);
  755.         }
  756.         return round($weight,2);
  757.     }
  758.     public function getShipmentPackagingTotalPieces() 
  759.     {    
  760.         $pieces 0;
  761.         foreach ($this->shipmentPackagings as $shipmentPackaging) {
  762.             $pieces += $shipmentPackaging->getQuantity();
  763.         }
  764.         return round($pieces,2);
  765.     }
  766.  
  767.     public function getShipmentPackagingTotalFinalWeight()
  768.     {
  769.         if($this->getShipmentPackagingTotalVolumetricWeight() > $this->getShipmentPackagingTotalGrossWeight())
  770.         {
  771.             return $this->getShipmentPackagingTotalVolumetricWeight();
  772.         }
  773.         else
  774.         {
  775.             return $this->getShipmentPackagingTotalGrossWeight();
  776.         }
  777.     }
  778.     public function getShipmentItemsTotalCustomValue() 
  779.     {    
  780.         $value 0;
  781.         foreach ($this->shipmentItems as $shipmentItem) {
  782.             $value += $shipmentItem->getQuantity() * $shipmentItem->getValue();
  783.         }
  784.         return round($value,2);
  785.     }
  786.     public function getCourier(): ?Courier
  787.     {
  788.         return $this->courier;
  789.     }
  790.     public function setCourier(?Courier $courier): self
  791.     {
  792.         $this->courier $courier;
  793.         return $this;
  794.     }
  795.     public function getCourierHawbno(): ?string
  796.     {
  797.         return $this->courierHawbno;
  798.     }
  799.     public function setCourierHawbno(?string $courierHawbno): self
  800.     {
  801.         $this->courierHawbno $courierHawbno;
  802.         return $this;
  803.     }
  804.     public function getShipmentType(): ?int
  805.     {
  806.         return $this->shipmentType;
  807.     }
  808.     public function setShipmentType(?int $shipmentType): self
  809.     {
  810.         $this->shipmentType $shipmentType;
  811.         return $this;
  812.     }
  813.     public function getPickupName(): ?string
  814.     {
  815.         return $this->pickupName;
  816.     }
  817.     public function setPickupName(?string $pickupName): self
  818.     {
  819.         $this->pickupName $pickupName;
  820.         return $this;
  821.     }
  822.     public function getPickupCompany(): ?string
  823.     {
  824.         return $this->pickupCompany;
  825.     }
  826.     public function setPickupCompany(?string $pickupCompany): self
  827.     {
  828.         $this->pickupCompany $pickupCompany;
  829.         return $this;
  830.     }
  831.     public function getPickupCountry(): ?Country
  832.     {
  833.         return $this->pickupCountry;
  834.     }
  835.     public function setPickupCountry(?Country $pickupCountry): self
  836.     {
  837.         $this->pickupCountry $pickupCountry;
  838.         return $this;
  839.     }
  840.     public function getPickupAddress(): ?string
  841.     {
  842.         return $this->pickupAddress;
  843.     }
  844.     public function setPickupAddress(?string $pickupAddress): self
  845.     {
  846.         $this->pickupAddress $pickupAddress;
  847.         return $this;
  848.     }
  849.     public function getPickupAddressTwo(): ?string
  850.     {
  851.         return $this->pickupAddressTwo;
  852.     }
  853.     public function setPickupAddressTwo(?string $pickupAddressTwo): self
  854.     {
  855.         $this->pickupAddressTwo $pickupAddressTwo;
  856.         return $this;
  857.     }
  858.     public function getPickupAddressThree(): ?string
  859.     {
  860.         return $this->pickupAddressThree;
  861.     }
  862.     public function setPickupAddressThree(?string $pickupAddressThree): self
  863.     {
  864.         $this->pickupAddressThree $pickupAddressThree;
  865.         return $this;
  866.     }
  867.     public function getPickupPostalCode(): ?string
  868.     {
  869.         return $this->pickupPostalCode;
  870.     }
  871.     public function setPickupPostalCode(?string $pickupPostalCode): self
  872.     {
  873.         $this->pickupPostalCode $pickupPostalCode;
  874.         return $this;
  875.     }
  876.     public function getPickupCity(): ?string
  877.     {
  878.         return $this->pickupCity;
  879.     }
  880.     public function setPickupCity(?string $pickupCity): self
  881.     {
  882.         $this->pickupCity $pickupCity;
  883.         return $this;
  884.     }
  885.     public function getPickupState(): ?string
  886.     {
  887.         return $this->pickupState;
  888.     }
  889.     public function setPickupState(?string $pickupState): self
  890.     {
  891.         $this->pickupState $pickupState;
  892.         return $this;
  893.     }
  894.     public function getPickupEmail(): ?string
  895.     {
  896.         return $this->pickupEmail;
  897.     }
  898.     public function setPickupEmail(?string $pickupEmail): self
  899.     {
  900.         $this->pickupEmail $pickupEmail;
  901.         return $this;
  902.     }
  903.     public function getPickupPhoneType(): ?PhoneType
  904.     {
  905.         return $this->pickupPhoneType;
  906.     }
  907.     public function setPickupPhoneType(?PhoneType $pickupPhoneType): self
  908.     {
  909.         $this->pickupPhoneType $pickupPhoneType;
  910.         return $this;
  911.     }
  912.     public function getPickupPhoneCode(): ?string
  913.     {
  914.         return $this->pickupPhoneCode;
  915.     }
  916.     public function setPickupPhoneCode(?string $pickupPhoneCode): self
  917.     {
  918.         $this->pickupPhoneCode $pickupPhoneCode;
  919.         return $this;
  920.     }
  921.     public function getPickupPhone(): ?string
  922.     {
  923.         return $this->pickupPhone;
  924.     }
  925.     public function setPickupPhone(?string $pickupPhone): self
  926.     {
  927.         $this->pickupPhone $pickupPhone;
  928.         return $this;
  929.     }
  930.     public function getCreatedAt(): ?\DateTimeImmutable
  931.     {
  932.         return $this->createdAt;
  933.     }
  934.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  935.     {
  936.         $this->createdAt $createdAt;
  937.         return $this;
  938.     }
  939.     public function getCreatedBy(): ?User
  940.     {
  941.         return $this->createdBy;
  942.     }
  943.     public function setCreatedBy(?User $createdBy): self
  944.     {
  945.         $this->createdBy $createdBy;
  946.         return $this;
  947.     }
  948.     public function getModifiedAt(): ?\DateTimeImmutable
  949.     {
  950.         return $this->modifiedAt;
  951.     }
  952.     public function setModifiedAt(?\DateTimeImmutable $modifiedAt): self
  953.     {
  954.         $this->modifiedAt $modifiedAt;
  955.         return $this;
  956.     }
  957.     public function getModifiedBy(): ?User
  958.     {
  959.         return $this->modifiedBy;
  960.     }
  961.     public function setModifiedBy(?User $modifiedBy): self
  962.     {
  963.         $this->modifiedBy $modifiedBy;
  964.         return $this;
  965.     }
  966.     public function getUserCompany(): ?UserCompany
  967.     {
  968.         return $this->userCompany;
  969.     }
  970.     public function setUserCompany(?UserCompany $userCompany): self
  971.     {
  972.         $this->userCompany $userCompany;
  973.         return $this;
  974.     }
  975.     public function getDutyPayer(): ?DutyPayer
  976.     {
  977.         return $this->dutyPayer;
  978.     }
  979.     public function setDutyPayer(?DutyPayer $dutyPayer): self
  980.     {
  981.         $this->dutyPayer $dutyPayer;
  982.         return $this;
  983.     }
  984.     public function getPaymentOptions(): ?PaymentOptions
  985.     {
  986.         return $this->paymentOptions;
  987.     }
  988.     public function setPaymentOptions(?PaymentOptions $paymentOptions): self
  989.     {
  990.         $this->paymentOptions $paymentOptions;
  991.         return $this;
  992.     }
  993.     public function getServicese(): ?Services
  994.     {
  995.         return $this->servicese;
  996.     }
  997.     public function setServicese(?Services $servicese): self
  998.     {
  999.         $this->servicese $servicese;
  1000.         return $this;
  1001.     }
  1002.     public function getDutyAccountno(): ?string
  1003.     {
  1004.         return $this->dutyAccountno;
  1005.     }
  1006.     public function setDutyAccountno(?string $dutyAccountno): self
  1007.     {
  1008.         $this->dutyAccountno $dutyAccountno;
  1009.         return $this;
  1010.     }
  1011.     public function getSaveFromAb(): ?bool
  1012.     {
  1013.         return $this->saveFromAb;
  1014.     }
  1015.     public function setSaveFromAb(?bool $saveFromAb): self
  1016.     {
  1017.         $this->saveFromAb $saveFromAb;
  1018.         return $this;
  1019.     }
  1020.     public function getSaveToAb(): ?bool
  1021.     {
  1022.         return $this->saveToAb;
  1023.     }
  1024.     public function setSaveToAb(?bool $saveToAb): self
  1025.     {
  1026.         $this->saveToAb $saveToAb;
  1027.         return $this;
  1028.     }
  1029.     public function getAccepted(): ?int
  1030.     {
  1031.         return $this->accepted;
  1032.     }
  1033.     public function setAccepted(?int $accepted): self
  1034.     {
  1035.         $this->accepted $accepted;
  1036.         return $this;
  1037.     }
  1038.     public function isTrackingStatus(): ?bool
  1039.     {
  1040.         return $this->trackingStatus;
  1041.     }
  1042.     public function setTrackingStatus(?bool $trackingStatus): self
  1043.     {
  1044.         $this->trackingStatus $trackingStatus;
  1045.         return $this;
  1046.     }
  1047.     public function getImagePath(): ?string
  1048.     {
  1049.         return $this->imagePath;
  1050.     }
  1051.     public function setImagePath(?string $imagePath): self
  1052.     {
  1053.         $this->imagePath $imagePath;
  1054.         return $this;
  1055.     }
  1056.     public function getPickup(): ?User
  1057.     {
  1058.         return $this->pickup;
  1059.     }
  1060.     public function setPickup(?User $pickup): self
  1061.     {
  1062.         $this->pickup $pickup;
  1063.         return $this;
  1064.     }
  1065.     public function getBookingNO(): ?string
  1066.     {
  1067.         return $this->bookingNO;
  1068.     }
  1069.     public function setBookingNO(?string $bookingNO): self
  1070.     {
  1071.         $this->bookingNO $bookingNO;
  1072.         return $this;
  1073.     }
  1074.     public function getServiceType(): ?string
  1075.     {
  1076.         return $this->serviceType;
  1077.     }
  1078.     public function setServiceType(?string $serviceType): self
  1079.     {
  1080.         $this->serviceType $serviceType;
  1081.         return $this;
  1082.     }
  1083.     public function getMasterWeight(): ?float
  1084.     {
  1085.         return $this->masterWeight;
  1086.     }
  1087.     public function setMasterWeight(?float $masterWeight): self
  1088.     {
  1089.         $this->masterWeight $masterWeight;
  1090.         return $this;
  1091.     }
  1092.     public function isExpedite(): ?bool
  1093.     {
  1094.         return $this->expedite;
  1095.     }
  1096.     public function setExpedite(?bool $expedite): self
  1097.     {
  1098.         $this->expedite $expedite;
  1099.         return $this;
  1100.     }
  1101.     public function getCustomerName(): ?string
  1102.     {
  1103.         return $this->customerName;
  1104.     }
  1105.     public function setCustomerName(?string $customerName): self
  1106.     {
  1107.         $this->customerName $customerName;
  1108.         return $this;
  1109.     }
  1110.     public function getPickupmanName(): ?string
  1111.     {
  1112.         return $this->pickupmanName;
  1113.     }
  1114.     public function setPickupmanName(?string $pickupmanName): self
  1115.     {
  1116.         $this->pickupmanName $pickupmanName;
  1117.         return $this;
  1118.     }
  1119.     public function isTextCustomer(): ?bool
  1120.     {
  1121.         return $this->textCustomer;
  1122.     }
  1123.     public function setTextCustomer(?bool $textCustomer): self
  1124.     {
  1125.         $this->textCustomer $textCustomer;
  1126.         return $this;
  1127.     }
  1128.     public function isTextPickup(): ?bool
  1129.     {
  1130.         return $this->textPickup;
  1131.     }
  1132.     public function setTextPickup(?bool $textPickup): self
  1133.     {
  1134.         $this->textPickup $textPickup;
  1135.         return $this;
  1136.     }
  1137.     public function getFromEori(): ?string
  1138.     {
  1139.         return $this->fromEori;
  1140.     }
  1141.     public function setFromEori(?string $fromEori): self
  1142.     {
  1143.         $this->fromEori $fromEori;
  1144.         return $this;
  1145.     }
  1146.     public function getFromEroino(): ?string
  1147.     {
  1148.         return $this->fromEroino;
  1149.     }
  1150.     public function setFromEroino(?string $fromEroino): self
  1151.     {
  1152.         $this->fromEroino $fromEroino;
  1153.         return $this;
  1154.     }
  1155.     public function getToEori(): ?string
  1156.     {
  1157.         return $this->toEori;
  1158.     }
  1159.     public function setToEori(?string $toEori): self
  1160.     {
  1161.         $this->toEori $toEori;
  1162.         return $this;
  1163.     }
  1164.     public function getToEorino(): ?string
  1165.     {
  1166.         return $this->toEorino;
  1167.     }
  1168.     public function setToEorino(?string $toEorino): self
  1169.     {
  1170.         $this->toEorino $toEorino;
  1171.         return $this;
  1172.     }
  1173.     /**
  1174.      * @return Collection<int, FromPhoneDetails>
  1175.      */
  1176.     public function getFromPhoneDetails(): Collection
  1177.     {
  1178.         return $this->fromPhoneDetails;
  1179.     }
  1180.     public function addFromPhoneDetail(FromPhoneDetails $fromPhoneDetail): self
  1181.     {
  1182.         if (!$this->fromPhoneDetails->contains($fromPhoneDetail)) {
  1183.             $this->fromPhoneDetails->add($fromPhoneDetail);
  1184.             $fromPhoneDetail->setShipment($this);
  1185.         }
  1186.         return $this;
  1187.     }
  1188.     public function removeFromPhoneDetail(FromPhoneDetails $fromPhoneDetail): self
  1189.     {
  1190.         if ($this->fromPhoneDetails->removeElement($fromPhoneDetail)) {
  1191.             // set the owning side to null (unless already changed)
  1192.             if ($fromPhoneDetail->getShipment() === $this) {
  1193.                 $fromPhoneDetail->setShipment(null);
  1194.             }
  1195.         }
  1196.         return $this;
  1197.     }
  1198.     /**
  1199.      * @return Collection<int, ToPhoneDetails>
  1200.      */
  1201.     public function getToPhoneDetails(): Collection
  1202.     {
  1203.         return $this->toPhoneDetails;
  1204.     }
  1205.     public function addToPhoneDetail(ToPhoneDetails $toPhoneDetail): self
  1206.     {
  1207.         if (!$this->toPhoneDetails->contains($toPhoneDetail)) {
  1208.             $this->toPhoneDetails->add($toPhoneDetail);
  1209.             $toPhoneDetail->setShipment($this);
  1210.         }
  1211.         return $this;
  1212.     }
  1213.     public function removeToPhoneDetail(ToPhoneDetails $toPhoneDetail): self
  1214.     {
  1215.         if ($this->toPhoneDetails->removeElement($toPhoneDetail)) {
  1216.             // set the owning side to null (unless already changed)
  1217.             if ($toPhoneDetail->getShipment() === $this) {
  1218.                 $toPhoneDetail->setShipment(null);
  1219.             }
  1220.         }
  1221.         return $this;
  1222.     }
  1223.     public function getItemSummary(): ?string
  1224.     {
  1225.         return $this->itemSummary;
  1226.     }
  1227.     public function setItemSummary(?string $itemSummary): self
  1228.     {
  1229.         $this->itemSummary $itemSummary;
  1230.         return $this;
  1231.     }
  1232.     public function getAdditionalInvoiceInfo(): ?string
  1233.     {
  1234.         return $this->additionalInvoiceInfo;
  1235.     }
  1236.     public function setAdditionalInvoiceInfo(?string $additionalInvoiceInfo): self
  1237.     {
  1238.         $this->additionalInvoiceInfo $additionalInvoiceInfo;
  1239.         return $this;
  1240.     }
  1241.     public function getInstructions(): ?string
  1242.     {
  1243.         return $this->instructions;
  1244.     }
  1245.     public function setInstructions(?string $instructions): self
  1246.     {
  1247.         $this->instructions $instructions;
  1248.         return $this;
  1249.     }
  1250.     public function getRemarks(): ?string
  1251.     {
  1252.         return $this->remarks;
  1253.     }
  1254.     public function setRemarks(?string $remarks): self
  1255.     {
  1256.         $this->remarks $remarks;
  1257.         return $this;
  1258.     }
  1259.     public function getCheckStatus(): ?int
  1260.     {
  1261.         return $this->check_status;
  1262.     }
  1263.     public function setCheckStatus(?int $check_status): self
  1264.     {
  1265.         $this->check_status $check_status;
  1266.         return $this;
  1267.     }
  1268.     public function getCashAmount(): ?float
  1269.     {
  1270.         return $this->cashAmount;
  1271.     }
  1272.     public function setCashAmount(?float $cashAmount): self
  1273.     {
  1274.         $this->cashAmount $cashAmount;
  1275.         return $this;
  1276.     }
  1277.     public function getMoneyReceipt(): ?string
  1278.     {
  1279.         return $this->moneyReceipt;
  1280.     }
  1281.     public function setMoneyReceipt(?string $moneyReceipt): self
  1282.     {
  1283.         $this->moneyReceipt $moneyReceipt;
  1284.         return $this;
  1285.     }
  1286.     public function isManualHawb(): ?bool
  1287.     {
  1288.         return $this->manualHawb;
  1289.     }
  1290.     public function setManualHawb(?bool $manualHawb): self
  1291.     {
  1292.         $this->manualHawb $manualHawb;
  1293.         return $this;
  1294.     }
  1295.  
  1296. }