mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-02-16 00:28:41 +00:00
cleanup and tests added for ci/cd
This commit is contained in:
parent
5572d75e27
commit
f5e743b10c
|
|
@ -18,7 +18,7 @@ use Modules\Media\Models\Media;
|
||||||
use Modules\Profile\Models\Profile;
|
use Modules\Profile\Models\Profile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Account class.
|
* Supplier class.
|
||||||
*
|
*
|
||||||
* @package Modules\SupplierManagement\Models
|
* @package Modules\SupplierManagement\Models
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
|
|
@ -35,9 +35,9 @@ class Supplier
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
protected int $id = 0;
|
||||||
|
|
||||||
private $number = '';
|
private string $number = '';
|
||||||
|
|
||||||
private $numberReverse = '';
|
private string $numberReverse = '';
|
||||||
|
|
||||||
private int $status = 0;
|
private int $status = 0;
|
||||||
|
|
||||||
|
|
@ -80,66 +80,162 @@ class Supplier
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get number.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getNumber() : string
|
public function getNumber() : string
|
||||||
{
|
{
|
||||||
return $this->number;
|
return $this->number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set number.
|
||||||
|
*
|
||||||
|
* @param string $number Number
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setNumber(string $number) : void
|
public function setNumber(string $number) : void
|
||||||
{
|
{
|
||||||
$this->number = $number;
|
$this->number = $number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getReverseNumber()
|
/**
|
||||||
|
* Get reverse number.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getReverseNumber() : string
|
||||||
{
|
{
|
||||||
return $this->numberReverse;
|
return $this->numberReverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setReverseNumber($rev_no) : void
|
/**
|
||||||
|
* Set revers number.
|
||||||
|
*
|
||||||
|
* @param string $numberReverse Reverse number
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setReverseNumber(string $numberReverse) : void
|
||||||
{
|
{
|
||||||
if (!\is_scalar($rev_no)) {
|
if (!\is_scalar($numberReverse)) {
|
||||||
throw new \Exception();
|
throw new \Exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->numberReverse = $rev_no;
|
$this->numberReverse = $numberReverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get status.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getStatus() : int
|
public function getStatus() : int
|
||||||
{
|
{
|
||||||
return $this->status;
|
return $this->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set status.
|
||||||
|
*
|
||||||
|
* @param int $status Status
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setStatus(int $status) : void
|
public function setStatus(int $status) : void
|
||||||
{
|
{
|
||||||
$this->status = $status;
|
$this->status = $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get supplier type.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getType() : int
|
public function getType() : int
|
||||||
{
|
{
|
||||||
return $this->type;
|
return $this->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set supplier type.
|
||||||
|
*
|
||||||
|
* @param int $type Type
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setType(int $type) : void
|
public function setType(int $type) : void
|
||||||
{
|
{
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tax id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getTaxId() : int
|
public function getTaxId() : int
|
||||||
{
|
{
|
||||||
return $this->taxId;
|
return $this->taxId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set tax id.
|
||||||
|
*
|
||||||
|
* @param int $taxId Tax id
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setTaxId(int $taxId) : void
|
public function setTaxId(int $taxId) : void
|
||||||
{
|
{
|
||||||
$this->taxId = $taxId;
|
$this->taxId = $taxId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get info.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getInfo() : string
|
public function getInfo() : string
|
||||||
{
|
{
|
||||||
return $this->info;
|
return $this->info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setInfo(string $info) : void /* : void */
|
/**
|
||||||
|
* Set info.
|
||||||
|
*
|
||||||
|
* @param string $info Info
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setInfo(string $info) : void
|
||||||
{
|
{
|
||||||
$this->info = $info;
|
$this->info = $info;
|
||||||
}
|
}
|
||||||
|
|
@ -156,31 +252,77 @@ class Supplier
|
||||||
return $this->createdAt;
|
return $this->createdAt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get profile.
|
||||||
|
*
|
||||||
|
* @return Profile
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getProfile() : Profile
|
public function getProfile() : Profile
|
||||||
{
|
{
|
||||||
return $this->profile;
|
return $this->profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set profile.
|
||||||
|
*
|
||||||
|
* @param Profile $profile Profile
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setProfile(Profile $profile) : void
|
public function setProfile(Profile $profile) : void
|
||||||
{
|
{
|
||||||
$this->profile = $profile;
|
$this->profile = $profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get media.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getFiles() : array
|
public function getFiles() : array
|
||||||
{
|
{
|
||||||
return $this->files;
|
return $this->files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add media.
|
||||||
|
*
|
||||||
|
* @param Media $file Media
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function addFile(Media $file) : void
|
public function addFile(Media $file) : void
|
||||||
{
|
{
|
||||||
$this->files[] = $file;
|
$this->files[] = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get addresses.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getAddresses() : array
|
public function getAddresses() : array
|
||||||
{
|
{
|
||||||
return $this->address;
|
return $this->address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get contacts.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getContactElements() : array
|
public function getContactElements() : array
|
||||||
{
|
{
|
||||||
return $this->contactElements;
|
return $this->contactElements;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user