large commit

This commit is contained in:
omair saleh
2021-03-11 13:06:02 +08:00
parent 13ddf458db
commit 05401f6bbc
729 changed files with 23312 additions and 7218 deletions
@@ -2,112 +2,72 @@
namespace App\Classes\Modules\Transactions\DataTransferObjects;
use App\Classes\Interfaces\DataTransferObject;
use App\Classes\General\Interfaces\DataTransferObject;
class TransactionDetailObject implements DataTransferObject
{
/** @var string */
private $code;
/*
*
* $table->string('trans_type1');
$table->string('trans_type2');
$table->bigInteger('transaction_id')->unsigned();
$table->string('product_code');
$table->string('product_name');
$table->integer('qty')->default(0);
$table->decimal('price', 14, 5)->default(0.00);
$table->decimal('amount', 14, 5)->default(0.00);
*/
private $trans_type1;
private $trans_type2;
private $transaction_id;
private $product_code;
private $product_name;
private $qty;
/** @var string */
private $name;
/** @var int */
private $quantity;
/** @var float */
private $price;
private $amount;
public function __construct(
string $trans_type1,string $trans_type2,
int $transaction_id, string $product_code, $product_name,
int $qty, float $price,float $amount
){
$this->trans_type1= $trans_type1;
$this->trans_type2 = $trans_type2;
$this->transaction_id = $transaction_id;
$this->product_code = $product_code;
$this->product_name = $product_name;
$this->qty = $qty;
/**
* TransactionDetailObject constructor.
* @param string $code
* @param string $name
* @param int $quantity
* @param float $price
*/
public function __construct(string $code, string $name, int $quantity, float $price)
{
$this->code = $code;
$this->name = $name;
$this->quantity = $quantity;
$this->price = $price;
$this->amount = $amount;
}
/**
* @return string
*/
public function getTransType1(): string
public function getCode(): string
{
return $this->trans_type1;
return $this->code;
}
/**
* @return string
*/
public function getTransType2(): string
public function getName(): string
{
return $this->trans_type2;
return $this->name;
}
/**
* @return int
*/
public function getTransactionId(): int
public function getQuantity(): int
{
return $this->transaction_id;
return $this->quantity;
}
/**
* @return string
* @return float
*/
public function getProductCode(): string
{
return $this->product_code;
}
/**
* @return string
*/
public function getProductName(): string
{
return $this->product_name;
}
/**
* @return int
*/
public function getQty(): int
{
return $this->qty;
}
public function getPrice(): float
{
return $this->price;
}
public function getAmount(): float
{
return $this->amount;
return $this->getQuantity() * $this->getPrice();
}
}