mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-10 05:18:43 +00:00
cleanup and tests added for ci/cd
This commit is contained in:
parent
fd3131d25f
commit
31f8dc494b
|
|
@ -180,31 +180,79 @@ class Invoice implements \JsonSerializable
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get invoice number.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getNumber() : string
|
||||
{
|
||||
return $this->number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set invoice number.
|
||||
*
|
||||
* @param string $number Invoice number
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setNumber(string $number) : void
|
||||
{
|
||||
$this->number = $number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getType() : int
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set type
|
||||
*
|
||||
* @param int $type Type
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setType(int $type) : void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getStatus() : int
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set status
|
||||
*
|
||||
* @param int $status Status
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setStatus(int $status) : void
|
||||
{
|
||||
$this->status = $status;
|
||||
|
|
@ -222,12 +270,28 @@ class Invoice implements \JsonSerializable
|
|||
return $this->createdAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping date.
|
||||
*
|
||||
* @param \DateTime $send Shipping date
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setSend(\DateTime $send) : void
|
||||
{
|
||||
$this->send = $send;
|
||||
}
|
||||
|
||||
public function getSend()
|
||||
/**
|
||||
* Get shipping date.
|
||||
*
|
||||
* @return null|\DateTime
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getSend() : ?\DateTime
|
||||
{
|
||||
return $this->send;
|
||||
}
|
||||
|
|
@ -244,306 +308,795 @@ class Invoice implements \JsonSerializable
|
|||
return $this->createdBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set creator.
|
||||
*
|
||||
* @param int $creator Creator
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCreatedBy(int $creator) : void
|
||||
{
|
||||
$this->createdBy = $creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get client.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getClient()
|
||||
{
|
||||
return $this->client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set client.
|
||||
*
|
||||
* @param mixed $client client
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setClient($client) : void
|
||||
{
|
||||
$this->client = $client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping receiver.
|
||||
*
|
||||
* @param string $ship Shipping receiver
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipTo(string $ship) : void
|
||||
{
|
||||
$this->shipTo = $ship;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping receiver.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipTo() : string
|
||||
{
|
||||
return $this->shipTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping fao.
|
||||
*
|
||||
* @param string $ship FAO
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipFAO(string $ship) : void
|
||||
{
|
||||
$this->shipFAO = $ship;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping fao.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipFAO() : string
|
||||
{
|
||||
return $this->shipFAO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping address.
|
||||
*
|
||||
* @param string $ship Shipping address
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipAddress(string $ship) : void
|
||||
{
|
||||
$this->shipAddress = $ship;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping address.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipAddress() : string
|
||||
{
|
||||
return $this->shipAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping city.
|
||||
*
|
||||
* @param string $ship City
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipCity(string $ship) : void
|
||||
{
|
||||
$this->shipCity = $ship;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping city.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipCity() : string
|
||||
{
|
||||
return $this->shipCity;
|
||||
}
|
||||
|
||||
public function setShipZip($ship) : void
|
||||
/**
|
||||
* Set shipping zip.
|
||||
*
|
||||
* @param string $ship Zip
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipZip(string $ship) : void
|
||||
{
|
||||
$this->shipZip = $ship;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping zip.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipZip() : string
|
||||
{
|
||||
return $this->shipZip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping country.
|
||||
*
|
||||
* @param string $ship Country
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipCountry(string $ship) : void
|
||||
{
|
||||
$this->shipCountry = $ship;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping country.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipCountry() : string
|
||||
{
|
||||
return $this->shipCountry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set billing receiver.
|
||||
*
|
||||
* @param string $bill Billing receiver
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBillTo(string $bill) : void
|
||||
{
|
||||
$this->billTo = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing receiver.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBillTo() : string
|
||||
{
|
||||
return $this->billTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set billing fao.
|
||||
*
|
||||
* @param string $bill FAO
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBillFAO(string $bill) : void
|
||||
{
|
||||
$this->billFAO = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing fao.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBillFAO() : string
|
||||
{
|
||||
return $this->billFAO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set billing address.
|
||||
*
|
||||
* @param string $bill Billing address
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBillAddress(string $bill) : void
|
||||
{
|
||||
$this->billAddress = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing address.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBillAddress() : string
|
||||
{
|
||||
return $this->billAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set billing city.
|
||||
*
|
||||
* @param string $bill City
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBillCity(string $bill) : void
|
||||
{
|
||||
$this->billCity = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing city.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBillCity() : string
|
||||
{
|
||||
return $this->billCity;
|
||||
}
|
||||
|
||||
public function setBillZip($bill) : void
|
||||
/**
|
||||
* Set billing zip.
|
||||
*
|
||||
* @param string $bill Zip
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBillZip(string $bill) : void
|
||||
{
|
||||
$this->billZip = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing zip.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBillZip() : string
|
||||
{
|
||||
return $this->billZip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set billing country.
|
||||
*
|
||||
* @param string $bill Country
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setBillCountry(string $bill) : void
|
||||
{
|
||||
$this->billCountry = $bill;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get billing country.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getBillCountry() : string
|
||||
{
|
||||
return $this->billCountry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set referer.
|
||||
*
|
||||
* @param int $referer Referer
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setReferer(int $referer) : void
|
||||
{
|
||||
$this->referer = $referer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get referer.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getReferer() : int
|
||||
{
|
||||
return $this->referer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set referer name.
|
||||
*
|
||||
* @param string $refererName Referer name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setRefererName(string $refererName) : void
|
||||
{
|
||||
$this->refererName = $refererName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get referer name.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getRefererName() : string
|
||||
{
|
||||
return $this->refererName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set tax id.
|
||||
*
|
||||
* @param string $tax Tax id
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTaxId(string $tax) : void
|
||||
{
|
||||
$this->taxId = $tax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tax id.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTaxId() : string
|
||||
{
|
||||
return $this->taxId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set insurance.
|
||||
*
|
||||
* @param Money $insurance Insurance fee
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setInsurance(Money $insurance) : void
|
||||
{
|
||||
$this->insurance = $insurance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get insurance.
|
||||
*
|
||||
* @return Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getInsurance() : Money
|
||||
{
|
||||
return $this->insurance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set freight.
|
||||
*
|
||||
* @param Money $freight Freight fee
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setFreight(Money $freight) : void
|
||||
{
|
||||
$this->freight = $freight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get freight.
|
||||
*
|
||||
* @return Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getFreight() : Money
|
||||
{
|
||||
return $this->freight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get net amount.
|
||||
*
|
||||
* @return Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getNet() : Money
|
||||
{
|
||||
return $this->net;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gross amount.
|
||||
*
|
||||
* @return Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getGross() : Money
|
||||
{
|
||||
return $this->gross;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set currency.
|
||||
*
|
||||
* @param string $currency Currency
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCurrency(string $currency) : void
|
||||
{
|
||||
$this->currency = $currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get currency.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getCurrency() : string
|
||||
{
|
||||
return $this->currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set info.
|
||||
*
|
||||
* @param string $info Info
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setInfo(string $info) : void
|
||||
{
|
||||
$this->info = $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getInfo() : string
|
||||
{
|
||||
return $this->info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set payment term.
|
||||
*
|
||||
* @param int $payment Payment term
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPayment(int $payment) : void
|
||||
{
|
||||
$this->payment = $payment;
|
||||
}
|
||||
|
||||
public function getPayment()
|
||||
/**
|
||||
* Get payment term.
|
||||
*
|
||||
* @return null|int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPayment() : ?int
|
||||
{
|
||||
return $this->payment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set payment text.
|
||||
*
|
||||
* @param string $payment Payment text
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPaymentText(string $payment) : void
|
||||
{
|
||||
$this->paymentText = $payment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get payment text.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPaymentText() : string
|
||||
{
|
||||
return $this->paymentText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping terms (e.g. inco).
|
||||
*
|
||||
* @param int $terms Terms
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTerms(int $terms) : void
|
||||
{
|
||||
$this->terms = $terms;
|
||||
}
|
||||
|
||||
public function getTerms()
|
||||
/**
|
||||
* Get terms.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTerms() : ?int
|
||||
{
|
||||
return $this->terms;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set terms text.
|
||||
*
|
||||
* @param string $terms Terms text
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTermsText(string $terms) : void
|
||||
{
|
||||
$this->termsText = $terms;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get terms text.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTermsText() : string
|
||||
{
|
||||
return $this->termsText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping.
|
||||
*
|
||||
* @param int $shipping Shipping (e.g. incoterm)
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShipping(int $shipping) : void
|
||||
{
|
||||
$this->shipping = $shipping;
|
||||
}
|
||||
|
||||
public function getShipping()
|
||||
/**
|
||||
* Get shipping.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShipping() : ?int
|
||||
{
|
||||
return $this->shipping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shipping text.
|
||||
*
|
||||
* @param string $shipping Shipping text
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setShippingText(string $shipping) : void
|
||||
{
|
||||
$this->shippingText = $shipping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shipping text.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getShippingText() : string
|
||||
{
|
||||
return $this->shippingText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get vouchers.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getVouchers() : array
|
||||
{
|
||||
return $this->vouchers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add voucher.
|
||||
*
|
||||
* @param string $voucher Voucher code
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addVoucher(string $voucher) : void
|
||||
{
|
||||
$this->vouchers[] = $voucher;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tracking ids for shipment.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTrackings() : array
|
||||
{
|
||||
return $this->trackings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add tracking id.
|
||||
*
|
||||
* @param string $tracking Tracking id
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @todo: do same for actual tracking information per trackign id
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addTracking(string $tracking) : void
|
||||
{
|
||||
$this->trackings[] = $tracking;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get invoice elements.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getElements() : array
|
||||
{
|
||||
return $this->elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add invoice element.
|
||||
*
|
||||
* @param mixed $element Invoice element
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function addElement($element) : void
|
||||
{
|
||||
$this->elements[] = $element;
|
||||
|
|
@ -552,8 +1105,8 @@ class Invoice implements \JsonSerializable
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function jsonSerialize() : void
|
||||
public function jsonSerialize()
|
||||
{
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ class InvoiceElement implements \JsonSerializable
|
|||
|
||||
private $singleDiscountR = 0;
|
||||
|
||||
private $totalDiscountR = null;
|
||||
|
||||
private $discountQ = 0;
|
||||
|
||||
private $singlePriceNet = null;
|
||||
|
|
@ -64,7 +62,7 @@ class InvoiceElement implements \JsonSerializable
|
|||
|
||||
private $taxP = null;
|
||||
|
||||
private $taxR = null;
|
||||
private $taxR = 0.0;
|
||||
|
||||
private $singlePriceGross = null;
|
||||
|
||||
|
|
@ -76,16 +74,6 @@ class InvoiceElement implements \JsonSerializable
|
|||
|
||||
private $invoice = 0;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*
|
||||
|
|
@ -98,197 +86,484 @@ class InvoiceElement implements \JsonSerializable
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set event.
|
||||
*
|
||||
* @param int $event Event
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setEvent(int $event) : void
|
||||
{
|
||||
$this->event = $event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get event.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getEvent()
|
||||
{
|
||||
return $this->event;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set promotion.
|
||||
*
|
||||
* @param int $promotion Promotion
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setPromotion(int $promotion) : void
|
||||
{
|
||||
$this->promotion = $promotion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get promotion.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getPromotion()
|
||||
{
|
||||
return $this->promotion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set order.
|
||||
*
|
||||
* @param int $order Order
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setOrder(int $order) : void
|
||||
{
|
||||
$this->order = $order;
|
||||
}
|
||||
|
||||
public function getorder() : int
|
||||
/**
|
||||
* Get order.
|
||||
*
|
||||
* @return int
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getOrder() : int
|
||||
{
|
||||
return $this->order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item.
|
||||
*
|
||||
* @param mixed $item Item
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setItem($item) : void
|
||||
{
|
||||
$this->item = $item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item name.
|
||||
*
|
||||
* @param string $name Name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setItemName(string $name) : void
|
||||
{
|
||||
$this->itemName = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get item name.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getItemName() : string
|
||||
{
|
||||
return $this->itemName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set item description.
|
||||
*
|
||||
* @param string $description Description
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setItemDescription(string $description) : void
|
||||
{
|
||||
$this->itemDescription = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get item description.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getItemDescripion() : string
|
||||
{
|
||||
return $this->itemDescription;
|
||||
}
|
||||
|
||||
public function setQuantity(int $quantity) : void
|
||||
/**
|
||||
* Set quantity.
|
||||
*
|
||||
* @param int|float $quantity Quantity
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setQuantity($quantity) : void
|
||||
{
|
||||
$this->quantity = $quantity;
|
||||
}
|
||||
|
||||
public function getQuantity() : int
|
||||
/**
|
||||
* Get quantity.
|
||||
*
|
||||
* @return int|float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getQuantity()
|
||||
{
|
||||
return $this->quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set single unit price.
|
||||
*
|
||||
* @param Money $price Single unit price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setSinglePrice(Money $price) : void
|
||||
{
|
||||
$this->singlePrice = $price;
|
||||
}
|
||||
|
||||
public function getSinglePrice() : Money
|
||||
/**
|
||||
* Get single unit price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getSinglePrice() : ?Money
|
||||
{
|
||||
return $this->singlePrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set total price.
|
||||
*
|
||||
* @param Money $price Total price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTotalPrice(Money $price) : void
|
||||
{
|
||||
$this->totalPrice = $price;
|
||||
}
|
||||
|
||||
public function getTotalPrice() : Money
|
||||
/**
|
||||
* Get total price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTotalPrice() : ?Money
|
||||
{
|
||||
return $this->totalPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set discount price.
|
||||
*
|
||||
* @param Money $discount Discount
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDiscountPrice(Money $discount) : void
|
||||
{
|
||||
$this->singleDiscountP = $discount;
|
||||
}
|
||||
|
||||
public function getDiscountPrice() : Money
|
||||
/**
|
||||
* Get discount price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDiscountPrice() : ?Money
|
||||
{
|
||||
return $this->singleDiscountP;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set total discount price.
|
||||
*
|
||||
* @param Money $discount Discount price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTotalDiscountPrice(Money $discount) : void
|
||||
{
|
||||
$this->totalDiscountP = $discount;
|
||||
}
|
||||
|
||||
public function getTotalDiscountPrice() : Money
|
||||
/**
|
||||
* Get total discount price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTotalDiscountPrice() : ?Money
|
||||
{
|
||||
return $this->totalDiscountP;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set discount percentage.
|
||||
*
|
||||
* @param float $discount Discount percentag
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDiscountPercentage(float $discount) : void
|
||||
{
|
||||
$this->singleDiscountR = $discount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get discount percentage.
|
||||
*
|
||||
* @return float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDiscountPercentage() : float
|
||||
{
|
||||
return $this->singleDiscountR;
|
||||
}
|
||||
|
||||
public function setTotalDiscountPercentage(float $discount) : void
|
||||
{
|
||||
$this->totalDiscountR = $discount;
|
||||
}
|
||||
|
||||
public function getTotalDiscountPercentage() : float
|
||||
{
|
||||
return $this->totalDiscountR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set discount quantity.
|
||||
*
|
||||
* @param int|float $quantity Quantity
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDiscountQuantity($quantity) : void
|
||||
{
|
||||
$this->discountQ = $quantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get discount quantity.
|
||||
*
|
||||
* @return int|float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDiscountQuantity()
|
||||
{
|
||||
return $this->discountQ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set single net price.
|
||||
*
|
||||
* @param Money $price Net price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setSingleNetPrice(Money $price) : void
|
||||
{
|
||||
$this->singlePriceNet = $price;
|
||||
}
|
||||
|
||||
public function getSingleNetPrice() : Money
|
||||
/**
|
||||
* Get single net price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getSingleNetPrice() : ?Money
|
||||
{
|
||||
return $this->singlePriceNet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set total net price.
|
||||
*
|
||||
* @param Money $price Total net price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTotalNetPrice(Money $price) : void
|
||||
{
|
||||
$this->totalPriceNet = $price;
|
||||
}
|
||||
|
||||
public function getTotalNetPrice() : Money
|
||||
/**
|
||||
* Get total net price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTotalNetPrice() : ?Money
|
||||
{
|
||||
return $this->totalPriceNet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set tax price.
|
||||
*
|
||||
* @param Money $tax Tax price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTaxPrice(Money $tax) : void
|
||||
{
|
||||
$this->taxP = $tax;
|
||||
}
|
||||
|
||||
public function getTaxPrice() : Money
|
||||
/**
|
||||
* Get tax price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTaxPrice() : ?Money
|
||||
{
|
||||
return $this->taxP;
|
||||
}
|
||||
|
||||
public function setTaxPercentag(float $tax) : void
|
||||
/**
|
||||
* Set tax rate.
|
||||
*
|
||||
* @param float $tax Tax rate
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTaxPercentage(float $tax) : void
|
||||
{
|
||||
$this->taxR = $tax;
|
||||
}
|
||||
|
||||
public function getTaxPercentag() : float
|
||||
/**
|
||||
* Get tax rate.
|
||||
*
|
||||
* @return float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTaxPercentage() : float
|
||||
{
|
||||
return $this->taxR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set single gross price.
|
||||
*
|
||||
* @param Money $price Single gross price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setSingleGrossPrice(Money $price) : void
|
||||
{
|
||||
$this->singlePriceGross = $price;
|
||||
}
|
||||
|
||||
public function getSingleGrossPrice() : Money
|
||||
/**
|
||||
* Get single gross price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getSingleGrossPrice() : ?Money
|
||||
{
|
||||
return $this->singlePriceGross;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set total gross price.
|
||||
*
|
||||
* @param Money $price Total gross price
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setTotalGrossPrice(Money $price) : void
|
||||
{
|
||||
$this->totalPriceGross = $price;
|
||||
}
|
||||
|
||||
public function getTotalGrossPrice() : Money
|
||||
/**
|
||||
* Get total gross price.
|
||||
*
|
||||
* @return null|Money
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getTotalGrossPrice() : ?Money
|
||||
{
|
||||
return $this->totalPriceGross;
|
||||
}
|
||||
|
|
@ -296,8 +571,8 @@ class InvoiceElement implements \JsonSerializable
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function jsonSerialize() : void
|
||||
public function jsonSerialize()
|
||||
{
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user