src/Entity/Orders.php line 63

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\OrdersRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. use ApiPlatform\Metadata\ApiFilter;
  11. use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
  12. use ApiPlatform\Core\Annotation\ApiProperty;
  13. use Symfony\Component\Serializer\Annotation\MaxDepth;
  14. use ApiPlatform\Metadata\Get;
  15. use ApiPlatform\Metadata\GetCollection;
  16. use ApiPlatform\Metadata\Delete;
  17. use ApiPlatform\Metadata\Put;
  18. use ApiPlatform\Metadata\Post;
  19. use App\Controller\OrdersController;
  20. use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
  21. #[ORM\Entity(repositoryClassOrdersRepository::class)]
  22. #[ApiResource(
  23.     operations: [
  24.         new Get(),
  25.         new Post(),
  26.         new Delete(),
  27.         new GetCollection(),
  28.         new Put(),
  29.         new Post(
  30.             name'synced_orders'
  31.             uriTemplate'/orders/synced'
  32.             controllerOrdersController::class
  33.         )
  34.     ],
  35.     normalizationContext: ['groups' => ['order:read']],
  36.     denormalizationContext: ['groups' => ['order:write']],
  37.     order: ['id' => 'DESC'],
  38. )] 
  39. #[ApiFilter(
  40.     SearchFilter::class, 
  41.     properties: [
  42.         'code1c' => 'exact'
  43.         'synced' => 'exact'
  44.         'status' => 'exact'
  45.         'createdIn' => 'exact'
  46.         'account.name' => 'ipartial',
  47.         'account.manager' => 'exact'
  48.         'account.user' => 'exact'
  49.         'manager.username' => 'ipartial'
  50.         'manager.firstName' => 'ipartial'
  51.         'manager.lastName' => 'ipartial'
  52.     ]
  53. )]
  54. #[ORM\HasLifecycleCallbacks]
  55. #[ApiFilter(DateFilter::class, properties: ['dateEnteredIn1c''dateEntered''dateOrder'])]
  56. class Orders
  57. {
  58.     #[Groups(['order:read',  'order_product:write','load_invoice:read''order:write''media_object:read''agreements:read''pre_order_product:read''pre_order:read'])]
  59.     #[ORM\Id]
  60.     #[ORM\GeneratedValue]
  61.     #[ORM\Column]
  62.     private ?int $id null;
  63.     #[Groups(['order:read',  'order_product:write','load_invoice:read''order:write''media_object:read''agreements:read''pre_order_product:read''pre_order:read'])]
  64.     #[ORM\Column(length255nullabletrue)]
  65.     private ?string $name null;
  66.     #[Groups(['order:read',  'order_product:write','load_invoice:read''order:write','media_object:read''pre_order_product:read''pre_order:read'])]
  67.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  68.     private ?\DateTimeInterface $dateEntered null;
  69.     #[Groups(['order:read',  'order_product:write''order:write'])]
  70.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  71.     private ?\DateTimeInterface $dateModified null;
  72.     #[ORM\Column(nullabletrue)]
  73.     private ?int $created_by null;
  74.     #[ORM\Column(nullabletrue)]
  75.     private ?int $modified_user_id null;
  76.     #[Groups(['order:read',  'order_product:write''order:write''pre_order:read'])]
  77.     #[ORM\ManyToOne(inversedBy'orders')]
  78.     private ?User $client null;
  79.     #[Groups(['order:read',  'order_product:write''order:write''pre_order:read''load_invoice:read'])]
  80.     #[ORM\ManyToOne(inversedBy'managerOrders')]
  81.     private ?User $manager null;
  82.     #[Groups(['order:read',  'order_product:write''order:write''pre_order_product:read''pre_order:read''load_invoice:read'])]
  83.     #[ORM\ManyToOne(inversedBy'orders')]
  84.     private ?Accounts $account null;
  85.     #[Groups(['order:read',  'order_product:write','load_invoice:read''order:write''pre_order_product:read''pre_order:read''load_invoice:read'])]
  86.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  87.     private ?\DateTimeInterface $dateOrder null;
  88.     #[Groups(['order:read',  'order_product:write','load_invoice:read''order:write''pre_order_product:read''pre_order:read'])]
  89.     #[ORM\Column(length100nullabletrue)]
  90.     private ?string $status null;
  91.     #[Groups(['order:read',  'order_product:write''order:write''pre_order_product:read''pre_order:read'])]
  92.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  93.     private ?string $description null;
  94.     #[Groups(['order:read',  'order_product:write''load_invoice:read''order:write''pre_order_product:read''pre_order:read'])]
  95.     #[ORM\Column(length20nullabletrue)]
  96.     private ?string $paymentMethod null;
  97.     #[Groups(['order:read',  'order_product:write''load_invoice:read',  'order:write''pre_order_product:read''pre_order:read'])]
  98.     #[ORM\Column(nullabletrue)]
  99.     private ?float $sumOrdered null;
  100.     #[Groups(['order:read',  'order_product:write''load_invoice:read''order:write''media_object:read''agreements:read''pre_order_product:read''pre_order:read'])]
  101.     #[ORM\Column(length20nullabletrue)]
  102.     private ?string $code1c null;
  103.     #[Groups(['order:read',  'order_product:write''load_invoice:read',  'order:write'])]
  104.     #[ORM\Column(length10nullabletrue)]
  105.     private ?string $curency null;
  106.     #[Groups(['order:read',  'order_product:write''order:write'])]
  107.     #[ORM\Column(nullabletrue)]
  108.     private ?float $curencyRate null;
  109.     #[Groups(['order:read',  'order_product:write''order:write'])]
  110.     #[ORM\Column(nullabletrue)]
  111.     private ?float $discountTotal null;
  112.     #[Groups(['order:read',  'order_product:write''order:write'])]
  113.     #[ORM\Column(nullabletrue)]
  114.     private ?int $discount_percent null;
  115.     #[Groups(['order:read',  'order_product:write''order:write'])]
  116.     #[ORM\Column(length100nullabletrue)]
  117.     private ?string $shippingAddressStreet null;
  118.     #[Groups(['order:read',  'order_product:write''order:write'])]
  119.     #[ORM\Column(length100nullabletrue)]
  120.     private ?string $shippingAddressCity null;
  121.     #[Groups(['order:read',  'order_product:write''order:write'])]
  122.     #[ORM\Column(length100nullabletrue)]
  123.     private ?string $shippingAddressBuilding null;
  124.     #[Groups(['order:read',  'order_product:write''order:write'])]
  125.     #[ORM\Column(length100nullabletrue)]
  126.     private ?string $shippingAddressPost null;
  127.     #[Groups(['order:read',  'order_product:write''order:write'])]
  128.     #[ORM\Column(length100nullabletrue)]
  129.     private ?string $shippingAddressCountry null;
  130.     #[Groups(['order:read',  'order_product:write''order:write'])]
  131.     #[ORM\Column(length100nullabletrue)]
  132.     private ?string $shippingAddressDate null;
  133.     #[Groups(['order:read',  'order_product:write''order:write'])]
  134.     #[ORM\Column(nullabletrue)]
  135.     private ?int $copyOrderId null;
  136.     #[ApiProperty(writabletrue)]
  137.     #[Groups(['order:read''order:write'])]
  138.     #[ORM\OneToMany(mappedBy'order'targetEntityOrderProduct::class, cascade:['persist''remove'])]
  139.     #[MaxDepth(4)]
  140.     private Collection $orderProducts;
  141.     #[MaxDepth(1)]
  142.     #[Groups(['order:read',  'order_product:write''order:write'])]
  143.     #[ORM\ManyToOne(inversedBy'orders')]
  144.     private ?Storage $storage null;
  145.     #[Groups(['order:read',  'order_product:write''order:write'])]
  146.     #[ORM\Column(length20nullabletrue)]
  147.     private ?string $shippingMethod null;
  148.     #[Groups(['order:read',  'order_product:write''order:write'])]
  149.     #[ORM\Column(length20nullabletrue)]
  150.     private ?string $dovirenistSeries null;
  151.     #[Groups(['order:read',  'order_product:write''order:write'])]
  152.     #[ORM\Column(length100nullabletrue)]
  153.     private ?string $dovirenistNumber null;
  154.     #[Groups(['order:read',  'order_product:write''order:write'])]
  155.     #[ORM\Column(nullabletrue)]
  156.     private ?bool $isGot null;
  157.     #[Groups(['order:read',  'order_product:write''order:write'])]
  158.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  159.     private ?\DateTimeInterface $dovirenistDate null;
  160.     #[Groups(['order_product:write''order:write'])]
  161.     #[ORM\ManyToOne]
  162.     private ?User $releaseAllowed null;
  163.     #[Groups(['order:read',  'order_product:write''order:write'])]
  164.     #[ORM\Column(nullabletrue)]
  165.     private ?bool $isReleaseAllowed null;
  166.     #[Groups(['order:read',  'order_product:write''order:write'])]
  167.     #[ORM\Column(nullabletrue)]
  168.     private ?bool $isChecked null;
  169.     #[Groups(['order_product:write''order:write'])]
  170.     #[ORM\ManyToOne]
  171.     private ?User $checked null;
  172.     #[Groups(['order:read',  'order_product:write''order:write'])]
  173.     #[ORM\Column(length255nullabletrue)]
  174.     private ?string $carrier null;
  175.     #[Groups(['order:read',  'order_product:write''order:write'])]
  176.     #[ORM\Column(length10nullabletrue)]
  177.     private ?string $id_1c null;
  178.     #[Groups(['order:read',  'order_product:write''order:write'])]
  179.     #[ORM\Column(nullabletrue)]
  180.     private ?float $sumTransport null;
  181.     #[MaxDepth(1)]
  182.     #[Groups(['order:read',  'order_product:write''order:write'])]
  183.     #[ORM\ManyToOne(inversedBy'orders')]
  184.     private ?PreOrder $preOrder null;
  185.     // #[ORM\ManyToOne(inversedBy: 'orders')]
  186.     // private ?LoadInvoice $load_invoice = null;
  187.     // #[ORM\OneToMany(mappedBy: '_order', targetEntity: LoadInvoice::class)]
  188.     // private Collection $loadInvoices;
  189.     #[Groups(['order:read',  'order_product:write''order:write'])]
  190.     #[ORM\OneToMany(mappedBy'order'targetEntityAccepted::class)]
  191.     private Collection $accepteds;
  192.     #[Groups(['order:read',  'order_product:write''order:write'])]
  193.     #[ORM\ManyToMany(targetEntityLoadInvoice::class, inversedBy'orders')]
  194.     private Collection $loadInvoice;
  195.     #[ORM\OneToMany(mappedBy'orders'targetEntityCalculations::class)]
  196.     private Collection $calculations;
  197.     #[Groups([ 'order_product:write'])]
  198.     #[ORM\OneToMany(mappedBy'orders'targetEntityMediaObject::class)]
  199.     private Collection $mediaObjects;
  200.     #[Groups(['order:read',  'order_product:write''order:write''pre_order_product:read''pre_order:read''load_invoice:read'])]
  201.     #[ORM\Column(nullabletrue)]
  202.     private ?bool $synced null;
  203.     #[Groups(['order:read',  'order_product:write''order:write''load_invoice:read'])]
  204.     #[ORM\ManyToOne(inversedBy'orders')]
  205.     private ?Agreements $agreement null;
  206.     
  207.     #[Groups(['order:read',  'order_product:write''order:write''load_invoice:read'])]
  208.     #[ORM\Column(length100nullabletrue)]
  209.     private ?string $createdIn 'crm';
  210.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'parentOrders')]
  211.     private ?self $parent null;
  212.     #[ORM\OneToMany(mappedBy'parent'targetEntityself::class)]
  213.     private Collection $parentOrders;
  214.     #[Groups(['order:read','order:write'])]
  215.     #[ORM\ManyToOne(inversedBy'orders')]
  216.     private ?AccountAddress $address null;
  217.     #[Groups(['order:read','order:write'])] 
  218.     #[ORM\Column(nullabletrue)]
  219.     private ?bool $deleted null;
  220.     #[Groups(['order:read','order:write'])]
  221.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  222.     private ?\DateTimeInterface $dateEnteredIn1c null;
  223.     #[Groups(['order:read','order:write'])]
  224.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  225.     private ?\DateTimeInterface $dateModifiedIn1c null;
  226.     #[Groups(['order:read','order:write'])]
  227.     #[ORM\Column(length100nullabletrue)]
  228.     private ?string $status1c null;
  229.     #[Groups(['order:carriers','order:write'])]
  230.     #[ORM\ManyToOne(inversedBy'orderCarrier')]
  231.     private ?Accounts $carriers null;
  232.     public function __construct()
  233.     {
  234.         $this->orderProducts = new ArrayCollection();
  235.         // $this->loadInvoices = new ArrayCollection();
  236.         $this->accepteds = new ArrayCollection();
  237.         $this->loadInvoice = new ArrayCollection();
  238.         $this->calculations = new ArrayCollection();
  239.         $this->mediaObjects = new ArrayCollection();
  240.         $this->parentOrders = new ArrayCollection();
  241.     }
  242.     public function getId(): ?int
  243.     {
  244.         return $this->id;
  245.     }
  246.     public function setId(?string $id): self
  247.     {
  248.         $this->id $id;
  249.         return $this;
  250.     }
  251.     public function getName(): ?string
  252.     {
  253.         return $this->name;
  254.     }
  255.     public function setName(?string $name): self
  256.     {
  257.         $this->name $name;
  258.         return $this;
  259.     }
  260.     public function getDateEntered(): ?\DateTimeInterface
  261.     {
  262.         return $this->dateEntered;
  263.     }
  264.     public function setDateEntered(?\DateTimeInterface $dateEntered): self
  265.     {
  266.         $this->dateEntered $dateEntered;
  267.         return $this;
  268.     }
  269.     public function getDateModified(): ?\DateTimeInterface
  270.     {
  271.         return $this->dateModified;
  272.     }
  273.     public function setDateModified(?\DateTimeInterface $dateModified): self
  274.     {
  275.         $this->dateModified $dateModified;
  276.         return $this;
  277.     }
  278.     public function getCreatedBy(): ?int
  279.     {
  280.         return $this->created_by;
  281.     }
  282.     public function setCreatedBy(?int $created_by): self
  283.     {
  284.         $this->created_by $created_by;
  285.         return $this;
  286.     }
  287.     public function getModifiedUserId(): ?int
  288.     {
  289.         return $this->modified_user_id;
  290.     }
  291.     public function setModifiedUserId(?int $modified_user_id): self
  292.     {
  293.         $this->modified_user_id $modified_user_id;
  294.         return $this;
  295.     }
  296.     public function getClient(): ?User
  297.     {
  298.         return $this->client;
  299.     }
  300.     public function setClient(?User $client): self
  301.     {
  302.         $this->client $client;
  303.         return $this;
  304.     }
  305.     public function getManager(): ?User
  306.     {
  307.         return $this->manager;
  308.     }
  309.     public function setManager(?User $manager): self
  310.     {
  311.         $this->manager $manager;
  312.         return $this;
  313.     }
  314.     public function getAccount(): ?Accounts
  315.     {
  316.         return $this->account;
  317.     }
  318.     public function setAccount(?Accounts $account): self
  319.     {
  320.         $this->account $account;
  321.         return $this;
  322.     }
  323.     public function getDateOrder(): ?\DateTimeInterface
  324.     {
  325.         return $this->dateOrder;
  326.     }
  327.     public function setDateOrder(?\DateTimeInterface $dateOrder): self
  328.     {
  329.         $this->dateOrder $dateOrder;
  330.         return $this;
  331.     }
  332.     public function getStatus(): ?string
  333.     {
  334.         return $this->status;
  335.     }
  336.     public function setStatus(?string $status): self
  337.     {
  338.         $this->status $status;
  339.         return $this;
  340.     }
  341.     public function getDescription(): ?string
  342.     {
  343.         return $this->description;
  344.     }
  345.     public function setDescription(?string $description): self
  346.     {
  347.         $this->description $description;
  348.         return $this;
  349.     }
  350.     public function getPaymentMethod(): ?string
  351.     {
  352.         return $this->paymentMethod;
  353.     }
  354.     public function setPaymentMethod(?string $paymentMethod): self
  355.     {
  356.         $this->paymentMethod $paymentMethod;
  357.         return $this;
  358.     }
  359.     public function getSumOrdered(): ?float
  360.     {
  361.         return $this->sumOrdered;
  362.     }
  363.     public function setSumOrdered(?float $sumOrdered): self
  364.     {
  365.         $this->sumOrdered $sumOrdered;
  366.         return $this;
  367.     }
  368.     public function getCode1c(): ?string
  369.     {
  370.         return $this->code1c;
  371.     }
  372.     public function setCode1c(?string $code1c): self
  373.     {
  374.         $this->code1c $code1c;
  375.         return $this;
  376.     }
  377.     public function getCurency(): ?string
  378.     {
  379.         return $this->curency;
  380.     }
  381.     public function setCurency(?string $curency): self
  382.     {
  383.         $this->curency $curency;
  384.         return $this;
  385.     }
  386.     public function getCurencyRate(): ?float
  387.     {
  388.         return $this->curencyRate;
  389.     }
  390.     public function setCurencyRate(?float $curencyRate): self
  391.     {
  392.         $this->curencyRate $curencyRate;
  393.         return $this;
  394.     }
  395.     public function getDiscountTotal(): ?float
  396.     {
  397.         return $this->discountTotal;
  398.     }
  399.     public function setDiscountTotal(?float $discountTotal): self
  400.     {
  401.         $this->discountTotal $discountTotal;
  402.         return $this;
  403.     }
  404.     public function getDiscountPercent(): ?int
  405.     {
  406.         return $this->discount_percent;
  407.     }
  408.     public function setDiscountPercent(?int $discount_percent): self
  409.     {
  410.         $this->discount_percent $discount_percent;
  411.         return $this;
  412.     }
  413.     public function getShippingAddressStreet(): ?string
  414.     {
  415.         return $this->shippingAddressStreet;
  416.     }
  417.     public function setShippingAddressStreet(?string $shippingAddressStreet): self
  418.     {
  419.         $this->shippingAddressStreet $shippingAddressStreet;
  420.         return $this;
  421.     }
  422.     public function getShippingAddressCity(): ?string
  423.     {
  424.         return $this->shippingAddressCity;
  425.     }
  426.     public function setShippingAddressCity(?string $shippingAddressCity): self
  427.     {
  428.         $this->shippingAddressCity $shippingAddressCity;
  429.         return $this;
  430.     }
  431.     public function getShippingAddressBuilding(): ?string
  432.     {
  433.         return $this->shippingAddressBuilding;
  434.     }
  435.     public function setShippingAddressBuilding(?string $shippingAddressBuilding): self
  436.     {
  437.         $this->shippingAddressBuilding $shippingAddressBuilding;
  438.         return $this;
  439.     }
  440.     public function getShippingAddressPost(): ?string
  441.     {
  442.         return $this->shippingAddressPost;
  443.     }
  444.     public function setShippingAddressPost(?string $shippingAddressPost): self
  445.     {
  446.         $this->shippingAddressPost $shippingAddressPost;
  447.         return $this;
  448.     }
  449.     public function getShippingAddressCountry(): ?string
  450.     {
  451.         return $this->shippingAddressCountry;
  452.     }
  453.     public function setShippingAddressCountry(?string $shippingAddressCountry): self
  454.     {
  455.         $this->shippingAddressCountry $shippingAddressCountry;
  456.         return $this;
  457.     }
  458.     public function getShippingAddressDate(): ?string
  459.     {
  460.         return $this->shippingAddressDate;
  461.     }
  462.     public function setShippingAddressDate(?string $shippingAddressDate): self
  463.     {
  464.         $this->shippingAddressDate $shippingAddressDate;
  465.         return $this;
  466.     }
  467.     public function getCopyOrderId(): ?int
  468.     {
  469.         return $this->copyOrderId;
  470.     }
  471.     public function setCopyOrderId(?int $copyOrderId): self
  472.     {
  473.         $this->copyOrderId $copyOrderId;
  474.         return $this;
  475.     }
  476.     /**
  477.      * @return Collection<int, OrderProduct>
  478.      */
  479.     public function getOrderProducts(): Collection
  480.     {
  481.         return $this->orderProducts;
  482.     }
  483.     public function addOrderProduct(OrderProduct $orderProduct): self
  484.     {
  485.         if (!$this->orderProducts->contains($orderProduct)) {
  486.             $this->orderProducts->add($orderProduct);
  487.             $orderProduct->setOrder($this);
  488.         }
  489.         return $this;
  490.     }
  491.     public function removeOrderProduct(OrderProduct $orderProduct): self
  492.     {
  493.         if ($this->orderProducts->removeElement($orderProduct)) {
  494.             // set the owning side to null (unless already changed)
  495.             if ($orderProduct->getOrder() === $this) {
  496.                 $orderProduct->setOrder(null);
  497.             }
  498.         }
  499.         return $this;
  500.     }
  501.     public function getStorage(): ?Storage
  502.     {
  503.         return $this->storage;
  504.     }
  505.     public function setStorage(?Storage $storage): self
  506.     {
  507.         $this->storage $storage;
  508.         return $this;
  509.     }
  510.     public function getShippingMethod(): ?string
  511.     {
  512.         return $this->shippingMethod;
  513.     }
  514.     public function setShippingMethod(?string $shippingMethod): self
  515.     {
  516.         $this->shippingMethod $shippingMethod;
  517.         return $this;
  518.     }
  519.     public function getDovirenistSeries(): ?string
  520.     {
  521.         return $this->dovirenistSeries;
  522.     }
  523.     public function setDovirenistSeries(?string $dovirenistSeries): self
  524.     {
  525.         $this->dovirenistSeries $dovirenistSeries;
  526.         return $this;
  527.     }
  528.     public function getDovirenistNumber(): ?string
  529.     {
  530.         return $this->dovirenistNumber;
  531.     }
  532.     public function setDovirenistNumber(?string $dovirenistNumber): self
  533.     {
  534.         $this->dovirenistNumber $dovirenistNumber;
  535.         return $this;
  536.     }
  537.     public function isIsGot(): ?bool
  538.     {
  539.         return $this->isGot;
  540.     }
  541.     public function setIsGot(?bool $isGot): self
  542.     {
  543.         $this->isGot $isGot;
  544.         return $this;
  545.     }
  546.     public function getDovirenistDate(): ?\DateTimeInterface
  547.     {
  548.         return $this->dovirenistDate;
  549.     }
  550.     public function setDovirenistDate(?\DateTimeInterface $dovirenistDate): self
  551.     {
  552.         $this->dovirenistDate $dovirenistDate;
  553.         return $this;
  554.     }
  555.     public function getReleaseAllowed(): ?User
  556.     {
  557.         return $this->releaseAllowed;
  558.     }
  559.     public function setReleaseAllowed(?User $releaseAllowed): self
  560.     {
  561.         $this->releaseAllowed $releaseAllowed;
  562.         return $this;
  563.     }
  564.     public function isIsReleaseAllowed(): ?bool
  565.     {
  566.         return $this->isReleaseAllowed;
  567.     }
  568.     public function setIsReleaseAllowed(?bool $isReleaseAllowed): self
  569.     {
  570.         $this->isReleaseAllowed $isReleaseAllowed;
  571.         return $this;
  572.     }
  573.     public function getIsChecked(): ?bool
  574.     {
  575.         return $this->isChecked;
  576.     }
  577.     public function setIsChecked(?bool $isChecked): self
  578.     {
  579.         $this->isChecked $isChecked;
  580.         return $this;
  581.     }
  582.     public function getChecked(): ?User
  583.     {
  584.         return $this->checked;
  585.     }
  586.     public function setChecked(?User $checked): self
  587.     {
  588.         $this->checked $checked;
  589.         return $this;
  590.     }
  591.     public function getCarrier(): ?string
  592.     {
  593.         return $this->carrier;
  594.     }
  595.     public function setCarrier(?string $carrier): self
  596.     {
  597.         $this->carrier $carrier;
  598.         return $this;
  599.     }
  600.     public function getId1c(): ?string
  601.     {
  602.         return $this->id_1c;
  603.     }
  604.     public function setId1c(?string $id_1c): self
  605.     {
  606.         $this->id_1c $id_1c;
  607.         return $this;
  608.     }
  609.     public function getSumTransport(): ?float
  610.     {
  611.         return $this->sumTransport;
  612.     }
  613.     public function setSumTransport(?float $sumTransport): self
  614.     {
  615.         $this->sumTransport $sumTransport;
  616.         return $this;
  617.     }
  618.     public function getPreOrder(): ?PreOrder
  619.     {
  620.         return $this->preOrder;
  621.     }
  622.     public function setPreOrder(?PreOrder $preOrder): self
  623.     {
  624.         $this->preOrder $preOrder;
  625.         return $this;
  626.     }
  627.     // public function getLoadInvoice(): ?LoadInvoice
  628.     // {
  629.     //     return $this->load_invoice;
  630.     // }
  631.     // public function setLoadInvoice(?LoadInvoice $load_invoice): self
  632.     // {
  633.     //     $this->load_invoice = $load_invoice;
  634.     //     return $this;
  635.     // }
  636.     /**
  637.      * @return Collection<int, LoadInvoice>
  638.      */
  639.     // public function getLoadInvoices(): Collection
  640.     // {
  641.     //     return $this->loadInvoices;
  642.     // }
  643.     // public function addLoadInvoice(LoadInvoice $loadInvoice): self
  644.     // {
  645.     //     if (!$this->loadInvoices->contains($loadInvoice)) {
  646.     //         $this->loadInvoices->add($loadInvoice);
  647.     //         $loadInvoice->setOrder($this);
  648.     //     }
  649.     //     return $this;
  650.     // }
  651.     // public function removeLoadInvoice(LoadInvoice $loadInvoice): self
  652.     // {
  653.     //     if ($this->loadInvoices->removeElement($loadInvoice)) {
  654.     //         // set the owning side to null (unless already changed)
  655.     //         if ($loadInvoice->getOrder() === $this) {
  656.     //             $loadInvoice->setOrder(null);
  657.     //         }
  658.     //     }
  659.     //     return $this;
  660.     // }
  661.     /**
  662.      * @return Collection<int, Accepted>
  663.      */
  664.     public function getAccepteds(): Collection
  665.     {
  666.         return $this->accepteds;
  667.     }
  668.     public function addAccepted(Accepted $accepted): self
  669.     {
  670.         if (!$this->accepteds->contains($accepted)) {
  671.             $this->accepteds->add($accepted);
  672.             $accepted->setOrder($this);
  673.         }
  674.         return $this;
  675.     }
  676.     public function removeAccepted(Accepted $accepted): self
  677.     {
  678.         if ($this->accepteds->removeElement($accepted)) {
  679.             // set the owning side to null (unless already changed)
  680.             if ($accepted->getOrder() === $this) {
  681.                 $accepted->setOrder(null);
  682.             }
  683.         }
  684.         return $this;
  685.     }
  686.     /**
  687.      * @return Collection<int, LoadInvoice>
  688.      */
  689.     public function getLoadInvoice(): Collection
  690.     {
  691.         return $this->loadInvoice;
  692.     }
  693.     public function addLoadInvoice(LoadInvoice $loadInvoice): self
  694.     {
  695.         if (!$this->loadInvoice->contains($loadInvoice)) {
  696.             $this->loadInvoice->add($loadInvoice);
  697.         }
  698.         return $this;
  699.     }
  700.     public function removeLoadInvoice(LoadInvoice $loadInvoice): self
  701.     {
  702.         $this->loadInvoice->removeElement($loadInvoice);
  703.         return $this;
  704.     }
  705.     /**
  706.      * @return Collection<int, Calculations>
  707.      */
  708.     public function getCalculations(): Collection
  709.     {
  710.         return $this->calculations;
  711.     }
  712.     public function addCalculation(Calculations $calculation): self
  713.     {
  714.         if (!$this->calculations->contains($calculation)) {
  715.             $this->calculations->add($calculation);
  716.             $calculation->setOrders($this);
  717.         }
  718.         return $this;
  719.     }
  720.     public function removeCalculation(Calculations $calculation): self
  721.     {
  722.         if ($this->calculations->removeElement($calculation)) {
  723.             // set the owning side to null (unless already changed)
  724.             if ($calculation->getOrders() === $this) {
  725.                 $calculation->setOrders(null);
  726.             }
  727.         }
  728.         return $this;
  729.     }
  730.     /**
  731.      * @return Collection<int, MediaObject>
  732.      */
  733.     public function getMediaObjects(): Collection
  734.     {
  735.         return $this->mediaObjects;
  736.     }
  737.     public function addMediaObject(MediaObject $mediaObject): self
  738.     {
  739.         if (!$this->mediaObjects->contains($mediaObject)) {
  740.             $this->mediaObjects->add($mediaObject);
  741.             $mediaObject->setOrders($this);
  742.         }
  743.         return $this;
  744.     }
  745.     public function removeMediaObject(MediaObject $mediaObject): self
  746.     {
  747.         if ($this->mediaObjects->removeElement($mediaObject)) {
  748.             // set the owning side to null (unless already changed)
  749.             if ($mediaObject->getOrders() === $this) {
  750.                 $mediaObject->setOrders(null);
  751.             }
  752.         }
  753.         return $this;
  754.     }
  755.     #[ORM\PrePersist]
  756.     public function setCreatedAtValue(): void
  757.     {
  758.         $this->dateEntered = new \DateTime();
  759.     }
  760.     // #[ORM\PrePersist]
  761.     #[ORM\PreUpdate]
  762.     public function setUpdatedAtValue(): void
  763.     {
  764.         $this->dateModified = new \DateTime();
  765.     }
  766.     public function isSynced(): ?bool
  767.     {
  768.         return $this->synced;
  769.     }
  770.     public function setSynced(?bool $synced): self
  771.     {
  772.         $this->synced $synced;
  773.         return $this;
  774.     }
  775.     public function getAgreement(): ?Agreements
  776.     {
  777.         return $this->agreement;
  778.     }
  779.     public function setAgreement(?Agreements $agreement): self
  780.     {
  781.         $this->agreement $agreement;
  782.         return $this;
  783.     }
  784.     public function getCreatedIn(): ?string
  785.     {
  786.         return $this->createdIn;
  787.     }
  788.     public function setCreatedIn(?string $createdIn): self
  789.     {
  790.         $this->createdIn $createdIn;
  791.         return $this;
  792.     }
  793.     public function getParent(): ?self
  794.     {
  795.         return $this->parent;
  796.     }
  797.     public function setParent(?self $parent): self
  798.     {
  799.         $this->parent $parent;
  800.         return $this;
  801.     }
  802.     /**
  803.      * @return Collection<int, self>
  804.      */
  805.     public function getParentOrders(): Collection
  806.     {
  807.         return $this->parentOrders;
  808.     }
  809.     public function addParentOrder(self $parentOrder): self
  810.     {
  811.         if (!$this->parentOrders->contains($parentOrder)) {
  812.             $this->parentOrders->add($parentOrder);
  813.             $parentOrder->setParent($this);
  814.         }
  815.         return $this;
  816.     }
  817.     public function removeParentOrder(self $parentOrder): self
  818.     {
  819.         if ($this->parentOrders->removeElement($parentOrder)) {
  820.             // set the owning side to null (unless already changed)
  821.             if ($parentOrder->getParent() === $this) {
  822.                 $parentOrder->setParent(null);
  823.             }
  824.         }
  825.         return $this;
  826.     }
  827.     public function getAddress(): ?AccountAddress
  828.     {
  829.         return $this->address;
  830.     }
  831.     public function setAddress(?AccountAddress $address): self
  832.     {
  833.         $this->address $address;
  834.         return $this;
  835.     }
  836.     public function isDeleted(): ?bool
  837.     {
  838.         return $this->deleted;
  839.     }
  840.     public function setDeleted(?bool $deleted): static
  841.     {
  842.         $this->deleted $deleted;
  843.         return $this;
  844.     }
  845.     public function getDateEnteredIn1c(): ?\DateTimeInterface
  846.     {
  847.         return $this->dateEnteredIn1c;
  848.     }
  849.     public function setDateEnteredIn1c(?\DateTimeInterface $dateEnteredIn1c): static
  850.     {
  851.         $this->dateEnteredIn1c $dateEnteredIn1c;
  852.         return $this;
  853.     }
  854.     public function getDateModifiedIn1c(): ?\DateTimeInterface
  855.     {
  856.         return $this->dateModifiedIn1c;
  857.     }
  858.     public function setDateModifiedIn1c(?\DateTimeInterface $dateModifiedIn1c): static
  859.     {
  860.         $this->dateModifiedIn1c $dateModifiedIn1c;
  861.         return $this;
  862.     }
  863.     public function getStatus1c(): ?string
  864.     {
  865.         return $this->status1c;
  866.     }
  867.     public function setStatus1c(?string $status1c): static
  868.     {
  869.         $this->status1c $status1c;
  870.         return $this;
  871.     }
  872.     public function getCarriers(): ?Accounts
  873.     {
  874.         return $this->carriers;
  875.     }
  876.     public function setCarriers(?Accounts $carriers): static
  877.     {
  878.         $this->carriers $carriers;
  879.         return $this;
  880.     }
  881. }