mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-21 21:44:01 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c1343f45a5 |
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\General\Eloquent\Filters;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
|
||||||
|
class Receiver implements Filter
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Builder $builder
|
||||||
|
* @param $value
|
||||||
|
* @return Builder|mixed
|
||||||
|
*/
|
||||||
|
public static function apply(Builder $builder, $value)
|
||||||
|
{
|
||||||
|
return $builder->where('receiver', '=', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ namespace App\Classes\Modules\Companies\ControllersLogic;
|
|||||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||||
use App\Classes\Modules\PackingLists\Services\ListsPackingLists;
|
use App\Classes\Modules\PackingLists\Services\ListsPackingLists;
|
||||||
use App\Classes\Modules\Transactions\Services\ListsTransactions;
|
use App\Classes\Modules\Transactions\Services\ListsTransactions;
|
||||||
|
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
|
||||||
use App\Classes\Modules\PackingLists\Standards\Rules\CanListPackingLists;
|
use App\Classes\Modules\PackingLists\Standards\Rules\CanListPackingLists;
|
||||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||||
@@ -35,16 +36,21 @@ class ListCompanyModuleInvoicesLogic extends AbstractControllerLogic
|
|||||||
/** @var ListsPackingLists */
|
/** @var ListsPackingLists */
|
||||||
private $listsPackingLists;
|
private $listsPackingLists;
|
||||||
|
|
||||||
|
/** @var FetchesCompanyModule */
|
||||||
|
private $fetchesCompanyModule;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ListCompanyModuleInvoicesLogic constructor.
|
* ListCompanyModuleInvoicesLogic constructor.
|
||||||
* @param CanListPackingLists $canListPackingLists
|
* @param CanListPackingLists $canListPackingLists
|
||||||
* @param ListsPackingLists $listsPackingLists
|
* @param ListsPackingLists $listsPackingLists
|
||||||
|
* @param FetchesCompanyModule $fetchesCompanyModule
|
||||||
*/
|
*/
|
||||||
public function __construct(CanListPackingLists $canListPackingLists, ListsPackingLists $listsPackingLists, ListsTransactions $listsTransactions)
|
public function __construct(CanListPackingLists $canListPackingLists, ListsPackingLists $listsPackingLists, ListsTransactions $listsTransactions, FetchesCompanyModule $fetchesCompanyModule)
|
||||||
{
|
{
|
||||||
$this->canListPackingLists = $canListPackingLists;
|
$this->canListPackingLists = $canListPackingLists;
|
||||||
$this->listsPackingLists = $listsPackingLists;
|
$this->listsPackingLists = $listsPackingLists;
|
||||||
$this->listsTransactions = $listsTransactions;
|
$this->listsTransactions = $listsTransactions;
|
||||||
|
$this->fetchesCompanyModule = $fetchesCompanyModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -57,12 +63,16 @@ class ListCompanyModuleInvoicesLogic extends AbstractControllerLogic
|
|||||||
*/
|
*/
|
||||||
public function logic(Request $request): JsonResponse
|
public function logic(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
|
$companyModule = $this->fetchesCompanyModule->execute(['company_id' => $request->route('id')]);
|
||||||
|
|
||||||
$filterArray = [
|
$filterArray = [
|
||||||
"per_page" => 10,
|
"per_page" => 10,
|
||||||
"order_by" => (object)[
|
"order_by" => (object)[
|
||||||
"column" => 'id',
|
"column" => 'id',
|
||||||
"DESC" => true,
|
"DESC" => true,
|
||||||
],
|
],
|
||||||
|
"status_in" => [2],
|
||||||
|
"receiver" => intval($companyModule->id),
|
||||||
"type" => TransactionType::SHIPPING_INVOICE
|
"type" => TransactionType::SHIPPING_INVOICE
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row" v-if="company">
|
<div class="row" v-if="company">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<p>ok</p>
|
<p>{{ company }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user