<?php
namespace App\Entity\System;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\OneToOne;
use Doctrine\ORM\Mapping\JoinColumn;
/**
* Order
*
* @ORM\Table(
* name="ps_orders",
* indexes={
*
* @ORM\Index(name="ref_order_supplier", columns={"ref_order_supplier"}),
* @ORM\Index(name="id_carrier_master", columns={"id_carrier_master"}),
* @ORM\Index(name="transaction_id", columns={"transaction_id"}),
* @ORM\Index(name="id_carrier", columns={"id_carrier"}),
* @ORM\Index(name="date_add", columns={"date_add"}),
* @ORM\Index(name="is_tracking", columns={"is_tracking"}),
* @ORM\Index(name="id_currency", columns={"id_currency"}),
* @ORM\Index(name="id_customer__order_state__total_paid", columns={"id_customer", "id_order_state", "total_paid"})
* }
* )
*
* @ORM\Entity(repositoryClass="App\Repository\System\OrderRepository")
*/
class Order
{
public const PRODUCTS_ORDER_TYPE = 1;
public const PACK_ORDER_TYPE = 2;
public const SERVICES_ORDER_TYPE = 3;
public const PACK_AND_SERVICES_ORDER_TYPE = 5;
public const MAX_DROPSHIPPING_ORDERS_PER_MONTH = 3;
/**
* @var int
*
* @ORM\Id()
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer", name="id_order")
*/
private $id;
/**
* One Order has One Cart.
*
* @var Cart
*
* @OneToOne(targetEntity="App\Entity\System\Cart", mappedBy="order")
*
* @JoinColumn(name="id_cart", referencedColumnName="id_cart", nullable=false, unique=true)
*/
private $cart;
/**
* @var string|null
*
* @ORM\Column(type="string", length=9, nullable=true)
*/
private $reference;
/**
* @var int
*
* @ORM\Column(type="integer", length=10)
*/
private $idCarrier;
/**
* @var Customer
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="orders")
*
* @ORM\JoinColumn(nullable=false, name="id_customer", referencedColumnName="id_customer")
*/
private $customer;
/**
* @var CodeDiscount|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\CodeDiscount", inversedBy="orders")
*
* @ORM\JoinColumn(nullable=true, name="id_voucher")
*/
private $idVoucher;
/**
* @var int
*
* @ORM\Column(type="integer", length=10)
*/
private $idCurrency;
/**
* @var Address
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Address")
*
* @ORM\JoinColumn(name="id_address_delivery", referencedColumnName="id_address", nullable=false)
*/
private $deliveryAddress;
/**
* @var OrderStatus
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\OrderStatus")
*
* @ORM\JoinColumn(name="id_order_state", referencedColumnName="id", nullable=false)
*/
private $orderStatus;
/**
* @deprecated
*
* @var Language|null
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
*
* @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang", nullable=true)
*/
private $language;
/**
* @deprecated use paymentMethod relationship instead
*
* @var string
*
* @ORM\Column(type="string", length=255)
*/
private $payment;
/**
* @var float
*
* @ORM\Column(type="float", options={"default" : 1.000000})
*/
private $conversionRate;
/**
* @var string|null
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $module;
/**
* @var bool
*
* @ORM\Column(type="boolean", options={"default" : 0})
*/
private $dropshipping;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalDiscounts;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalDiscountsTaxIncl;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalDiscountsTaxExcl;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalPaid;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalPaidTaxIncl;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalPaidTaxExcl;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalPaidReal;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalProducts;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalProductsWt;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalShipping;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalShippingTaxIncl;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalShippingTaxExcl;
/**
* @var float
*
* @ORM\Column(type="float", precision=10, scale=3, options={"default" : 0.000})
*/
private $carrierTaxRate;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalWrapping;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalWrappingTaxIncl;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $totalWrappingTaxExcl;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $invoiceDate;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $deliveryDate;
/**
* @var int
*
* @ORM\Column(type="integer", length=1, options={"default" : 0})
*/
private $valid;
/**
* @var bool
*
* @ORM\Column(type="boolean", options={"default" : 0})
*/
private $validateTransfer;
/**
* @var string|null
*
* @ORM\Column(type="string", length=128, nullable=true)
*/
private $refOrderSupplier;
/**
* @var \DateTime
*
* @ORM\Column(type="datetime")
*/
private $dateAdd;
/**
* @var \DateTime
*
* @ORM\Column(type="datetime")
*/
private $dateUpd;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $purse;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $dropshippingQty;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $paymentMethodCost;
/**
* @var float
*
* @ORM\Column(type="float", precision=17, scale=2, options={"default" : 0.00})
*/
private $dropshippingCost;
/**
* @var bool
*
* @ORM\Column(type="boolean", options={"default" : 0})
*/
private $re;
/**
* @var string|null
*
* @ORM\Column(type="string", length=254, nullable=true)
*/
private $transactionId;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
*/
private $refund;
/**
* @var bool
*
* @ORM\Column(type="boolean", nullable=false, options={"default" : 0})
*/
private $fullRefund;
/**
* @var string|null
*
* @ORM\Column(type="string", length=1, options={"default" : 1}, nullable=true)
*/
private $intracomunitario;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", nullable=true)
*/
private $isTracking;
/**
* @var int|null
*
* @ORM\Column(type="integer", options={"default" : 0}, nullable=true)
*/
private $stateDropshipping;
/**
* @var float|null
*
* @ORM\Column(type="float", options={"default" : 0}, nullable=true)
*/
private $volWeight;
/**
* @var int|null
*
* @ORM\Column(type="integer", length=11, options={"default" : 0}, nullable=true)
*/
private $idCarrierMaster;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
*/
private $quantityStockSupplier;
/**
* @var bool|null
*
* @ORM\Column(name="quantity_stock_supplier_3_5", type="boolean", options={"default" : 0}, nullable=true)
*/
private $quantityStockSupplier3To5;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
*/
private $quantityFutureStock;
/**
* @var int|null
*
* @ORM\Column(type="integer", length=10, options={"default" : 0}, nullable=true)
*/
private $idPack;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $deliveredDate;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
*/
private $api;
/**
* @var bool|null
*
* @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
*/
private $isSystem;
/**
* @var string|null
*
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $sellingChannel;
/**
* @var \DateTime|null
*
* @ORM\Column(type="date", nullable=true)
*/
private $dateAmazon;
/**
* @var string|null
*
* @ORM\Column(type="string", length=256, nullable=true)
*/
private $additionalParameters;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $estimatedShippingDate;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $scheduledConfirmationDate;
/**
* @var string|null
*
* @ORM\Column(type="string", length=36, nullable=true)
*/
private $a4bUuid;
/**
* @var bool
*
* @ORM\Column(type="boolean", nullable=false)
*/
private $dispute;
/**
* @var Collection<int, OrderDetail>&iterable<OrderDetail>
*
* @ORM\OneToMany(targetEntity="App\Entity\System\OrderDetail", mappedBy="order", cascade={"all"}, orphanRemoval=true)
*/
private $orderDetails;
/**
* @var Warehouse
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Warehouse")
*
* @ORM\JoinColumn(name="warehouse_id", referencedColumnName="id", nullable=false, options={"default" : 1}))
*/
private $warehouse;
/**
* @var OrderNotification|null
*
* @ORM\OneToOne(targetEntity="OrderNotification", mappedBy="order")
*/
private $notification;
/**
* @var Collection<int, Invoice>&iterable<Invoice>
*
* @ORM\ManyToMany(targetEntity="Invoice", mappedBy="orders")
*/
private $invoice;
/**
* @var OrderCancellationRequest|null
*
* @ORM\OneToOne(targetEntity="OrderCancellationRequest", mappedBy="order")
*/
private ?OrderCancellationRequest $cancellationRequest;
/**
* @deprecated use paymentMethod relationship instead
*
* @var string|null
*
* @ORM\Column(type="string", length=64, nullable=true)
*/
private $paymentMethodType;
/**
* @var string|null
*
* @ORM\Column(type="string", nullable=true)
*/
private $paypalPayerId;
/**
* @var string|null
*
* @ORM\Column(type="string", nullable=true)
*/
private $paypalPayerEmail;
/**
* @var OrderTax|null
*
* @ORM\OneToOne(targetEntity="App\Entity\System\OrderTax", mappedBy="order")
*/
private $orderTax;
/**
* @ORM\Column(type="boolean", options={"default" : 0})
*/
private bool $fba = false;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $maxExpeditionDatetime = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $maxDeliveryDatetime = null;
/**
* @ORM\Column(type="float", nullable=true)
*/
private ?float $logisticWeight;
/**
* @var PaymentMethod
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod")
*
* @ORM\JoinColumn(name="payment_method", referencedColumnName="id_payment_method", nullable=false)
*/
private $paymentMethod;
/**
* @var Collection<int, Tracking>&iterable<Tracking>
*
* @ORM\OneToMany(targetEntity="App\Entity\System\Tracking", mappedBy="order", cascade={"persist"})
*/
private $trackings;
/**
* Order constructor.
*/
public function __construct()
{
$this->idCurrency = Cart::DEFAULT_CURRENCY_EUR;
$this->conversionRate = 1.000000;
$this->dropshipping = false;
$this->totalDiscounts = 0.00;
$this->totalDiscountsTaxIncl = 0.00;
$this->totalDiscountsTaxExcl = 0.00;
$this->totalPaid = 0.00;
$this->totalPaidTaxIncl = 0.00;
$this->totalPaidTaxExcl = 0.00;
$this->totalPaidReal = 0.00;
$this->totalProducts = 0.00;
$this->totalProductsWt = 0.00;
$this->totalShipping = 0.00;
$this->totalShippingTaxIncl = 0.00;
$this->totalShippingTaxExcl = 0.00;
$this->carrierTaxRate = 0.000;
$this->totalWrapping = 0.00;
$this->totalWrappingTaxIncl = 0.00;
$this->totalWrappingTaxExcl = 0.00;
$this->valid = 0;
$this->validateTransfer = false;
$this->purse = 0.00;
$this->dropshippingQty = 0.00;
$this->paymentMethodCost = 0.00;
$this->dropshippingCost = 0.00;
$this->re = false;
$this->refund = false;
$this->fullRefund = false;
$this->intracomunitario = '1';
$this->stateDropshipping = 0;
$this->volWeight = 0;
$this->idCarrierMaster = 0;
$this->quantityStockSupplier = false;
$this->quantityStockSupplier3To5 = false;
$this->quantityFutureStock = false;
$this->idPack = Pack::PACK_WITHOUT_PACK;
$this->api = false;
$this->isSystem = false;
$this->dispute = false;
$this->orderDetails = new ArrayCollection();
$this->invoice = new ArrayCollection();
$this->trackings = new ArrayCollection();
}
public function getId(): int
{
return $this->id;
}
public function setId(int $id): Order
{
$this->id = $id;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): Order
{
$this->reference = $reference;
return $this;
}
public function getIdCarrier(): int
{
return $this->idCarrier;
}
public function setIdCarrier(int $idCarrier): Order
{
$this->idCarrier = $idCarrier;
return $this;
}
public function getIdVoucher(): ?CodeDiscount
{
if ($this->idVoucher && $this->idVoucher->getId() === 0) {
return null;
}
return $this->idVoucher;
}
public function setIdVoucher(?CodeDiscount $idVoucher): Order
{
$this->idVoucher = $idVoucher;
return $this;
}
public function getIdCurrency(): int
{
return $this->idCurrency;
}
public function setIdCurrency(int $idCurrency): Order
{
$this->idCurrency = $idCurrency;
return $this;
}
public function getDeliveryAddress(): Address
{
return $this->deliveryAddress;
}
public function setDeliveryAddress(Address $deliveryAddress): Order
{
$this->deliveryAddress = $deliveryAddress;
return $this;
}
/**
* @deprecated
*/
public function getLanguage(): ?Language
{
return $this->language;
}
/**
* @deprecated
*/
public function setLanguage(?Language $language): Order
{
$this->language = $language;
return $this;
}
public function getPayment(): string
{
return $this->paymentMethod->getPayment();
}
public function getConversionRate(): float
{
return $this->conversionRate;
}
public function setConversionRate(float $conversionRate): Order
{
$this->conversionRate = $conversionRate;
return $this;
}
public function getModule(): ?string
{
return $this->module;
}
public function setModule(?string $module): Order
{
$this->module = $module;
return $this;
}
public function isDropshipping(): bool
{
return $this->dropshipping;
}
public function setDropshipping(bool $dropshipping): Order
{
$this->dropshipping = $dropshipping;
return $this;
}
public function getTotalDiscounts(): float
{
return $this->totalDiscounts;
}
public function setTotalDiscounts(float $totalDiscounts): Order
{
$this->totalDiscounts = $totalDiscounts;
return $this;
}
public function getTotalDiscountsTaxIncl(): float
{
return $this->totalDiscountsTaxIncl;
}
public function setTotalDiscountsTaxIncl(float $totalDiscountsTaxIncl): Order
{
$this->totalDiscountsTaxIncl = $totalDiscountsTaxIncl;
return $this;
}
public function getTotalDiscountsTaxExcl(): float
{
return $this->totalDiscountsTaxExcl;
}
public function setTotalDiscountsTaxExcl(float $totalDiscountsTaxExcl): Order
{
$this->totalDiscountsTaxExcl = $totalDiscountsTaxExcl;
return $this;
}
public function getTotalPaid(): float
{
return $this->totalPaid;
}
public function setTotalPaid(float $totalPaid): Order
{
$this->totalPaid = $totalPaid;
return $this;
}
public function getTotalPaidTaxIncl(): float
{
return $this->totalPaidTaxIncl;
}
public function setTotalPaidTaxIncl(float $totalPaidTaxIncl): Order
{
$this->totalPaidTaxIncl = $totalPaidTaxIncl;
return $this;
}
public function getTotalPaidTaxExcl(): float
{
return $this->totalPaidTaxExcl;
}
public function setTotalPaidTaxExcl(float $totalPaidTaxExcl): Order
{
$this->totalPaidTaxExcl = $totalPaidTaxExcl;
return $this;
}
public function getTotalPaidReal(): float
{
return $this->totalPaidReal;
}
public function setTotalPaidReal(float $totalPaidReal): Order
{
$this->totalPaidReal = $totalPaidReal;
return $this;
}
public function getTotalProducts(): float
{
return $this->totalProducts;
}
public function setTotalProducts(float $totalProducts): Order
{
$this->totalProducts = $totalProducts;
return $this;
}
public function getTotalProductsWt(): float
{
return $this->totalProductsWt;
}
public function setTotalProductsWt(float $totalProductsWt): Order
{
$this->totalProductsWt = $totalProductsWt;
return $this;
}
public function getTotalShipping(): float
{
return $this->totalShipping;
}
public function setTotalShipping(float $totalShipping): Order
{
$this->totalShipping = $totalShipping;
return $this;
}
public function getTotalShippingTaxIncl(): float
{
return $this->totalShippingTaxIncl;
}
public function setTotalShippingTaxIncl(float $totalShippingTaxIncl): Order
{
$this->totalShippingTaxIncl = $totalShippingTaxIncl;
return $this;
}
public function getTotalShippingTaxExcl(): float
{
return $this->totalShippingTaxExcl;
}
public function setTotalShippingTaxExcl(float $totalShippingTaxExcl): Order
{
$this->totalShippingTaxExcl = $totalShippingTaxExcl;
return $this;
}
public function getCarrierTaxRate(): float
{
return $this->carrierTaxRate;
}
public function setCarrierTaxRate(float $carrierTaxRate): Order
{
$this->carrierTaxRate = $carrierTaxRate;
return $this;
}
public function getTotalWrapping(): float
{
return $this->totalWrapping;
}
public function setTotalWrapping(float $totalWrapping): Order
{
$this->totalWrapping = $totalWrapping;
return $this;
}
public function getTotalWrappingTaxIncl(): float
{
return $this->totalWrappingTaxIncl;
}
public function setTotalWrappingTaxIncl(float $totalWrappingTaxIncl): Order
{
$this->totalWrappingTaxIncl = $totalWrappingTaxIncl;
return $this;
}
public function getTotalWrappingTaxExcl(): float
{
return $this->totalWrappingTaxExcl;
}
public function setTotalWrappingTaxExcl(float $totalWrappingTaxExcl): Order
{
$this->totalWrappingTaxExcl = $totalWrappingTaxExcl;
return $this;
}
public function getInvoiceDate(): ?\DateTime
{
return $this->invoiceDate;
}
public function setInvoiceDate(?\DateTime $invoiceDate): Order
{
$this->invoiceDate = $invoiceDate;
return $this;
}
public function getDeliveryDate(): ?\DateTime
{
return $this->deliveryDate;
}
public function setDeliveryDate(?\DateTime $deliveryDate): Order
{
$this->deliveryDate = $deliveryDate;
return $this;
}
public function getValid(): int
{
return $this->valid;
}
public function setValid(int $valid): Order
{
$this->valid = $valid;
return $this;
}
public function isValidateTransfer(): bool
{
return $this->validateTransfer;
}
public function setValidateTransfer(bool $validateTransfer): Order
{
$this->validateTransfer = $validateTransfer;
return $this;
}
public function getRefOrderSupplier(): ?string
{
return $this->refOrderSupplier;
}
public function setRefOrderSupplier(?string $refOrderSupplier): Order
{
$this->refOrderSupplier = $refOrderSupplier;
return $this;
}
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
public function setDateAdd(\DateTime $dateAdd): Order
{
$this->dateAdd = $dateAdd;
return $this;
}
public function getDateUpd(): \DateTime
{
return $this->dateUpd;
}
public function setDateUpd(\DateTime $dateUpd): Order
{
$this->dateUpd = $dateUpd;
return $this;
}
public function getPurse(): float
{
return $this->purse;
}
public function setPurse(float $purse): Order
{
$this->purse = $purse;
return $this;
}
public function getDropshippingQty(): float
{
return $this->dropshippingQty;
}
public function setDropshippingQty(float $dropshippingQty): Order
{
$this->dropshippingQty = $dropshippingQty;
return $this;
}
public function getPaymentMethodCost(): float
{
return $this->paymentMethodCost;
}
public function setPaymentMethodCost(float $paymentMethodCost): Order
{
$this->paymentMethodCost = $paymentMethodCost;
return $this;
}
public function getDropshippingCost(): float
{
return $this->dropshippingCost;
}
public function setDropshippingCost(float $dropshippingCost): Order
{
$this->dropshippingCost = $dropshippingCost;
return $this;
}
public function isRe(): bool
{
return $this->re;
}
public function setRe(bool $re): Order
{
$this->re = $re;
return $this;
}
public function getTransactionId(): ?string
{
return $this->transactionId;
}
public function setTransactionId(?string $transactionId): Order
{
$this->transactionId = $transactionId;
return $this;
}
public function getRefund(): ?bool
{
return $this->refund;
}
public function setRefund(?bool $refund): Order
{
$this->refund = $refund;
return $this;
}
public function getIntracomunitario(): ?string
{
return $this->intracomunitario;
}
public function setIntracomunitario(?string $intracomunitario): Order
{
$this->intracomunitario = $intracomunitario;
return $this;
}
public function getIsTracking(): ?bool
{
return $this->isTracking;
}
public function setIsTracking(?bool $isTracking): Order
{
$this->isTracking = $isTracking;
return $this;
}
public function getStateDropshipping(): ?int
{
return $this->stateDropshipping;
}
public function setStateDropshipping(?int $stateDropshipping): Order
{
$this->stateDropshipping = $stateDropshipping;
return $this;
}
/**
* @return float|null
*/
public function getVolWeight(): ?float
{
return $this->volWeight;
}
public function setVolWeight(?float $volWeight): Order
{
$this->volWeight = $volWeight;
return $this;
}
public function getIdCarrierMaster(): ?int
{
return $this->idCarrierMaster;
}
public function setIdCarrierMaster(?int $idCarrierMaster): Order
{
$this->idCarrierMaster = $idCarrierMaster;
return $this;
}
public function getQuantityStockSupplier(): ?bool
{
return $this->quantityStockSupplier;
}
public function setQuantityStockSupplier(?bool $quantityStockSupplier): Order
{
$this->quantityStockSupplier = $quantityStockSupplier;
return $this;
}
public function getQuantityFutureStock(): ?bool
{
return $this->quantityFutureStock;
}
public function setQuantityFutureStock(?bool $quantityFutureStock): Order
{
$this->quantityFutureStock = $quantityFutureStock;
return $this;
}
public function getIdPack(): ?int
{
return $this->idPack;
}
public function setIdPack(?int $idPack): Order
{
$this->idPack = $idPack;
return $this;
}
public function getDeliveredDate(): ?\DateTime
{
return $this->deliveredDate;
}
public function setDeliveredDate(?\DateTime $deliveredDate): Order
{
$this->deliveredDate = $deliveredDate;
return $this;
}
public function getApi(): ?bool
{
return $this->api;
}
public function setApi(?bool $api): Order
{
$this->api = $api;
return $this;
}
public function isSystem(): ?bool
{
return $this->isSystem;
}
public function setSystem(?bool $isSystem): Order
{
$this->isSystem = $isSystem;
return $this;
}
public function getSellingChannel(): ?string
{
return $this->sellingChannel;
}
public function setSellingChannel(?string $sellingChannel): Order
{
$this->sellingChannel = $sellingChannel;
return $this;
}
public function getDateAmazon(): ?\DateTime
{
return $this->dateAmazon;
}
public function setDateAmazon(?\DateTime $dateAmazon): Order
{
$this->dateAmazon = $dateAmazon;
return $this;
}
public function getAdditionalParameters(): ?string
{
return $this->additionalParameters;
}
public function setAdditionalParameters(?string $additionalParameters): Order
{
$this->additionalParameters = $additionalParameters;
return $this;
}
/**
* @return Collection<int, OrderDetail>&iterable<OrderDetail>
*/
public function getOrderDetails()
{
return $this->orderDetails;
}
/**
* @param Collection<int, OrderDetail>&iterable<OrderDetail> $orderDetails
*/
public function setOrderDetails($orderDetails): Order
{
$this->orderDetails = $orderDetails;
return $this;
}
public function addOrderDetail(OrderDetail $orderDetail): Order
{
if (!$this->orderDetails->contains($orderDetail)) {
$this->orderDetails[] = $orderDetail;
}
return $this;
}
public function getCustomer(): Customer
{
return $this->customer;
}
public function setCustomer(Customer $customer): self
{
$this->customer = $customer;
return $this;
}
public function getEstimatedShippingDate(): ?\DateTime
{
return $this->estimatedShippingDate;
}
public function setEstimatedShippingDate(?\DateTime $estimatedShippingDate): self
{
$this->estimatedShippingDate = $estimatedShippingDate;
return $this;
}
public function getA4bUuid(): ?string
{
return $this->a4bUuid;
}
public function setA4bUuid(?string $a4bUuid): self
{
$this->a4bUuid = $a4bUuid;
return $this;
}
public function getDispute(): bool
{
return $this->dispute;
}
public function setDispute(bool $dispute): self
{
$this->dispute = $dispute;
return $this;
}
public function getOrderStatusId(): int
{
return $this->orderStatus->getId();
}
public function getOrderStatus(): OrderStatus
{
return $this->orderStatus;
}
public function setOrderStatus(OrderStatus $orderStatus): self
{
$this->orderStatus = $orderStatus;
return $this;
}
public function getCart(): ?Cart
{
return $this->cart;
}
public function setCart(?Cart $cart): Order
{
$this->cart = $cart;
return $this;
}
public function getWarehouse(): Warehouse
{
return $this->warehouse;
}
public function setWarehouse(Warehouse $warehouse): self
{
$this->warehouse = $warehouse;
return $this;
}
/**
* @return Collection<int, Invoice>&iterable<Invoice>
*/
public function getInvoice()
{
return $this->invoice;
}
/**
* @return bool|null
*/
public function getQuantityStockSupplier3To5(): ?bool
{
return $this->quantityStockSupplier3To5;
}
/**
* @param bool|null $quantityStockSupplier3To5
*/
public function setQuantityStockSupplier3To5(?bool $quantityStockSupplier3To5): void
{
$this->quantityStockSupplier3To5 = $quantityStockSupplier3To5;
}
public function getPaymentMethodType(): ?string
{
return $this->paymentMethod->getSlug();
}
public function getPaypalPayerId(): ?string
{
return $this->paypalPayerId;
}
public function setPaypalPayerId(?string $paypalPayerId): Order
{
$this->paypalPayerId = $paypalPayerId;
return $this;
}
public function getPaypalPayerEmail(): ?string
{
return $this->paypalPayerEmail;
}
public function setPaypalPayerEmail(?string $paypalPayerEmail): Order
{
$this->paypalPayerEmail = $paypalPayerEmail;
return $this;
}
public function getOrderTax(): ?OrderTax
{
return $this->orderTax;
}
public function setOrderTax(OrderTax $orderTax): Order
{
$this->orderTax = $orderTax;
return $this;
}
public function getDropshipping(): bool
{
return $this->dropshipping;
}
public function isFba(): bool
{
return $this->fba;
}
public function setFba(bool $fba): Order
{
$this->fba = $fba;
return $this;
}
public function getMaxExpeditionDatetime(): ?\DateTime
{
return $this->maxExpeditionDatetime;
}
public function setMaxExpeditionDatetime(\DateTime $maxExpeditionDatetime): Order
{
$this->maxExpeditionDatetime = $maxExpeditionDatetime;
return $this;
}
public function getMaxDeliveryDatetime(): ?\DateTime
{
return $this->maxDeliveryDatetime;
}
public function setMaxDeliveryDatetime(\DateTime $maxDeliveryDatetime): Order
{
$this->maxDeliveryDatetime = $maxDeliveryDatetime;
return $this;
}
public function getFullRefund(): bool
{
return $this->fullRefund;
}
public function setFullRefund(bool $fullRefund): Order
{
$this->fullRefund = $fullRefund;
return $this;
}
public function getLogisticWeight(): ?float
{
return $this->logisticWeight;
}
public function setLogisticWeight(?float $logisticWeight): void
{
$this->logisticWeight = $logisticWeight;
}
public function getScheduledConfirmationDate(): ?\DateTime
{
if (null === $this->scheduledConfirmationDate) {
return null;
}
if ((int)$this->scheduledConfirmationDate->format('Y') <= 0) {
// 0000-00-00 00:00:00 dates
return null;
}
return $this->scheduledConfirmationDate;
}
public function setScheduledConfirmationDate(?\DateTime $scheduledConfirmationDate): void
{
$this->scheduledConfirmationDate = $scheduledConfirmationDate;
}
public function getCancellationRequest(): ?OrderCancellationRequest
{
return $this->cancellationRequest;
}
public function setCancellationRequest(?OrderCancellationRequest $cancellationRequest): void
{
$this->cancellationRequest = $cancellationRequest;
}
public function getNotification(): ?OrderNotification
{
return $this->notification;
}
public function setNotification(?OrderNotification $notification): void
{
$this->notification = $notification;
}
public function getPaymentMethod(): PaymentMethod
{
return $this->paymentMethod;
}
public function setPaymentMethod(PaymentMethod $paymentMethod): void
{
$this->paymentMethod = $paymentMethod;
$this->payment = $paymentMethod->getPayment();
$this->paymentMethodType = $paymentMethod->getSlug();
}
/**
* @return Collection<int, Tracking>&iterable<Tracking>
*/
public function getTrackings()
{
return $this->trackings;
}
/**
* @param Collection<int, Tracking>&iterable<Tracking> $trackings
*/
public function setTrackings($trackings): void
{
$this->trackings = $trackings;
}
public function markAsRefunded(bool $isFullRefund): void
{
$this->refund = true;
$this->fullRefund = $isFullRefund;
$this->dateUpd = new \DateTime();
}
}