mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
9ed67e74e2
- Supplier (AP) - PO - DO - INV - Customer (AR) - PO - DO - INV
50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Transactions\Standards\Rules;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Transactions\Standards\Validators\TransactionDetailValidation;
|
|
|
|
class CanCreateTransactionDetail extends AbstractRule
|
|
{
|
|
|
|
/** @var WalletTransactionValidation */
|
|
private $transactionDetailValidation;
|
|
|
|
|
|
public function __construct(TransactionDetailValidation $transactionDetailValidation)
|
|
{
|
|
$this->transactionDetailValidation = $transactionDetailValidation;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @param CompanyWalletValidation $object
|
|
* @return bool
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return $this->transactionDetailValidation->validate($object);
|
|
}
|
|
|
|
/**
|
|
* @param SegmentCompanyValidation $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} |