<?php
namespace App\Entity\Invoice;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Table(name="invoice")
* @ORM\Entity()
*/
class Invoice
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Customer\Customer", inversedBy="invoices")
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
*/
protected $customer;
/**
* @ORM\Column(type="string", length=100)
*/
protected $sub;
/**
* @ORM\Column(type="string", length=100)
*/
protected $number;
/**
* @ORM\Column(type="string", length=100)
*/
protected $guide_number;
/**
* @ORM\Column(type="string", length=255)
*/
protected $guide_attachment;
/**
* @ORM\Column(type="decimal", name="handling", precision=10, scale=2, nullable=true)
*/
protected $handling;
/**
* @ORM\Column(type="decimal", name="copies", precision=10, scale=2, nullable=true)
*/
protected $copies;
/**
* @ORM\Column(type="string", length=100)
*/
protected $dmc_in;
/**
* @ORM\Column(type="decimal", name="dmc_in_total", precision=10, scale=2, nullable=true)
*/
protected $dmc_in_total;
/**
* @ORM\Column(type="string", length=100)
*/
protected $dmc_out;
/**
* @ORM\Column(type="decimal", name="dmc_out_total", precision=10, scale=2, nullable=true)
*/
protected $dmc_out_total;
/**
* @ORM\Column(type="string", length=255)
*/
protected $pre_attachment;
/**
* @ORM\Column(type="decimal", name="ti_total", precision=10, scale=2, nullable=true)
*/
protected $ti_total;
/**
* @ORM\Column(type="decimal", name="ti_cash", precision=10, scale=2, nullable=true)
*/
protected $ti_cash;
/**
* @ORM\Column(type="string", length=255)
*/
protected $ti_attachment;
/**
* @ORM\Column(type="string", length=255)
*/
protected $stamp_text;
/**
* @ORM\Column(type="decimal", name="stamp_total", precision=10, scale=2, nullable=true)
*/
protected $stamp_total;
/**
* @ORM\Column(type="decimal", name="stamp_cost", precision=10, scale=2, nullable=true)
*/
protected $stamp_cost;
/**
* @ORM\Column(type="decimal", name="online_payment", precision=10, scale=2, nullable=true)
*/
protected $online_payment;
/**
* @ORM\Column(type="decimal", name="additional_form", precision=10, scale=2, nullable=true)
*/
protected $additional_form;
/**
* @ORM\Column(type="decimal", name="unload_load", precision=10, scale=2, nullable=true)
*/
protected $unload_load;
/**
* @ORM\Column(type="decimal", name="ramp", precision=10, scale=2, nullable=true)
*/
protected $ramp;
/**
* @ORM\Column(type="decimal", name="forklift", precision=10, scale=2, nullable=true)
*/
protected $forklift;
/**
* @ORM\Column(type="decimal", name="overtime", precision=10, scale=2, nullable=true)
*/
protected $overtime;
/**
* @ORM\Column(type="decimal", name="warehouse", precision=10, scale=2, nullable=true)
*/
protected $warehouse;
/**
* @ORM\Column(type="string", length=1000)
*/
protected $warehouse_text;
/**
* @ORM\Column(type="decimal", name="quarantine", precision=10, scale=2, nullable=true)
*/
protected $quarantine;
/**
* @ORM\Column(type="decimal", name="quarantine_bank_charge", precision=10, scale=2, nullable=true)
*/
protected $quarantine_bank_charge;
/**
* @ORM\Column(type="decimal", name="apa", precision=10, scale=2, nullable=true)
*/
protected $apa;
/**
* @ORM\Column(type="decimal", name="total", precision=10, scale=2, nullable=true)
*/
protected $total;
/**
* @ORM\Column(type="decimal", name="expense", precision=10, scale=2, nullable=true)
*/
protected $expense;
/**
* @ORM\Column(type="decimal", name="profit", precision=10, scale=2, nullable=true)
*/
protected $profit;
/**
* @ORM\Column(name="invoice_date", type="datetime")
*/
protected $invoice_date;
/**
* @ORM\Column(type="datetime")
*/
//protected $due_date;
/**
* @var boolean
*
* @ORM\Column(name="paid", type="boolean", nullable=true)
*/
private $paid = false;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
protected $paid_date;
/**
* @var int $paid_by
*
* @ORM\ManyToOne(targetEntity="\App\Entity\User\User")
* @ORM\JoinColumn(name="paid_by", referencedColumnName="id", onDelete="CASCADE")
*/
private $paid_by;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
protected $deleted;
/**
* @var mixed
*
* @ORM\OneToMany(targetEntity="\App\Entity\Invoice\InvoiceDmcIn", mappedBy="invoice", cascade={"persist"})
*/
private $dmc_ins;
/**
* @var mixed
*
* @ORM\OneToMany(targetEntity="\App\Entity\Invoice\InvoiceDmcOut", mappedBy="invoice", cascade={"persist"})
*/
private $dmc_outs;
/**
* @var mixed
*
* @ORM\OneToMany(targetEntity="\App\Entity\Invoice\InvoiceFile", mappedBy="invoice", cascade={"persist"})
*/
private $files;
/**
* @ORM\Column(name="isdeleted", type="boolean")
*/
//protected $isdeleted;
/**
* @var int $created_by
*
* @Gedmo\Blameable(on="create")
* @ORM\ManyToOne(targetEntity="\GEL\Bundle\Admin\UserBundle\Entity\User")
* @ORM\JoinColumn(name="created_by", referencedColumnName="id", onDelete="CASCADE")
*/
//private $created_by;
/**
* Constructor
*/
public function __construct()
{
$this->dmc_ins = new \Doctrine\Common\Collections\ArrayCollection();
$this->dmc_outs = new \Doctrine\Common\Collections\ArrayCollection();
$this->files = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set sub
*
* @param string $sub
* @return Invoice
*/
public function setSub($sub)
{
$this->sub = $sub;
return $this;
}
/**
* Get sub
*
* @return string
*/
public function getSub()
{
return $this->sub;
}
/**
* Set number
*
* @param string $number
* @return Invoice
*/
public function setNumber($number)
{
$this->number = $number;
return $this;
}
/**
* Get number
*
* @return string
*/
public function getNumber()
{
return $this->number;
}
/**
* Set guide_number
*
* @param string $guide_number
* @return Invoice
*/
public function setGuideNumber($guide_number)
{
$this->guide_number = $guide_number;
return $this;
}
/**
* Get guide_number
*
* @return string
*/
public function getGuideNumber()
{
return $this->guide_number;
}
/**
* Set guide_attachment
*
* @param string $guide_attachment
* @return Invoice
*/
public function setGuideAttachment($guide_attachment)
{
$this->guide_attachment = $guide_attachment;
return $this;
}
/**
* Get guide_attachment
*
* @return string
*/
public function getGuideAttachment()
{
return $this->guide_attachment;
}
/**
* Set handling
*
* @param decimal $handling
* @return Invoice
*/
public function setHandling($handling)
{
$this->handling = $handling;
return $this;
}
/**
* Get handling
*
* @return decimal
*/
public function getHandling()
{
return $this->handling;
}
/**
* Set copies
*
* @param decimal $copies
* @return Invoice
*/
public function setCopies($copies)
{
$this->copies = $copies;
return $this;
}
/**
* Get copies
*
* @return decimal
*/
public function getCopies()
{
return $this->copies;
}
/**
* Set dmc_in
*
* @param string $dmc_in
* @return Invoice
*/
public function setDmcIn($dmc_in)
{
$this->dmc_in = $dmc_in;
return $this;
}
/**
* Get dmc_in
*
* @return string
*/
public function getDmcIn()
{
return $this->dmc_in;
}
/**
* Set dmc_in_total
*
* @param decimal $dmc_in_total
* @return Invoice
*/
public function setDmcInTotal($dmc_in_total)
{
$this->dmc_in_total = $dmc_in_total;
return $this;
}
/**
* Get dmc_in_total
*
* @return decimal
*/
public function getDmcInTotal()
{
return $this->dmc_in_total;
}
/**
* Set dmc_out
*
* @param string $dmc_out
* @return Invoice
*/
public function setDmcOut($dmc_out)
{
$this->dmc_out = $dmc_out;
return $this;
}
/**
* Get dmc_out
*
* @return string
*/
public function getDmcOut()
{
return $this->dmc_out;
}
/**
* Set dmc_out_total
*
* @param decimal $dmc_out_total
* @return Invoice
*/
public function setDmcOutTotal($dmc_out_total)
{
$this->dmc_out_total = $dmc_out_total;
return $this;
}
/**
* Get dmc_out_total
*
* @return decimal
*/
public function getDmcOutTotal()
{
return $this->dmc_out_total;
}
/**
* Set pre_attachment
*
* @param string $pre_attachment
* @return Invoice
*/
public function setPreAttachment($pre_attachment)
{
$this->pre_attachment = $pre_attachment;
return $this;
}
/**
* Get pre_attachment
*
* @return string
*/
public function getPreAttachment()
{
return $this->pre_attachment;
}
/**
* Set ti_total
*
* @param decimal $ti_total
* @return Invoice
*/
public function setTiTotal($ti_total)
{
$this->ti_total = $ti_total;
return $this;
}
/**
* Get ti_total
*
* @return decimal
*/
public function getTiTotal()
{
return $this->ti_total;
}
/**
* Set ti_cash
*
* @param decimal $ti_cash
* @return Invoice
*/
public function setTiCash($ti_cash)
{
$this->ti_cash = $ti_cash;
return $this;
}
/**
* Get ti_cash
*
* @return decimal
*/
public function getTiCash()
{
return $this->ti_cash;
}
/**
* Set ti_attachment
*
* @param string $ti_attachment
* @return Invoice
*/
public function setTiAttachment($ti_attachment)
{
$this->ti_attachment = $ti_attachment;
return $this;
}
/**
* Get ti_attachment
*
* @return string
*/
public function getTiAttachment()
{
return $this->ti_attachment;
}
/**
* Set stamp_text
*
* @param string $stamp_text
* @return Invoice
*/
public function setStampText($stamp_text)
{
$this->stamp_text = $stamp_text;
return $this;
}
/**
* Get stamp_text
*
* @return string
*/
public function getStampText()
{
return $this->stamp_text;
}
/**
* Set stamp_total
*
* @param decimal $stamp_total
* @return Invoice
*/
public function setStampTotal($stamp_total)
{
$this->stamp_total = $stamp_total;
return $this;
}
/**
* Get stamp_total
*
* @return decimal
*/
public function getStampTotal()
{
return $this->stamp_total;
}
/**
* Set stamp_cost
*
* @param decimal $stamp_cost
* @return Invoice
*/
public function setStampCost($stamp_cost)
{
$this->stamp_cost = $stamp_cost;
return $this;
}
/**
* Get stamp_cost
*
* @return decimal
*/
public function getStampCost()
{
return $this->stamp_cost;
}
/**
* Set online_payment
*
* @param decimal $online_payment
* @return Invoice
*/
public function setOnlinePayment($online_payment)
{
$this->online_payment = $online_payment;
return $this;
}
/**
* Get online_payment
*
* @return decimal
*/
public function getOnlinePayment()
{
return $this->online_payment;
}
/**
* Set additional_form
*
* @param decimal $additional_form
* @return Invoice
*/
public function setAdditionalForm($additional_form)
{
$this->additional_form = $additional_form;
return $this;
}
/**
* Get additional_form
*
* @return decimal
*/
public function getAdditionalForm()
{
return $this->additional_form;
}
/**
* Set unload_load
*
* @param decimal $unload_load
* @return Invoice
*/
public function setUnloadLoad($unload_load)
{
$this->unload_load = $unload_load;
return $this;
}
/**
* Get unload_load
*
* @return decimal
*/
public function getUnloadLoad()
{
return $this->unload_load;
}
/**
* Set ramp
*
* @param decimal $ramp
* @return Invoice
*/
public function setRamp($ramp)
{
$this->ramp = $ramp;
return $this;
}
/**
* Get ramp
*
* @return decimal
*/
public function getRamp()
{
return $this->ramp;
}
/**
* Set forklift
*
* @param decimal $forklift
* @return Invoice
*/
public function setForklift($forklift)
{
$this->forklift = $forklift;
return $this;
}
/**
* Get forklift
*
* @return decimal
*/
public function getForklift()
{
return $this->forklift;
}
/**
* Set overtime
*
* @param decimal $overtime
* @return Invoice
*/
public function setOvertime($overtime)
{
$this->overtime = $overtime;
return $this;
}
/**
* Get overtime
*
* @return decimal
*/
public function getOvertime()
{
return $this->overtime;
}
/**
* Set warehouse
*
* @param decimal $warehouse
* @return Invoice
*/
public function setWarehouse($warehouse)
{
$this->warehouse = $warehouse;
return $this;
}
/**
* Get warehouse
*
* @return decimal
*/
public function getWarehouse()
{
return $this->warehouse;
}
/**
* Set warehouse_text
*
* @param string $warehouse_text
* @return Invoice
*/
public function setWarehouseText($warehouse_text)
{
$this->warehouse_text = $warehouse_text;
return $this;
}
/**
* Get warehouse_text
*
* @return string
*/
public function getWarehouseText()
{
return $this->warehouse_text;
}
/**
* Set quarantine
*
* @param decimal $quarantine
* @return Invoice
*/
public function setQuarantine($quarantine)
{
$this->quarantine = $quarantine;
return $this;
}
/**
* Get quarantine
*
* @return decimal
*/
public function getQuarantine()
{
return $this->quarantine;
}
/**
* Set quarantine_bank_charge
*
* @param decimal $quarantine_bank_charge
* @return Invoice
*/
public function setQuarantineBankCharge($quarantine_bank_charge)
{
$this->quarantine_bank_charge = $quarantine_bank_charge;
return $this;
}
/**
* Get quarantine_bank_charge
*
* @return decimal
*/
public function getQuarantineBankCharge()
{
return $this->quarantine_bank_charge;
}
/**
* Set apa
*
* @param decimal $apa
* @return Invoice
*/
public function setApa($apa)
{
$this->apa = $apa;
return $this;
}
/**
* Get apa
*
* @return decimal
*/
public function getApa()
{
return $this->apa;
}
/**
* Set total
*
* @param decimal $total
* @return Invoice
*/
public function setTotal($total)
{
$this->total = $total;
return $this;
}
/**
* Get total
*
* @return decimal
*/
public function getTotal()
{
return $this->total;
}
/**
* Set expense
*
* @param decimal $expense
* @return Invoice
*/
public function setExpense($expense)
{
$this->expense = $expense;
return $this;
}
/**
* Get expense
*
* @return decimal
*/
public function getExpense()
{
return $this->expense;
}
/**
* Set profit
*
* @param decimal $profit
* @return Invoice
*/
public function setProfit($profit)
{
$this->profit = $profit;
return $this;
}
/**
* Get profit
*
* @return decimal
*/
public function getProfit()
{
return $this->profit;
}
/**
* Set invoice_date
*
* @param \DateTime $invoice_date
* @return Invoice
*/
public function setInvoiceDate($invoice_date)
{
$this->invoice_date = $invoice_date;
return $this;
}
/**
* Get invoice_date
*
* @return \DateTime
*/
public function getInvoiceDate()
{
return $this->invoice_date;
}
/**
* Set due_date
*
* @param \DateTime $due_date
* @return Invoice
*/
public function setDueDate($due_date)
{
$this->due_date = $due_date;
return $this;
}
/**
* Get due_date
*
* @return \DateTime
*/
public function getDueDate()
{
return $this->due_date;
}
/**
* Set paid
*
* @param boolean $paid
* @return Invoice
*/
public function setPaid($paid)
{
$this->paid = $paid;
return $this;
}
/**
* Get paid
*
* @return boolean
*/
public function getPaid()
{
return $this->paid;
}
/**
* Set paid_date
*
* @param boolean $paid_date
* @return Invoice
*/
public function setPaidDate($paid_date)
{
$this->paid_date = $paid_date;
return $this;
}
/**
* Get paid_date
*
* @return boolean
*/
public function getPaidDate()
{
return $this->paid_date;
}
/**
* Set paid_by
*
* @param \App\Entity\User\User $paid_by
* @return Invoice
*/
public function setPaidBy(\App\Entity\User\User $paid_by = null)
{
$this->paid_by = $paid_by;
return $this;
}
/**
* Get paid_by
*
* @return \App\Entity\User\User
*/
public function getPaidBy()
{
return $this->paid_by;
}
/**
* Set deleted
*
* @param boolean $deleted
* @return Invoice
*/
public function setDeleted($deleted)
{
$this->deleted = $deleted;
return $this;
}
/**
* Get deleted
*
* @return boolean
*/
public function getDeleted()
{
return $this->deleted;
}
/**
* Set customer
*
* @param \App\Entity\Customer\Customer $customer
* @return Invoice
*/
public function setCustomer(\App\Entity\Customer\Customer $customer = null)
{
$this->customer = $customer;
return $this;
}
/**
* Get customer
*
* @return \App\Entity\Customer\Customer
*/
public function getCustomer()
{
return $this->customer;
}
/**
* Get dmc_ins
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getDmcIns()
{
return $this->dmc_ins;
}
/**
* Get dmc_outs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getDmcOuts()
{
return $this->dmc_outs;
}
/**
* Get files
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getFiles()
{
return $this->files;
}
/**
* Set isdeleted
*
* @param boolean $isdeleted
* @return Register
*/
public function setIsdeleted($isdeleted)
{
$this->isdeleted = $isdeleted;
return $this;
}
/**
* Get isdeleted
*
* @return boolean
*/
public function getIsdeleted()
{
return $this->isdeleted;
}
/**
* Set created_by
*
* @param int $created_by
* @return Request
*/
public function setCreatedBy($created_by)
{
$this->created_by = $created_by;
return $this;
}
/**
* Get User
*
* @return \GEL\Bundle\Admin\UserBundle\Entity\User
*/
public function getCreatedBy()
{
return $this->created_by;
}
}